repo
stringclasses
11 values
path
stringlengths
41
234
func_name
stringlengths
5
78
original_string
stringlengths
71
14.1k
language
stringclasses
1 value
code
stringlengths
71
14.1k
code_tokens
listlengths
22
2.65k
docstring
stringlengths
2
5.35k
docstring_tokens
listlengths
1
369
sha
stringclasses
11 values
url
stringlengths
129
339
partition
stringclasses
1 value
summary
stringlengths
7
175
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java
ClassUtil.isSimpleValueType
public static boolean isSimpleValueType(Class<?> clazz) { return isBasicType(clazz) // || clazz.isEnum() // || CharSequence.class.isAssignableFrom(clazz) // || Number.class.isAssignableFrom(clazz) // || Date.class.isAssignableFrom(clazz) // || clazz.equals(URI.class) // || clazz.equals(...
java
public static boolean isSimpleValueType(Class<?> clazz) { return isBasicType(clazz) // || clazz.isEnum() // || CharSequence.class.isAssignableFrom(clazz) // || Number.class.isAssignableFrom(clazz) // || Date.class.isAssignableFrom(clazz) // || clazz.equals(URI.class) // || clazz.equals(...
[ "public", "static", "boolean", "isSimpleValueType", "(", "Class", "<", "?", ">", "clazz", ")", "{", "return", "isBasicType", "(", "clazz", ")", "//\r", "||", "clazz", ".", "isEnum", "(", ")", "//\r", "||", "CharSequence", ".", "class", ".", "isAssignableFr...
是否为简单值类型<br> 包括:原始类型,、String、other CharSequence, a Number, a Date, a URI, a URL, a Locale or a Class. @param clazz 类 @return 是否为简单值类型
[ "是否为简单值类型<br", ">", "包括:原始类型", "、String、other", "CharSequence", "a", "Number", "a", "Date", "a", "URI", "a", "URL", "a", "Locale", "or", "a", "Class", "." ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java#L747-L757
train
Returns true if the given class is a simple value type.
[ 30522, 2270, 10763, 22017, 20898, 26354, 5714, 10814, 10175, 23361, 18863, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1007, 1063, 2709, 2003, 22083, 2594, 13874, 1006, 18856, 10936, 2480, 1007, 1013, 1013, 1064, 1064, 30524, 1013, 1064...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
FlinkKafkaConsumerBase.setStartFromTimestamp
protected FlinkKafkaConsumerBase<T> setStartFromTimestamp(long startupOffsetsTimestamp) { checkArgument(startupOffsetsTimestamp >= 0, "The provided value for the startup offsets timestamp is invalid."); long currentTimestamp = System.currentTimeMillis(); checkArgument(startupOffsetsTimestamp <= currentTimestamp,...
java
protected FlinkKafkaConsumerBase<T> setStartFromTimestamp(long startupOffsetsTimestamp) { checkArgument(startupOffsetsTimestamp >= 0, "The provided value for the startup offsets timestamp is invalid."); long currentTimestamp = System.currentTimeMillis(); checkArgument(startupOffsetsTimestamp <= currentTimestamp,...
[ "protected", "FlinkKafkaConsumerBase", "<", "T", ">", "setStartFromTimestamp", "(", "long", "startupOffsetsTimestamp", ")", "{", "checkArgument", "(", "startupOffsetsTimestamp", ">=", "0", ",", "\"The provided value for the startup offsets timestamp is invalid.\"", ")", ";", ...
Version-specific subclasses which can expose the functionality should override and allow public access.
[ "Version", "-", "specific", "subclasses", "which", "can", "expose", "the", "functionality", "should", "override", "and", "allow", "public", "access", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java#L411-L422
train
Sets the start time of the Kafka consumer from the provided timestamp.
[ 30522, 5123, 13109, 19839, 2912, 24316, 22684, 3619, 17897, 28483, 3366, 1026, 1056, 1028, 4520, 7559, 24475, 21716, 7292, 9153, 8737, 1006, 2146, 22752, 27475, 8454, 7292, 9153, 8737, 1007, 1063, 4638, 2906, 22850, 4765, 1006, 22752, 27475, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/cookie/CookieUtil.java
CookieUtil.validCookieNameOctets
private static BitSet validCookieNameOctets() { BitSet bits = new BitSet(); for (int i = 32; i < 127; i++) { bits.set(i); } int[] separators = new int[] { '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t' }; ...
java
private static BitSet validCookieNameOctets() { BitSet bits = new BitSet(); for (int i = 32; i < 127; i++) { bits.set(i); } int[] separators = new int[] { '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t' }; ...
[ "private", "static", "BitSet", "validCookieNameOctets", "(", ")", "{", "BitSet", "bits", "=", "new", "BitSet", "(", ")", ";", "for", "(", "int", "i", "=", "32", ";", "i", "<", "127", ";", "i", "++", ")", "{", "bits", ".", "set", "(", "i", ")", ...
| "{" | "}" | SP | HT
[ "|", "{", "|", "}", "|", "SP", "|", "HT" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/cookie/CookieUtil.java#L36-L47
train
Returns a BitSet of valid cookie name octets.
[ 30522, 2797, 10763, 9017, 3388, 9398, 3597, 23212, 8189, 26247, 6593, 8454, 1006, 1007, 1063, 9017, 3388, 9017, 1027, 2047, 9017, 3388, 1006, 1007, 1025, 2005, 1006, 20014, 1045, 1027, 3590, 1025, 1045, 1026, 13029, 1025, 1045, 1009, 1009, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/sax/Excel07SaxReader.java
Excel07SaxReader.fetchSheetReader
private XMLReader fetchSheetReader() throws SAXException { XMLReader xmlReader = null; try { xmlReader = XMLReaderFactory.createXMLReader(CLASS_SAXPARSER); } catch (SAXException e) { if (e.getMessage().contains("org.apache.xerces.parsers.SAXParser")) { throw new DependencyException(e, "You need to...
java
private XMLReader fetchSheetReader() throws SAXException { XMLReader xmlReader = null; try { xmlReader = XMLReaderFactory.createXMLReader(CLASS_SAXPARSER); } catch (SAXException e) { if (e.getMessage().contains("org.apache.xerces.parsers.SAXParser")) { throw new DependencyException(e, "You need to...
[ "private", "XMLReader", "fetchSheetReader", "(", ")", "throws", "SAXException", "{", "XMLReader", "xmlReader", "=", "null", ";", "try", "{", "xmlReader", "=", "XMLReaderFactory", ".", "createXMLReader", "(", "CLASS_SAXPARSER", ")", ";", "}", "catch", "(", "SAXEx...
获取sheet的解析器 @param sharedStringsTable @return {@link XMLReader} @throws SAXException SAX异常
[ "获取sheet的解析器" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/sax/Excel07SaxReader.java#L366-L379
train
Fetch the XMLReader for the sheet.
[ 30522, 2797, 20950, 16416, 4063, 18584, 4095, 15558, 16416, 4063, 1006, 1007, 11618, 24937, 2595, 24422, 1063, 20950, 16416, 4063, 20950, 16416, 4063, 1027, 19701, 1025, 3046, 1063, 20950, 16416, 4063, 1027, 20950, 16416, 4063, 21450, 1012, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/mail/Mail.java
Mail.setFiles
public Mail setFiles(File... files) { DataSource[] attachments = new DataSource[files.length]; for (int i = 0; i < files.length; i++) { attachments[i] = new FileDataSource(files[i]); } return setAttachments(attachments); }
java
public Mail setFiles(File... files) { DataSource[] attachments = new DataSource[files.length]; for (int i = 0; i < files.length; i++) { attachments[i] = new FileDataSource(files[i]); } return setAttachments(attachments); }
[ "public", "Mail", "setFiles", "(", "File", "...", "files", ")", "{", "DataSource", "[", "]", "attachments", "=", "new", "DataSource", "[", "files", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "files", ".", "length", ";...
设置文件类型附件 @param files 附件文件列表 @return this
[ "设置文件类型附件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/mail/Mail.java#L174-L180
train
Sets the files to be uploaded.
[ 30522, 2270, 5653, 2275, 8873, 4244, 1006, 5371, 1012, 1012, 1012, 6764, 1007, 1063, 2951, 6499, 3126, 3401, 1031, 1033, 14449, 2015, 1027, 2047, 2951, 6499, 3126, 3401, 1031, 6764, 1012, 3091, 1033, 1025, 2005, 1006, 20014, 1045, 1027, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/AbstractConfigurableWebServerFactory.java
AbstractConfigurableWebServerFactory.createTempDir
protected final File createTempDir(String prefix) { try { File tempDir = File.createTempFile(prefix + ".", "." + getPort()); tempDir.delete(); tempDir.mkdir(); tempDir.deleteOnExit(); return tempDir; } catch (IOException ex) { throw new WebServerException( "Unable to create tempDir. java.io...
java
protected final File createTempDir(String prefix) { try { File tempDir = File.createTempFile(prefix + ".", "." + getPort()); tempDir.delete(); tempDir.mkdir(); tempDir.deleteOnExit(); return tempDir; } catch (IOException ex) { throw new WebServerException( "Unable to create tempDir. java.io...
[ "protected", "final", "File", "createTempDir", "(", "String", "prefix", ")", "{", "try", "{", "File", "tempDir", "=", "File", ".", "createTempFile", "(", "prefix", "+", "\".\"", ",", "\".\"", "+", "getPort", "(", ")", ")", ";", "tempDir", ".", "delete", ...
Return the absolute temp dir for given web server. @param prefix server name @return the temp dir for given server.
[ "Return", "the", "absolute", "temp", "dir", "for", "given", "web", "server", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/AbstractConfigurableWebServerFactory.java#L171-L185
train
Creates a temp directory.
[ 30522, 5123, 2345, 5371, 3443, 18532, 17299, 4313, 1006, 5164, 17576, 1007, 1063, 3046, 1063, 5371, 8915, 8737, 4305, 2099, 1027, 5371, 1012, 3443, 18532, 14376, 9463, 1006, 17576, 1009, 1000, 1012, 1000, 1010, 1000, 1012, 1000, 1009, 2131,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java
AbstractTrafficShapingHandler.setWriteLimit
public void setWriteLimit(long writeLimit) { this.writeLimit = writeLimit; if (trafficCounter != null) { trafficCounter.resetAccounting(TrafficCounter.milliSecondFromNano()); } }
java
public void setWriteLimit(long writeLimit) { this.writeLimit = writeLimit; if (trafficCounter != null) { trafficCounter.resetAccounting(TrafficCounter.milliSecondFromNano()); } }
[ "public", "void", "setWriteLimit", "(", "long", "writeLimit", ")", "{", "this", ".", "writeLimit", "=", "writeLimit", ";", "if", "(", "trafficCounter", "!=", "null", ")", "{", "trafficCounter", ".", "resetAccounting", "(", "TrafficCounter", ".", "milliSecondFrom...
<p>Note the change will be taken as best effort, meaning that all already scheduled traffics will not be changed, but only applied to new traffics.</p> <p>So the expected usage of this method is to be used not too often, accordingly to the traffic shaping configuration.</p> @param writeLimit the writeLimit to set
[ "<p", ">", "Note", "the", "change", "will", "be", "taken", "as", "best", "effort", "meaning", "that", "all", "already", "scheduled", "traffics", "will", "not", "be", "changed", "but", "only", "applied", "to", "new", "traffics", ".", "<", "/", "p", ">", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java#L289-L294
train
Sets the write limit.
[ 30522, 2270, 11675, 2275, 26373, 17960, 4183, 1006, 2146, 4339, 17960, 4183, 1007, 1063, 2023, 1012, 4339, 17960, 4183, 1027, 4339, 17960, 4183, 1025, 2065, 1006, 4026, 3597, 16671, 2121, 30524, 1012, 4971, 5562, 8663, 20952, 21716, 7229, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/util/SetCache.java
SetCache.getSortedGrouping
@SuppressWarnings("unchecked") public <T> SortedGrouping<T> getSortedGrouping(int id) { return verifyType(id, sortedGroupings.get(id), SetType.SORTED_GROUPING); }
java
@SuppressWarnings("unchecked") public <T> SortedGrouping<T> getSortedGrouping(int id) { return verifyType(id, sortedGroupings.get(id), SetType.SORTED_GROUPING); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "SortedGrouping", "<", "T", ">", "getSortedGrouping", "(", "int", "id", ")", "{", "return", "verifyType", "(", "id", ",", "sortedGroupings", ".", "get", "(", "id", ")", ",", "Se...
Returns the cached {@link SortedGrouping} for the given ID. @param id Set ID @param <T> SortedGrouping type @return Cached SortedGrouping @throws IllegalStateException if the cached set is not a SortedGrouping
[ "Returns", "the", "cached", "{", "@link", "SortedGrouping", "}", "for", "the", "given", "ID", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/util/SetCache.java#L182-L185
train
Gets the sorted grouping with the given id.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 1026, 1056, 1028, 19616, 17058, 2075, 1026, 1056, 1028, 4152, 15613, 17058, 2075, 1006, 20014, 8909, 1007, 1063, 2709, 20410, 13874, 1006, 8909, 1010, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/HandlerRequest.java
HandlerRequest.getPathParameter
public <X, PP extends MessagePathParameter<X>> X getPathParameter(Class<PP> parameterClass) { @SuppressWarnings("unchecked") PP pathParameter = (PP) pathParameters.get(parameterClass); Preconditions.checkState(pathParameter != null, "No parameter could be found for the given class."); return pathParameter.getVa...
java
public <X, PP extends MessagePathParameter<X>> X getPathParameter(Class<PP> parameterClass) { @SuppressWarnings("unchecked") PP pathParameter = (PP) pathParameters.get(parameterClass); Preconditions.checkState(pathParameter != null, "No parameter could be found for the given class."); return pathParameter.getVa...
[ "public", "<", "X", ",", "PP", "extends", "MessagePathParameter", "<", "X", ">", ">", "X", "getPathParameter", "(", "Class", "<", "PP", ">", "parameterClass", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "PP", "pathParameter", "=", "(", "P...
Returns the value of the {@link MessagePathParameter} for the given class. @param parameterClass class of the parameter @param <X> the value type that the parameter contains @param <PP> type of the path parameter @return path parameter value for the given class @throws IllegalStateException if no ...
[ "Returns", "the", "value", "of", "the", "{", "@link", "MessagePathParameter", "}", "for", "the", "given", "class", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/HandlerRequest.java#L118-L123
train
Gets the path parameter value for the given class.
[ 30522, 2270, 1026, 1060, 1010, 4903, 8908, 4471, 15069, 28689, 22828, 1026, 1060, 1028, 1028, 1060, 2131, 15069, 28689, 22828, 1006, 2465, 1026, 4903, 1028, 16381, 26266, 1007, 1063, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/YmlConfigBinder.java
YmlConfigBinder.bindYmlToObj
public static <T> T bindYmlToObj(String prefix, String content, Class<T> clazz, String charset, Properties baseProperties) { try { byte[] contentBytes; if (charset == null) { contentBytes = content.getBytes("UTF-8"); } else...
java
public static <T> T bindYmlToObj(String prefix, String content, Class<T> clazz, String charset, Properties baseProperties) { try { byte[] contentBytes; if (charset == null) { contentBytes = content.getBytes("UTF-8"); } else...
[ "public", "static", "<", "T", ">", "T", "bindYmlToObj", "(", "String", "prefix", ",", "String", "content", ",", "Class", "<", "T", ">", "clazz", ",", "String", "charset", ",", "Properties", "baseProperties", ")", "{", "try", "{", "byte", "[", "]", "con...
将当前内容指定前缀部分绑定到指定对象并用环境变量中的属性替换占位符, 例: 当前内容有属性 zkServers: ${zookeeper.servers} 在envProperties中有属性 zookeeper.servers: 192.168.0.1:2181,192.168.0.1:2181,192.168.0.1:2181 则当前内容 zkServers 会被替换为 zkServers: 192.168.0.1:2181,192.168.0.1:2181,192.168.0.1:2181 注: 假设绑定的类中 zkServers 属性是 List<String> 对象, 则会自动映射成List @param prefix ...
[ "将当前内容指定前缀部分绑定到指定对象并用环境变量中的属性替换占位符", "例", ":", "当前内容有属性", "zkServers", ":", "$", "{", "zookeeper", ".", "servers", "}", "在envProperties中有属性", "zookeeper", ".", "servers", ":", "192", ".", "168", ".", "0", ".", "1", ":", "2181", "192", ".", "168", ".", "0",...
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/YmlConfigBinder.java#L82-L154
train
Bind a yml string to an object.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 14187, 24335, 23223, 16429, 3501, 1006, 5164, 17576, 1010, 5164, 4180, 1010, 2465, 1026, 1056, 1028, 18856, 10936, 2480, 1010, 5164, 25869, 13462, 1010, 5144, 2918, 21572, 4842, 7368, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/ConfigurationParserUtils.java
ConfigurationParserUtils.getManagedMemorySize
public static long getManagedMemorySize(Configuration configuration) { long managedMemorySize; String managedMemorySizeDefaultVal = TaskManagerOptions.MANAGED_MEMORY_SIZE.defaultValue(); if (!configuration.getString(TaskManagerOptions.MANAGED_MEMORY_SIZE).equals(managedMemorySizeDefaultVal)) { try { manage...
java
public static long getManagedMemorySize(Configuration configuration) { long managedMemorySize; String managedMemorySizeDefaultVal = TaskManagerOptions.MANAGED_MEMORY_SIZE.defaultValue(); if (!configuration.getString(TaskManagerOptions.MANAGED_MEMORY_SIZE).equals(managedMemorySizeDefaultVal)) { try { manage...
[ "public", "static", "long", "getManagedMemorySize", "(", "Configuration", "configuration", ")", "{", "long", "managedMemorySize", ";", "String", "managedMemorySizeDefaultVal", "=", "TaskManagerOptions", ".", "MANAGED_MEMORY_SIZE", ".", "defaultValue", "(", ")", ";", "if...
Parses the configuration to get the managed memory size and validates the value. @param configuration configuration object @return managed memory size (in megabytes)
[ "Parses", "the", "configuration", "to", "get", "the", "managed", "memory", "size", "and", "validates", "the", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ConfigurationParserUtils.java#L41-L62
train
Get the managed memory size from the configuration.
[ 30522, 2270, 10763, 2146, 2131, 24805, 5999, 4168, 5302, 24769, 4697, 1006, 9563, 9563, 1007, 1063, 2146, 3266, 4168, 5302, 24769, 4697, 1025, 5164, 3266, 4168, 5302, 24769, 3550, 12879, 23505, 10175, 1027, 4708, 24805, 4590, 7361, 9285, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/InPlaceMutableHashTable.java
InPlaceMutableHashTable.rebuild
private void rebuild(long newNumBucketSegments) throws IOException { // Get new bucket segments releaseBucketSegments(); allocateBucketSegments((int)newNumBucketSegments); T record = buildSideSerializer.createInstance(); try { EntryIterator iter = getEntryIterator(); recordArea.resetAppendPosition(); ...
java
private void rebuild(long newNumBucketSegments) throws IOException { // Get new bucket segments releaseBucketSegments(); allocateBucketSegments((int)newNumBucketSegments); T record = buildSideSerializer.createInstance(); try { EntryIterator iter = getEntryIterator(); recordArea.resetAppendPosition(); ...
[ "private", "void", "rebuild", "(", "long", "newNumBucketSegments", ")", "throws", "IOException", "{", "// Get new bucket segments", "releaseBucketSegments", "(", ")", ";", "allocateBucketSegments", "(", "(", "int", ")", "newNumBucketSegments", ")", ";", "T", "record",...
Same as above, but the number of bucket segments of the new table can be specified.
[ "Same", "as", "above", "but", "the", "number", "of", "bucket", "segments", "of", "the", "new", "table", "can", "be", "specified", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/InPlaceMutableHashTable.java#L444-L472
train
Rebuilds the table.
[ 30522, 2797, 11675, 14591, 1006, 2146, 2047, 19172, 24204, 8454, 13910, 8163, 1007, 11618, 22834, 10288, 24422, 1063, 1013, 1013, 2131, 2047, 13610, 9214, 2713, 24204, 8454, 13910, 8163, 1006, 1007, 1025, 2035, 24755, 2618, 24204, 8454, 13910...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.flip
public static void flip(Image image, ImageOutputStream out) throws IORuntimeException { writeJpg(flip(image), out); }
java
public static void flip(Image image, ImageOutputStream out) throws IORuntimeException { writeJpg(flip(image), out); }
[ "public", "static", "void", "flip", "(", "Image", "image", ",", "ImageOutputStream", "out", ")", "throws", "IORuntimeException", "{", "writeJpg", "(", "flip", "(", "image", ")", ",", "out", ")", ";", "}" ]
水平翻转图像,写出格式为JPG @param image 图像 @param out 输出 @throws IORuntimeException IO异常 @since 3.2.2
[ "水平翻转图像,写出格式为JPG" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1106-L1108
train
Flips the image and writes it to the output stream.
[ 30522, 2270, 10763, 11675, 11238, 1006, 3746, 3746, 1010, 3746, 5833, 18780, 21422, 2041, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 4339, 3501, 26952, 1006, 11238, 1006, 3746, 1007, 1010, 2041, 1007, 1025, 1065, 102, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTags.java
WebClientExchangeTags.uri
public static Tag uri(ClientRequest request) { String uri = (String) request.attribute(URI_TEMPLATE_ATTRIBUTE) .orElseGet(() -> request.url().getPath()); return Tag.of("uri", extractPath(uri)); }
java
public static Tag uri(ClientRequest request) { String uri = (String) request.attribute(URI_TEMPLATE_ATTRIBUTE) .orElseGet(() -> request.url().getPath()); return Tag.of("uri", extractPath(uri)); }
[ "public", "static", "Tag", "uri", "(", "ClientRequest", "request", ")", "{", "String", "uri", "=", "(", "String", ")", "request", ".", "attribute", "(", "URI_TEMPLATE_ATTRIBUTE", ")", ".", "orElseGet", "(", "(", ")", "->", "request", ".", "url", "(", ")"...
Creates a {@code uri} {@code Tag} for the URI path of the given {@code request}. @param request the request @return the uri tag
[ "Creates", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTags.java#L82-L86
train
Get the URI of the request.
[ 30522, 2270, 10763, 6415, 24471, 2072, 1006, 7396, 2890, 15500, 5227, 1007, 1063, 5164, 24471, 2072, 1027, 1006, 5164, 1007, 5227, 1012, 17961, 1006, 24471, 2072, 1035, 23561, 1035, 17961, 1007, 1012, 10848, 4877, 24746, 2102, 1006, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/algorithm/ArrayCompare.java
ArrayCompare.compare
public static int compare(Long[] arrayA, Long[] arrayB) { int len1 = arrayA.length; int len2 = arrayB.length; int lim = Math.min(len1, len2); int k = 0; while (k < lim) { Long c1 = arrayA[k]; Long c2 = arrayB[k]; if (!c1.equals(c2)...
java
public static int compare(Long[] arrayA, Long[] arrayB) { int len1 = arrayA.length; int len2 = arrayB.length; int lim = Math.min(len1, len2); int k = 0; while (k < lim) { Long c1 = arrayA[k]; Long c2 = arrayB[k]; if (!c1.equals(c2)...
[ "public", "static", "int", "compare", "(", "Long", "[", "]", "arrayA", ",", "Long", "[", "]", "arrayB", ")", "{", "int", "len1", "=", "arrayA", ".", "length", ";", "int", "len2", "=", "arrayB", ".", "length", ";", "int", "lim", "=", "Math", ".", ...
比较数组A与B的大小关系 @param arrayA @param arrayB @return
[ "比较数组A与B的大小关系" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/algorithm/ArrayCompare.java#L26-L44
train
Compare two Long arrays.
[ 30522, 2270, 10763, 20014, 12826, 1006, 2146, 1031, 1033, 9140, 2050, 1010, 2146, 1031, 1033, 9140, 2497, 1007, 1063, 20014, 18798, 2487, 1027, 9140, 2050, 1012, 3091, 1025, 20014, 18798, 2475, 1027, 9140, 2497, 1012, 3091, 1025, 20014, 185...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/common/Vertex.java
Vertex.newOrganizationInstance
public static Vertex newOrganizationInstance(String realWord, int frequency) { return new Vertex(Predefine.TAG_GROUP, realWord, new CoreDictionary.Attribute(Nature.nt, frequency)); }
java
public static Vertex newOrganizationInstance(String realWord, int frequency) { return new Vertex(Predefine.TAG_GROUP, realWord, new CoreDictionary.Attribute(Nature.nt, frequency)); }
[ "public", "static", "Vertex", "newOrganizationInstance", "(", "String", "realWord", ",", "int", "frequency", ")", "{", "return", "new", "Vertex", "(", "Predefine", ".", "TAG_GROUP", ",", "realWord", ",", "new", "CoreDictionary", ".", "Attribute", "(", "Nature", ...
创建一个机构名实例 @param realWord @param frequency @return
[ "创建一个机构名实例" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/Vertex.java#L433-L436
train
Create an organization instance.
[ 30522, 2270, 10763, 19449, 2047, 21759, 7088, 9276, 7076, 26897, 1006, 5164, 2613, 18351, 1010, 20014, 6075, 1007, 1063, 2709, 2047, 19449, 1006, 3653, 3207, 23460, 1012, 6415, 1035, 2177, 1010, 2613, 18351, 1010, 2047, 4563, 29201, 3258, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileStateBackend.java
AbstractFileStateBackend.validatePath
private static Path validatePath(Path path) { final URI uri = path.toUri(); final String scheme = uri.getScheme(); final String pathPart = uri.getPath(); // some validity checks if (scheme == null) { throw new IllegalArgumentException("The scheme (hdfs://, file://, etc) is null. " + "Please specify t...
java
private static Path validatePath(Path path) { final URI uri = path.toUri(); final String scheme = uri.getScheme(); final String pathPart = uri.getPath(); // some validity checks if (scheme == null) { throw new IllegalArgumentException("The scheme (hdfs://, file://, etc) is null. " + "Please specify t...
[ "private", "static", "Path", "validatePath", "(", "Path", "path", ")", "{", "final", "URI", "uri", "=", "path", ".", "toUri", "(", ")", ";", "final", "String", "scheme", "=", "uri", ".", "getScheme", "(", ")", ";", "final", "String", "pathPart", "=", ...
Checks the validity of the path's scheme and path. @param path The path to check. @return The URI as a Path. @throws IllegalArgumentException Thrown, if the URI misses scheme or path.
[ "Checks", "the", "validity", "of", "the", "path", "s", "scheme", "and", "path", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/AbstractFileStateBackend.java#L180-L199
train
Validate the path.
[ 30522, 2797, 10763, 4130, 9398, 3686, 15069, 1006, 4130, 4130, 1007, 1063, 2345, 24471, 2072, 24471, 2072, 1027, 4130, 1012, 2778, 2072, 1006, 1007, 1025, 2345, 5164, 5679, 1027, 24471, 2072, 1012, 4152, 5403, 4168, 1006, 1007, 1025, 2345, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java
Pattern.times
public Pattern<T, F> times(int from, int to) { checkIfNoNotPattern(); checkIfQuantifierApplied(); this.quantifier = Quantifier.times(quantifier.getConsumingStrategy()); if (from == 0) { this.quantifier.optional(); from = 1; } this.times = Times.of(from, to); return this; }
java
public Pattern<T, F> times(int from, int to) { checkIfNoNotPattern(); checkIfQuantifierApplied(); this.quantifier = Quantifier.times(quantifier.getConsumingStrategy()); if (from == 0) { this.quantifier.optional(); from = 1; } this.times = Times.of(from, to); return this; }
[ "public", "Pattern", "<", "T", ",", "F", ">", "times", "(", "int", "from", ",", "int", "to", ")", "{", "checkIfNoNotPattern", "(", ")", ";", "checkIfQuantifierApplied", "(", ")", ";", "this", ".", "quantifier", "=", "Quantifier", ".", "times", "(", "qu...
Specifies that the pattern can occur between from and to times. @param from number of times matching event must appear at least @param to number of times matching event must appear at most @return The same pattern with the number of times range applied @throws MalformedPatternException if the quantifier is not applic...
[ "Specifies", "that", "the", "pattern", "can", "occur", "between", "from", "and", "to", "times", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java#L399-L409
train
Sets the times of this pattern.
[ 30522, 2270, 5418, 1026, 1056, 1010, 1042, 1028, 2335, 1006, 20014, 2013, 1010, 20014, 2000, 1007, 1063, 4638, 10128, 8540, 4140, 4502, 12079, 2078, 1006, 1007, 1025, 4638, 10128, 16211, 16778, 8873, 6906, 9397, 8751, 2094, 1006, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java
IncrementalRemoteKeyedStateHandle.createSharedStateRegistryKeyFromFileName
@VisibleForTesting public SharedStateRegistryKey createSharedStateRegistryKeyFromFileName(StateHandleID shId) { return new SharedStateRegistryKey(String.valueOf(backendIdentifier) + '-' + keyGroupRange, shId); }
java
@VisibleForTesting public SharedStateRegistryKey createSharedStateRegistryKeyFromFileName(StateHandleID shId) { return new SharedStateRegistryKey(String.valueOf(backendIdentifier) + '-' + keyGroupRange, shId); }
[ "@", "VisibleForTesting", "public", "SharedStateRegistryKey", "createSharedStateRegistryKeyFromFileName", "(", "StateHandleID", "shId", ")", "{", "return", "new", "SharedStateRegistryKey", "(", "String", ".", "valueOf", "(", "backendIdentifier", ")", "+", "'", "'", "+",...
Create a unique key to register one of our shared state handles.
[ "Create", "a", "unique", "key", "to", "register", "one", "of", "our", "shared", "state", "handles", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/IncrementalRemoteKeyedStateHandle.java#L267-L270
train
Create a SharedStateRegistryKey from the given state handle ID.
[ 30522, 1030, 5710, 13028, 4355, 2075, 2270, 4207, 9153, 3334, 13910, 2923, 2854, 14839, 9005, 8167, 2098, 9153, 3334, 13910, 2923, 2854, 14839, 19699, 5358, 8873, 20844, 4168, 1006, 2110, 11774, 23057, 2094, 11895, 2094, 1007, 1063, 2709, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/PythonOperationInfo.java
PythonOperationInfo.normalizeKeys
private static String[] normalizeKeys(Object keys) { if (keys instanceof Tuple) { Tuple tupleKeys = (Tuple) keys; if (tupleKeys.getArity() == 0) { return new String[0]; } if (tupleKeys.getField(0) instanceof Integer) { String[] stringKeys = new String[tupleKeys.getArity()]; for (int x = 0; x <...
java
private static String[] normalizeKeys(Object keys) { if (keys instanceof Tuple) { Tuple tupleKeys = (Tuple) keys; if (tupleKeys.getArity() == 0) { return new String[0]; } if (tupleKeys.getField(0) instanceof Integer) { String[] stringKeys = new String[tupleKeys.getArity()]; for (int x = 0; x <...
[ "private", "static", "String", "[", "]", "normalizeKeys", "(", "Object", "keys", ")", "{", "if", "(", "keys", "instanceof", "Tuple", ")", "{", "Tuple", "tupleKeys", "=", "(", "Tuple", ")", "keys", ";", "if", "(", "tupleKeys", ".", "getArity", "(", ")",...
====Utility=======================================================================================================
[ "====", "Utility", "=======================================================================================================" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/PythonOperationInfo.java#L141-L164
train
Normalizes the keys.
[ 30522, 2797, 10763, 5164, 1031, 1033, 3671, 4697, 14839, 2015, 1006, 4874, 6309, 1007, 1063, 2065, 1006, 6309, 6013, 11253, 10722, 10814, 1007, 1063, 10722, 10814, 10722, 10814, 14839, 2015, 1027, 1006, 10722, 10814, 1007, 6309, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/util/FileUtils.java
FileUtils.cleanDirectory
public static void cleanDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::cleanDirectoryInternal, directory); }
java
public static void cleanDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::cleanDirectoryInternal, directory); }
[ "public", "static", "void", "cleanDirectory", "(", "File", "directory", ")", "throws", "IOException", "{", "checkNotNull", "(", "directory", ",", "\"directory\"", ")", ";", "guardIfWindows", "(", "FileUtils", "::", "cleanDirectoryInternal", ",", "directory", ")", ...
Removes all files contained within a directory, without removing the directory itself. <p>This method is safe against other concurrent deletion attempts. @param directory The directory to remove all files from. @throws FileNotFoundException Thrown if the directory itself does not exist. @throws IOException Thrown if...
[ "Removes", "all", "files", "contained", "within", "a", "directory", "without", "removing", "the", "directory", "itself", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/FileUtils.java#L279-L283
train
Clean the directory.
[ 30522, 2270, 10763, 11675, 4550, 4305, 2890, 16761, 2100, 1006, 5371, 14176, 1007, 11618, 22834, 10288, 24422, 1063, 4638, 17048, 11231, 3363, 1006, 14176, 1010, 1000, 14176, 1000, 1007, 1025, 3457, 10128, 11101, 15568, 1006, 5371, 21823, 487...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-orc/src/main/java/org/apache/flink/orc/OrcBatchReader.java
OrcBatchReader.schemaToTypeInfo
static TypeInformation schemaToTypeInfo(TypeDescription schema) { switch (schema.getCategory()) { case BOOLEAN: return BasicTypeInfo.BOOLEAN_TYPE_INFO; case BYTE: return BasicTypeInfo.BYTE_TYPE_INFO; case SHORT: return BasicTypeInfo.SHORT_TYPE_INFO; case INT: return BasicTypeInfo.INT_TYPE_...
java
static TypeInformation schemaToTypeInfo(TypeDescription schema) { switch (schema.getCategory()) { case BOOLEAN: return BasicTypeInfo.BOOLEAN_TYPE_INFO; case BYTE: return BasicTypeInfo.BYTE_TYPE_INFO; case SHORT: return BasicTypeInfo.SHORT_TYPE_INFO; case INT: return BasicTypeInfo.INT_TYPE_...
[ "static", "TypeInformation", "schemaToTypeInfo", "(", "TypeDescription", "schema", ")", "{", "switch", "(", "schema", ".", "getCategory", "(", ")", ")", "{", "case", "BOOLEAN", ":", "return", "BasicTypeInfo", ".", "BOOLEAN_TYPE_INFO", ";", "case", "BYTE", ":", ...
Converts an ORC schema to a Flink TypeInformation. @param schema The ORC schema. @return The TypeInformation that corresponds to the ORC schema.
[ "Converts", "an", "ORC", "schema", "to", "a", "Flink", "TypeInformation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-orc/src/main/java/org/apache/flink/orc/OrcBatchReader.java#L72-L124
train
Convert a type description to a TypeInformation object.
[ 30522, 10763, 2828, 2378, 14192, 3370, 8040, 28433, 3406, 13874, 2378, 14876, 1006, 21189, 2229, 23235, 3258, 8040, 28433, 1007, 1063, 6942, 1006, 8040, 28433, 1012, 2131, 16280, 20255, 2100, 1006, 1007, 1007, 1063, 2553, 22017, 20898, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStream.java
PatternStream.select
public <R> SingleOutputStreamOperator<R> select( final PatternSelectFunction<T, R> patternSelectFunction, final TypeInformation<R> outTypeInfo) { final PatternProcessFunction<T, R> processFunction = fromSelect(builder.clean(patternSelectFunction)).build(); return process(processFunction, outTypeInfo); }
java
public <R> SingleOutputStreamOperator<R> select( final PatternSelectFunction<T, R> patternSelectFunction, final TypeInformation<R> outTypeInfo) { final PatternProcessFunction<T, R> processFunction = fromSelect(builder.clean(patternSelectFunction)).build(); return process(processFunction, outTypeInfo); }
[ "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "select", "(", "final", "PatternSelectFunction", "<", "T", ",", "R", ">", "patternSelectFunction", ",", "final", "TypeInformation", "<", "R", ">", "outTypeInfo", ")", "{", "final", "PatternP...
Applies a select function to the detected pattern sequence. For each pattern sequence the provided {@link PatternSelectFunction} is called. The pattern select function can produce exactly one resulting element. @param patternSelectFunction The pattern select function which is called for each detected pattern sequence....
[ "Applies", "a", "select", "function", "to", "the", "detected", "pattern", "sequence", ".", "For", "each", "pattern", "sequence", "the", "provided", "{", "@link", "PatternSelectFunction", "}", "is", "called", ".", "The", "pattern", "select", "function", "can", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStream.java#L158-L166
train
Select a single output stream using a pattern select function.
[ 30522, 2270, 1026, 1054, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1054, 1028, 7276, 1006, 2345, 7060, 12260, 6593, 11263, 27989, 1026, 1056, 1010, 1054, 1028, 7060, 12260, 6593, 11263, 27989, 1010, 2345, 2828, 2378, 14192, 3370, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java
ParameterTool.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { addToDefaults(key, Boolean.toString(defaultValue)); String value = get(key); if (value == null) { return defaultValue; } else { return Boolean.valueOf(value); } }
java
public boolean getBoolean(String key, boolean defaultValue) { addToDefaults(key, Boolean.toString(defaultValue)); String value = get(key); if (value == null) { return defaultValue; } else { return Boolean.valueOf(value); } }
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "addToDefaults", "(", "key", ",", "Boolean", ".", "toString", "(", "defaultValue", ")", ")", ";", "String", "value", "=", "get", "(", "key", ")", ";", "if"...
Returns the Boolean value for the given key. If the key does not exists it will return the default value given. The method returns whether the string of the value is "true" ignoring cases.
[ "Returns", "the", "Boolean", "value", "for", "the", "given", "key", ".", "If", "the", "key", "does", "not", "exists", "it", "will", "return", "the", "default", "value", "given", ".", "The", "method", "returns", "whether", "the", "string", "of", "the", "v...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L397-L405
train
Gets a boolean value.
[ 30522, 2270, 22017, 20898, 2131, 5092, 9890, 2319, 1006, 5164, 3145, 1010, 22017, 20898, 12398, 10175, 5657, 1007, 1063, 5587, 3406, 3207, 7011, 11314, 2015, 1006, 3145, 1010, 22017, 20898, 1012, 2000, 3367, 4892, 1006, 12398, 10175, 5657, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopUtils.java
HadoopUtils.paramsFromGenericOptionsParser
public static ParameterTool paramsFromGenericOptionsParser(String[] args) throws IOException { Option[] options = new GenericOptionsParser(args).getCommandLine().getOptions(); Map<String, String> map = new HashMap<String, String>(); for (Option option : options) { String[] split = option.getValue().split("=");...
java
public static ParameterTool paramsFromGenericOptionsParser(String[] args) throws IOException { Option[] options = new GenericOptionsParser(args).getCommandLine().getOptions(); Map<String, String> map = new HashMap<String, String>(); for (Option option : options) { String[] split = option.getValue().split("=");...
[ "public", "static", "ParameterTool", "paramsFromGenericOptionsParser", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "Option", "[", "]", "options", "=", "new", "GenericOptionsParser", "(", "args", ")", ".", "getCommandLine", "(", ")", ".", ...
Returns {@link ParameterTool} for the arguments parsed by {@link GenericOptionsParser}. @param args Input array arguments. It should be parsable by {@link GenericOptionsParser} @return A {@link ParameterTool} @throws IOException If arguments cannot be parsed by {@link GenericOptionsParser} @see GenericOptionsParser
[ "Returns", "{", "@link", "ParameterTool", "}", "for", "the", "arguments", "parsed", "by", "{", "@link", "GenericOptionsParser", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopUtils.java#L42-L50
train
Parses command line options and returns a ParameterTool object.
[ 30522, 2270, 10763, 16381, 3406, 4747, 11498, 5244, 19699, 5358, 6914, 22420, 7361, 9285, 19362, 8043, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 30524, 19362, 8043, 1006, 12098, 5620, 1007, 1012, 2131, 9006, 2386, 19422, 3170, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.writeAsText
public DataSink<T> writeAsText(String filePath) { return output(new TextOutputFormat<T>(new Path(filePath))); }
java
public DataSink<T> writeAsText(String filePath) { return output(new TextOutputFormat<T>(new Path(filePath))); }
[ "public", "DataSink", "<", "T", ">", "writeAsText", "(", "String", "filePath", ")", "{", "return", "output", "(", "new", "TextOutputFormat", "<", "T", ">", "(", "new", "Path", "(", "filePath", ")", ")", ")", ";", "}" ]
Writes a DataSet as text file(s) to the specified location. <p>For each element of the DataSet the result of {@link Object#toString()} is written.<br/> <br/> <span class="strong">Output files and directories</span><br/> What output how writeAsText() method produces is depending on other circumstance <ul> <li> A direct...
[ "Writes", "a", "DataSet", "as", "text", "file", "(", "s", ")", "to", "the", "specified", "location", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1492-L1494
train
Write the data to a file as text.
[ 30522, 2270, 2951, 11493, 2243, 1026, 1056, 1028, 4339, 14083, 10288, 2102, 1006, 5164, 5371, 15069, 1007, 1063, 2709, 6434, 1006, 2047, 3793, 5833, 18780, 14192, 4017, 1026, 1056, 1028, 1006, 2047, 4130, 1006, 5371, 15069, 1007, 1007, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.savepoint
protected void savepoint(String[] args) throws Exception { LOG.info("Running 'savepoint' command."); final Options commandOptions = CliFrontendParser.getSavepointCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine co...
java
protected void savepoint(String[] args) throws Exception { LOG.info("Running 'savepoint' command."); final Options commandOptions = CliFrontendParser.getSavepointCommandOptions(); final Options commandLineOptions = CliFrontendParser.mergeOptions(commandOptions, customCommandLineOptions); final CommandLine co...
[ "protected", "void", "savepoint", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "LOG", ".", "info", "(", "\"Running 'savepoint' command.\"", ")", ";", "final", "Options", "commandOptions", "=", "CliFrontendParser", ".", "getSavepointCommandOption...
Executes the SAVEPOINT action. @param args Command line arguments for the savepoint action.
[ "Executes", "the", "SAVEPOINT", "action", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L630-L686
train
Execute a savepoint command.
[ 30522, 5123, 11675, 3828, 8400, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 11618, 6453, 1063, 8833, 1012, 18558, 1006, 1000, 2770, 1005, 3828, 8400, 1005, 3094, 1012, 1000, 1007, 1025, 2345, 7047, 15054, 16790, 2015, 1027, 18856, 10128, 494...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
HiveSessionImpl.getUserFromToken
private String getUserFromToken(HiveAuthFactory authFactory, String tokenStr) throws HiveSQLException { return authFactory.getUserFromToken(tokenStr); }
java
private String getUserFromToken(HiveAuthFactory authFactory, String tokenStr) throws HiveSQLException { return authFactory.getUserFromToken(tokenStr); }
[ "private", "String", "getUserFromToken", "(", "HiveAuthFactory", "authFactory", ",", "String", "tokenStr", ")", "throws", "HiveSQLException", "{", "return", "authFactory", ".", "getUserFromToken", "(", "tokenStr", ")", ";", "}" ]
extract the real user from the given token string
[ "extract", "the", "real", "user", "from", "the", "given", "token", "string" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java#L831-L833
train
getUserFromToken gets the user from the token
[ 30522, 2797, 5164, 2131, 20330, 19699, 5358, 18715, 2368, 1006, 26736, 4887, 2705, 21450, 8740, 2705, 21450, 1010, 5164, 19204, 3367, 2099, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, 2709, 8740, 2705, 21450, 1012, 2131, 20330, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelReader.java
ExcelReader.aliasHeader
private List<String> aliasHeader(List<Object> headerList) { final int size = headerList.size(); final ArrayList<String> result = new ArrayList<>(size); if (CollUtil.isEmpty(headerList)) { return result; } for(int i = 0; i < size; i++) { result.add(aliasHeader(headerList.get(i), i)); } ret...
java
private List<String> aliasHeader(List<Object> headerList) { final int size = headerList.size(); final ArrayList<String> result = new ArrayList<>(size); if (CollUtil.isEmpty(headerList)) { return result; } for(int i = 0; i < size; i++) { result.add(aliasHeader(headerList.get(i), i)); } ret...
[ "private", "List", "<", "String", ">", "aliasHeader", "(", "List", "<", "Object", ">", "headerList", ")", "{", "final", "int", "size", "=", "headerList", ".", "size", "(", ")", ";", "final", "ArrayList", "<", "String", ">", "result", "=", "new", "Array...
转换标题别名,如果没有别名则使用原标题,当标题为空时,列号对应的字母便是header @param headerList 原标题列表 @return 转换别名列表
[ "转换标题别名,如果没有别名则使用原标题,当标题为空时,列号对应的字母便是header" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelReader.java#L445-L456
train
Returns a list of strings that alias the headerList.
[ 30522, 2797, 2862, 1026, 5164, 1028, 14593, 4974, 2121, 1006, 2862, 1026, 4874, 1028, 20346, 9863, 1007, 1063, 2345, 20014, 2946, 1027, 20346, 9863, 1012, 2946, 1006, 1007, 1025, 2345, 9140, 9863, 1026, 5164, 1028, 2765, 1027, 2047, 9140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java
CellUtil.getCellValue
public static Object getCellValue(Cell cell, CellEditor cellEditor) { if (null == cell) { return null; } return getCellValue(cell, cell.getCellTypeEnum(), cellEditor); }
java
public static Object getCellValue(Cell cell, CellEditor cellEditor) { if (null == cell) { return null; } return getCellValue(cell, cell.getCellTypeEnum(), cellEditor); }
[ "public", "static", "Object", "getCellValue", "(", "Cell", "cell", ",", "CellEditor", "cellEditor", ")", "{", "if", "(", "null", "==", "cell", ")", "{", "return", "null", ";", "}", "return", "getCellValue", "(", "cell", ",", "cell", ".", "getCellTypeEnum",...
获取单元格值 @param cell {@link Cell}单元格 @param cellEditor 单元格值编辑器。可以通过此编辑器对单元格值做自定义操作 @return 值,类型可能为:Date、Double、Boolean、String
[ "获取单元格值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java#L50-L55
train
Returns the value of a cell.
[ 30522, 2270, 10763, 4874, 2131, 29109, 22144, 7630, 2063, 1006, 3526, 3526, 1010, 3526, 2098, 15660, 3526, 2098, 15660, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 3526, 1007, 1063, 2709, 19701, 1025, 1065, 2709, 2131, 29109, 22144, 7630, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityEngine.java
VelocityEngine.createEngine
private static org.apache.velocity.app.VelocityEngine createEngine(TemplateConfig config) { if (null == config) { config = new TemplateConfig(); } final org.apache.velocity.app.VelocityEngine ve = new org.apache.velocity.app.VelocityEngine(); // 编码 final String charsetStr = config.getCharset().toSt...
java
private static org.apache.velocity.app.VelocityEngine createEngine(TemplateConfig config) { if (null == config) { config = new TemplateConfig(); } final org.apache.velocity.app.VelocityEngine ve = new org.apache.velocity.app.VelocityEngine(); // 编码 final String charsetStr = config.getCharset().toSt...
[ "private", "static", "org", ".", "apache", ".", "velocity", ".", "app", ".", "VelocityEngine", "createEngine", "(", "TemplateConfig", "config", ")", "{", "if", "(", "null", "==", "config", ")", "{", "config", "=", "new", "TemplateConfig", "(", ")", ";", ...
创建引擎 @param config 模板配置 @return {@link org.apache.velocity.app.VelocityEngine}
[ "创建引擎" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityEngine.java#L68-L107
train
Creates a Velocity Engine based on the given TemplateConfig.
[ 30522, 2797, 10763, 8917, 1012, 15895, 1012, 10146, 1012, 10439, 1012, 10146, 13159, 3170, 3443, 13159, 3170, 1006, 23561, 8663, 8873, 2290, 9530, 8873, 2290, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 9530, 8873, 2290, 1007, 1063, 9530, 88...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializer.java
KryoSerializer.readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // kryoRegistrations may be null if this Kryo serializer is deserialized from an old version if (kryoRegistrations == null) { this.kryoRegistrations = buildKryoRegistrations( type, regi...
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // kryoRegistrations may be null if this Kryo serializer is deserialized from an old version if (kryoRegistrations == null) { this.kryoRegistrations = buildKryoRegistrations( type, regi...
[ "private", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "// kryoRegistrations may be null if this Kryo serializer is deserialized from an old version", "if"...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializer.java#L589-L600
train
Read the object from an input stream.
[ 30522, 2797, 11675, 3191, 16429, 20614, 1006, 4874, 2378, 18780, 21422, 1999, 1007, 11618, 22834, 10288, 24422, 1010, 2465, 17048, 14876, 8630, 10288, 24422, 1063, 1999, 1012, 12398, 16416, 3527, 2497, 20614, 1006, 1007, 1025, 1013, 1013, 104...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.repartitionBroadcastState
private void repartitionBroadcastState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> broadcastState, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { int newParallelism = mergeMapList.size(); for (int i = 0; i < newParallelism; ++i) { final Map<StreamSt...
java
private void repartitionBroadcastState( Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> broadcastState, List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) { int newParallelism = mergeMapList.size(); for (int i = 0; i < newParallelism; ++i) { final Map<StreamSt...
[ "private", "void", "repartitionBroadcastState", "(", "Map", "<", "String", ",", "List", "<", "Tuple2", "<", "StreamStateHandle", ",", "OperatorStateHandle", ".", "StateMetaInfo", ">", ">", ">", "broadcastState", ",", "List", "<", "Map", "<", "StreamStateHandle", ...
Repartition BROADCAST state.
[ "Repartition", "BROADCAST", "state", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L348-L376
train
Repartition the broadcast state.
[ 30522, 2797, 11675, 16360, 8445, 22753, 12618, 4215, 10526, 9153, 2618, 1006, 4949, 1026, 5164, 1010, 2862, 1026, 10722, 10814, 2475, 1026, 9199, 12259, 11774, 2571, 1010, 9224, 12259, 11774, 2571, 1012, 2110, 11368, 8113, 14876, 1028, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/Convert.java
Convert.toFloat
public static Float toFloat(Object value, Float defaultValue) { return convert(Float.class, value, defaultValue); }
java
public static Float toFloat(Object value, Float defaultValue) { return convert(Float.class, value, defaultValue); }
[ "public", "static", "Float", "toFloat", "(", "Object", "value", ",", "Float", "defaultValue", ")", "{", "return", "convert", "(", "Float", ".", "class", ",", "value", ",", "defaultValue", ")", ";", "}" ]
转换为Float<br> 如果给定的值为空,或者转换失败,返回默认值<br> 转换失败不会报错 @param value 被转换的值 @param defaultValue 转换错误时的默认值 @return 结果
[ "转换为Float<br", ">", "如果给定的值为空,或者转换失败,返回默认值<br", ">", "转换失败不会报错" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/Convert.java#L326-L328
train
Converts value of the class to Float.
[ 30522, 2270, 10763, 14257, 2000, 10258, 16503, 1006, 4874, 3643, 1010, 14257, 12398, 10175, 5657, 1007, 1063, 2709, 10463, 1006, 14257, 30524, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.setOrAppend
public static <T> List<T> setOrAppend(List<T> list, int index, T element) { if (index < list.size()) { list.set(index, element); } else { list.add(element); } return list; }
java
public static <T> List<T> setOrAppend(List<T> list, int index, T element) { if (index < list.size()) { list.set(index, element); } else { list.add(element); } return list; }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "setOrAppend", "(", "List", "<", "T", ">", "list", ",", "int", "index", ",", "T", "element", ")", "{", "if", "(", "index", "<", "list", ".", "size", "(", ")", ")", "{", "list", ".", "s...
设置或增加元素。当index小于List的长度时,替换指定位置的值,否则在尾部追加 @param list List列表 @param index 位置 @param element 新元素 @return 原List @since 4.1.2
[ "设置或增加元素。当index小于List的长度时,替换指定位置的值,否则在尾部追加" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L2387-L2394
train
Appends the specified element to the end of the list if the index is greater than the list size.
[ 30522, 2270, 10763, 1026, 1056, 1028, 2862, 1026, 1056, 1028, 2275, 6525, 21512, 4859, 1006, 2862, 1026, 1056, 1028, 2862, 1010, 20014, 5950, 1010, 1056, 5783, 1007, 1063, 2065, 1006, 5950, 1026, 2862, 1012, 2946, 1006, 1007, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/cluster/ClusterAnalyzer.java
ClusterAnalyzer.addDocument
public Document<K> addDocument(K id, List<String> document) { SparseVector vector = toVector(document); Document<K> d = new Document<K>(id, vector); return documents_.put(id, d); }
java
public Document<K> addDocument(K id, List<String> document) { SparseVector vector = toVector(document); Document<K> d = new Document<K>(id, vector); return documents_.put(id, d); }
[ "public", "Document", "<", "K", ">", "addDocument", "(", "K", "id", ",", "List", "<", "String", ">", "document", ")", "{", "SparseVector", "vector", "=", "toVector", "(", "document", ")", ";", "Document", "<", "K", ">", "d", "=", "new", "Document", "...
添加文档 @param id 文档id @param document 文档内容 @return 文档对象
[ "添加文档" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/cluster/ClusterAnalyzer.java#L126-L131
train
Add a document to the set.
[ 30522, 2270, 6254, 1026, 1047, 1028, 5587, 3527, 24894, 4765, 1006, 1047, 8909, 1010, 2862, 1026, 5164, 1028, 6254, 1007, 1063, 20288, 3726, 16761, 9207, 1027, 2000, 3726, 16761, 1006, 6254, 1007, 1025, 6254, 1026, 1047, 1028, 1040, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.isSub
public static boolean isSub(File parent, File sub) { Assert.notNull(parent); Assert.notNull(sub); return sub.toPath().startsWith(parent.toPath()); }
java
public static boolean isSub(File parent, File sub) { Assert.notNull(parent); Assert.notNull(sub); return sub.toPath().startsWith(parent.toPath()); }
[ "public", "static", "boolean", "isSub", "(", "File", "parent", ",", "File", "sub", ")", "{", "Assert", ".", "notNull", "(", "parent", ")", ";", "Assert", ".", "notNull", "(", "sub", ")", ";", "return", "sub", ".", "toPath", "(", ")", ".", "startsWith...
判断给定的目录是否为给定文件或文件夹的父目录 @param parent 父目录 @param sub 子目录 @return 子目录是否为父目录的子目录 @since 4.5.4
[ "判断给定的目录是否为给定文件或文件夹的父目录" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3431-L3435
train
Checks if the given file is a sub file of the given parent file.
[ 30522, 2270, 10763, 22017, 20898, 26354, 12083, 1006, 5371, 6687, 1010, 5371, 4942, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 6687, 1007, 1025, 20865, 1012, 2025, 11231, 3363, 1006, 4942, 1007, 1025, 2709, 4942, 1012, 2327, 8988, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java
BindResult.ifBound
public void ifBound(Consumer<? super T> consumer) { Assert.notNull(consumer, "Consumer must not be null"); if (this.value != null) { consumer.accept(this.value); } }
java
public void ifBound(Consumer<? super T> consumer) { Assert.notNull(consumer, "Consumer must not be null"); if (this.value != null) { consumer.accept(this.value); } }
[ "public", "void", "ifBound", "(", "Consumer", "<", "?", "super", "T", ">", "consumer", ")", "{", "Assert", ".", "notNull", "(", "consumer", ",", "\"Consumer must not be null\"", ")", ";", "if", "(", "this", ".", "value", "!=", "null", ")", "{", "consumer...
Invoke the specified consumer with the bound value, or do nothing if no value has been bound. @param consumer block to execute if a value has been bound
[ "Invoke", "the", "specified", "consumer", "with", "the", "bound", "value", "or", "do", "nothing", "if", "no", "value", "has", "been", "bound", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java#L74-L79
train
Applies the specified consumer to the bound value.
[ 30522, 2270, 11675, 2065, 15494, 1006, 7325, 1026, 1029, 3565, 1056, 1028, 7325, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 7325, 1010, 1000, 7325, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 2065, 1006, 2023, 1012, 3643, 999, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java
StackTraceSampleCoordinator.collectStackTraces
public void collectStackTraces( int sampleId, ExecutionAttemptID executionId, List<StackTraceElement[]> stackTraces) { synchronized (lock) { if (isShutDown) { return; } if (LOG.isDebugEnabled()) { LOG.debug("Collecting stack trace sample {} of task {}", sampleId, executionId); } Pen...
java
public void collectStackTraces( int sampleId, ExecutionAttemptID executionId, List<StackTraceElement[]> stackTraces) { synchronized (lock) { if (isShutDown) { return; } if (LOG.isDebugEnabled()) { LOG.debug("Collecting stack trace sample {} of task {}", sampleId, executionId); } Pen...
[ "public", "void", "collectStackTraces", "(", "int", "sampleId", ",", "ExecutionAttemptID", "executionId", ",", "List", "<", "StackTraceElement", "[", "]", ">", "stackTraces", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "isShutDown", ")", "{", ...
Collects stack traces of a task. @param sampleId ID of the sample. @param executionId ID of the sampled task. @param stackTraces Stack traces of the sampled task. @throws IllegalStateException If unknown sample ID and not recently finished or cancelled sample.
[ "Collects", "stack", "traces", "of", "a", "task", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java#L243-L280
train
Collect the stack traces for the given sample ID and execution ID.
[ 30522, 2270, 11675, 17427, 2696, 3600, 6494, 9623, 1006, 20014, 7099, 3593, 1010, 7781, 19321, 6633, 13876, 3593, 7781, 3593, 1010, 2862, 1026, 9991, 6494, 3401, 12260, 3672, 1031, 1033, 1028, 9991, 6494, 9623, 1007, 1063, 25549, 1006, 5843...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.isDouble
public static boolean isDouble(String s) { try { Double.parseDouble(s); if (s.contains(".")) { return true; } return false; } catch (NumberFormatException e) { return false; } }
java
public static boolean isDouble(String s) { try { Double.parseDouble(s); if (s.contains(".")) { return true; } return false; } catch (NumberFormatException e) { return false; } }
[ "public", "static", "boolean", "isDouble", "(", "String", "s", ")", "{", "try", "{", "Double", ".", "parseDouble", "(", "s", ")", ";", "if", "(", "s", ".", "contains", "(", "\".\"", ")", ")", "{", "return", "true", ";", "}", "return", "false", ";",...
判断字符串是否是浮点数 @param s String @return 是否为{@link Double}类型
[ "判断字符串是否是浮点数" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1187-L1197
train
Checks if the string is a valid double.
[ 30522, 2270, 10763, 22017, 20898, 2003, 26797, 3468, 1006, 5164, 1055, 1007, 1063, 3046, 1063, 3313, 1012, 11968, 6924, 7140, 3468, 1006, 1055, 1007, 1025, 2065, 1006, 1055, 1012, 3397, 1006, 1000, 1012, 1000, 1007, 1007, 1063, 2709, 2995, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/core/fs/LimitedConnectionsFileSystem.java
LimitedConnectionsFileSystem.createStream
private <T extends StreamWithTimeout> T createStream( final SupplierWithException<T, IOException> streamOpener, final HashSet<T> openStreams, final boolean output) throws IOException { final int outputLimit = output && maxNumOpenOutputStreams > 0 ? maxNumOpenOutputStreams : Integer.MAX_VALUE; final int in...
java
private <T extends StreamWithTimeout> T createStream( final SupplierWithException<T, IOException> streamOpener, final HashSet<T> openStreams, final boolean output) throws IOException { final int outputLimit = output && maxNumOpenOutputStreams > 0 ? maxNumOpenOutputStreams : Integer.MAX_VALUE; final int in...
[ "private", "<", "T", "extends", "StreamWithTimeout", ">", "T", "createStream", "(", "final", "SupplierWithException", "<", "T", ",", "IOException", ">", "streamOpener", ",", "final", "HashSet", "<", "T", ">", "openStreams", ",", "final", "boolean", "output", "...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/LimitedConnectionsFileSystem.java#L389-L462
train
Creates a new stream.
[ 30522, 2797, 1026, 1056, 8908, 5460, 24415, 7292, 5833, 1028, 1056, 9005, 25379, 1006, 2345, 17024, 24415, 10288, 24422, 1026, 1056, 1010, 22834, 10288, 24422, 1028, 5460, 26915, 2121, 1010, 2345, 23325, 13462, 1026, 1056, 1028, 7480, 25379, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
common/sketch/src/main/java/org/apache/spark/util/sketch/BitArray.java
BitArray.set
boolean set(long index) { if (!get(index)) { data[(int) (index >>> 6)] |= (1L << index); bitCount++; return true; } return false; }
java
boolean set(long index) { if (!get(index)) { data[(int) (index >>> 6)] |= (1L << index); bitCount++; return true; } return false; }
[ "boolean", "set", "(", "long", "index", ")", "{", "if", "(", "!", "get", "(", "index", ")", ")", "{", "data", "[", "(", "int", ")", "(", "index", ">>>", "6", ")", "]", "|=", "(", "1L", "<<", "index", ")", ";", "bitCount", "++", ";", "return",...
Returns true if the bit changed value.
[ "Returns", "true", "if", "the", "bit", "changed", "value", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/sketch/src/main/java/org/apache/spark/util/sketch/BitArray.java#L54-L61
train
Sets the bit at the given index.
[ 30522, 22017, 20898, 2275, 1006, 2146, 5950, 1007, 1063, 2065, 1006, 999, 2131, 1006, 5950, 1007, 1007, 1063, 2951, 1031, 1006, 20014, 1007, 1006, 5950, 1028, 1028, 1028, 1020, 1007, 1033, 1064, 1027, 1006, 1015, 2140, 1026, 1026, 5950, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/StringUtil.java
StringUtil.commonSuffixOfLength
public static boolean commonSuffixOfLength(String s, String p, int len) { return s != null && p != null && len >= 0 && s.regionMatches(s.length() - len, p, p.length() - len, len); }
java
public static boolean commonSuffixOfLength(String s, String p, int len) { return s != null && p != null && len >= 0 && s.regionMatches(s.length() - len, p, p.length() - len, len); }
[ "public", "static", "boolean", "commonSuffixOfLength", "(", "String", "s", ",", "String", "p", ",", "int", "len", ")", "{", "return", "s", "!=", "null", "&&", "p", "!=", "null", "&&", "len", ">=", "0", "&&", "s", ".", "regionMatches", "(", "s", ".", ...
Checks if two strings have the same suffix of specified length @param s string @param p string @param len length of the common suffix @return true if both s and p are not null and both have the same suffix. Otherwise - false
[ "Checks", "if", "two", "strings", "have", "the", "same", "suffix", "of", "specified", "length" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/StringUtil.java#L83-L85
train
Returns true if s and p are common suffixes of the given length.
[ 30522, 2270, 10763, 22017, 20898, 7674, 16093, 8873, 2595, 11253, 7770, 13512, 2232, 1006, 5164, 1055, 1010, 5164, 1052, 1010, 20014, 18798, 1007, 1063, 2709, 1055, 999, 1027, 19701, 1004, 1004, 1052, 999, 1027, 19701, 1004, 1004, 18798, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageParameters.java
MessageParameters.isResolved
public final boolean isResolved() { return getPathParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved) && getQueryParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved); }
java
public final boolean isResolved() { return getPathParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved) && getQueryParameters().stream().filter(MessageParameter::isMandatory).allMatch(MessageParameter::isResolved); }
[ "public", "final", "boolean", "isResolved", "(", ")", "{", "return", "getPathParameters", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "MessageParameter", "::", "isMandatory", ")", ".", "allMatch", "(", "MessageParameter", "::", "isResolved", ")", ...
Returns whether all mandatory parameters have been resolved. @return true, if all mandatory parameters have been resolved, false otherwise
[ "Returns", "whether", "all", "mandatory", "parameters", "have", "been", "resolved", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/MessageParameters.java#L51-L54
train
Returns true if all mandatory parameters are resolved.
[ 30522, 2270, 2345, 22017, 20898, 2003, 6072, 16116, 1006, 1007, 1063, 2709, 2131, 15069, 28689, 22828, 2015, 1006, 1007, 1012, 5460, 1006, 1007, 1012, 11307, 1006, 4471, 28689, 22828, 1024, 1024, 2003, 2386, 2850, 7062, 1007, 1012, 2035, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/servlet/multipart/UploadSetting.java
UploadSetting.load
synchronized public void load(String settingPath) { URL url = URLUtil.getURL(settingPath); if (url == null) { log.info("Can not find Upload setting file [{}], use default setting.", settingPath); return; } Setting setting = new Setting(url, Setting.DEFAULT_CHARSET, true); maxFileSize = setting....
java
synchronized public void load(String settingPath) { URL url = URLUtil.getURL(settingPath); if (url == null) { log.info("Can not find Upload setting file [{}], use default setting.", settingPath); return; } Setting setting = new Setting(url, Setting.DEFAULT_CHARSET, true); maxFileSize = setting....
[ "synchronized", "public", "void", "load", "(", "String", "settingPath", ")", "{", "URL", "url", "=", "URLUtil", ".", "getURL", "(", "settingPath", ")", ";", "if", "(", "url", "==", "null", ")", "{", "log", ".", "info", "(", "\"Can not find Upload setting f...
加载全局设定 @param settingPath 设定文件路径,相对Classpath
[ "加载全局设定" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/multipart/UploadSetting.java#L135-L148
train
Load the settings from the specified path.
[ 30522, 25549, 2270, 11675, 7170, 1006, 5164, 4292, 15069, 1007, 1063, 24471, 2140, 24471, 2140, 1027, 24471, 7630, 3775, 2140, 1012, 2131, 3126, 2140, 1006, 4292, 15069, 1007, 1025, 2065, 1006, 24471, 2140, 1027, 1027, 19701, 1007, 1063, 88...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/MacAddressUtil.java
MacAddressUtil.defaultMachineId
public static byte[] defaultMachineId() { byte[] bestMacAddr = bestAvailableMac(); if (bestMacAddr == null) { bestMacAddr = new byte[EUI64_MAC_ADDRESS_LENGTH]; PlatformDependent.threadLocalRandom().nextBytes(bestMacAddr); logger.warn( "Failed to fi...
java
public static byte[] defaultMachineId() { byte[] bestMacAddr = bestAvailableMac(); if (bestMacAddr == null) { bestMacAddr = new byte[EUI64_MAC_ADDRESS_LENGTH]; PlatformDependent.threadLocalRandom().nextBytes(bestMacAddr); logger.warn( "Failed to fi...
[ "public", "static", "byte", "[", "]", "defaultMachineId", "(", ")", "{", "byte", "[", "]", "bestMacAddr", "=", "bestAvailableMac", "(", ")", ";", "if", "(", "bestMacAddr", "==", "null", ")", "{", "bestMacAddr", "=", "new", "byte", "[", "EUI64_MAC_ADDRESS_L...
Returns the result of {@link #bestAvailableMac()} if non-{@code null} otherwise returns a random EUI-64 MAC address.
[ "Returns", "the", "result", "of", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/MacAddressUtil.java#L137-L147
train
Returns the default machine id.
[ 30522, 2270, 10763, 24880, 1031, 1033, 12398, 22911, 14014, 3593, 1006, 1007, 1063, 24880, 1031, 1033, 2190, 22911, 4215, 13626, 1027, 2190, 12462, 11733, 3468, 22911, 1006, 1007, 1025, 2065, 1006, 2190, 22911, 4215, 13626, 1027, 1027, 19701,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java
BindResult.orElseCreate
public T orElseCreate(Class<? extends T> type) { Assert.notNull(type, "Type must not be null"); return (this.value != null) ? this.value : BeanUtils.instantiateClass(type); }
java
public T orElseCreate(Class<? extends T> type) { Assert.notNull(type, "Type must not be null"); return (this.value != null) ? this.value : BeanUtils.instantiateClass(type); }
[ "public", "T", "orElseCreate", "(", "Class", "<", "?", "extends", "T", ">", "type", ")", "{", "Assert", ".", "notNull", "(", "type", ",", "\"Type must not be null\"", ")", ";", "return", "(", "this", ".", "value", "!=", "null", ")", "?", "this", ".", ...
Return the object that was bound, or a new instance of the specified class if no value has been bound. @param type the type to create if no value was bound @return the value, if bound, otherwise a new instance of {@code type}
[ "Return", "the", "object", "that", "was", "bound", "or", "a", "new", "instance", "of", "the", "specified", "class", "if", "no", "value", "has", "been", "bound", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java#L122-L125
train
Gets the value or creates a new instance of the specified type.
[ 30522, 2270, 1056, 10848, 4877, 8586, 29313, 1006, 2465, 1026, 1029, 8908, 1056, 1028, 2828, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 2828, 1010, 1000, 2828, 2442, 2025, 2022, 19701, 1000, 1007, 1025, 2709, 1006, 2023, 1012, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java
CassandraSink.disableChaining
public CassandraSink<IN> disableChaining() { if (useDataStreamSink) { getSinkTransformation().setChainingStrategy(ChainingStrategy.NEVER); } else { getStreamTransformation().setChainingStrategy(ChainingStrategy.NEVER); } return this; }
java
public CassandraSink<IN> disableChaining() { if (useDataStreamSink) { getSinkTransformation().setChainingStrategy(ChainingStrategy.NEVER); } else { getStreamTransformation().setChainingStrategy(ChainingStrategy.NEVER); } return this; }
[ "public", "CassandraSink", "<", "IN", ">", "disableChaining", "(", ")", "{", "if", "(", "useDataStreamSink", ")", "{", "getSinkTransformation", "(", ")", ".", "setChainingStrategy", "(", "ChainingStrategy", ".", "NEVER", ")", ";", "}", "else", "{", "getStreamT...
Turns off chaining for this operator so thread co-location will not be used as an optimization. <p/> <p/> Chaining can be turned off for the whole job by {@link org.apache.flink.streaming.api.environment.StreamExecutionEnvironment#disableOperatorChaining()} however it is not advised for performance considerations. @re...
[ "Turns", "off", "chaining", "for", "this", "operator", "so", "thread", "co", "-", "location", "will", "not", "be", "used", "as", "an", "optimization", ".", "<p", "/", ">", "<p", "/", ">", "Chaining", "can", "be", "turned", "off", "for", "the", "whole",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java#L163-L170
train
Disable changing the chaining strategy for this sink.
[ 30522, 2270, 15609, 11493, 2243, 1026, 1999, 1028, 4487, 19150, 24925, 5582, 1006, 1007, 1063, 2065, 1006, 2109, 6790, 21422, 11493, 2243, 1007, 1063, 4152, 19839, 6494, 3619, 14192, 3370, 1006, 1007, 1012, 2275, 24925, 5582, 20528, 2618, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java
TableFactoryService.filterByContext
private static <T> List<TableFactory> filterByContext( Class<T> factoryClass, Map<String, String> properties, List<TableFactory> foundFactories, List<TableFactory> classFactories) { List<TableFactory> matchingFactories = classFactories.stream().filter(factory -> { Map<String, String> requestedContext = no...
java
private static <T> List<TableFactory> filterByContext( Class<T> factoryClass, Map<String, String> properties, List<TableFactory> foundFactories, List<TableFactory> classFactories) { List<TableFactory> matchingFactories = classFactories.stream().filter(factory -> { Map<String, String> requestedContext = no...
[ "private", "static", "<", "T", ">", "List", "<", "TableFactory", ">", "filterByContext", "(", "Class", "<", "T", ">", "factoryClass", ",", "Map", "<", "String", ",", "String", ">", "properties", ",", "List", "<", "TableFactory", ">", "foundFactories", ",",...
Filters for factories with matching context. @return all matching factories
[ "Filters", "for", "factories", "with", "matching", "context", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/TableFactoryService.java#L197-L228
train
Filter by context.
[ 30522, 2797, 10763, 1026, 1056, 1028, 2862, 1026, 2795, 21450, 1028, 11307, 3762, 8663, 18209, 1006, 2465, 1026, 1056, 1028, 4713, 26266, 1010, 4949, 1026, 5164, 1010, 5164, 1028, 5144, 1010, 2862, 1026, 2795, 21450, 1028, 2179, 7011, 16761...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OffHeapColumnVector.java
OffHeapColumnVector.putByteArray
@Override public int putByteArray(int rowId, byte[] value, int offset, int length) { int result = arrayData().appendBytes(length, value, offset); Platform.putInt(null, lengthData + 4L * rowId, length); Platform.putInt(null, offsetData + 4L * rowId, result); return result; }
java
@Override public int putByteArray(int rowId, byte[] value, int offset, int length) { int result = arrayData().appendBytes(length, value, offset); Platform.putInt(null, lengthData + 4L * rowId, length); Platform.putInt(null, offsetData + 4L * rowId, result); return result; }
[ "@", "Override", "public", "int", "putByteArray", "(", "int", "rowId", ",", "byte", "[", "]", "value", ",", "int", "offset", ",", "int", "length", ")", "{", "int", "result", "=", "arrayData", "(", ")", ".", "appendBytes", "(", "length", ",", "value", ...
APIs dealing with ByteArrays
[ "APIs", "dealing", "with", "ByteArrays" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/OffHeapColumnVector.java#L521-L527
train
Override putByteArray to append bytes to the array data.
[ 30522, 1030, 2058, 15637, 2270, 20014, 2404, 3762, 27058, 11335, 2100, 1006, 20014, 5216, 3593, 1010, 24880, 1031, 1033, 3643, 1010, 20014, 16396, 1010, 20014, 3091, 1007, 1063, 20014, 2765, 1027, 9140, 2850, 2696, 1006, 1007, 1012, 10439, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java
Matrix.trace
public double trace() { double t = 0; for (int i = 0; i < Math.min(m, n); i++) { t += A[i][i]; } return t; }
java
public double trace() { double t = 0; for (int i = 0; i < Math.min(m, n); i++) { t += A[i][i]; } return t; }
[ "public", "double", "trace", "(", ")", "{", "double", "t", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "Math", ".", "min", "(", "m", ",", "n", ")", ";", "i", "++", ")", "{", "t", "+=", "A", "[", "i", "]", "[", "i", ...
Matrix trace. @return sum of the diagonal elements.
[ "Matrix", "trace", "." ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java#L977-L985
train
Trace method.
[ 30522, 2270, 3313, 7637, 1006, 1007, 1063, 3313, 1056, 1027, 1014, 1025, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 8785, 1012, 8117, 1006, 1049, 1010, 1050, 1007, 1025, 1045, 1009, 1009, 1007, 1063, 1056, 1009, 1027, 1037, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java
CustomDictionary.remove
public static void remove(String key) { if (HanLP.Config.Normalization) key = CharTable.convert(key); if (trie == null) return; trie.remove(key); }
java
public static void remove(String key) { if (HanLP.Config.Normalization) key = CharTable.convert(key); if (trie == null) return; trie.remove(key); }
[ "public", "static", "void", "remove", "(", "String", "key", ")", "{", "if", "(", "HanLP", ".", "Config", ".", "Normalization", ")", "key", "=", "CharTable", ".", "convert", "(", "key", ")", ";", "if", "(", "trie", "==", "null", ")", "return", ";", ...
删除单词<br> 动态增删不会持久化到词典文件 @param key
[ "删除单词<br", ">", "动态增删不会持久化到词典文件" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java#L433-L438
train
Removes a key from the cache.
[ 30522, 2270, 10763, 11675, 6366, 1006, 5164, 3145, 1007, 1063, 2065, 1006, 7658, 14277, 1012, 9530, 8873, 2290, 1012, 3671, 3989, 1007, 3145, 1027, 3673, 3085, 1012, 10463, 1006, 3145, 1007, 1025, 2065, 1006, 13012, 2063, 1027, 1027, 19701,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.setShort
public static void setShort(MemorySegment[] segments, int offset, short value) { if (inFirstSegment(segments, offset, 2)) { segments[0].putShort(offset, value); } else { setShortMultiSegments(segments, offset, value); } }
java
public static void setShort(MemorySegment[] segments, int offset, short value) { if (inFirstSegment(segments, offset, 2)) { segments[0].putShort(offset, value); } else { setShortMultiSegments(segments, offset, value); } }
[ "public", "static", "void", "setShort", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ",", "short", "value", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "2", ")", ")", "{", "segments", "[", "0", "]", ...
set short from segments. @param segments target segments. @param offset value offset.
[ "set", "short", "from", "segments", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L826-L832
train
set short from segments.
[ 30522, 2270, 10763, 11675, 4520, 27794, 1006, 3638, 3366, 21693, 4765, 1031, 1033, 9214, 1010, 20014, 16396, 1010, 2460, 3643, 1007, 1063, 2065, 1006, 1999, 8873, 12096, 3366, 21693, 4765, 1006, 9214, 1010, 16396, 1010, 1016, 1007, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java
PythonDataStream.split
public PythonSplitStream split(OutputSelector<PyObject> output_selector) throws IOException { return new PythonSplitStream(this.stream.split(new PythonOutputSelector(output_selector))); }
java
public PythonSplitStream split(OutputSelector<PyObject> output_selector) throws IOException { return new PythonSplitStream(this.stream.split(new PythonOutputSelector(output_selector))); }
[ "public", "PythonSplitStream", "split", "(", "OutputSelector", "<", "PyObject", ">", "output_selector", ")", "throws", "IOException", "{", "return", "new", "PythonSplitStream", "(", "this", ".", "stream", ".", "split", "(", "new", "PythonOutputSelector", "(", "out...
A thin wrapper layer over {@link DataStream#split(OutputSelector)}. @param output_selector The user defined {@link OutputSelector} for directing the tuples. @return The {@link PythonSplitStream}
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "DataStream#split", "(", "OutputSelector", ")", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java#L91-L93
train
Splits this stream into two using the given output selector.
[ 30522, 2270, 18750, 13102, 15909, 21422, 3975, 1006, 27852, 12260, 16761, 1026, 1052, 7677, 2497, 20614, 1028, 6434, 1035, 27000, 1007, 11618, 22834, 10288, 24422, 1063, 2709, 2047, 18750, 13102, 15909, 21422, 1006, 2023, 1012, 5460, 1012, 39...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/JarClassLoader.java
JarClassLoader.loadJar
public static JarClassLoader loadJar(File jarFile) { final JarClassLoader loader = new JarClassLoader(); loader.addJar(jarFile); return loader; }
java
public static JarClassLoader loadJar(File jarFile) { final JarClassLoader loader = new JarClassLoader(); loader.addJar(jarFile); return loader; }
[ "public", "static", "JarClassLoader", "loadJar", "(", "File", "jarFile", ")", "{", "final", "JarClassLoader", "loader", "=", "new", "JarClassLoader", "(", ")", ";", "loader", ".", "addJar", "(", "jarFile", ")", ";", "return", "loader", ";", "}" ]
加载Jar到ClassPath @param jarFile jar文件或所在目录 @return JarClassLoader
[ "加载Jar到ClassPath" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/JarClassLoader.java#L44-L48
train
Load a jar file.
[ 30522, 2270, 10763, 15723, 26266, 11066, 2121, 7170, 16084, 1006, 5371, 15723, 8873, 2571, 1007, 1063, 2345, 15723, 26266, 11066, 2121, 7170, 2121, 1027, 2047, 15723, 26266, 11066, 2121, 1006, 1007, 1025, 7170, 2121, 1012, 5587, 16084, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java
HttpPostMultipartRequestDecoder.splitMultipartHeaderValues
private static String[] splitMultipartHeaderValues(String svalue) { List<String> values = InternalThreadLocalMap.get().arrayList(1); boolean inQuote = false; boolean escapeNext = false; int start = 0; for (int i = 0; i < svalue.length(); i++) { char c = svalue.charAt(...
java
private static String[] splitMultipartHeaderValues(String svalue) { List<String> values = InternalThreadLocalMap.get().arrayList(1); boolean inQuote = false; boolean escapeNext = false; int start = 0; for (int i = 0; i < svalue.length(); i++) { char c = svalue.charAt(...
[ "private", "static", "String", "[", "]", "splitMultipartHeaderValues", "(", "String", "svalue", ")", "{", "List", "<", "String", ">", "values", "=", "InternalThreadLocalMap", ".", "get", "(", ")", ".", "arrayList", "(", "1", ")", ";", "boolean", "inQuote", ...
Split one header value in Multipart @return an array of String where values that were separated by ';' or ','
[ "Split", "one", "header", "value", "in", "Multipart" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java#L1491-L1519
train
Split a string into a list of strings.
[ 30522, 2797, 10763, 5164, 1031, 1033, 3975, 12274, 7096, 11514, 22425, 13775, 2121, 10175, 15808, 1006, 5164, 17917, 2389, 5657, 1007, 1063, 2862, 1026, 5164, 1028, 5300, 1027, 4722, 2705, 16416, 19422, 24755, 19145, 2361, 1012, 2131, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java
JaccardIndex.runInternal
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { // s, t, d(t) DataSet<Edge<K, Tuple2<EV, LongValue>>> neighborDegree = input .run(new EdgeTargetDegree<K, VV, EV>() .setParallelism(parallelism)); // group span, s, t, d(t) DataSet<Tuple4<IntValue, K, K, IntVa...
java
@Override public DataSet<Result<K>> runInternal(Graph<K, VV, EV> input) throws Exception { // s, t, d(t) DataSet<Edge<K, Tuple2<EV, LongValue>>> neighborDegree = input .run(new EdgeTargetDegree<K, VV, EV>() .setParallelism(parallelism)); // group span, s, t, d(t) DataSet<Tuple4<IntValue, K, K, IntVa...
[ "@", "Override", "public", "DataSet", "<", "Result", "<", "K", ">", ">", "runInternal", "(", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "input", ")", "throws", "Exception", "{", "// s, t, d(t)", "DataSet", "<", "Edge", "<", "K", ",", "Tuple2", "<"...
/* Implementation notes: The requirement that "K extends CopyableValue<K>" can be removed when Flink has a self-join which performs the skew distribution handled by GenerateGroupSpans / GenerateGroups / GenerateGroupPairs.
[ "/", "*", "Implementation", "notes", ":" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java#L190-L237
train
This method is used to run the algorithm in the internal mode.
[ 30522, 1030, 2058, 15637, 2270, 2951, 13462, 1026, 2765, 1026, 1047, 1028, 1028, 2448, 18447, 11795, 2389, 1006, 10629, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 7953, 1007, 11618, 6453, 1063, 1013, 1013, 1055, 1010, 1056, 1010, 1040...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java
MysqlEventParser.findStartPosition
private EntryPosition findStartPosition(MysqlConnection mysqlConnection) { try { ResultSetPacket packet = mysqlConnection.query("show binlog events limit 1"); List<String> fields = packet.getFieldValues(); if (CollectionUtils.isEmpty(fields)) { throw new Canal...
java
private EntryPosition findStartPosition(MysqlConnection mysqlConnection) { try { ResultSetPacket packet = mysqlConnection.query("show binlog events limit 1"); List<String> fields = packet.getFieldValues(); if (CollectionUtils.isEmpty(fields)) { throw new Canal...
[ "private", "EntryPosition", "findStartPosition", "(", "MysqlConnection", "mysqlConnection", ")", "{", "try", "{", "ResultSetPacket", "packet", "=", "mysqlConnection", ".", "query", "(", "\"show binlog events limit 1\"", ")", ";", "List", "<", "String", ">", "fields", ...
查询当前的binlog位置
[ "查询当前的binlog位置" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java#L671-L684
train
Find the start position of the last binlog event in the table.
[ 30522, 2797, 4443, 26994, 4858, 7559, 25856, 19234, 1006, 2026, 2015, 4160, 22499, 10087, 7542, 2026, 2015, 4160, 22499, 10087, 7542, 1007, 1063, 3046, 1063, 3463, 3388, 23947, 3388, 14771, 1027, 2026, 2015, 4160, 22499, 10087, 7542, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.unWrap
public static byte[] unWrap(Byte... values) { if (null == values) { return null; } final int length = values.length; if (0 == length) { return new byte[0]; } final byte[] array = new byte[length]; for (int i = 0; i < length; i++) { array[i] = values[i].byteValue(); } return arra...
java
public static byte[] unWrap(Byte... values) { if (null == values) { return null; } final int length = values.length; if (0 == length) { return new byte[0]; } final byte[] array = new byte[length]; for (int i = 0; i < length; i++) { array[i] = values[i].byteValue(); } return arra...
[ "public", "static", "byte", "[", "]", "unWrap", "(", "Byte", "...", "values", ")", "{", "if", "(", "null", "==", "values", ")", "{", "return", "null", ";", "}", "final", "int", "length", "=", "values", ".", "length", ";", "if", "(", "0", "==", "l...
包装类数组转为原始类型数组 @param values 包装类型数组 @return 原始类型数组
[ "包装类数组转为原始类型数组" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L1553-L1567
train
Creates a new byte array that wraps the specified Byte objects.
[ 30522, 2270, 10763, 24880, 1031, 1033, 4895, 13088, 9331, 1006, 24880, 1012, 1012, 1012, 5300, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 5300, 1007, 1063, 2709, 19701, 1025, 1065, 2345, 20014, 3091, 1027, 5300, 1012, 3091, 1025, 2065, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java
AbsSetting.getStrings
public String[] getStrings(String key, String group, String delimiter) { final String value = getByGroup(key, group); if (StrUtil.isBlank(value)) { return null; } return StrUtil.split(value, delimiter); }
java
public String[] getStrings(String key, String group, String delimiter) { final String value = getByGroup(key, group); if (StrUtil.isBlank(value)) { return null; } return StrUtil.split(value, delimiter); }
[ "public", "String", "[", "]", "getStrings", "(", "String", "key", ",", "String", "group", ",", "String", "delimiter", ")", "{", "final", "String", "value", "=", "getByGroup", "(", "key", ",", "group", ")", ";", "if", "(", "StrUtil", ".", "isBlank", "("...
获得数组型 @param key 属性名 @param group 分组名 @param delimiter 分隔符 @return 属性值
[ "获得数组型" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java#L136-L142
train
Returns an array of strings from the specified group.
[ 30522, 2270, 5164, 1031, 1033, 4152, 18886, 3070, 2015, 1006, 5164, 3145, 1010, 5164, 2177, 1010, 5164, 3972, 27605, 3334, 1007, 1063, 2345, 5164, 3643, 1027, 2131, 3762, 17058, 1006, 3145, 1010, 2177, 1007, 1025, 2065, 1006, 2358, 22134, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/EndpointLinksResolver.java
EndpointLinksResolver.resolveLinks
public Map<String, Link> resolveLinks(String requestUrl) { String normalizedUrl = normalizeRequestUrl(requestUrl); Map<String, Link> links = new LinkedHashMap<>(); links.put("self", new Link(normalizedUrl)); for (ExposableEndpoint<?> endpoint : this.endpoints) { if (endpoint instanceof ExposableWebEndpoint) ...
java
public Map<String, Link> resolveLinks(String requestUrl) { String normalizedUrl = normalizeRequestUrl(requestUrl); Map<String, Link> links = new LinkedHashMap<>(); links.put("self", new Link(normalizedUrl)); for (ExposableEndpoint<?> endpoint : this.endpoints) { if (endpoint instanceof ExposableWebEndpoint) ...
[ "public", "Map", "<", "String", ",", "Link", ">", "resolveLinks", "(", "String", "requestUrl", ")", "{", "String", "normalizedUrl", "=", "normalizeRequestUrl", "(", "requestUrl", ")", ";", "Map", "<", "String", ",", "Link", ">", "links", "=", "new", "Linke...
Resolves links to the known endpoints based on a request with the given {@code requestUrl}. @param requestUrl the url of the request for the endpoint links @return the links
[ "Resolves", "links", "to", "the", "known", "endpoints", "based", "on", "a", "request", "with", "the", "given", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/EndpointLinksResolver.java#L70-L85
train
Resolves the links for the given request URL.
[ 30522, 2270, 4949, 1026, 5164, 1010, 4957, 1028, 10663, 13767, 2015, 1006, 5164, 5227, 3126, 2140, 1007, 1063, 5164, 3671, 3550, 3126, 2140, 1027, 3671, 17629, 2063, 15500, 3126, 2140, 1006, 5227, 3126, 2140, 1007, 1025, 4949, 1026, 5164, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/io/CsvReader.java
CsvReader.includeFields
public CsvReader includeFields(boolean ... fields) { if (fields == null || fields.length == 0) { throw new IllegalArgumentException("The set of included fields must not be null or empty."); } int lastTruePos = -1; for (int i = 0; i < fields.length; i++) { if (fields[i]) { lastTruePos = i; } } ...
java
public CsvReader includeFields(boolean ... fields) { if (fields == null || fields.length == 0) { throw new IllegalArgumentException("The set of included fields must not be null or empty."); } int lastTruePos = -1; for (int i = 0; i < fields.length; i++) { if (fields[i]) { lastTruePos = i; } } ...
[ "public", "CsvReader", "includeFields", "(", "boolean", "...", "fields", ")", "{", "if", "(", "fields", "==", "null", "||", "fields", ".", "length", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The set of included fields must not be nul...
Configures which fields of the CSV file should be included and which should be skipped. The parser will look at the first {@code n} fields, where {@code n} is the length of the boolean array. The parser will skip over all fields where the boolean value at the corresponding position in the array is {@code false}. The re...
[ "Configures", "which", "fields", "of", "the", "CSV", "file", "should", "be", "included", "and", "which", "should", "be", "skipped", ".", "The", "parser", "will", "look", "at", "the", "first", "{", "@code", "n", "}", "fields", "where", "{", "@code", "n", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/io/CsvReader.java#L197-L218
train
Sets the fields to be included in the CSV file.
[ 30522, 2270, 20116, 12229, 9648, 2099, 2421, 15155, 1006, 22017, 20898, 1012, 1012, 1012, 4249, 1007, 1063, 2065, 1006, 4249, 1027, 1027, 19701, 1064, 1064, 4249, 1012, 3091, 1027, 1027, 1014, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 1578...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/registration/RetryingRegistration.java
RetryingRegistration.register
@SuppressWarnings("unchecked") private void register(final G gateway, final int attempt, final long timeoutMillis) { // eager check for canceling to avoid some unnecessary work if (canceled) { return; } try { log.info("Registration at {} attempt {} (timeout={}ms)", targetName, attempt, timeoutMillis); ...
java
@SuppressWarnings("unchecked") private void register(final G gateway, final int attempt, final long timeoutMillis) { // eager check for canceling to avoid some unnecessary work if (canceled) { return; } try { log.info("Registration at {} attempt {} (timeout={}ms)", targetName, attempt, timeoutMillis); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "register", "(", "final", "G", "gateway", ",", "final", "int", "attempt", ",", "final", "long", "timeoutMillis", ")", "{", "// eager check for canceling to avoid some unnecessary work", "if", "(", ...
This method performs a registration attempt and triggers either a success notification or a retry, depending on the result.
[ "This", "method", "performs", "a", "registration", "attempt", "and", "triggers", "either", "a", "success", "notification", "or", "a", "retry", "depending", "on", "the", "result", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/registration/RetryingRegistration.java#L196-L263
train
Register with the Gateway.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2797, 11675, 4236, 1006, 2345, 1043, 11909, 1010, 2345, 20014, 3535, 1010, 2345, 2146, 2051, 5833, 19912, 2483, 1007, 1063, 1013, 1013, 9461, 4638, 2005, 17542...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.readFile
public <X> DataSource<X> readFile(FileInputFormat<X> inputFormat, String filePath) { if (inputFormat == null) { throw new IllegalArgumentException("InputFormat must not be null."); } if (filePath == null) { throw new IllegalArgumentException("The file path must not be null."); } inputFormat.setFilePath...
java
public <X> DataSource<X> readFile(FileInputFormat<X> inputFormat, String filePath) { if (inputFormat == null) { throw new IllegalArgumentException("InputFormat must not be null."); } if (filePath == null) { throw new IllegalArgumentException("The file path must not be null."); } inputFormat.setFilePath...
[ "public", "<", "X", ">", "DataSource", "<", "X", ">", "readFile", "(", "FileInputFormat", "<", "X", ">", "inputFormat", ",", "String", "filePath", ")", "{", "if", "(", "inputFormat", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
------------------------------------ File Input Format -----------------------------------------
[ "------------------------------------", "File", "Input", "Format", "-----------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L506-L523
train
Reads the data from the given file path using the given input format.
[ 30522, 2270, 1026, 1060, 1028, 2951, 6499, 3126, 3401, 1026, 1060, 1028, 3191, 8873, 2571, 1006, 5371, 2378, 18780, 14192, 4017, 1026, 1060, 1028, 7953, 14192, 4017, 1010, 5164, 5371, 15069, 1007, 1063, 2065, 1006, 7953, 14192, 4017, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/crf/crfpp/FeatureIndex.java
FeatureIndex.calcCost
public void calcCost(Path path) { path.cost = 0.0; if (alphaFloat_ != null) { float c = 0.0f; for (int i = 0; path.fvector.get(i) != -1; i++) { c += alphaFloat_[path.fvector.get(i) + path.lnode.y * y_.size() + path.rnode.y]; } ...
java
public void calcCost(Path path) { path.cost = 0.0; if (alphaFloat_ != null) { float c = 0.0f; for (int i = 0; path.fvector.get(i) != -1; i++) { c += alphaFloat_[path.fvector.get(i) + path.lnode.y * y_.size() + path.rnode.y]; } ...
[ "public", "void", "calcCost", "(", "Path", "path", ")", "{", "path", ".", "cost", "=", "0.0", ";", "if", "(", "alphaFloat_", "!=", "null", ")", "{", "float", "c", "=", "0.0f", ";", "for", "(", "int", "i", "=", "0", ";", "path", ".", "fvector", ...
计算转移特征函数的代价 @param path 边
[ "计算转移特征函数的代价" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/crf/crfpp/FeatureIndex.java#L79-L100
train
Calculate the cost of a path.
[ 30522, 2270, 11675, 10250, 21408, 3367, 1006, 4130, 4130, 1007, 1063, 4130, 1012, 3465, 1027, 1014, 1012, 1014, 1025, 2065, 1006, 6541, 10258, 16503, 1035, 999, 1027, 19701, 1007, 1063, 14257, 1039, 1027, 1014, 1012, 1014, 2546, 1025, 2005,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/logging/MessageFormatter.java
MessageFormatter.arrayFormat
static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray) { if (argArray == null || argArray.length == 0) { return new FormattingTuple(messagePattern, null); } int lastArrIdx = argArray.length - 1; Object ...
java
static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray) { if (argArray == null || argArray.length == 0) { return new FormattingTuple(messagePattern, null); } int lastArrIdx = argArray.length - 1; Object ...
[ "static", "FormattingTuple", "arrayFormat", "(", "final", "String", "messagePattern", ",", "final", "Object", "[", "]", "argArray", ")", "{", "if", "(", "argArray", "==", "null", "||", "argArray", ".", "length", "==", "0", ")", "{", "return", "new", "Forma...
Same principle as the {@link #format(String, Object)} and {@link #format(String, Object, Object)} methods except that any number of arguments can be passed in an array. @param messagePattern The message pattern which will be parsed and formatted @param argArray An array of arguments to be substituted in place of...
[ "Same", "principle", "as", "the", "{", "@link", "#format", "(", "String", "Object", ")", "}", "and", "{", "@link", "#format", "(", "String", "Object", "Object", ")", "}", "methods", "except", "that", "any", "number", "of", "arguments", "can", "be", "pass...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/logging/MessageFormatter.java#L170-L220
train
Format an array of message patterns.
[ 30522, 10763, 4289, 3436, 8525, 10814, 9140, 14192, 4017, 1006, 2345, 5164, 4471, 4502, 12079, 2078, 1010, 2345, 4874, 1031, 1033, 12098, 6843, 9447, 1007, 1063, 2065, 1006, 12098, 6843, 9447, 1027, 1027, 19701, 1064, 1064, 12098, 6843, 944...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java
Types.ENUM
public static <E extends Enum<E>> TypeInformation<E> ENUM(Class<E> enumType) { return new EnumTypeInfo<>(enumType); }
java
public static <E extends Enum<E>> TypeInformation<E> ENUM(Class<E> enumType) { return new EnumTypeInfo<>(enumType); }
[ "public", "static", "<", "E", "extends", "Enum", "<", "E", ">", ">", "TypeInformation", "<", "E", ">", "ENUM", "(", "Class", "<", "E", ">", "enumType", ")", "{", "return", "new", "EnumTypeInfo", "<>", "(", "enumType", ")", ";", "}" ]
Returns type information for Java enumerations. Null values are not supported. @param enumType enumeration class extending {@link java.lang.Enum}
[ "Returns", "type", "information", "for", "Java", "enumerations", ".", "Null", "values", "are", "not", "supported", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java#L440-L442
train
Returns a type information for an enum type.
[ 30522, 2270, 10763, 1026, 1041, 8908, 4372, 2819, 1026, 1041, 1028, 1028, 2828, 2378, 14192, 3370, 1026, 1041, 1028, 4372, 2819, 1006, 2465, 1026, 1041, 1028, 4372, 2819, 13874, 1007, 1063, 2709, 2047, 4372, 2819, 13874, 2378, 14876, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/ds/simple/SimpleDataSource.java
SimpleDataSource.init
public void init(String url, String user, String pass) { init(url, user, pass, null); }
java
public void init(String url, String user, String pass) { init(url, user, pass, null); }
[ "public", "void", "init", "(", "String", "url", ",", "String", "user", ",", "String", "pass", ")", "{", "init", "(", "url", ",", "user", ",", "pass", ",", "null", ")", ";", "}" ]
初始化 @param url jdbc url @param user 用户名 @param pass 密码
[ "初始化" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/ds/simple/SimpleDataSource.java#L124-L126
train
Initializes the connection to a remote host.
[ 30522, 2270, 11675, 1999, 4183, 1006, 5164, 24471, 2140, 1010, 5164, 5310, 1010, 5164, 3413, 1007, 1063, 1999, 4183, 1006, 24471, 2140, 1010, 5310, 1010, 3413, 1010, 19701, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/schema/ShardingSchema.java
ShardingSchema.renew
@Subscribe public synchronized void renew(final DisabledStateChangedEvent disabledStateChangedEvent) { OrchestrationShardingSchema shardingSchema = disabledStateChangedEvent.getShardingSchema(); if (getName().equals(shardingSchema.getSchemaName())) { for (MasterSlaveRule each : shardingR...
java
@Subscribe public synchronized void renew(final DisabledStateChangedEvent disabledStateChangedEvent) { OrchestrationShardingSchema shardingSchema = disabledStateChangedEvent.getShardingSchema(); if (getName().equals(shardingSchema.getSchemaName())) { for (MasterSlaveRule each : shardingR...
[ "@", "Subscribe", "public", "synchronized", "void", "renew", "(", "final", "DisabledStateChangedEvent", "disabledStateChangedEvent", ")", "{", "OrchestrationShardingSchema", "shardingSchema", "=", "disabledStateChangedEvent", ".", "getShardingSchema", "(", ")", ";", "if", ...
Renew disabled data source names. @param disabledStateChangedEvent disabled state changed event
[ "Renew", "disabled", "data", "source", "names", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/schema/ShardingSchema.java#L91-L99
train
Renews the disabled state.
[ 30522, 1030, 4942, 29234, 2270, 25549, 11675, 20687, 1006, 2345, 9776, 9153, 15007, 22043, 24844, 4765, 9776, 9153, 15007, 22043, 24844, 4765, 1007, 1063, 4032, 9285, 11783, 8613, 5403, 2863, 21146, 17080, 3070, 22842, 2863, 1027, 9776, 9153,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java
BucketingSink.reflectTruncate
private Method reflectTruncate(FileSystem fs) { // completely disable the check for truncate() because the check can be problematic // on some filesystem implementations if (!useTruncate) { return null; } Method m = null; if (fs != null) { Class<?> fsClass = fs.getClass(); try { m = fsClass.ge...
java
private Method reflectTruncate(FileSystem fs) { // completely disable the check for truncate() because the check can be problematic // on some filesystem implementations if (!useTruncate) { return null; } Method m = null; if (fs != null) { Class<?> fsClass = fs.getClass(); try { m = fsClass.ge...
[ "private", "Method", "reflectTruncate", "(", "FileSystem", "fs", ")", "{", "// completely disable the check for truncate() because the check can be problematic", "// on some filesystem implementations", "if", "(", "!", "useTruncate", ")", "{", "return", "null", ";", "}", "Met...
Gets the truncate() call using reflection. <p><b>NOTE:</b> This code comes from Flume.
[ "Gets", "the", "truncate", "()", "call", "using", "reflection", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java#L615-L664
train
This method reflects the truncate method.
[ 30522, 2797, 4118, 8339, 16344, 4609, 16280, 1006, 6764, 27268, 6633, 1042, 2015, 1007, 1063, 1013, 1013, 3294, 4487, 19150, 1996, 4638, 2005, 19817, 4609, 16280, 1006, 1007, 2138, 1996, 4638, 2064, 2022, 18636, 1013, 1013, 2006, 2070, 6764...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
SingleInputGate.assignExclusiveSegments
public void assignExclusiveSegments(NetworkBufferPool networkBufferPool, int networkBuffersPerChannel) throws IOException { checkState(this.isCreditBased, "Bug in input gate setup logic: exclusive buffers only exist with credit-based flow control."); checkState(this.networkBufferPool == null, "Bug in input gate set...
java
public void assignExclusiveSegments(NetworkBufferPool networkBufferPool, int networkBuffersPerChannel) throws IOException { checkState(this.isCreditBased, "Bug in input gate setup logic: exclusive buffers only exist with credit-based flow control."); checkState(this.networkBufferPool == null, "Bug in input gate set...
[ "public", "void", "assignExclusiveSegments", "(", "NetworkBufferPool", "networkBufferPool", ",", "int", "networkBuffersPerChannel", ")", "throws", "IOException", "{", "checkState", "(", "this", ".", "isCreditBased", ",", "\"Bug in input gate setup logic: exclusive buffers only ...
Assign the exclusive buffers to all remote input channels directly for credit-based mode. @param networkBufferPool The global pool to request and recycle exclusive buffers @param networkBuffersPerChannel The number of exclusive buffers for each channel
[ "Assign", "the", "exclusive", "buffers", "to", "all", "remote", "input", "channels", "directly", "for", "credit", "-", "based", "mode", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java#L305-L321
train
Assigns exclusive segments to this input gate.
[ 30522, 2270, 11675, 23911, 10288, 23633, 3366, 21693, 11187, 1006, 2897, 8569, 12494, 16869, 2897, 8569, 12494, 16869, 1010, 20014, 2897, 8569, 12494, 17668, 26058, 1007, 11618, 22834, 10288, 24422, 1063, 14148, 12259, 1006, 2023, 1012, 2003, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.newerThan
public static boolean newerThan(File file, File reference) { if (null == reference || false == reference.exists()) { return true;// 文件一定比一个不存在的文件新 } return newerThan(file, reference.lastModified()); }
java
public static boolean newerThan(File file, File reference) { if (null == reference || false == reference.exists()) { return true;// 文件一定比一个不存在的文件新 } return newerThan(file, reference.lastModified()); }
[ "public", "static", "boolean", "newerThan", "(", "File", "file", ",", "File", "reference", ")", "{", "if", "(", "null", "==", "reference", "||", "false", "==", "reference", ".", "exists", "(", ")", ")", "{", "return", "true", ";", "// 文件一定比一个不存在的文件新\r", ...
给定文件或目录的最后修改时间是否晚于给定时间 @param file 文件或目录 @param reference 参照文件 @return 是否晚于给定时间
[ "给定文件或目录的最后修改时间是否晚于给定时间" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L566-L571
train
Checks if the given file is newer than the given reference file.
[ 30522, 2270, 10763, 22017, 20898, 10947, 21604, 1006, 5371, 5371, 1010, 5371, 4431, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 4431, 1064, 1064, 6270, 1027, 1027, 4431, 1012, 6526, 1006, 1007, 1007, 1063, 2709, 2995, 1025, 1013, 1013, 1861,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java
IdleStateHandler.newIdleStateEvent
protected IdleStateEvent newIdleStateEvent(IdleState state, boolean first) { switch (state) { case ALL_IDLE: return first ? IdleStateEvent.FIRST_ALL_IDLE_STATE_EVENT : IdleStateEvent.ALL_IDLE_STATE_EVENT; case READER_IDLE: return first ? IdleStateEvent.FIR...
java
protected IdleStateEvent newIdleStateEvent(IdleState state, boolean first) { switch (state) { case ALL_IDLE: return first ? IdleStateEvent.FIRST_ALL_IDLE_STATE_EVENT : IdleStateEvent.ALL_IDLE_STATE_EVENT; case READER_IDLE: return first ? IdleStateEvent.FIR...
[ "protected", "IdleStateEvent", "newIdleStateEvent", "(", "IdleState", "state", ",", "boolean", "first", ")", "{", "switch", "(", "state", ")", "{", "case", "ALL_IDLE", ":", "return", "first", "?", "IdleStateEvent", ".", "FIRST_ALL_IDLE_STATE_EVENT", ":", "IdleStat...
Returns a {@link IdleStateEvent}.
[ "Returns", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java#L378-L389
train
Creates a new IdleStateEvent.
[ 30522, 5123, 18373, 9153, 17389, 15338, 2047, 3593, 4244, 12259, 18697, 3372, 1006, 18373, 9153, 2618, 2110, 1010, 22017, 20898, 2034, 1007, 1063, 6942, 1006, 2110, 1007, 1063, 2553, 2035, 1035, 18373, 1024, 2709, 2034, 1029, 18373, 9153, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java
ExpectedConditions.visibilityOf
public static ExpectedCondition<WebElement> visibilityOf(final WebElement element) { return new ExpectedCondition<WebElement>() { @Override public WebElement apply(WebDriver driver) { return elementIfVisible(element); } @Override public String toString() { return "visi...
java
public static ExpectedCondition<WebElement> visibilityOf(final WebElement element) { return new ExpectedCondition<WebElement>() { @Override public WebElement apply(WebDriver driver) { return elementIfVisible(element); } @Override public String toString() { return "visi...
[ "public", "static", "ExpectedCondition", "<", "WebElement", ">", "visibilityOf", "(", "final", "WebElement", "element", ")", "{", "return", "new", "ExpectedCondition", "<", "WebElement", ">", "(", ")", "{", "@", "Override", "public", "WebElement", "apply", "(", ...
An expectation for checking that an element, known to be present on the DOM of a page, is visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0. @param element the WebElement @return the (same) WebElement once it is visible
[ "An", "expectation", "for", "checking", "that", "an", "element", "known", "to", "be", "present", "on", "the", "DOM", "of", "a", "page", "is", "visible", ".", "Visibility", "means", "that", "the", "element", "is", "not", "only", "displayed", "but", "also", ...
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java#L296-L308
train
An expectation for checking that an element is visible.
[ 30522, 2270, 10763, 3517, 8663, 20562, 1026, 4773, 12260, 3672, 1028, 16476, 11253, 1006, 2345, 4773, 12260, 3672, 5783, 1007, 1063, 2709, 2047, 3517, 8663, 20562, 1026, 4773, 12260, 3672, 1028, 1006, 1007, 1063, 1030, 2058, 15637, 2270, 47...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.setKeepAlive
public static void setKeepAlive(HttpMessage message, boolean keepAlive) { setKeepAlive(message.headers(), message.protocolVersion(), keepAlive); }
java
public static void setKeepAlive(HttpMessage message, boolean keepAlive) { setKeepAlive(message.headers(), message.protocolVersion(), keepAlive); }
[ "public", "static", "void", "setKeepAlive", "(", "HttpMessage", "message", ",", "boolean", "keepAlive", ")", "{", "setKeepAlive", "(", "message", ".", "headers", "(", ")", ",", "message", ".", "protocolVersion", "(", ")", ",", "keepAlive", ")", ";", "}" ]
Sets the value of the {@code "Connection"} header depending on the protocol version of the specified message. This getMethod sets or removes the {@code "Connection"} header depending on what the default keep alive mode of the message's protocol version is, as specified by {@link HttpVersion#isKeepAliveDefault()}. <ul> ...
[ "Sets", "the", "value", "of", "the", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L93-L95
train
Sets the keep alive flag on the given message.
[ 30522, 2270, 10763, 11675, 2275, 20553, 12952, 3512, 1006, 8299, 7834, 3736, 3351, 4471, 1010, 22017, 20898, 2562, 11475, 3726, 1007, 1063, 2275, 20553, 12952, 3512, 1006, 4471, 1012, 20346, 2015, 1006, 1007, 1010, 4471, 1012, 8778, 27774, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.doubleClick
public Actions doubleClick() { if (isBuildingActions()) { action.addAction(new DoubleClickAction(jsonMouse, null)); } return clickInTicks(LEFT).clickInTicks(LEFT); }
java
public Actions doubleClick() { if (isBuildingActions()) { action.addAction(new DoubleClickAction(jsonMouse, null)); } return clickInTicks(LEFT).clickInTicks(LEFT); }
[ "public", "Actions", "doubleClick", "(", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "DoubleClickAction", "(", "jsonMouse", ",", "null", ")", ")", ";", "}", "return", "clickInTicks", "(", "LEFT", ...
Performs a double-click at the current mouse location. @return A self reference.
[ "Performs", "a", "double", "-", "click", "at", "the", "current", "mouse", "location", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L344-L350
train
Double click.
[ 30522, 2270, 4506, 3313, 20464, 6799, 1006, 1007, 1063, 2065, 1006, 2003, 25820, 18908, 8496, 1006, 1007, 1007, 1063, 2895, 1012, 5587, 18908, 3258, 1006, 2047, 3313, 20464, 6799, 18908, 3258, 1006, 1046, 3385, 27711, 2063, 1010, 19701, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java
TableSchema.getFieldType
public Optional<TypeInformation<?>> getFieldType(String fieldName) { if (fieldNameToIndex.containsKey(fieldName)) { return Optional.of(fieldTypes[fieldNameToIndex.get(fieldName)]); } return Optional.empty(); }
java
public Optional<TypeInformation<?>> getFieldType(String fieldName) { if (fieldNameToIndex.containsKey(fieldName)) { return Optional.of(fieldTypes[fieldNameToIndex.get(fieldName)]); } return Optional.empty(); }
[ "public", "Optional", "<", "TypeInformation", "<", "?", ">", ">", "getFieldType", "(", "String", "fieldName", ")", "{", "if", "(", "fieldNameToIndex", ".", "containsKey", "(", "fieldName", ")", ")", "{", "return", "Optional", ".", "of", "(", "fieldTypes", ...
Returns the specified type information for the given field name. @param fieldName the name of the field
[ "Returns", "the", "specified", "type", "information", "for", "the", "given", "field", "name", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java#L121-L126
train
Gets the type information for the given field name.
[ 30522, 2270, 11887, 1026, 2828, 2378, 14192, 3370, 1026, 1029, 1028, 1028, 2131, 3790, 13874, 1006, 5164, 2492, 18442, 1007, 1063, 2065, 1006, 2492, 18442, 3406, 22254, 10288, 1012, 3397, 14839, 1006, 2492, 18442, 1007, 1007, 1063, 2709, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.joinWithTiny
public <R> JoinOperatorSets<T, R> joinWithTiny(DataSet<R> other) { return new JoinOperatorSets<>(this, other, JoinHint.BROADCAST_HASH_SECOND); }
java
public <R> JoinOperatorSets<T, R> joinWithTiny(DataSet<R> other) { return new JoinOperatorSets<>(this, other, JoinHint.BROADCAST_HASH_SECOND); }
[ "public", "<", "R", ">", "JoinOperatorSets", "<", "T", ",", "R", ">", "joinWithTiny", "(", "DataSet", "<", "R", ">", "other", ")", "{", "return", "new", "JoinOperatorSets", "<>", "(", "this", ",", "other", ",", "JoinHint", ".", "BROADCAST_HASH_SECOND", "...
Initiates a Join transformation. <p>A Join transformation joins the elements of two {@link DataSet DataSets} on key equality and provides multiple ways to combine joining elements into one DataSet. <p>This method also gives the hint to the optimizer that the second DataSet to join is much smaller than the first one. ...
[ "Initiates", "a", "Join", "transformation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L797-L799
train
Joins the data set with the specified data set with the second data set.
[ 30522, 2270, 1026, 1054, 1028, 3693, 25918, 18926, 8454, 1026, 1056, 1010, 1054, 1028, 3693, 24415, 7629, 2100, 1006, 2951, 13462, 1026, 1054, 1028, 2060, 1007, 1063, 2709, 2047, 3693, 25918, 18926, 8454, 1026, 1028, 1006, 2023, 1010, 2060,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerSnapshotData.java
KryoSerializerSnapshotData.createFrom
static <T> KryoSerializerSnapshotData<T> createFrom( Class<T> typeClass, LinkedHashMap<Class<?>, SerializableSerializer<?>> defaultKryoSerializers, LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> defaultKryoSerializerClasses, LinkedHashMap<String, KryoRegistration> kryoRegistrations) { return new Kry...
java
static <T> KryoSerializerSnapshotData<T> createFrom( Class<T> typeClass, LinkedHashMap<Class<?>, SerializableSerializer<?>> defaultKryoSerializers, LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> defaultKryoSerializerClasses, LinkedHashMap<String, KryoRegistration> kryoRegistrations) { return new Kry...
[ "static", "<", "T", ">", "KryoSerializerSnapshotData", "<", "T", ">", "createFrom", "(", "Class", "<", "T", ">", "typeClass", ",", "LinkedHashMap", "<", "Class", "<", "?", ">", ",", "SerializableSerializer", "<", "?", ">", ">", "defaultKryoSerializers", ",",...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerSnapshotData.java#L54-L65
train
Creates a new instance of the KryoSerializerSnapshotData class.
[ 30522, 10763, 1026, 1056, 1028, 1047, 2854, 9232, 14482, 17629, 2015, 2532, 4523, 12326, 2850, 2696, 1026, 1056, 1028, 3443, 19699, 5358, 1006, 2465, 1026, 1056, 1028, 2828, 26266, 1010, 5799, 14949, 22444, 2361, 1026, 2465, 1026, 1029, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
FutureUtils.runIfNotDoneAndGet
public static <T> T runIfNotDoneAndGet(RunnableFuture<T> future) throws ExecutionException, InterruptedException { if (null == future) { return null; } if (!future.isDone()) { future.run(); } return future.get(); }
java
public static <T> T runIfNotDoneAndGet(RunnableFuture<T> future) throws ExecutionException, InterruptedException { if (null == future) { return null; } if (!future.isDone()) { future.run(); } return future.get(); }
[ "public", "static", "<", "T", ">", "T", "runIfNotDoneAndGet", "(", "RunnableFuture", "<", "T", ">", "future", ")", "throws", "ExecutionException", ",", "InterruptedException", "{", "if", "(", "null", "==", "future", ")", "{", "return", "null", ";", "}", "i...
Run the given {@code RunnableFuture} if it is not done, and then retrieves its result. @param future to run if not done and get @param <T> type of the result @return the result after running the future @throws ExecutionException if a problem occurred @throws InterruptedException if the current thread has been interrupt...
[ "Run", "the", "given", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L384-L395
train
Run the given runnable future if not done and get the result.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 2448, 10128, 17048, 5280, 11219, 24291, 1006, 2448, 22966, 11263, 11244, 1026, 1056, 1028, 2925, 1007, 11618, 7781, 10288, 24422, 1010, 7153, 10288, 24422, 1063, 2065, 1006, 19701, 1027, 1027, 2925,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java
DaoTemplate.addOrUpdate
public int addOrUpdate(Entity entity) throws SQLException { return null == entity.get(primaryKeyField) ? add(entity) : update(entity); }
java
public int addOrUpdate(Entity entity) throws SQLException { return null == entity.get(primaryKeyField) ? add(entity) : update(entity); }
[ "public", "int", "addOrUpdate", "(", "Entity", "entity", ")", "throws", "SQLException", "{", "return", "null", "==", "entity", ".", "get", "(", "primaryKeyField", ")", "?", "add", "(", "entity", ")", ":", "update", "(", "entity", ")", ";", "}" ]
增加或者更新实体 @param entity 实体,当包含主键时更新,否则新增 @return 新增或更新条数 @throws SQLException SQL执行异常
[ "增加或者更新实体" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java#L204-L206
train
Adds or updates an entity.
[ 30522, 2270, 20014, 5587, 2953, 6279, 13701, 1006, 9178, 9178, 1007, 11618, 29296, 10288, 24422, 1063, 2709, 19701, 1027, 1027, 9178, 1012, 2131, 1006, 3078, 14839, 3790, 1007, 1029, 5587, 1006, 9178, 1007, 1024, 10651, 1006, 9178, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.read
public static String read(ReadableByteChannel channel, Charset charset) throws IORuntimeException { FastByteArrayOutputStream out = read(channel); return null == charset ? out.toString() : out.toString(charset); }
java
public static String read(ReadableByteChannel channel, Charset charset) throws IORuntimeException { FastByteArrayOutputStream out = read(channel); return null == charset ? out.toString() : out.toString(charset); }
[ "public", "static", "String", "read", "(", "ReadableByteChannel", "channel", ",", "Charset", "charset", ")", "throws", "IORuntimeException", "{", "FastByteArrayOutputStream", "out", "=", "read", "(", "channel", ")", ";", "return", "null", "==", "charset", "?", "...
从流中读取内容,读取完毕后并不关闭流 @param channel 可读通道,读取完毕后并不关闭通道 @param charset 字符集 @return 内容 @throws IORuntimeException IO异常 @since 4.5.0
[ "从流中读取内容,读取完毕后并不关闭流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L423-L426
train
Reads a sequence of bytes from the specified channel using the specified encoding.
[ 30522, 2270, 10763, 5164, 3191, 1006, 3191, 3085, 3762, 15007, 20147, 2140, 3149, 1010, 25869, 13462, 25869, 13462, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 3435, 3762, 27058, 11335, 30524, 1006, 25869, 13462, 1007, 1025, 1065, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/TumblingProcessingTimeWindows.java
TumblingProcessingTimeWindows.of
public static TumblingProcessingTimeWindows of(Time size, Time offset) { return new TumblingProcessingTimeWindows(size.toMilliseconds(), offset.toMilliseconds()); }
java
public static TumblingProcessingTimeWindows of(Time size, Time offset) { return new TumblingProcessingTimeWindows(size.toMilliseconds(), offset.toMilliseconds()); }
[ "public", "static", "TumblingProcessingTimeWindows", "of", "(", "Time", "size", ",", "Time", "offset", ")", "{", "return", "new", "TumblingProcessingTimeWindows", "(", "size", ".", "toMilliseconds", "(", ")", ",", "offset", ".", "toMilliseconds", "(", ")", ")", ...
Creates a new {@code TumblingProcessingTimeWindows} {@link WindowAssigner} that assigns elements to time windows based on the element timestamp and offset. <p>For example, if you want window a stream by hour,but window begins at the 15th minutes of each hour, you can use {@code of(Time.hours(1),Time.minutes(15))},then...
[ "Creates", "a", "new", "{", "@code", "TumblingProcessingTimeWindows", "}", "{", "@link", "WindowAssigner", "}", "that", "assigns", "elements", "to", "time", "windows", "based", "on", "the", "element", "timestamp", "and", "offset", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/TumblingProcessingTimeWindows.java#L109-L111
train
Create a TumblingProcessingTimeWindows with the given size and offset.
[ 30522, 2270, 10763, 21552, 21572, 9623, 7741, 7292, 11101, 15568, 1997, 1006, 2051, 2946, 1010, 2051, 16396, 1007, 1063, 2709, 2047, 21552, 21572, 9623, 7741, 7292, 11101, 15568, 1006, 2946, 1012, 3419, 8591, 5562, 8663, 5104, 1006, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.copy
public static void copy(AsciiString src, int srcIdx, ByteBuf dst, int dstIdx, int length) { if (isOutOfBounds(srcIdx, length, src.length())) { throw new IndexOutOfBoundsException("expected: " + "0 <= srcIdx(" + srcIdx + ") <= srcIdx + length(" + length + ") <= srcLen(" + ...
java
public static void copy(AsciiString src, int srcIdx, ByteBuf dst, int dstIdx, int length) { if (isOutOfBounds(srcIdx, length, src.length())) { throw new IndexOutOfBoundsException("expected: " + "0 <= srcIdx(" + srcIdx + ") <= srcIdx + length(" + length + ") <= srcLen(" + ...
[ "public", "static", "void", "copy", "(", "AsciiString", "src", ",", "int", "srcIdx", ",", "ByteBuf", "dst", ",", "int", "dstIdx", ",", "int", "length", ")", "{", "if", "(", "isOutOfBounds", "(", "srcIdx", ",", "length", ",", "src", ".", "length", "(", ...
Copies the content of {@code src} to a {@link ByteBuf} using {@link ByteBuf#setBytes(int, byte[], int, int)}. Unlike the {@link #copy(AsciiString, ByteBuf)} and {@link #copy(AsciiString, int, ByteBuf, int)} methods, this method do not increase a {@code writerIndex} of {@code dst} buffer. @param src the source string t...
[ "Copies", "the", "content", "of", "{", "@code", "src", "}", "to", "a", "{", "@link", "ByteBuf", "}", "using", "{", "@link", "ByteBuf#setBytes", "(", "int", "byte", "[]", "int", "int", ")", "}", ".", "Unlike", "the", "{", "@link", "#copy", "(", "Ascii...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L881-L888
train
Copies the bytes from src to dst.
[ 30522, 2270, 10763, 11675, 6100, 1006, 2004, 6895, 2923, 4892, 5034, 2278, 1010, 20014, 5034, 6895, 2094, 2595, 1010, 24880, 8569, 2546, 16233, 2102, 1010, 20014, 16233, 3775, 2094, 2595, 1010, 20014, 3091, 1007, 1063, 2065, 1006, 11163, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
common/network-common/src/main/java/org/apache/spark/network/sasl/SaslEncryption.java
SaslEncryption.addToChannel
static void addToChannel( Channel channel, SaslEncryptionBackend backend, int maxOutboundBlockSize) { channel.pipeline() .addFirst(ENCRYPTION_HANDLER_NAME, new EncryptionHandler(backend, maxOutboundBlockSize)) .addFirst("saslDecryption", new DecryptionHandler(backend)) .addFirst(...
java
static void addToChannel( Channel channel, SaslEncryptionBackend backend, int maxOutboundBlockSize) { channel.pipeline() .addFirst(ENCRYPTION_HANDLER_NAME, new EncryptionHandler(backend, maxOutboundBlockSize)) .addFirst("saslDecryption", new DecryptionHandler(backend)) .addFirst(...
[ "static", "void", "addToChannel", "(", "Channel", "channel", ",", "SaslEncryptionBackend", "backend", ",", "int", "maxOutboundBlockSize", ")", "{", "channel", ".", "pipeline", "(", ")", ".", "addFirst", "(", "ENCRYPTION_HANDLER_NAME", ",", "new", "EncryptionHandler"...
Adds channel handlers that perform encryption / decryption of data using SASL. @param channel The channel. @param backend The SASL backend. @param maxOutboundBlockSize Max size in bytes of outgoing encrypted blocks, to control memory usage.
[ "Adds", "channel", "handlers", "that", "perform", "encryption", "/", "decryption", "of", "data", "using", "SASL", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/sasl/SaslEncryption.java#L57-L65
train
Add to channel.
[ 30522, 10763, 11675, 5587, 3406, 26058, 1006, 3149, 3149, 1010, 21871, 7770, 26775, 22571, 3508, 5963, 10497, 2067, 10497, 1010, 20014, 4098, 5833, 15494, 23467, 5332, 4371, 1007, 1063, 3149, 1012, 13117, 1006, 1007, 1012, 5587, 8873, 12096, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.write
@Override public void write(DataOutputView out) throws IOException { // make sure everything is in a valid binary representation updateBinaryRepresenation(); // write the length first, variably encoded, then the contents of the binary array writeVarLengthInt(out, this.binaryLen); out.write(this.binaryData...
java
@Override public void write(DataOutputView out) throws IOException { // make sure everything is in a valid binary representation updateBinaryRepresenation(); // write the length first, variably encoded, then the contents of the binary array writeVarLengthInt(out, this.binaryLen); out.write(this.binaryData...
[ "@", "Override", "public", "void", "write", "(", "DataOutputView", "out", ")", "throws", "IOException", "{", "// make sure everything is in a valid binary representation", "updateBinaryRepresenation", "(", ")", ";", "// write the length first, variably encoded, then the contents of...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L1085-L1093
train
Writes the contents of the CID into the specified output view.
[ 30522, 1030, 2058, 15637, 2270, 11675, 4339, 1006, 2951, 5833, 18780, 8584, 2041, 1007, 11618, 22834, 10288, 24422, 1063, 1013, 1013, 2191, 2469, 2673, 2003, 1999, 1037, 9398, 12441, 6630, 10651, 21114, 2854, 2890, 28994, 8189, 3508, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/TransformMatrix.java
TransformMatrix.extend
public void extend(int ordinaryMax) { this.ordinaryMax = ordinaryMax; double[][] n_transititon_probability = new double[ordinaryMax][ordinaryMax]; for (int i = 0; i < transititon_probability.length; i++) { System.arraycopy(transititon_probability[i], 0, n_transititon_prob...
java
public void extend(int ordinaryMax) { this.ordinaryMax = ordinaryMax; double[][] n_transititon_probability = new double[ordinaryMax][ordinaryMax]; for (int i = 0; i < transititon_probability.length; i++) { System.arraycopy(transititon_probability[i], 0, n_transititon_prob...
[ "public", "void", "extend", "(", "int", "ordinaryMax", ")", "{", "this", ".", "ordinaryMax", "=", "ordinaryMax", ";", "double", "[", "]", "[", "]", "n_transititon_probability", "=", "new", "double", "[", "ordinaryMax", "]", "[", "ordinaryMax", "]", ";", "f...
拓展内部矩阵,仅用于通过反射新增了枚举实例之后的兼容措施
[ "拓展内部矩阵", "仅用于通过反射新增了枚举实例之后的兼容措施" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/TransformMatrix.java#L149-L173
train
Extend the class with the ordinaryMax value.
[ 30522, 2270, 11675, 7949, 1006, 20014, 6623, 17848, 1007, 1063, 2023, 1012, 6623, 17848, 1027, 6623, 17848, 1025, 3313, 1031, 1033, 1031, 1033, 1050, 1035, 6671, 9956, 2078, 1035, 9723, 1027, 2047, 3313, 1031, 6623, 17848, 1033, 1031, 6623,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
TaskExecutor.triggerCheckpoint
@Override public CompletableFuture<Acknowledge> triggerCheckpoint( ExecutionAttemptID executionAttemptID, long checkpointId, long checkpointTimestamp, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) { log.debug("Trigger checkpoint {}@{} for {}.", checkpointId, checkpointTimestamp...
java
@Override public CompletableFuture<Acknowledge> triggerCheckpoint( ExecutionAttemptID executionAttemptID, long checkpointId, long checkpointTimestamp, CheckpointOptions checkpointOptions, boolean advanceToEndOfEventTime) { log.debug("Trigger checkpoint {}@{} for {}.", checkpointId, checkpointTimestamp...
[ "@", "Override", "public", "CompletableFuture", "<", "Acknowledge", ">", "triggerCheckpoint", "(", "ExecutionAttemptID", "executionAttemptID", ",", "long", "checkpointId", ",", "long", "checkpointTimestamp", ",", "CheckpointOptions", "checkpointOptions", ",", "boolean", "...
----------------------------------------------------------------------
[ "----------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java#L682-L708
train
Trigger a checkpoint.
[ 30522, 1030, 2058, 15637, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 13399, 1028, 9495, 5403, 3600, 8400, 1006, 7781, 19321, 6633, 13876, 3593, 7781, 19321, 6633, 13876, 3593, 1010, 2146, 26520, 3593, 1010, 2146, 26520, 7292, 9153, 8737, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java
KinesisDataFetcher.createInitialSubscribedStreamsToLastDiscoveredShardsState
protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; }
java
protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; }
[ "protected", "static", "HashMap", "<", "String", ",", "String", ">", "createInitialSubscribedStreamsToLastDiscoveredShardsState", "(", "List", "<", "String", ">", "streams", ")", "{", "HashMap", "<", "String", ",", "String", ">", "initial", "=", "new", "HashMap", ...
Utility function to create an initial map of the last discovered shard id of each subscribed stream, set to null; This is called in the constructor; correct values will be set later on by calling advanceLastDiscoveredShardOfStream(). @param streams the list of subscribed streams @return the initial map for subscribedS...
[ "Utility", "function", "to", "create", "an", "initial", "map", "of", "the", "last", "discovered", "shard", "id", "of", "each", "subscribed", "stream", "set", "to", "null", ";", "This", "is", "called", "in", "the", "constructor", ";", "correct", "values", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java#L859-L865
train
Creates the initial subscribed streams to last discovered shards state.
[ 30522, 5123, 10763, 23325, 2863, 2361, 1026, 5164, 1010, 5164, 1028, 3443, 5498, 20925, 6342, 5910, 26775, 20755, 5104, 25379, 16033, 8523, 2102, 10521, 3597, 25896, 7377, 17811, 9153, 2618, 1006, 2862, 1026, 5164, 1028, 9199, 1007, 1063, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java
URLUtil.encode
public static String encode(String url, Charset charset) { if (StrUtil.isEmpty(url)) { return url; } if (null == charset) { charset = CharsetUtil.defaultCharset(); } return URLEncoder.DEFAULT.encode(url, charset); }
java
public static String encode(String url, Charset charset) { if (StrUtil.isEmpty(url)) { return url; } if (null == charset) { charset = CharsetUtil.defaultCharset(); } return URLEncoder.DEFAULT.encode(url, charset); }
[ "public", "static", "String", "encode", "(", "String", "url", ",", "Charset", "charset", ")", "{", "if", "(", "StrUtil", ".", "isEmpty", "(", "url", ")", ")", "{", "return", "url", ";", "}", "if", "(", "null", "==", "charset", ")", "{", "charset", ...
编码字符为 application/x-www-form-urlencoded<br> 将需要转换的内容(ASCII码形式之外的内容),用十六进制表示法转换出来,并在之前加上%开头。<br> 此方法用于URL自动编码,类似于浏览器中键入地址自动编码,对于像类似于“/”的字符不再编码 @param url 被编码内容 @param charset 编码 @return 编码后的字符 @since 4.4.1
[ "编码字符为", "application", "/", "x", "-", "www", "-", "form", "-", "urlencoded<br", ">", "将需要转换的内容(ASCII码形式之外的内容),用十六进制表示法转换出来,并在之前加上%开头。<br", ">", "此方法用于URL自动编码,类似于浏览器中键入地址自动编码,对于像类似于“", "/", "”的字符不再编码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java#L275-L283
train
URL encode method.
[ 30522, 2270, 10763, 5164, 4372, 16044, 1006, 5164, 24471, 2140, 1010, 25869, 13462, 25869, 13462, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 6633, 13876, 2100, 1006, 24471, 2140, 1007, 1007, 1063, 2709, 24471, 2140, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java
AbstractEpollStreamChannel.spliceTo
public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len) { return spliceTo(ch, offset, len, newPromise()); }
java
public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len) { return spliceTo(ch, offset, len, newPromise()); }
[ "public", "final", "ChannelFuture", "spliceTo", "(", "final", "FileDescriptor", "ch", ",", "final", "int", "offset", ",", "final", "int", "len", ")", "{", "return", "spliceTo", "(", "ch", ",", "offset", ",", "len", ",", "newPromise", "(", ")", ")", ";", ...
Splice from this {@link AbstractEpollStreamChannel} to another {@link FileDescriptor}. The {@code offset} is the offset for the {@link FileDescriptor} and {@code len} is the number of bytes to splice. If using {@link Integer#MAX_VALUE} it will splice until the {@link ChannelFuture} was canceled or it was failed. Pleas...
[ "Splice", "from", "this", "{", "@link", "AbstractEpollStreamChannel", "}", "to", "another", "{", "@link", "FileDescriptor", "}", ".", "The", "{", "@code", "offset", "}", "is", "the", "offset", "for", "the", "{", "@link", "FileDescriptor", "}", "and", "{", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java#L196-L198
train
splice to.
[ 30522, 2270, 2345, 3149, 11263, 11244, 11867, 13231, 3406, 1006, 2345, 6406, 2229, 23235, 2953, 10381, 1010, 2345, 20014, 16396, 1010, 2345, 20014, 18798, 1007, 1063, 2709, 11867, 13231, 3406, 1006, 10381, 1010, 16396, 1010, 18798, 1010, 2047...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/EventTransactionBuffer.java
EventTransactionBuffer.checkFreeSlotAt
private boolean checkFreeSlotAt(final long sequence) { final long wrapPoint = sequence - bufferSize; if (wrapPoint > flushSequence.get()) { // 刚好追上一轮 return false; } else { return true; } }
java
private boolean checkFreeSlotAt(final long sequence) { final long wrapPoint = sequence - bufferSize; if (wrapPoint > flushSequence.get()) { // 刚好追上一轮 return false; } else { return true; } }
[ "private", "boolean", "checkFreeSlotAt", "(", "final", "long", "sequence", ")", "{", "final", "long", "wrapPoint", "=", "sequence", "-", "bufferSize", ";", "if", "(", "wrapPoint", ">", "flushSequence", ".", "get", "(", ")", ")", "{", "// 刚好追上一轮", "return", ...
查询是否有空位
[ "查询是否有空位" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/EventTransactionBuffer.java#L131-L138
train
Check if free slot at the given sequence is at the flush sequence.
[ 30522, 2797, 22017, 20898, 4638, 23301, 14540, 17287, 2102, 1006, 2345, 2146, 5537, 1007, 1063, 2345, 2146, 10236, 8400, 1027, 5537, 1011, 17698, 5332, 4371, 1025, 2065, 1006, 10236, 8400, 1028, 13862, 3366, 4226, 5897, 1012, 2131, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java
Decimal.castToIntegral
public static long castToIntegral(Decimal dec) { BigDecimal bd = dec.toBigDecimal(); // rounding down. This is consistent with float=>int, // and consistent with SQLServer, Spark. bd = bd.setScale(0, RoundingMode.DOWN); return bd.longValue(); }
java
public static long castToIntegral(Decimal dec) { BigDecimal bd = dec.toBigDecimal(); // rounding down. This is consistent with float=>int, // and consistent with SQLServer, Spark. bd = bd.setScale(0, RoundingMode.DOWN); return bd.longValue(); }
[ "public", "static", "long", "castToIntegral", "(", "Decimal", "dec", ")", "{", "BigDecimal", "bd", "=", "dec", ".", "toBigDecimal", "(", ")", ";", "// rounding down. This is consistent with float=>int,", "// and consistent with SQLServer, Spark.", "bd", "=", "bd", ".", ...
to cast to floats, overflow will not happen, because precision<=38.
[ "to", "cast", "to", "floats", "overflow", "will", "not", "happen", "because", "precision<", "=", "38", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java#L337-L343
train
Casts a decimal to an integer.
[ 30522, 2270, 10763, 2146, 3459, 3406, 18447, 13910, 7941, 1006, 26066, 11703, 1007, 1063, 2502, 3207, 6895, 9067, 1038, 2094, 1027, 11703, 1012, 2000, 5638, 2290, 3207, 6895, 9067, 1006, 1007, 1025, 1013, 1013, 26939, 2091, 1012, 2023, 2003...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/BigIntComparator.java
BigIntComparator.putNormalizedKey
@Override public void putNormalizedKey(BigInteger record, MemorySegment target, int offset, int len) { // add normalized bit length (the larger the length, the larger the value) int bitLen = 0; if (len > 0) { final int signum = record.signum(); bitLen = record.bitLength(); // normalize dependent on sig...
java
@Override public void putNormalizedKey(BigInteger record, MemorySegment target, int offset, int len) { // add normalized bit length (the larger the length, the larger the value) int bitLen = 0; if (len > 0) { final int signum = record.signum(); bitLen = record.bitLength(); // normalize dependent on sig...
[ "@", "Override", "public", "void", "putNormalizedKey", "(", "BigInteger", "record", ",", "MemorySegment", "target", ",", "int", "offset", ",", "int", "len", ")", "{", "// add normalized bit length (the larger the length, the larger the value)", "int", "bitLen", "=", "0"...
Adds a normalized key containing the normalized number of bits and MSBs of the given record. 1 bit determines the sign (negative, zero/positive), 31 bit the bit length of the record. Remaining bytes contain the most significant bits of the record.
[ "Adds", "a", "normalized", "key", "containing", "the", "normalized", "number", "of", "bits", "and", "MSBs", "of", "the", "given", "record", ".", "1", "bit", "determines", "the", "sign", "(", "negative", "zero", "/", "positive", ")", "31", "bit", "the", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeutils/base/BigIntComparator.java#L72-L110
train
This method is called to put a normalized key into the given MemorySegment.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2404, 12131, 9067, 3550, 14839, 1006, 2502, 18447, 26320, 2501, 1010, 3638, 3366, 21693, 4765, 4539, 1010, 20014, 16396, 1010, 20014, 18798, 1007, 1063, 1013, 1013, 5587, 3671, 3550, 2978, 3091, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/TwoPhaseCommitSinkFunction.java
TwoPhaseCommitSinkFunction.setTransactionTimeout
protected TwoPhaseCommitSinkFunction<IN, TXN, CONTEXT> setTransactionTimeout(long transactionTimeout) { checkArgument(transactionTimeout >= 0, "transactionTimeout must not be negative"); this.transactionTimeout = transactionTimeout; return this; }
java
protected TwoPhaseCommitSinkFunction<IN, TXN, CONTEXT> setTransactionTimeout(long transactionTimeout) { checkArgument(transactionTimeout >= 0, "transactionTimeout must not be negative"); this.transactionTimeout = transactionTimeout; return this; }
[ "protected", "TwoPhaseCommitSinkFunction", "<", "IN", ",", "TXN", ",", "CONTEXT", ">", "setTransactionTimeout", "(", "long", "transactionTimeout", ")", "{", "checkArgument", "(", "transactionTimeout", ">=", "0", ",", "\"transactionTimeout must not be negative\"", ")", "...
Sets the transaction timeout. Setting only the transaction timeout has no effect in itself. @param transactionTimeout The transaction timeout in ms. @see #ignoreFailuresAfterTransactionTimeout() @see #enableTransactionTimeoutWarnings(double)
[ "Sets", "the", "transaction", "timeout", ".", "Setting", "only", "the", "transaction", "timeout", "has", "no", "effect", "in", "itself", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/TwoPhaseCommitSinkFunction.java#L436-L440
train
Sets the transaction timeout.
[ 30522, 5123, 2048, 21890, 3366, 9006, 22930, 11493, 2243, 11263, 27989, 1026, 1999, 1010, 19067, 2078, 1010, 6123, 1028, 2275, 6494, 3619, 18908, 3258, 7292, 5833, 1006, 2146, 12598, 7292, 5833, 1007, 1063, 4638, 2906, 22850, 4765, 1006, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.collect
public List<T> collect() throws Exception { final String id = new AbstractID().toString(); final TypeSerializer<T> serializer = getType().createSerializer(getExecutionEnvironment().getConfig()); this.output(new Utils.CollectHelper<>(id, serializer)).name("collect()"); JobExecutionResult res = getExecutionEnvir...
java
public List<T> collect() throws Exception { final String id = new AbstractID().toString(); final TypeSerializer<T> serializer = getType().createSerializer(getExecutionEnvironment().getConfig()); this.output(new Utils.CollectHelper<>(id, serializer)).name("collect()"); JobExecutionResult res = getExecutionEnvir...
[ "public", "List", "<", "T", ">", "collect", "(", ")", "throws", "Exception", "{", "final", "String", "id", "=", "new", "AbstractID", "(", ")", ".", "toString", "(", ")", ";", "final", "TypeSerializer", "<", "T", ">", "serializer", "=", "getType", "(", ...
Convenience method to get the elements of a DataSet as a List. As DataSet can contain a lot of data, this method should be used with caution. @return A List containing the elements of the DataSet
[ "Convenience", "method", "to", "get", "the", "elements", "of", "a", "DataSet", "as", "a", "List", ".", "As", "DataSet", "can", "contain", "a", "lot", "of", "data", "this", "method", "should", "be", "used", "with", "caution", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L408-L427
train
Collect the data set.
[ 30522, 2270, 2862, 1026, 1056, 1028, 8145, 1006, 1007, 11618, 6453, 1063, 2345, 5164, 8909, 1027, 2047, 10061, 3593, 1006, 1007, 1012, 2000, 3367, 4892, 1006, 1007, 1025, 2345, 4127, 11610, 28863, 1026, 1056, 1028, 7642, 17629, 1027, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/IdcardUtil.java
IdcardUtil.getBirth
public static String getBirth(String idCard) { final Integer len = idCard.length(); if (len < CHINA_ID_MIN_LENGTH) { return null; } else if (len == CHINA_ID_MIN_LENGTH) { idCard = convert15To18(idCard); } return idCard.substring(6, 14); }
java
public static String getBirth(String idCard) { final Integer len = idCard.length(); if (len < CHINA_ID_MIN_LENGTH) { return null; } else if (len == CHINA_ID_MIN_LENGTH) { idCard = convert15To18(idCard); } return idCard.substring(6, 14); }
[ "public", "static", "String", "getBirth", "(", "String", "idCard", ")", "{", "final", "Integer", "len", "=", "idCard", ".", "length", "(", ")", ";", "if", "(", "len", "<", "CHINA_ID_MIN_LENGTH", ")", "{", "return", "null", ";", "}", "else", "if", "(", ...
根据身份编号获取生日,只支持15或18位身份证号码 @param idCard 身份编号 @return 生日(yyyyMMdd)
[ "根据身份编号获取生日,只支持15或18位身份证号码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/IdcardUtil.java#L383-L391
train
Returns the birth of the given ID card.
[ 30522, 2270, 10763, 5164, 2131, 17706, 2705, 1006, 5164, 8909, 11522, 1007, 1063, 2345, 16109, 18798, 1027, 8909, 11522, 1012, 3091, 1006, 1007, 1025, 2065, 1006, 18798, 1026, 2859, 1035, 8909, 1035, 8117, 1035, 3091, 1007, 1063, 2709, 1970...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
external/kinesis-asl/src/main/java/org/apache/spark/streaming/kinesis/KinesisInitialPositions.java
KinesisInitialPositions.fromKinesisInitialPosition
public static KinesisInitialPosition fromKinesisInitialPosition( InitialPositionInStream initialPositionInStream) throws UnsupportedOperationException { if (initialPositionInStream == InitialPositionInStream.LATEST) { return new Latest(); } else if (initialPositionInStream == Ini...
java
public static KinesisInitialPosition fromKinesisInitialPosition( InitialPositionInStream initialPositionInStream) throws UnsupportedOperationException { if (initialPositionInStream == InitialPositionInStream.LATEST) { return new Latest(); } else if (initialPositionInStream == Ini...
[ "public", "static", "KinesisInitialPosition", "fromKinesisInitialPosition", "(", "InitialPositionInStream", "initialPositionInStream", ")", "throws", "UnsupportedOperationException", "{", "if", "(", "initialPositionInStream", "==", "InitialPositionInStream", ".", "LATEST", ")", ...
Returns instance of [[KinesisInitialPosition]] based on the passed [[InitialPositionInStream]]. This method is used in KinesisUtils for translating the InitialPositionInStream to InitialPosition. This function would be removed when we deprecate the KinesisUtils. @return [[InitialPosition]]
[ "Returns", "instance", "of", "[[", "KinesisInitialPosition", "]]", "based", "on", "the", "passed", "[[", "InitialPositionInStream", "]]", ".", "This", "method", "is", "used", "in", "KinesisUtils", "for", "translating", "the", "InitialPositionInStream", "to", "Initia...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/external/kinesis-asl/src/main/java/org/apache/spark/streaming/kinesis/KinesisInitialPositions.java#L77-L92
train
Create a KinesisInitialPosition object from the KinesisInitialPositionInStream.
[ 30522, 2270, 10763, 12631, 19009, 5498, 20925, 26994, 2013, 4939, 19009, 5498, 20925, 26994, 1006, 3988, 26994, 7076, 25379, 3988, 26994, 7076, 25379, 1007, 11618, 4895, 6342, 9397, 15613, 25918, 3370, 10288, 24422, 1063, 2065, 1006, 3988, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
ResourceManager.deregisterApplication
@Override public CompletableFuture<Acknowledge> deregisterApplication( final ApplicationStatus finalStatus, @Nullable final String diagnostics) { log.info("Shut down cluster because application is in {}, diagnostics {}.", finalStatus, diagnostics); try { internalDeregisterApplication(finalStatus, diagnos...
java
@Override public CompletableFuture<Acknowledge> deregisterApplication( final ApplicationStatus finalStatus, @Nullable final String diagnostics) { log.info("Shut down cluster because application is in {}, diagnostics {}.", finalStatus, diagnostics); try { internalDeregisterApplication(finalStatus, diagnos...
[ "@", "Override", "public", "CompletableFuture", "<", "Acknowledge", ">", "deregisterApplication", "(", "final", "ApplicationStatus", "finalStatus", ",", "@", "Nullable", "final", "String", "diagnostics", ")", "{", "log", ".", "info", "(", "\"Shut down cluster because ...
Cleanup application and shut down cluster. @param finalStatus of the Flink application @param diagnostics diagnostics message for the Flink application or {@code null}
[ "Cleanup", "application", "and", "shut", "down", "cluster", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L492-L505
train
Deregister an application from the cluster.
[ 30522, 1030, 2058, 15637, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 13399, 1028, 4315, 13910, 12911, 29098, 19341, 3508, 1006, 2345, 5097, 29336, 2271, 4399, 29336, 2271, 1010, 1030, 19701, 3085, 2345, 5164, 16474, 2015, 1007, 1063, 8833,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/GroupedMap.java
GroupedMap.containsKey
public boolean containsKey(String group, String key) { group = StrUtil.nullToEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap<String, String> valueMap = this.get(group); if (MapUtil.isNotEmpty(valueMap)) { return valueMap.containsKey(key); } } finally { readLock.unlock();...
java
public boolean containsKey(String group, String key) { group = StrUtil.nullToEmpty(group).trim(); readLock.lock(); try { final LinkedHashMap<String, String> valueMap = this.get(group); if (MapUtil.isNotEmpty(valueMap)) { return valueMap.containsKey(key); } } finally { readLock.unlock();...
[ "public", "boolean", "containsKey", "(", "String", "group", ",", "String", "key", ")", "{", "group", "=", "StrUtil", ".", "nullToEmpty", "(", "group", ")", ".", "trim", "(", ")", ";", "readLock", ".", "lock", "(", ")", ";", "try", "{", "final", "Link...
指定分组中是否包含指定key @param group 分组 @param key 键 @return 是否包含key
[ "指定分组中是否包含指定key" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/GroupedMap.java#L177-L189
train
Checks if the specified key is present in the specified group.
[ 30522, 2270, 22017, 20898, 3397, 14839, 1006, 5164, 2177, 1010, 5164, 3145, 1007, 1063, 2177, 1027, 2358, 22134, 4014, 1012, 19701, 3406, 6633, 13876, 2100, 1006, 2177, 1007, 1012, 12241, 1006, 1007, 1025, 3191, 7878, 1012, 5843, 1006, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...