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
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronLexicalAnalyzer.java
PerceptronLexicalAnalyzer.segment
public void segment(String text, List<String> output) { String normalized = CharTable.convert(text); segment(text, normalized, output); }
java
public void segment(String text, List<String> output) { String normalized = CharTable.convert(text); segment(text, normalized, output); }
[ "public", "void", "segment", "(", "String", "text", ",", "List", "<", "String", ">", "output", ")", "{", "String", "normalized", "=", "CharTable", ".", "convert", "(", "text", ")", ";", "segment", "(", "text", ",", "normalized", ",", "output", ")", ";"...
中文分词 @param text @param output
[ "中文分词" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronLexicalAnalyzer.java#L104-L108
train
segment a text into a list of tokens.
[ 30522, 2270, 11675, 6903, 1006, 5164, 3793, 1010, 2862, 1026, 5164, 1028, 6434, 1007, 1063, 5164, 3671, 3550, 1027, 3673, 3085, 1012, 10463, 1006, 3793, 1007, 1025, 6903, 1006, 3793, 1010, 3671, 3550, 1010, 6434, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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.emitRecordAndUpdateState
protected void emitRecordAndUpdateState(T record, long recordTimestamp, int shardStateIndex, SequenceNumber lastSequenceNumber) { // track per shard watermarks and emit timestamps extracted from the record, // when a watermark assigner was configured. if (periodicWatermarkAssigner != null) { ShardWatermarkStat...
java
protected void emitRecordAndUpdateState(T record, long recordTimestamp, int shardStateIndex, SequenceNumber lastSequenceNumber) { // track per shard watermarks and emit timestamps extracted from the record, // when a watermark assigner was configured. if (periodicWatermarkAssigner != null) { ShardWatermarkStat...
[ "protected", "void", "emitRecordAndUpdateState", "(", "T", "record", ",", "long", "recordTimestamp", ",", "int", "shardStateIndex", ",", "SequenceNumber", "lastSequenceNumber", ")", "{", "// track per shard watermarks and emit timestamps extracted from the record,", "// when a wa...
Atomic operation to collect a record and update state to the sequence number of the record. This method is called by {@link ShardConsumer}s. @param record the record to collect @param recordTimestamp timestamp to attach to the collected record @param shardStateIndex index of the shard to update in subscribedShardsStat...
[ "Atomic", "operation", "to", "collect", "a", "record", "and", "update", "state", "to", "the", "sequence", "number", "of", "the", "record", ".", "This", "method", "is", "called", "by", "{", "@link", "ShardConsumer", "}", "s", "." ]
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#L605-L629
train
Emit a record and update the state of the stream.
[ 30522, 5123, 11675, 12495, 7913, 27108, 7847, 8566, 17299, 8520, 12259, 1006, 1056, 2501, 1010, 2146, 2501, 7292, 9153, 8737, 1010, 20014, 23327, 12259, 22254, 10288, 1010, 5537, 19172, 5677, 16180, 2063, 4226, 5897, 19172, 5677, 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-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/table/descriptors/Kafka.java
Kafka.startFromSpecificOffset
public Kafka startFromSpecificOffset(int partition, long specificOffset) { this.startupMode = StartupMode.SPECIFIC_OFFSETS; if (this.specificOffsets == null) { this.specificOffsets = new HashMap<>(); } this.specificOffsets.put(partition, specificOffset); return this; }
java
public Kafka startFromSpecificOffset(int partition, long specificOffset) { this.startupMode = StartupMode.SPECIFIC_OFFSETS; if (this.specificOffsets == null) { this.specificOffsets = new HashMap<>(); } this.specificOffsets.put(partition, specificOffset); return this; }
[ "public", "Kafka", "startFromSpecificOffset", "(", "int", "partition", ",", "long", "specificOffset", ")", "{", "this", ".", "startupMode", "=", "StartupMode", ".", "SPECIFIC_OFFSETS", ";", "if", "(", "this", ".", "specificOffsets", "==", "null", ")", "{", "th...
Configures to start reading partitions from specific offsets and specifies the given offset for the given partition. @param partition partition index @param specificOffset partition offset to start reading from @see FlinkKafkaConsumerBase#setStartFromSpecificOffsets(Map)
[ "Configures", "to", "start", "reading", "partitions", "from", "specific", "offsets", "and", "specifies", "the", "given", "offset", "for", "the", "given", "partition", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/table/descriptors/Kafka.java#L177-L184
train
Start Kafka from specific offsets.
[ 30522, 2270, 10556, 24316, 2050, 2707, 19699, 22225, 5051, 6895, 8873, 3597, 21807, 3388, 1006, 20014, 13571, 1010, 2146, 3563, 27475, 3388, 1007, 1063, 2023, 1012, 22752, 5302, 3207, 1027, 22752, 5302, 3207, 1012, 3563, 1035, 16396, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/vectorized/ColumnVector.java
ColumnVector.getInts
public int[] getInts(int rowId, int count) { int[] res = new int[count]; for (int i = 0; i < count; i++) { res[i] = getInt(rowId + i); } return res; }
java
public int[] getInts(int rowId, int count) { int[] res = new int[count]; for (int i = 0; i < count; i++) { res[i] = getInt(rowId + i); } return res; }
[ "public", "int", "[", "]", "getInts", "(", "int", "rowId", ",", "int", "count", ")", "{", "int", "[", "]", "res", "=", "new", "int", "[", "count", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "count", ";", "i", "++", ")", "{",...
Gets int type values from [rowId, rowId + count). The return values for the null slots are undefined and can be anything.
[ "Gets", "int", "type", "values", "from", "[", "rowId", "rowId", "+", "count", ")", ".", "The", "return", "values", "for", "the", "null", "slots", "are", "undefined", "and", "can", "be", "anything", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/core/src/main/java/org/apache/spark/sql/vectorized/ColumnVector.java#L146-L152
train
Gets the ints from the specified row.
[ 30522, 2270, 20014, 1031, 1033, 2131, 18447, 2015, 1006, 20014, 5216, 3593, 1010, 20014, 4175, 1007, 1063, 20014, 1031, 1033, 24501, 1027, 2047, 20014, 1031, 4175, 1033, 1025, 2005, 1006, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 4175, 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/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java
CLIService.executeStatement
@Override public OperationHandle executeStatement(SessionHandle sessionHandle, String statement, Map<String, String> confOverlay) throws HiveSQLException { OperationHandle opHandle = sessionManager.getSession(sessionHandle) .executeStatement(statement, confOverlay); LOG.debug(sessionHa...
java
@Override public OperationHandle executeStatement(SessionHandle sessionHandle, String statement, Map<String, String> confOverlay) throws HiveSQLException { OperationHandle opHandle = sessionManager.getSession(sessionHandle) .executeStatement(statement, confOverlay); LOG.debug(sessionHa...
[ "@", "Override", "public", "OperationHandle", "executeStatement", "(", "SessionHandle", "sessionHandle", ",", "String", "statement", ",", "Map", "<", "String", ",", "String", ">", "confOverlay", ")", "throws", "HiveSQLException", "{", "OperationHandle", "opHandle", ...
/* (non-Javadoc) @see org.apache.hive.service.cli.ICLIService#executeStatement(org.apache.hive.service.cli.SessionHandle, java.lang.String, java.util.Map)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java#L257-L265
train
Execute a SQL statement.
[ 30522, 1030, 2058, 15637, 2270, 3169, 11774, 2571, 15389, 9153, 18532, 4765, 1006, 5219, 11774, 2571, 5219, 11774, 2571, 1010, 5164, 4861, 1010, 4949, 1026, 5164, 1010, 5164, 1028, 9530, 14876, 6299, 8485, 1007, 11618, 26736, 2015, 4160, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.set100ContinueExpected
public static void set100ContinueExpected(HttpMessage message, boolean expected) { if (expected) { message.headers().set(HttpHeaderNames.EXPECT, HttpHeaderValues.CONTINUE); } else { message.headers().remove(HttpHeaderNames.EXPECT); } }
java
public static void set100ContinueExpected(HttpMessage message, boolean expected) { if (expected) { message.headers().set(HttpHeaderNames.EXPECT, HttpHeaderValues.CONTINUE); } else { message.headers().remove(HttpHeaderNames.EXPECT); } }
[ "public", "static", "void", "set100ContinueExpected", "(", "HttpMessage", "message", ",", "boolean", "expected", ")", "{", "if", "(", "expected", ")", "{", "message", ".", "headers", "(", ")", ".", "set", "(", "HttpHeaderNames", ".", "EXPECT", ",", "HttpHead...
Sets or removes the {@code "Expect: 100-continue"} header to / from the specified message. If {@code expected} is {@code true}, the {@code "Expect: 100-continue"} header is set and all other previous {@code "Expect"} headers are removed. Otherwise, all {@code "Expect"} headers are removed completely.
[ "Sets", "or", "removes", "the", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L286-L292
train
Sets the 100 Continue expected header.
[ 30522, 2270, 10763, 11675, 2275, 18613, 8663, 7629, 5657, 10288, 5051, 10985, 1006, 8299, 7834, 3736, 3351, 4471, 1010, 22017, 20898, 3517, 1007, 1063, 2065, 1006, 3517, 1007, 1063, 4471, 1012, 20346, 2015, 1006, 1007, 1012, 2275, 1006, 829...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.addDeprecation
public static void addDeprecation(String key, String newKey) { addDeprecation(key, new String[] {newKey}, null); }
java
public static void addDeprecation(String key, String newKey) { addDeprecation(key, new String[] {newKey}, null); }
[ "public", "static", "void", "addDeprecation", "(", "String", "key", ",", "String", "newKey", ")", "{", "addDeprecation", "(", "key", ",", "new", "String", "[", "]", "{", "newKey", "}", ",", "null", ")", ";", "}" ]
Adds the deprecated key to the global deprecation map when no custom message is provided. It does not override any existing entries in the deprecation map. This is to be used only by the developers in order to add deprecation of keys, and attempts to call this method after loading resources once, would lead to <tt>Unsu...
[ "Adds", "the", "deprecated", "key", "to", "the", "global", "deprecation", "map", "when", "no", "custom", "message", "is", "provided", ".", "It", "does", "not", "override", "any", "existing", "entries", "in", "the", "deprecation", "map", ".", "This", "is", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L549-L551
train
Add a deprecation for the given key.
[ 30522, 2270, 10763, 11675, 5587, 3207, 28139, 10719, 1006, 5164, 3145, 1010, 5164, 2047, 14839, 1007, 1063, 5587, 3207, 28139, 10719, 1006, 3145, 1010, 2047, 5164, 1031, 1033, 1063, 2047, 14839, 1065, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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-cron/src/main/java/cn/hutool/cron/CronUtil.java
CronUtil.start
synchronized public static void start(boolean isDeamon) { if (null == crontabSetting) { // 尝试查找config/cron.setting setCronSetting(CRONTAB_CONFIG_PATH); } // 尝试查找cron.setting if (null == crontabSetting) { setCronSetting(CRONTAB_CONFIG_PATH2); } if (scheduler.isStarted()) { throw new UtilException...
java
synchronized public static void start(boolean isDeamon) { if (null == crontabSetting) { // 尝试查找config/cron.setting setCronSetting(CRONTAB_CONFIG_PATH); } // 尝试查找cron.setting if (null == crontabSetting) { setCronSetting(CRONTAB_CONFIG_PATH2); } if (scheduler.isStarted()) { throw new UtilException...
[ "synchronized", "public", "static", "void", "start", "(", "boolean", "isDeamon", ")", "{", "if", "(", "null", "==", "crontabSetting", ")", "{", "// 尝试查找config/cron.setting", "setCronSetting", "(", "CRONTAB_CONFIG_PATH", ")", ";", "}", "// 尝试查找cron.setting", "if", ...
开始 @param isDeamon 是否以守护线程方式启动,如果为true,则在调用{@link #stop()}方法后执行的定时任务立即结束,否则等待执行完毕才结束。
[ "开始" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/CronUtil.java#L149-L164
train
Start the scheduler.
[ 30522, 25549, 2270, 10763, 11675, 2707, 1006, 22017, 20898, 2003, 3207, 22591, 2078, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 13675, 12162, 7875, 21678, 2075, 1007, 1063, 1013, 1013, 100, 100, 100, 100, 9530, 8873, 2290, 1013, 13675, 2239...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java
MainClassFinder.findSingleMainClass
public static String findSingleMainClass(File rootFolder, String annotationName) throws IOException { SingleMainClassCallback callback = new SingleMainClassCallback(annotationName); MainClassFinder.doWithMainClasses(rootFolder, callback); return callback.getMainClassName(); }
java
public static String findSingleMainClass(File rootFolder, String annotationName) throws IOException { SingleMainClassCallback callback = new SingleMainClassCallback(annotationName); MainClassFinder.doWithMainClasses(rootFolder, callback); return callback.getMainClassName(); }
[ "public", "static", "String", "findSingleMainClass", "(", "File", "rootFolder", ",", "String", "annotationName", ")", "throws", "IOException", "{", "SingleMainClassCallback", "callback", "=", "new", "SingleMainClassCallback", "(", "annotationName", ")", ";", "MainClassF...
Find a single main class from the given {@code rootFolder}. A main class annotated with an annotation with the given {@code annotationName} will be preferred over a main class with no such annotation. @param rootFolder the root folder to search @param annotationName the name of the annotation that may be present on the...
[ "Find", "a", "single", "main", "class", "from", "the", "given", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java#L107-L112
train
Find the main class name of the annotation.
[ 30522, 2270, 10763, 5164, 4858, 2075, 16930, 8113, 26266, 1006, 5371, 7117, 10371, 2121, 1010, 5164, 5754, 17287, 3508, 18442, 1007, 11618, 22834, 10288, 24422, 1063, 2309, 24238, 26266, 9289, 20850, 8684, 2655, 5963, 1027, 2047, 2309, 24238,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/nfa/aftermatch/AfterMatchSkipStrategy.java
AfterMatchSkipStrategy.prune
public void prune( Collection<ComputationState> matchesToPrune, Collection<Map<String, List<EventId>>> matchedResult, SharedBufferAccessor<?> sharedBufferAccessor) throws Exception { EventId pruningId = getPruningId(matchedResult); if (pruningId != null) { List<ComputationState> discardStates = new Arr...
java
public void prune( Collection<ComputationState> matchesToPrune, Collection<Map<String, List<EventId>>> matchedResult, SharedBufferAccessor<?> sharedBufferAccessor) throws Exception { EventId pruningId = getPruningId(matchedResult); if (pruningId != null) { List<ComputationState> discardStates = new Arr...
[ "public", "void", "prune", "(", "Collection", "<", "ComputationState", ">", "matchesToPrune", ",", "Collection", "<", "Map", "<", "String", ",", "List", "<", "EventId", ">", ">", ">", "matchedResult", ",", "SharedBufferAccessor", "<", "?", ">", "sharedBufferAc...
Prunes matches/partial matches based on the chosen strategy. @param matchesToPrune current partial matches @param matchedResult already completed matches @param sharedBufferAccessor accessor to corresponding shared buffer @throws Exception thrown if could not access the state
[ "Prunes", "matches", "/", "partial", "matches", "based", "on", "the", "chosen", "strategy", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/aftermatch/AfterMatchSkipStrategy.java#L102-L119
train
Prune a collection of matches to be considered to be discarded.
[ 30522, 2270, 11675, 10975, 9816, 1006, 3074, 1026, 22334, 9153, 2618, 1028, 3503, 14399, 15532, 2063, 1010, 3074, 1026, 4949, 1026, 5164, 1010, 2862, 1026, 2724, 3593, 1028, 1028, 1028, 10349, 6072, 11314, 1010, 4207, 8569, 12494, 6305, 962...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/date/DateUtil.java
DateUtil.round
public static DateTime round(Date date, DateField dateField) { return new DateTime(round(calendar(date), dateField)); }
java
public static DateTime round(Date date, DateField dateField) { return new DateTime(round(calendar(date), dateField)); }
[ "public", "static", "DateTime", "round", "(", "Date", "date", ",", "DateField", "dateField", ")", "{", "return", "new", "DateTime", "(", "round", "(", "calendar", "(", "date", ")", ",", "dateField", ")", ")", ";", "}" ]
修改日期为某个时间字段四舍五入时间 @param date {@link Date} @param dateField 时间字段 @return {@link DateTime} @since 4.5.7
[ "修改日期为某个时间字段四舍五入时间" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L779-L781
train
Round to the nearest integer value.
[ 30522, 2270, 10763, 3058, 7292, 2461, 1006, 3058, 3058, 1010, 3058, 3790, 3058, 3790, 1007, 1063, 2709, 2047, 3058, 7292, 1006, 2461, 1006, 8094, 1006, 3058, 1007, 1010, 3058, 3790, 1007, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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/runtime/window/WindowOperator.java
WindowOperator.registerCleanupTimer
private void registerCleanupTimer(W window) { long cleanupTime = cleanupTime(window); if (cleanupTime == Long.MAX_VALUE) { // don't set a GC timer for "end of time" return; } if (windowAssigner.isEventTime()) { triggerContext.registerEventTimeTimer(cleanupTime); } else { triggerContext.registerPr...
java
private void registerCleanupTimer(W window) { long cleanupTime = cleanupTime(window); if (cleanupTime == Long.MAX_VALUE) { // don't set a GC timer for "end of time" return; } if (windowAssigner.isEventTime()) { triggerContext.registerEventTimeTimer(cleanupTime); } else { triggerContext.registerPr...
[ "private", "void", "registerCleanupTimer", "(", "W", "window", ")", "{", "long", "cleanupTime", "=", "cleanupTime", "(", "window", ")", ";", "if", "(", "cleanupTime", "==", "Long", ".", "MAX_VALUE", ")", "{", "// don't set a GC timer for \"end of time\"", "return"...
Registers a timer to cleanup the content of the window. @param window the window whose state to discard
[ "Registers", "a", "timer", "to", "cleanup", "the", "content", "of", "the", "window", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/WindowOperator.java#L472-L484
train
Registers a cleanup timer for the given window.
[ 30522, 2797, 11675, 4236, 14321, 24076, 13876, 14428, 2099, 1006, 1059, 3332, 1007, 1063, 2146, 27686, 7292, 1027, 27686, 7292, 1006, 3332, 1007, 30524, 1012, 2003, 18697, 3372, 7292, 1006, 1007, 1007, 1063, 9495, 8663, 18209, 1012, 4236, 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-core/src/main/java/org/apache/flink/api/common/io/FileOutputFormat.java
FileOutputFormat.initializeGlobal
@Override public void initializeGlobal(int parallelism) throws IOException { final Path path = getOutputFilePath(); final FileSystem fs = path.getFileSystem(); // only distributed file systems can be initialized at start-up time. if (fs.isDistributedFS()) { final WriteMode writeMode = getWriteMode();...
java
@Override public void initializeGlobal(int parallelism) throws IOException { final Path path = getOutputFilePath(); final FileSystem fs = path.getFileSystem(); // only distributed file systems can be initialized at start-up time. if (fs.isDistributedFS()) { final WriteMode writeMode = getWriteMode();...
[ "@", "Override", "public", "void", "initializeGlobal", "(", "int", "parallelism", ")", "throws", "IOException", "{", "final", "Path", "path", "=", "getOutputFilePath", "(", ")", ";", "final", "FileSystem", "fs", "=", "path", ".", "getFileSystem", "(", ")", "...
Initialization of the distributed file system if it is used. @param parallelism The task parallelism.
[ "Initialization", "of", "the", "distributed", "file", "system", "if", "it", "is", "used", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/io/FileOutputFormat.java#L272-L300
train
Initialize the global output file system.
[ 30522, 1030, 2058, 15637, 2270, 11675, 3988, 4697, 23296, 16429, 2389, 1006, 20014, 5903, 2964, 1007, 11618, 22834, 10288, 24422, 1063, 2345, 4130, 4130, 1027, 2131, 5833, 18780, 8873, 2571, 15069, 1006, 1007, 1025, 2345, 6764, 27268, 6633, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/date/format/FastDateParser.java
FastDateParser.init
private void init(final Calendar definingCalendar) { patterns = new ArrayList<>(); final StrategyParser fm = new StrategyParser(definingCalendar); for (;;) { final StrategyAndWidth field = fm.getNextStrategy(); if (field == null) { break; } patterns.add(field); } }
java
private void init(final Calendar definingCalendar) { patterns = new ArrayList<>(); final StrategyParser fm = new StrategyParser(definingCalendar); for (;;) { final StrategyAndWidth field = fm.getNextStrategy(); if (field == null) { break; } patterns.add(field); } }
[ "private", "void", "init", "(", "final", "Calendar", "definingCalendar", ")", "{", "patterns", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "StrategyParser", "fm", "=", "new", "StrategyParser", "(", "definingCalendar", ")", ";", "for", "(", ";", ...
Initialize derived fields from defining fields. This is called from constructor and from readObject (de-serialization) @param definingCalendar the {@link java.util.Calendar} instance used to initialize this FastDateParser
[ "Initialize", "derived", "fields", "from", "defining", "fields", ".", "This", "is", "called", "from", "constructor", "and", "from", "readObject", "(", "de", "-", "serialization", ")" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateParser.java#L105-L116
train
Initializes the list of rules.
[ 30522, 2797, 11675, 1999, 4183, 1006, 2345, 8094, 12854, 9289, 10497, 2906, 1007, 1063, 7060, 1027, 2047, 9140, 9863, 1026, 1028, 1006, 1007, 1025, 2345, 5656, 19362, 8043, 4718, 1027, 2047, 5656, 19362, 8043, 1006, 12854, 9289, 10497, 2906...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.begin
public static <T, F extends T> GroupPattern<T, F> begin(final Pattern<T, F> group, final AfterMatchSkipStrategy afterMatchSkipStrategy) { return new GroupPattern<>(null, group, ConsumingStrategy.STRICT, afterMatchSkipStrategy); }
java
public static <T, F extends T> GroupPattern<T, F> begin(final Pattern<T, F> group, final AfterMatchSkipStrategy afterMatchSkipStrategy) { return new GroupPattern<>(null, group, ConsumingStrategy.STRICT, afterMatchSkipStrategy); }
[ "public", "static", "<", "T", ",", "F", "extends", "T", ">", "GroupPattern", "<", "T", ",", "F", ">", "begin", "(", "final", "Pattern", "<", "T", ",", "F", ">", "group", ",", "final", "AfterMatchSkipStrategy", "afterMatchSkipStrategy", ")", "{", "return"...
Starts a new pattern sequence. The provided pattern is the initial pattern of the new sequence. @param group the pattern to begin with @param afterMatchSkipStrategy the {@link AfterMatchSkipStrategy.SkipStrategy} to use after each match. @return The first pattern of a pattern sequence
[ "Starts", "a", "new", "pattern", "sequence", ".", "The", "provided", "pattern", "is", "the", "initial", "pattern", "of", "the", "new", "sequence", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java#L493-L495
train
Creates a new group pattern with a strict ConsumingStrategy.
[ 30522, 2270, 10763, 1026, 1056, 1010, 1042, 8908, 1056, 1028, 2177, 4502, 12079, 2078, 1026, 1056, 1010, 1042, 1028, 4088, 1006, 2345, 5418, 1026, 1056, 1010, 1042, 1028, 2177, 1010, 2345, 2044, 18900, 18069, 3211, 4523, 6494, 2618, 6292, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/webservices/client/WebServiceTemplateBuilder.java
WebServiceTemplateBuilder.setWebServiceMessageFactory
public WebServiceTemplateBuilder setWebServiceMessageFactory( WebServiceMessageFactory messageFactory) { Assert.notNull(messageFactory, "MessageFactory must not be null"); return new WebServiceTemplateBuilder(this.detectHttpMessageSender, this.interceptors, this.internalCustomizers, this.customizers, thi...
java
public WebServiceTemplateBuilder setWebServiceMessageFactory( WebServiceMessageFactory messageFactory) { Assert.notNull(messageFactory, "MessageFactory must not be null"); return new WebServiceTemplateBuilder(this.detectHttpMessageSender, this.interceptors, this.internalCustomizers, this.customizers, thi...
[ "public", "WebServiceTemplateBuilder", "setWebServiceMessageFactory", "(", "WebServiceMessageFactory", "messageFactory", ")", "{", "Assert", ".", "notNull", "(", "messageFactory", ",", "\"MessageFactory must not be null\"", ")", ";", "return", "new", "WebServiceTemplateBuilder"...
Sets the {@link WebServiceMessageFactory} to use for creating messages. @param messageFactory the message factory to use for creating messages @return a new builder instance. @see WebServiceTemplate#setMessageFactory(WebServiceMessageFactory)
[ "Sets", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilder.java#L367-L374
train
Sets the message factory to use for creating the message sender.
[ 30522, 2270, 4773, 8043, 7903, 12870, 8737, 13806, 8569, 23891, 2099, 2275, 8545, 5910, 2121, 7903, 21382, 11488, 3351, 21450, 1006, 4773, 8043, 7903, 21382, 11488, 3351, 21450, 4471, 21450, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 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-core/src/main/java/cn/hutool/core/bean/BeanDesc.java
BeanDesc.getField
public Field getField(String fieldName) { final PropDesc desc = this.propMap.get(fieldName); return null == desc ? null : desc.getField(); }
java
public Field getField(String fieldName) { final PropDesc desc = this.propMap.get(fieldName); return null == desc ? null : desc.getField(); }
[ "public", "Field", "getField", "(", "String", "fieldName", ")", "{", "final", "PropDesc", "desc", "=", "this", ".", "propMap", ".", "get", "(", "fieldName", ")", ";", "return", "null", "==", "desc", "?", "null", ":", "desc", ".", "getField", "(", ")", ...
获得字段名对应的字段对象,如果不存在返回null @param fieldName 字段名 @return 字段值
[ "获得字段名对应的字段对象,如果不存在返回null" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanDesc.java#L104-L107
train
Returns the field with the given name.
[ 30522, 2270, 2492, 2131, 3790, 1006, 5164, 2492, 18442, 1007, 1063, 2345, 17678, 6155, 2278, 4078, 2278, 1027, 2023, 1012, 17678, 2863, 2361, 1012, 2131, 1006, 2492, 18442, 1007, 1025, 2709, 19701, 1027, 1027, 4078, 2278, 1029, 19701, 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/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/lexer/analyzer/Tokenizer.java
Tokenizer.scanSymbol
public Token scanSymbol() { int length = 0; while (CharType.isSymbol(charAt(offset + length))) { length++; } String literals = input.substring(offset, offset + length); Symbol symbol; while (null == (symbol = Symbol.literalsOf(literals))) { literal...
java
public Token scanSymbol() { int length = 0; while (CharType.isSymbol(charAt(offset + length))) { length++; } String literals = input.substring(offset, offset + length); Symbol symbol; while (null == (symbol = Symbol.literalsOf(literals))) { literal...
[ "public", "Token", "scanSymbol", "(", ")", "{", "int", "length", "=", "0", ";", "while", "(", "CharType", ".", "isSymbol", "(", "charAt", "(", "offset", "+", "length", ")", ")", ")", "{", "length", "++", ";", "}", "String", "literals", "=", "input", ...
scan symbol. @return symbol token
[ "scan", "symbol", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/lexer/analyzer/Tokenizer.java#L301-L312
train
Scan a symbol.
[ 30522, 2270, 19204, 27404, 24335, 14956, 1006, 1007, 1063, 20014, 3091, 1027, 1014, 1025, 2096, 1006, 3673, 18863, 1012, 26354, 24335, 14956, 1006, 25869, 4017, 1006, 16396, 1009, 3091, 1007, 1007, 1007, 1063, 3091, 1009, 1009, 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...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java
ExpectedConditions.visibilityOfNestedElementsLocatedBy
public static ExpectedCondition<List<WebElement>> visibilityOfNestedElementsLocatedBy( final By parent, final By childLocator) { return new ExpectedCondition<List<WebElement>>() { @Override public List<WebElement> apply(WebDriver driver) { WebElement current = driver.findElement(parent)...
java
public static ExpectedCondition<List<WebElement>> visibilityOfNestedElementsLocatedBy( final By parent, final By childLocator) { return new ExpectedCondition<List<WebElement>>() { @Override public List<WebElement> apply(WebDriver driver) { WebElement current = driver.findElement(parent)...
[ "public", "static", "ExpectedCondition", "<", "List", "<", "WebElement", ">", ">", "visibilityOfNestedElementsLocatedBy", "(", "final", "By", "parent", ",", "final", "By", "childLocator", ")", "{", "return", "new", "ExpectedCondition", "<", "List", "<", "WebElemen...
An expectation for checking child WebElement as a part of parent element to be visible @param parent used to check parent element. For example table with locator By.id("fish") @param childLocator used to find the ultimate child element. @return visible nested element
[ "An", "expectation", "for", "checking", "child", "WebElement", "as", "a", "part", "of", "parent", "element", "to", "be", "visible" ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java#L1159-L1182
train
An expectation for checking that a list of elements is visible in a nested page.
[ 30522, 2270, 10763, 3517, 8663, 20562, 1026, 2862, 1026, 4773, 12260, 3672, 1028, 1028, 16476, 11253, 5267, 3064, 12260, 8163, 4135, 12921, 3762, 1006, 2345, 2011, 6687, 1010, 2345, 2011, 2775, 4135, 11266, 2953, 1007, 1063, 2709, 2047, 351...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/runtime/hashtable/BinaryHashBucketArea.java
BinaryHashBucketArea.insertToBucket
boolean insertToBucket(int hashCode, int pointer, boolean spillingAllowed, boolean sizeAddAndCheckResize) throws IOException { final int posHashCode = findBucket(hashCode); // get the bucket for the given hash code final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits; final int bucketInSegmentP...
java
boolean insertToBucket(int hashCode, int pointer, boolean spillingAllowed, boolean sizeAddAndCheckResize) throws IOException { final int posHashCode = findBucket(hashCode); // get the bucket for the given hash code final int bucketArrayPos = posHashCode >> table.bucketsPerSegmentBits; final int bucketInSegmentP...
[ "boolean", "insertToBucket", "(", "int", "hashCode", ",", "int", "pointer", ",", "boolean", "spillingAllowed", ",", "boolean", "sizeAddAndCheckResize", ")", "throws", "IOException", "{", "final", "int", "posHashCode", "=", "findBucket", "(", "hashCode", ")", ";", ...
Insert into bucket by hashCode and pointer. @return return false when spill own partition.
[ "Insert", "into", "bucket", "by", "hashCode", "and", "pointer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashBucketArea.java#L436-L443
train
Insert the given hash code into the bucket.
[ 30522, 22017, 20898, 19274, 3406, 24204, 3388, 1006, 20014, 23325, 16044, 1010, 20014, 20884, 1010, 22017, 20898, 18054, 8095, 15096, 1010, 22017, 20898, 2946, 4215, 7847, 16409, 5369, 3600, 6072, 4697, 1007, 11618, 22834, 10288, 24422, 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...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.click
public Actions click() { if (isBuildingActions()) { action.addAction(new ClickAction(jsonMouse, null)); } return clickInTicks(LEFT); }
java
public Actions click() { if (isBuildingActions()) { action.addAction(new ClickAction(jsonMouse, null)); } return clickInTicks(LEFT); }
[ "public", "Actions", "click", "(", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "ClickAction", "(", "jsonMouse", ",", "null", ")", ")", ";", "}", "return", "clickInTicks", "(", "LEFT", ")", ";", ...
Clicks at the current mouse location. Useful when combined with {@link #moveToElement(org.openqa.selenium.WebElement, int, int)} or {@link #moveByOffset(int, int)}. @return A self reference.
[ "Clicks", "at", "the", "current", "mouse", "location", ".", "Useful", "when", "combined", "with", "{" ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L305-L311
train
Clicks the user in the left tick of the document.
[ 30522, 2270, 4506, 11562, 1006, 1007, 1063, 2065, 1006, 2003, 25820, 18908, 8496, 1006, 1007, 1007, 1063, 2895, 1012, 5587, 18908, 3258, 1006, 2047, 11562, 18908, 3258, 1006, 1046, 3385, 27711, 2063, 1010, 19701, 1007, 1007, 1025, 1065, 270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dml/insert/InsertParserFactory.java
InsertParserFactory.newInstance
public static AbstractInsertParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine, final ShardingTableMetaData shardingTableMetaData) { switch (dbType) { case H2: case MySQL: return new MySQLInsertParser(shardingRule,...
java
public static AbstractInsertParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine, final ShardingTableMetaData shardingTableMetaData) { switch (dbType) { case H2: case MySQL: return new MySQLInsertParser(shardingRule,...
[ "public", "static", "AbstractInsertParser", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "LexerEngine", "lexerEngine", ",", "final", "ShardingTableMetaData", "shardingTableMetaData", ")", "{", "switch",...
Create insert parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine @param shardingTableMetaData sharding meta data @return insert parser instance
[ "Create", "insert", "parser", "instance", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dml/insert/InsertParserFactory.java#L49-L63
train
Create insert parser instance.
[ 30522, 2270, 10763, 10061, 7076, 8743, 19362, 8043, 2047, 7076, 26897, 1006, 2345, 7809, 13874, 16962, 13874, 1010, 2345, 21146, 17080, 3070, 6820, 2571, 21146, 17080, 3070, 6820, 2571, 1010, 2345, 17244, 7869, 3070, 3170, 17244, 7869, 3070, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/resource/ResourceUtil.java
ResourceUtil.getResourceObj
public static Resource getResourceObj(String path) { if(StrUtil.isNotBlank(path)) { if(path.startsWith(URLUtil.FILE_URL_PREFIX) || FileUtil.isAbsolutePath(path)) { return new FileResource(path); } } return new ClassPathResource(path); }
java
public static Resource getResourceObj(String path) { if(StrUtil.isNotBlank(path)) { if(path.startsWith(URLUtil.FILE_URL_PREFIX) || FileUtil.isAbsolutePath(path)) { return new FileResource(path); } } return new ClassPathResource(path); }
[ "public", "static", "Resource", "getResourceObj", "(", "String", "path", ")", "{", "if", "(", "StrUtil", ".", "isNotBlank", "(", "path", ")", ")", "{", "if", "(", "path", ".", "startsWith", "(", "URLUtil", ".", "FILE_URL_PREFIX", ")", "||", "FileUtil", "...
获取{@link Resource} 资源对象<br> 如果提供路径为绝对路径或路径以file:开头,返回{@link FileResource},否则返回{@link ClassPathResource} @param path 路径,可以是绝对路径,也可以是相对路径 @return {@link Resource} 资源对象 @since 3.2.1
[ "获取", "{", "@link", "Resource", "}", "资源对象<br", ">", "如果提供路径为绝对路径或路径以file", ":", "开头,返回", "{", "@link", "FileResource", "}", ",否则返回", "{", "@link", "ClassPathResource", "}" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/resource/ResourceUtil.java#L171-L178
train
Get a resource object from a path.
[ 30522, 2270, 10763, 7692, 2131, 6072, 8162, 3401, 16429, 3501, 1006, 5164, 4130, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 3475, 4140, 28522, 8950, 1006, 4130, 1007, 1007, 1063, 2065, 1006, 4130, 1012, 4627, 24415, 1006, 24471, 7630,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/src/main/java/io/netty/channel/AbstractCoalescingBufferQueue.java
AbstractCoalescingBufferQueue.copyTo
public final void copyTo(AbstractCoalescingBufferQueue dest) { dest.bufAndListenerPairs.addAll(bufAndListenerPairs); dest.incrementReadableBytes(readableBytes); }
java
public final void copyTo(AbstractCoalescingBufferQueue dest) { dest.bufAndListenerPairs.addAll(bufAndListenerPairs); dest.incrementReadableBytes(readableBytes); }
[ "public", "final", "void", "copyTo", "(", "AbstractCoalescingBufferQueue", "dest", ")", "{", "dest", ".", "bufAndListenerPairs", ".", "addAll", "(", "bufAndListenerPairs", ")", ";", "dest", ".", "incrementReadableBytes", "(", "readableBytes", ")", ";", "}" ]
Copy all pending entries in this queue into the destination queue. @param dest to copy pending buffers to.
[ "Copy", "all", "pending", "entries", "in", "this", "queue", "into", "the", "destination", "queue", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/AbstractCoalescingBufferQueue.java#L214-L217
train
Copy the contents of this object to another object.
[ 30522, 2270, 2345, 11675, 6100, 3406, 1006, 10061, 3597, 23266, 6129, 8569, 12494, 4226, 5657, 4078, 2102, 1007, 1063, 4078, 2102, 1012, 20934, 15143, 19422, 27870, 3678, 4502, 18894, 1012, 5587, 8095, 1006, 20934, 15143, 19422, 27870, 3678, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.refreshed
public static <T> ExpectedCondition<T> refreshed(final ExpectedCondition<T> condition) { return new ExpectedCondition<T>() { @Override public T apply(WebDriver driver) { try { return condition.apply(driver); } catch (StaleElementReferenceException e) { return null; ...
java
public static <T> ExpectedCondition<T> refreshed(final ExpectedCondition<T> condition) { return new ExpectedCondition<T>() { @Override public T apply(WebDriver driver) { try { return condition.apply(driver); } catch (StaleElementReferenceException e) { return null; ...
[ "public", "static", "<", "T", ">", "ExpectedCondition", "<", "T", ">", "refreshed", "(", "final", "ExpectedCondition", "<", "T", ">", "condition", ")", "{", "return", "new", "ExpectedCondition", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "T...
Wrapper for a condition, which allows for elements to update by redrawing. This works around the problem of conditions which have two parts: find an element and then check for some condition on it. For these conditions it is possible that an element is located and then subsequently it is redrawn on the client. When th...
[ "Wrapper", "for", "a", "condition", "which", "allows", "for", "elements", "to", "update", "by", "redrawing", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java#L726-L742
train
An expectation that is satisfied when the element is refreshed.
[ 30522, 2270, 10763, 1026, 1056, 1028, 3517, 8663, 20562, 1026, 1056, 1028, 25416, 21898, 2098, 1006, 2345, 3517, 8663, 20562, 1026, 1056, 1028, 4650, 1007, 1063, 2709, 2047, 3517, 8663, 20562, 1026, 1056, 1028, 1006, 1007, 1063, 1030, 2058,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Setting.java
Setting.entrySet
public Set<Entry<String, String>> entrySet(String group) { return this.groupedMap.entrySet(group); }
java
public Set<Entry<String, String>> entrySet(String group) { return this.groupedMap.entrySet(group); }
[ "public", "Set", "<", "Entry", "<", "String", ",", "String", ">", ">", "entrySet", "(", "String", "group", ")", "{", "return", "this", ".", "groupedMap", ".", "entrySet", "(", "group", ")", ";", "}" ]
指定分组下所有键值对 @param group 分组 @return 键值对
[ "指定分组下所有键值对" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L485-L487
train
Returns a set of entries in the specified group.
[ 30522, 2270, 2275, 1026, 4443, 1026, 5164, 1010, 5164, 1028, 1028, 4443, 13462, 1006, 5164, 2177, 1007, 1063, 2709, 2023, 1012, 15131, 2863, 2361, 1012, 4443, 13462, 1006, 2177, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/route/ShardingAlgorithmFactory.java
ShardingAlgorithmFactory.newInstance
@SneakyThrows @SuppressWarnings("unchecked") public static <T extends ShardingAlgorithm> T newInstance(final String shardingAlgorithmClassName, final Class<T> superShardingAlgorithmClass) { Class<?> result = Class.forName(shardingAlgorithmClassName); if (!superShardingAlgorithmClass.isAssignable...
java
@SneakyThrows @SuppressWarnings("unchecked") public static <T extends ShardingAlgorithm> T newInstance(final String shardingAlgorithmClassName, final Class<T> superShardingAlgorithmClass) { Class<?> result = Class.forName(shardingAlgorithmClassName); if (!superShardingAlgorithmClass.isAssignable...
[ "@", "SneakyThrows", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "ShardingAlgorithm", ">", "T", "newInstance", "(", "final", "String", "shardingAlgorithmClassName", ",", "final", "Class", "<", "T", ">", "superShardi...
Create sharding algorithm. @param shardingAlgorithmClassName sharding algorithm class name @param superShardingAlgorithmClass sharding algorithm super class @param <T> class generic type @return sharding algorithm instance
[ "Create", "sharding", "algorithm", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/route/ShardingAlgorithmFactory.java#L42-L50
train
Create a new instance of the sharding algorithm class.
[ 30522, 1030, 13583, 22123, 8093, 15568, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1056, 8908, 21146, 17080, 13807, 2140, 20255, 8939, 2213, 1028, 1056, 2047, 7076, 26897, 1006, 2345, 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...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java
HpackEncoder.encodeLiteral
private void encodeLiteral(ByteBuf out, CharSequence name, CharSequence value, IndexType indexType, int nameIndex) { boolean nameIndexValid = nameIndex != -1; switch (indexType) { case INCREMENTAL: encodeInteger(out, 0x40, 6, nameIndexValid ? na...
java
private void encodeLiteral(ByteBuf out, CharSequence name, CharSequence value, IndexType indexType, int nameIndex) { boolean nameIndexValid = nameIndex != -1; switch (indexType) { case INCREMENTAL: encodeInteger(out, 0x40, 6, nameIndexValid ? na...
[ "private", "void", "encodeLiteral", "(", "ByteBuf", "out", ",", "CharSequence", "name", ",", "CharSequence", "value", ",", "IndexType", "indexType", ",", "int", "nameIndex", ")", "{", "boolean", "nameIndexValid", "=", "nameIndex", "!=", "-", "1", ";", "switch"...
Encode literal header field according to Section 6.2.
[ "Encode", "literal", "header", "field", "according", "to", "Section", "6", ".", "2", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java#L274-L294
train
Encode a single literal.
[ 30522, 2797, 11675, 4372, 16044, 22779, 7941, 1006, 24880, 8569, 2546, 2041, 1010, 25869, 3366, 4226, 5897, 2171, 1010, 25869, 3366, 4226, 5897, 3643, 1010, 5950, 13874, 5950, 13874, 1010, 20014, 2171, 22254, 10288, 1007, 1063, 22017, 20898, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/datasources/parquet/VectorizedParquetRecordReader.java
VectorizedParquetRecordReader.initBatch
private void initBatch( MemoryMode memMode, StructType partitionColumns, InternalRow partitionValues) { StructType batchSchema = new StructType(); for (StructField f: sparkSchema.fields()) { batchSchema = batchSchema.add(f); } if (partitionColumns != null) { for (StructFiel...
java
private void initBatch( MemoryMode memMode, StructType partitionColumns, InternalRow partitionValues) { StructType batchSchema = new StructType(); for (StructField f: sparkSchema.fields()) { batchSchema = batchSchema.add(f); } if (partitionColumns != null) { for (StructFiel...
[ "private", "void", "initBatch", "(", "MemoryMode", "memMode", ",", "StructType", "partitionColumns", ",", "InternalRow", "partitionValues", ")", "{", "StructType", "batchSchema", "=", "new", "StructType", "(", ")", ";", "for", "(", "StructField", "f", ":", "spar...
Column 3: partitionValues[1]
[ "Column", "3", ":", "partitionValues", "[", "1", "]" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedParquetRecordReader.java#L185-L220
train
Initialize the batch.
[ 30522, 2797, 11675, 1999, 4183, 14479, 2818, 1006, 3638, 5302, 3207, 2033, 7382, 10244, 1010, 2358, 6820, 6593, 13874, 13571, 25778, 2819, 3619, 1010, 4722, 10524, 13571, 10175, 15808, 1007, 1063, 2358, 6820, 6593, 13874, 14108, 22842, 2863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ns/PlaceDictionary.java
PlaceDictionary.isBadCase
static boolean isBadCase(String name) { EnumItem<NS> nrEnumItem = dictionary.get(name); if (nrEnumItem == null) return false; return nrEnumItem.containsLabel(NS.Z); }
java
static boolean isBadCase(String name) { EnumItem<NS> nrEnumItem = dictionary.get(name); if (nrEnumItem == null) return false; return nrEnumItem.containsLabel(NS.Z); }
[ "static", "boolean", "isBadCase", "(", "String", "name", ")", "{", "EnumItem", "<", "NS", ">", "nrEnumItem", "=", "dictionary", ".", "get", "(", "name", ")", ";", "if", "(", "nrEnumItem", "==", "null", ")", "return", "false", ";", "return", "nrEnumItem",...
因为任何算法都无法解决100%的问题,总是有一些bad case,这些bad case会以“盖公章 A 1”的形式加入词典中<BR> 这个方法返回是否是bad case @param name @return
[ "因为任何算法都无法解决100%的问题,总是有一些bad", "case,这些bad", "case会以“盖公章", "A", "1”的形式加入词典中<BR", ">", "这个方法返回是否是bad", "case" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/ns/PlaceDictionary.java#L130-L135
train
Check if a name is a bad case.
[ 30522, 10763, 22017, 20898, 2003, 9024, 18382, 1006, 5164, 2171, 1007, 1063, 4372, 30524, 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, 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-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/internal/datasource/OrchestrationShardingDataSource.java
OrchestrationShardingDataSource.renew
@SneakyThrows @Subscribe public final synchronized void renew(final PropertiesChangedEvent propertiesChangedEvent) { dataSource = new ShardingDataSource(dataSource.getDataSourceMap(), dataSource.getShardingContext().getShardingRule(), propertiesChangedEvent.getProps()); }
java
@SneakyThrows @Subscribe public final synchronized void renew(final PropertiesChangedEvent propertiesChangedEvent) { dataSource = new ShardingDataSource(dataSource.getDataSourceMap(), dataSource.getShardingContext().getShardingRule(), propertiesChangedEvent.getProps()); }
[ "@", "SneakyThrows", "@", "Subscribe", "public", "final", "synchronized", "void", "renew", "(", "final", "PropertiesChangedEvent", "propertiesChangedEvent", ")", "{", "dataSource", "=", "new", "ShardingDataSource", "(", "dataSource", ".", "getDataSourceMap", "(", ")",...
Renew properties. @param propertiesChangedEvent properties changed event
[ "Renew", "properties", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/internal/datasource/OrchestrationShardingDataSource.java#L111-L116
train
Renews the data source.
[ 30522, 1030, 13583, 22123, 8093, 15568, 1030, 4942, 29234, 2270, 2345, 25549, 11675, 20687, 1006, 2345, 5144, 22305, 14728, 15338, 5144, 22305, 14728, 15338, 1007, 1063, 2951, 6499, 3126, 3401, 1027, 2047, 21146, 17080, 3070, 2850, 10230, 816...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/perceptron/transition/features/FeatureExtractor.java
FeatureExtractor.extractBasicFeatures
private static Long[] extractBasicFeatures(Configuration configuration, int length) { Long[] featureMap = new Long[length]; State state = configuration.state; Sentence sentence = configuration.sentence; int b0Position = 0; int b1Position = 0; int b2Position = 0; ...
java
private static Long[] extractBasicFeatures(Configuration configuration, int length) { Long[] featureMap = new Long[length]; State state = configuration.state; Sentence sentence = configuration.sentence; int b0Position = 0; int b1Position = 0; int b2Position = 0; ...
[ "private", "static", "Long", "[", "]", "extractBasicFeatures", "(", "Configuration", "configuration", ",", "int", "length", ")", "{", "Long", "[", "]", "featureMap", "=", "new", "Long", "[", "length", "]", ";", "State", "state", "=", "configuration", ".", ...
Given a list of templates, extracts all features for the given state @param configuration @return @throws Exception
[ "Given", "a", "list", "of", "templates", "extracts", "all", "features", "for", "the", "given", "state" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/perceptron/transition/features/FeatureExtractor.java#L566-L781
train
Extract the basic features from the configuration.
[ 30522, 2797, 10763, 2146, 1031, 1033, 14817, 22083, 2594, 7959, 4017, 14900, 1006, 9563, 9563, 1010, 20014, 3091, 1007, 1063, 2146, 1031, 1033, 3444, 2863, 2361, 1027, 2047, 2146, 1031, 3091, 1033, 1025, 2110, 2110, 1027, 9563, 1012, 2110, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/By.java
By.findElement
public WebElement findElement(SearchContext context) { List<WebElement> allElements = findElements(context); if (allElements == null || allElements.isEmpty()) { throw new NoSuchElementException("Cannot locate an element using " + toString()); } return allElements.get(0); }
java
public WebElement findElement(SearchContext context) { List<WebElement> allElements = findElements(context); if (allElements == null || allElements.isEmpty()) { throw new NoSuchElementException("Cannot locate an element using " + toString()); } return allElements.get(0); }
[ "public", "WebElement", "findElement", "(", "SearchContext", "context", ")", "{", "List", "<", "WebElement", ">", "allElements", "=", "findElements", "(", "context", ")", ";", "if", "(", "allElements", "==", "null", "||", "allElements", ".", "isEmpty", "(", ...
Find a single element. Override this method if necessary. @param context A context to use to find the element. @return The WebElement that matches the selector.
[ "Find", "a", "single", "element", ".", "Override", "this", "method", "if", "necessary", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/By.java#L125-L131
train
Find an element using the specified search context.
[ 30522, 2270, 4773, 12260, 3672, 2424, 12260, 3672, 1006, 3945, 8663, 18209, 6123, 1007, 1063, 2862, 1026, 4773, 12260, 3672, 1028, 2035, 12260, 8163, 1027, 2424, 12260, 8163, 1006, 6123, 1007, 1025, 2065, 1006, 2035, 12260, 8163, 1027, 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-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/internal/MergingWindowSet.java
MergingWindowSet.addWindow
public W addWindow(W newWindow, MergeFunction<W> mergeFunction) throws Exception { MergeResultCollector collector = new MergeResultCollector(); windowAssigner.mergeWindows(newWindow, sortedWindows, collector); W resultWindow = newWindow; boolean isNewWindowMerged = false; // perform the merge for (Map.Ent...
java
public W addWindow(W newWindow, MergeFunction<W> mergeFunction) throws Exception { MergeResultCollector collector = new MergeResultCollector(); windowAssigner.mergeWindows(newWindow, sortedWindows, collector); W resultWindow = newWindow; boolean isNewWindowMerged = false; // perform the merge for (Map.Ent...
[ "public", "W", "addWindow", "(", "W", "newWindow", ",", "MergeFunction", "<", "W", ">", "mergeFunction", ")", "throws", "Exception", "{", "MergeResultCollector", "collector", "=", "new", "MergeResultCollector", "(", ")", ";", "windowAssigner", ".", "mergeWindows",...
Adds a new {@code Window} to the set of in-flight windows. It might happen that this triggers merging of previously in-flight windows. In that case, the provided {@link MergeFunction} is called. <p>This returns the window that is the representative of the added window after adding. This can either be the new window it...
[ "Adds", "a", "new", "{", "@code", "Window", "}", "to", "the", "set", "of", "in", "-", "flight", "windows", ".", "It", "might", "happen", "that", "this", "triggers", "merging", "of", "previously", "in", "-", "flight", "windows", ".", "In", "that", "case...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/window/internal/MergingWindowSet.java#L155-L218
train
Add a new window to the cluster.
[ 30522, 2270, 1059, 5587, 11101, 5004, 1006, 1059, 2047, 11101, 5004, 1010, 13590, 11263, 27989, 1026, 1059, 1028, 13590, 11263, 27989, 1007, 11618, 6453, 1063, 7660, 2229, 11314, 26895, 22471, 2953, 10018, 1027, 2047, 7660, 2229, 11314, 26895...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/nfa/NFAStateSerializer.java
NFAStateSerializer.serializeComputationStates
private void serializeComputationStates(Queue<ComputationState> states, DataOutputView target) throws IOException { target.writeInt(states.size()); for (ComputationState computationState : states) { serializeSingleComputationState(computationState, target); } }
java
private void serializeComputationStates(Queue<ComputationState> states, DataOutputView target) throws IOException { target.writeInt(states.size()); for (ComputationState computationState : states) { serializeSingleComputationState(computationState, target); } }
[ "private", "void", "serializeComputationStates", "(", "Queue", "<", "ComputationState", ">", "states", ",", "DataOutputView", "target", ")", "throws", "IOException", "{", "target", ".", "writeInt", "(", "states", ".", "size", "(", ")", ")", ";", "for", "(", ...
/* De/serialization methods
[ "/", "*", "De", "/", "serialization", "methods" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFAStateSerializer.java#L168-L173
train
Serialize a queue of computation states to the given output view.
[ 30522, 2797, 11675, 7642, 4697, 9006, 18780, 10708, 12259, 2015, 1006, 24240, 1026, 22334, 9153, 2618, 1028, 2163, 1010, 2951, 5833, 18780, 8584, 4539, 1007, 11618, 22834, 10288, 24422, 1063, 4539, 1012, 4339, 18447, 1006, 2163, 1012, 2946, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/word/TfIdf.java
TfIdf.tf
public static <TERM> Map<TERM, Double> tf(Collection<TERM> document, TfType type) { Map<TERM, Double> tf = new HashMap<TERM, Double>(); for (TERM term : document) { Double f = tf.get(term); if (f == null) f = 0.0; tf.put(term, f + 1); } if ...
java
public static <TERM> Map<TERM, Double> tf(Collection<TERM> document, TfType type) { Map<TERM, Double> tf = new HashMap<TERM, Double>(); for (TERM term : document) { Double f = tf.get(term); if (f == null) f = 0.0; tf.put(term, f + 1); } if ...
[ "public", "static", "<", "TERM", ">", "Map", "<", "TERM", ",", "Double", ">", "tf", "(", "Collection", "<", "TERM", ">", "document", ",", "TfType", "type", ")", "{", "Map", "<", "TERM", ",", "Double", ">", "tf", "=", "new", "HashMap", "<", "TERM", ...
单文档词频 @param document 词袋 @param type 词频计算方式 @param <TERM> 词语类型 @return 一个包含词频的Map
[ "单文档词频" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word/TfIdf.java#L54-L79
train
Get a map of terms to counts for a given type of document.
[ 30522, 2270, 10763, 1026, 2744, 1028, 4949, 1026, 2744, 1010, 3313, 1028, 1056, 2546, 1006, 3074, 1026, 2744, 1028, 6254, 1010, 1056, 6199, 18863, 2828, 1007, 1063, 4949, 1026, 2744, 1010, 3313, 1028, 1056, 2546, 1027, 2047, 23325, 2863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/sql/SqlBuilder.java
SqlBuilder.where
public SqlBuilder where(String where) { if (StrUtil.isNotBlank(where)) { sql.append(" WHERE ").append(where); } return this; }
java
public SqlBuilder where(String where) { if (StrUtil.isNotBlank(where)) { sql.append(" WHERE ").append(where); } return this; }
[ "public", "SqlBuilder", "where", "(", "String", "where", ")", "{", "if", "(", "StrUtil", ".", "isNotBlank", "(", "where", ")", ")", "{", "sql", ".", "append", "(", "\" WHERE \"", ")", ".", "append", "(", "where", ")", ";", "}", "return", "this", ";",...
添加Where语句<br> @param where WHERE语句之后跟的条件语句字符串 @return 自己
[ "添加Where语句<br", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlBuilder.java#L322-L327
train
Add a WHERE clause to the query.
[ 30522, 2270, 29296, 8569, 23891, 2099, 2073, 1006, 5164, 2073, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 3475, 4140, 28522, 8950, 1006, 2073, 1007, 1007, 1063, 29296, 1012, 10439, 10497, 1006, 1000, 2073, 1000, 1007, 1012, 10439, 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...
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Bzip2BlockCompressor.java
Bzip2BlockCompressor.writeSymbolMap
private void writeSymbolMap(ByteBuf out) { Bzip2BitWriter writer = this.writer; final boolean[] blockValuesPresent = this.blockValuesPresent; final boolean[] condensedInUse = new boolean[16]; for (int i = 0; i < condensedInUse.length; i++) { for (int j = 0, k = i << 4; j < ...
java
private void writeSymbolMap(ByteBuf out) { Bzip2BitWriter writer = this.writer; final boolean[] blockValuesPresent = this.blockValuesPresent; final boolean[] condensedInUse = new boolean[16]; for (int i = 0; i < condensedInUse.length; i++) { for (int j = 0, k = i << 4; j < ...
[ "private", "void", "writeSymbolMap", "(", "ByteBuf", "out", ")", "{", "Bzip2BitWriter", "writer", "=", "this", ".", "writer", ";", "final", "boolean", "[", "]", "blockValuesPresent", "=", "this", ".", "blockValuesPresent", ";", "final", "boolean", "[", "]", ...
Write the Huffman symbol to output byte map.
[ "Write", "the", "Huffman", "symbol", "to", "output", "byte", "map", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Bzip2BlockCompressor.java#L106-L131
train
Write symbol map.
[ 30522, 2797, 11675, 7009, 24335, 14956, 2863, 2361, 1006, 24880, 8569, 2546, 2041, 1007, 1063, 1038, 5831, 2361, 2475, 16313, 15994, 3213, 1027, 2023, 1012, 3213, 1025, 2345, 22017, 20898, 1031, 1033, 3796, 10175, 15808, 28994, 4765, 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/HandlerRequest.java
HandlerRequest.getQueryParameter
public <X, QP extends MessageQueryParameter<X>> List<X> getQueryParameter(Class<QP> parameterClass) { @SuppressWarnings("unchecked") QP queryParameter = (QP) queryParameters.get(parameterClass); if (queryParameter == null) { return Collections.emptyList(); } else { return queryParameter.getValue(); } }
java
public <X, QP extends MessageQueryParameter<X>> List<X> getQueryParameter(Class<QP> parameterClass) { @SuppressWarnings("unchecked") QP queryParameter = (QP) queryParameters.get(parameterClass); if (queryParameter == null) { return Collections.emptyList(); } else { return queryParameter.getValue(); } }
[ "public", "<", "X", ",", "QP", "extends", "MessageQueryParameter", "<", "X", ">", ">", "List", "<", "X", ">", "getQueryParameter", "(", "Class", "<", "QP", ">", "parameterClass", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "QP", "queryPar...
Returns the value of the {@link MessageQueryParameter} for the given class. @param parameterClass class of the parameter @param <X> the value type that the parameter contains @param <QP> type of the query parameter @return query parameter value for the given class, or an empty list if no parameter...
[ "Returns", "the", "value", "of", "the", "{", "@link", "MessageQueryParameter", "}", "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#L133-L141
train
Gets the query parameter.
[ 30522, 2270, 1026, 1060, 1010, 1053, 2361, 8908, 4471, 4226, 2854, 28689, 22828, 1026, 1060, 1028, 1028, 2862, 1026, 1060, 1028, 2131, 4226, 2854, 28689, 22828, 1006, 2465, 1026, 1053, 2361, 1028, 16381, 26266, 1007, 1063, 1030, 16081, 9028...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/operators/UnionOperator.java
UnionOperator.translateToDataFlow
@Override protected Union<T> translateToDataFlow(Operator<T> input1, Operator<T> input2) { return new Union<T>(input1, input2, unionLocationName); }
java
@Override protected Union<T> translateToDataFlow(Operator<T> input1, Operator<T> input2) { return new Union<T>(input1, input2, unionLocationName); }
[ "@", "Override", "protected", "Union", "<", "T", ">", "translateToDataFlow", "(", "Operator", "<", "T", ">", "input1", ",", "Operator", "<", "T", ">", "input2", ")", "{", "return", "new", "Union", "<", "T", ">", "(", "input1", ",", "input2", ",", "un...
Returns the BinaryNodeTranslation of the Union. @param input1 The first input of the union, as a common API operator. @param input2 The second input of the union, as a common API operator. @return The common API union operator.
[ "Returns", "the", "BinaryNodeTranslation", "of", "the", "Union", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/UnionOperator.java#L61-L64
train
Override to translate to dataflow.
[ 30522, 1030, 2058, 15637, 5123, 2586, 1026, 1056, 1028, 17637, 3406, 2850, 2696, 12314, 1006, 6872, 1026, 1056, 1028, 7953, 2487, 1010, 6872, 1026, 1056, 1028, 7953, 2475, 1007, 1063, 2709, 2047, 2586, 1026, 1056, 1028, 1006, 7953, 2487, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/src/main/java/io/netty/handler/codec/base64/Base64.java
Base64.encodedBufferSize
static int encodedBufferSize(int len, boolean breakLines) { // Cast len to long to prevent overflow long len43 = ((long) len << 2) / 3; // Account for padding long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return re...
java
static int encodedBufferSize(int len, boolean breakLines) { // Cast len to long to prevent overflow long len43 = ((long) len << 2) / 3; // Account for padding long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return re...
[ "static", "int", "encodedBufferSize", "(", "int", "len", ",", "boolean", "breakLines", ")", "{", "// Cast len to long to prevent overflow", "long", "len43", "=", "(", "(", "long", ")", "len", "<<", "2", ")", "/", "3", ";", "// Account for padding", "long", "re...
package-private for testing
[ "package", "-", "private", "for", "testing" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/base64/Base64.java#L199-L211
train
Encode a size of a record set to be used in a log file.
[ 30522, 10763, 20014, 12359, 8569, 12494, 5332, 4371, 1006, 20014, 18798, 1010, 22017, 20898, 3338, 12735, 1007, 1063, 1013, 1013, 3459, 18798, 2000, 2146, 2000, 4652, 2058, 12314, 2146, 18798, 23777, 1027, 1006, 1006, 2146, 1007, 18798, 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-core/src/main/java/cn/hutool/core/math/Arrangement.java
Arrangement.select
private void select(String[] resultList, int resultIndex, List<String[]> result) { int resultLen = resultList.length; if (resultIndex >= resultLen) { // 全部选择完时,输出排列结果 result.add(Arrays.copyOf(resultList, resultList.length)); return; } // 递归选择下一个 for (int i = 0; i < datas.length; i++) { // 判...
java
private void select(String[] resultList, int resultIndex, List<String[]> result) { int resultLen = resultList.length; if (resultIndex >= resultLen) { // 全部选择完时,输出排列结果 result.add(Arrays.copyOf(resultList, resultList.length)); return; } // 递归选择下一个 for (int i = 0; i < datas.length; i++) { // 判...
[ "private", "void", "select", "(", "String", "[", "]", "resultList", ",", "int", "resultIndex", ",", "List", "<", "String", "[", "]", ">", "result", ")", "{", "int", "resultLen", "=", "resultList", ".", "length", ";", "if", "(", "resultIndex", ">=", "re...
排列选择 @param dataList 待选列表 @param resultList 前面(resultIndex-1)个的排列结果 @param resultIndex 选择索引,从0开始 @param result 最终结果
[ "排列选择" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/math/Arrangement.java#L108-L130
train
Select a list of strings from the list of strings.
[ 30522, 2797, 11675, 7276, 1006, 5164, 1031, 1033, 2765, 9863, 1010, 20014, 2765, 22254, 10288, 1010, 2862, 1026, 5164, 1031, 1033, 1028, 2765, 1007, 1063, 20014, 2765, 7770, 1027, 2765, 9863, 1012, 3091, 1025, 2065, 1006, 2765, 22254, 10288...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/graph/StreamGraphGenerator.java
StreamGraphGenerator.transformSink
private <T> Collection<Integer> transformSink(SinkTransformation<T> sink) { Collection<Integer> inputIds = transform(sink.getInput()); String slotSharingGroup = determineSlotSharingGroup(sink.getSlotSharingGroup(), inputIds); streamGraph.addSink(sink.getId(), slotSharingGroup, sink.getCoLocationGroupKe...
java
private <T> Collection<Integer> transformSink(SinkTransformation<T> sink) { Collection<Integer> inputIds = transform(sink.getInput()); String slotSharingGroup = determineSlotSharingGroup(sink.getSlotSharingGroup(), inputIds); streamGraph.addSink(sink.getId(), slotSharingGroup, sink.getCoLocationGroupKe...
[ "private", "<", "T", ">", "Collection", "<", "Integer", ">", "transformSink", "(", "SinkTransformation", "<", "T", ">", "sink", ")", "{", "Collection", "<", "Integer", ">", "inputIds", "=", "transform", "(", "sink", ".", "getInput", "(", ")", ")", ";", ...
Transforms a {@code SourceTransformation}.
[ "Transforms", "a", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java#L499-L529
train
Transform a sink transformation.
[ 30522, 2797, 1026, 1056, 1028, 3074, 1026, 16109, 1028, 21743, 19839, 1006, 7752, 6494, 3619, 14192, 3370, 1026, 1056, 1028, 7752, 1007, 1063, 3074, 1026, 16109, 1028, 7953, 9821, 1027, 10938, 1006, 7752, 1012, 2131, 2378, 18780, 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...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
AbstractDb.page
public PageResult<Entity> page(Entity where, int page, int numPerPage) throws SQLException { return this.page(where, new Page(page, numPerPage)); }
java
public PageResult<Entity> page(Entity where, int page, int numPerPage) throws SQLException { return this.page(where, new Page(page, numPerPage)); }
[ "public", "PageResult", "<", "Entity", ">", "page", "(", "Entity", "where", ",", "int", "page", ",", "int", "numPerPage", ")", "throws", "SQLException", "{", "return", "this", ".", "page", "(", "where", ",", "new", "Page", "(", "page", ",", "numPerPage",...
分页查询<br> 查询条件为多个key value对表示,默认key = value,如果使用其它条件可以使用:where.put("key", " &gt; 1"),value也可以传Condition对象,key被忽略 @param where 条件实体类(包含表名) @param page 页码 @param numPerPage 每页条目数 @return 分页结果集 @throws SQLException SQL执行异常 @since 3.2.2
[ "分页查询<br", ">", "查询条件为多个key", "value对表示,默认key", "=", "value,如果使用其它条件可以使用:where", ".", "put", "(", "key", "&gt", ";", "1", ")", ",value也可以传Condition对象,key被忽略" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java#L773-L775
train
Retrieves a page of entities matching the specified criteria.
[ 30522, 2270, 3931, 6072, 11314, 1026, 9178, 1028, 3931, 1006, 9178, 2073, 1010, 20014, 3931, 1010, 20014, 16371, 8737, 2121, 13704, 1007, 11618, 29296, 10288, 24422, 1063, 2709, 2023, 1012, 3931, 1006, 2073, 1010, 2047, 3931, 1006, 3931, 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-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java
RocksDBIncrementalRestoreOperation.readMetaData
private KeyedBackendSerializationProxy<K> readMetaData(StreamStateHandle metaStateHandle) throws Exception { FSDataInputStream inputStream = null; try { inputStream = metaStateHandle.openInputStream(); cancelStreamRegistry.registerCloseable(inputStream); DataInputView in = new DataInputViewStreamWrapper(...
java
private KeyedBackendSerializationProxy<K> readMetaData(StreamStateHandle metaStateHandle) throws Exception { FSDataInputStream inputStream = null; try { inputStream = metaStateHandle.openInputStream(); cancelStreamRegistry.registerCloseable(inputStream); DataInputView in = new DataInputViewStreamWrapper(...
[ "private", "KeyedBackendSerializationProxy", "<", "K", ">", "readMetaData", "(", "StreamStateHandle", "metaStateHandle", ")", "throws", "Exception", "{", "FSDataInputStream", "inputStream", "=", "null", ";", "try", "{", "inputStream", "=", "metaStateHandle", ".", "ope...
Reads Flink's state meta data file from the state handle.
[ "Reads", "Flink", "s", "state", "meta", "data", "file", "from", "the", "state", "handle", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java#L484-L498
train
Reads the metadata from the given state handle.
[ 30522, 2797, 3145, 2098, 5963, 10497, 8043, 4818, 3989, 21572, 18037, 1026, 1047, 1028, 3191, 11368, 8447, 2696, 1006, 9199, 12259, 11774, 2571, 18804, 9153, 2618, 11774, 2571, 1007, 11618, 6453, 1063, 1042, 16150, 6790, 2378, 18780, 21422, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.urlToBe
public static ExpectedCondition<Boolean> urlToBe(final String url) { return new ExpectedCondition<Boolean>() { private String currentUrl = ""; @Override public Boolean apply(WebDriver driver) { currentUrl = driver.getCurrentUrl(); return currentUrl != null && currentUrl.equals(url...
java
public static ExpectedCondition<Boolean> urlToBe(final String url) { return new ExpectedCondition<Boolean>() { private String currentUrl = ""; @Override public Boolean apply(WebDriver driver) { currentUrl = driver.getCurrentUrl(); return currentUrl != null && currentUrl.equals(url...
[ "public", "static", "ExpectedCondition", "<", "Boolean", ">", "urlToBe", "(", "final", "String", "url", ")", "{", "return", "new", "ExpectedCondition", "<", "Boolean", ">", "(", ")", "{", "private", "String", "currentUrl", "=", "\"\"", ";", "@", "Override", ...
An expectation for the URL of the current page to be a specific url. @param url the url that the page should be on @return <code>true</code> when the URL is what it should be
[ "An", "expectation", "for", "the", "URL", "of", "the", "current", "page", "to", "be", "a", "specific", "url", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java#L103-L118
train
An expectation for checking that the current url of the application is the same as the given url.
[ 30522, 2270, 10763, 3517, 8663, 20562, 1026, 22017, 20898, 1028, 24471, 23223, 4783, 1006, 2345, 5164, 24471, 2140, 1007, 1063, 2709, 2047, 3517, 8663, 20562, 1026, 22017, 20898, 1028, 1006, 1007, 1063, 2797, 5164, 2783, 3126, 2140, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.getStringsEndingWith
public HashSet<String> getStringsEndingWith(String suffixStr) { HashSet<String> strHashSet = new HashSet<String>(); if (sourceNode != null) //if the MDAG hasn't been simplified getStrings(strHashSet, SearchCondition.SUFFIX_SEARCH_CONDITION, suffixStr, "", sourceNode.getOutgoingTran...
java
public HashSet<String> getStringsEndingWith(String suffixStr) { HashSet<String> strHashSet = new HashSet<String>(); if (sourceNode != null) //if the MDAG hasn't been simplified getStrings(strHashSet, SearchCondition.SUFFIX_SEARCH_CONDITION, suffixStr, "", sourceNode.getOutgoingTran...
[ "public", "HashSet", "<", "String", ">", "getStringsEndingWith", "(", "String", "suffixStr", ")", "{", "HashSet", "<", "String", ">", "strHashSet", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "if", "(", "sourceNode", "!=", "null", ")", "//i...
后缀查询<br> Retrieves all the Strings in the MDAG that begin with a given String. @param suffixStr a String that is the suffix for all the desired Strings @return a HashSet containing all the Strings present in the MDAG that end with {@code suffixStr}
[ "后缀查询<br", ">", "Retrieves", "all", "the", "Strings", "in", "the", "MDAG", "that", "begin", "with", "a", "given", "String", "." ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L996-L1006
train
Get the strings ending with the suffixStr
[ 30522, 2270, 23325, 13462, 1026, 5164, 1028, 4152, 18886, 3070, 5054, 4667, 24415, 1006, 5164, 16809, 3367, 2099, 1007, 1063, 23325, 13462, 1026, 5164, 1028, 2358, 25032, 11823, 13462, 1027, 2047, 23325, 13462, 1026, 5164, 1028, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java
HashUtil.fnvHash
public static int fnvHash(String data) { final int p = 16777619; int hash = (int) 2166136261L; for (int i = 0; i < data.length(); i++) { hash = (hash ^ data.charAt(i)) * p; } hash += hash << 13; hash ^= hash >> 7; hash += hash << 3; hash ^= hash >> 17; hash += hash << 5; return hash; ...
java
public static int fnvHash(String data) { final int p = 16777619; int hash = (int) 2166136261L; for (int i = 0; i < data.length(); i++) { hash = (hash ^ data.charAt(i)) * p; } hash += hash << 13; hash ^= hash >> 7; hash += hash << 3; hash ^= hash >> 17; hash += hash << 5; return hash; ...
[ "public", "static", "int", "fnvHash", "(", "String", "data", ")", "{", "final", "int", "p", "=", "16777619", ";", "int", "hash", "=", "(", "int", ")", "2166136261L", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "data", ".", "length", "("...
改进的32位FNV算法1 @param data 字符串 @return hash结果
[ "改进的32位FNV算法1" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java#L164-L176
train
Returns a 32 - bit hash value for a given string.
[ 30522, 2270, 10763, 20014, 1042, 2078, 2615, 14949, 2232, 1006, 5164, 2951, 1007, 1063, 2345, 20014, 1052, 1027, 16785, 2581, 2581, 2575, 16147, 1025, 20014, 23325, 1027, 1006, 20014, 1007, 20294, 2575, 17134, 2575, 23833, 2487, 2140, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/Convert.java
Convert.toCollection
public static Collection<?> toCollection(Class<?> collectionType, Class<?> elementType, Object value) { return new CollectionConverter(collectionType, elementType).convert(value, null); }
java
public static Collection<?> toCollection(Class<?> collectionType, Class<?> elementType, Object value) { return new CollectionConverter(collectionType, elementType).convert(value, null); }
[ "public", "static", "Collection", "<", "?", ">", "toCollection", "(", "Class", "<", "?", ">", "collectionType", ",", "Class", "<", "?", ">", "elementType", ",", "Object", "value", ")", "{", "return", "new", "CollectionConverter", "(", "collectionType", ",", ...
转换为集合类 @param collectionType 集合类型 @param elementType 集合中元素类型 @param value 被转换的值 @return {@link Collection} @since 3.0.8
[ "转换为集合类" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/Convert.java#L500-L502
train
Converts the given value to a Collection of given type and element type.
[ 30522, 2270, 10763, 3074, 1026, 1029, 1028, 2000, 26895, 18491, 1006, 2465, 1026, 1029, 1028, 3074, 13874, 1010, 2465, 1026, 1029, 1028, 5783, 13874, 1010, 4874, 3643, 1007, 1063, 2709, 2047, 3074, 8663, 16874, 2121, 1006, 3074, 13874, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
networknt/light-4j
dump/src/main/java/com/networknt/dump/DumperFactory.java
DumperFactory.createRequestDumpers
public List<IRequestDumpable> createRequestDumpers(DumpConfig config, HttpServerExchange exchange) { RequestDumperFactory factory = new RequestDumperFactory(); List<IRequestDumpable> dumpers = new ArrayList<>(); for(String dumperNames: requestDumpers) { IRequestDumpable dumper = fac...
java
public List<IRequestDumpable> createRequestDumpers(DumpConfig config, HttpServerExchange exchange) { RequestDumperFactory factory = new RequestDumperFactory(); List<IRequestDumpable> dumpers = new ArrayList<>(); for(String dumperNames: requestDumpers) { IRequestDumpable dumper = fac...
[ "public", "List", "<", "IRequestDumpable", ">", "createRequestDumpers", "(", "DumpConfig", "config", ",", "HttpServerExchange", "exchange", ")", "{", "RequestDumperFactory", "factory", "=", "new", "RequestDumperFactory", "(", ")", ";", "List", "<", "IRequestDumpable",...
use RequestDumperFactory to create dumpers listed in this.requestDumpers @param config type: DumpConfig @param exchange type: HttpServerExchange @return a list of IRequestDumpable, dumpers can dump http request info
[ "use", "RequestDumperFactory", "to", "create", "dumpers", "listed", "in", "this", ".", "requestDumpers" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/dump/src/main/java/com/networknt/dump/DumperFactory.java#L45-L54
train
Create a list of request dumpers.
[ 30522, 2270, 2862, 1026, 20868, 2063, 15500, 8566, 8737, 3085, 1028, 3443, 2890, 15500, 8566, 8737, 2545, 1006, 15653, 8663, 8873, 2290, 9530, 8873, 2290, 1010, 16770, 2121, 28943, 2595, 22305, 2063, 3863, 1007, 1063, 5227, 8566, 8737, 2121...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
networknt/light-4j
http-url/src/main/java/com/networknt/url/QueryString.java
QueryString.addString
public final void addString(String key, String... values) { if (values == null || Array.getLength(values) == 0) { return; } List<String> list = parameters.get(key); if (list == null) { list = new ArrayList<>(); } list.addAll(Arrays.asList(values));...
java
public final void addString(String key, String... values) { if (values == null || Array.getLength(values) == 0) { return; } List<String> list = parameters.get(key); if (list == null) { list = new ArrayList<>(); } list.addAll(Arrays.asList(values));...
[ "public", "final", "void", "addString", "(", "String", "key", ",", "String", "...", "values", ")", "{", "if", "(", "values", "==", "null", "||", "Array", ".", "getLength", "(", "values", ")", "==", "0", ")", "{", "return", ";", "}", "List", "<", "S...
Adds one or multiple string values. Adding a single <code>null</code> value has no effect. When adding multiple values, <code>null</code> values are converted to blank strings. @param key the key of the value to set @param values the values to set
[ "Adds", "one", "or", "multiple", "string", "values", ".", "Adding", "a", "single", "<code", ">", "null<", "/", "code", ">", "value", "has", "no", "effect", ".", "When", "adding", "multiple", "values", "<code", ">", "null<", "/", "code", ">", "values", ...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/http-url/src/main/java/com/networknt/url/QueryString.java#L201-L211
train
Add a string parameter.
[ 30522, 2270, 2345, 11675, 9909, 18886, 3070, 1006, 5164, 3145, 1010, 5164, 1012, 1012, 1012, 5300, 1007, 1063, 2065, 1006, 5300, 1027, 1027, 19701, 1064, 1064, 9140, 1012, 2131, 7770, 13512, 2232, 1006, 5300, 1007, 1027, 1027, 1014, 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-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/entries/DeploymentEntry.java
DeploymentEntry.enrich
public static DeploymentEntry enrich(DeploymentEntry deployment, Map<String, String> prefixedProperties) { final Map<String, String> enrichedProperties = new HashMap<>(deployment.asMap()); prefixedProperties.forEach((k, v) -> { final String normalizedKey = k.toLowerCase(); if (k.startsWith(DEPLOYMENT_ENTRY +...
java
public static DeploymentEntry enrich(DeploymentEntry deployment, Map<String, String> prefixedProperties) { final Map<String, String> enrichedProperties = new HashMap<>(deployment.asMap()); prefixedProperties.forEach((k, v) -> { final String normalizedKey = k.toLowerCase(); if (k.startsWith(DEPLOYMENT_ENTRY +...
[ "public", "static", "DeploymentEntry", "enrich", "(", "DeploymentEntry", "deployment", ",", "Map", "<", "String", ",", "String", ">", "prefixedProperties", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "enrichedProperties", "=", "new", "HashMap", ...
Creates a new deployment entry enriched with additional properties that are prefixed with {@link Environment#DEPLOYMENT_ENTRY}.
[ "Creates", "a", "new", "deployment", "entry", "enriched", "with", "additional", "properties", "that", "are", "prefixed", "with", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/entries/DeploymentEntry.java#L153-L167
train
Enrich the deployment with the given prefixed properties.
[ 30522, 2270, 10763, 10813, 4765, 2854, 4372, 13149, 1006, 10813, 4765, 2854, 10813, 1010, 4949, 1026, 5164, 1010, 5164, 1028, 17576, 2098, 21572, 4842, 7368, 1007, 1063, 2345, 4949, 1026, 5164, 1010, 5164, 1028, 25202, 21572, 4842, 7368, 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...
alibaba/canal
client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/RdbAdapter.java
RdbAdapter.count
@Override public Map<String, Object> count(String task) { MappingConfig config = rdbMapping.get(task); MappingConfig.DbMapping dbMapping = config.getDbMapping(); String sql = "SELECT COUNT(1) AS cnt FROM " + SyncUtil.getDbTableName(dbMapping); Connection conn = null; Map<Stri...
java
@Override public Map<String, Object> count(String task) { MappingConfig config = rdbMapping.get(task); MappingConfig.DbMapping dbMapping = config.getDbMapping(); String sql = "SELECT COUNT(1) AS cnt FROM " + SyncUtil.getDbTableName(dbMapping); Connection conn = null; Map<Stri...
[ "@", "Override", "public", "Map", "<", "String", ",", "Object", ">", "count", "(", "String", "task", ")", "{", "MappingConfig", "config", "=", "rdbMapping", ".", "get", "(", "task", ")", ";", "MappingConfig", ".", "DbMapping", "dbMapping", "=", "config", ...
获取总数方法 @param task 任务名, 对应配置名 @return 总数
[ "获取总数方法" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/RdbAdapter.java#L221-L254
train
Count the number of records in a single table.
[ 30522, 1030, 2058, 15637, 2270, 4949, 1026, 5164, 1010, 4874, 1028, 4175, 1006, 5164, 4708, 1007, 1063, 12375, 8663, 8873, 2290, 9530, 8873, 2290, 1027, 16428, 25526, 29098, 2075, 1012, 2131, 1006, 4708, 1007, 1025, 12375, 8663, 8873, 2290,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/datastream/KeyedStream.java
KeyedStream.process
@Internal public <R> SingleOutputStreamOperator<R> process( KeyedProcessFunction<KEY, T, R> keyedProcessFunction, TypeInformation<R> outputType) { KeyedProcessOperator<KEY, T, R> operator = new KeyedProcessOperator<>(clean(keyedProcessFunction)); return transform("KeyedProcess", outputType, operator); }
java
@Internal public <R> SingleOutputStreamOperator<R> process( KeyedProcessFunction<KEY, T, R> keyedProcessFunction, TypeInformation<R> outputType) { KeyedProcessOperator<KEY, T, R> operator = new KeyedProcessOperator<>(clean(keyedProcessFunction)); return transform("KeyedProcess", outputType, operator); }
[ "@", "Internal", "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "process", "(", "KeyedProcessFunction", "<", "KEY", ",", "T", ",", "R", ">", "keyedProcessFunction", ",", "TypeInformation", "<", "R", ">", "outputType", ")", "{", "KeyedP...
Applies the given {@link KeyedProcessFunction} on the input stream, thereby creating a transformed output stream. <p>The function will be called for every element in the input streams and can produce zero or more output elements. Contrary to the {@link DataStream#flatMap(FlatMapFunction)} function, this function can a...
[ "Applies", "the", "given", "{", "@link", "KeyedProcessFunction", "}", "on", "the", "input", "stream", "thereby", "creating", "a", "transformed", "output", "stream", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java#L392-L399
train
Process a single output stream.
[ 30522, 1030, 4722, 2270, 1026, 1054, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1054, 1028, 2832, 1006, 3145, 2098, 21572, 9623, 22747, 4609, 7542, 1026, 3145, 1010, 1056, 1010, 1054, 1028, 3145, 2098, 21572, 9623, 22747, 4609, 7542...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/auth/HiveAuthFactory.java
HiveAuthFactory.getDelegationToken
public String getDelegationToken(String owner, String renewer) throws HiveSQLException { if (saslServer == null) { throw new HiveSQLException( "Delegation token only supported over kerberos authentication", "08S01"); } try { String tokenStr = saslServer.getDelegationTokenWithService(o...
java
public String getDelegationToken(String owner, String renewer) throws HiveSQLException { if (saslServer == null) { throw new HiveSQLException( "Delegation token only supported over kerberos authentication", "08S01"); } try { String tokenStr = saslServer.getDelegationTokenWithService(o...
[ "public", "String", "getDelegationToken", "(", "String", "owner", ",", "String", "renewer", ")", "throws", "HiveSQLException", "{", "if", "(", "saslServer", "==", "null", ")", "{", "throw", "new", "HiveSQLException", "(", "\"Delegation token only supported over kerber...
retrieve delegation token for the given user
[ "retrieve", "delegation", "token", "for", "the", "given", "user" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java#L315-L334
train
Get delegation token for a user.
[ 30522, 2270, 5164, 2131, 9247, 29107, 3508, 18715, 2368, 1006, 5164, 3954, 1010, 5164, 20687, 2121, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, 2065, 1006, 21871, 4877, 2121, 6299, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 267...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.cut
public static void cut(File srcImgFile, File destImgFile, Rectangle rectangle) { cut(read(srcImgFile), destImgFile, rectangle); }
java
public static void cut(File srcImgFile, File destImgFile, Rectangle rectangle) { cut(read(srcImgFile), destImgFile, rectangle); }
[ "public", "static", "void", "cut", "(", "File", "srcImgFile", ",", "File", "destImgFile", ",", "Rectangle", "rectangle", ")", "{", "cut", "(", "read", "(", "srcImgFile", ")", ",", "destImgFile", ",", "rectangle", ")", ";", "}" ]
图像切割(按指定起点坐标和宽高切割) @param srcImgFile 源图像文件 @param destImgFile 切片后的图像文件 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.1.0
[ "图像切割", "(", "按指定起点坐标和宽高切割", ")" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L256-L258
train
Cut the image from srcImgFile to destImgFile with the specified rectangle.
[ 30522, 2270, 10763, 11675, 3013, 1006, 5371, 5034, 6895, 24798, 8873, 2571, 1010, 5371, 4078, 3775, 24798, 8873, 2571, 1010, 28667, 23395, 28667, 23395, 1007, 1063, 3013, 1006, 3191, 1006, 5034, 6895, 24798, 8873, 2571, 1007, 1010, 4078, 37...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/MetricRegistry.java
MetricRegistry.removeAll
public void removeAll() { for(Iterator<Map.Entry<MetricName, Metric>> it = metrics.entrySet().iterator(); it.hasNext();) { Map.Entry<MetricName, Metric> entry = it.next(); Metric metric = entry.getValue(); if(metric != null) { onMetricRemoved(entry.getKey(), m...
java
public void removeAll() { for(Iterator<Map.Entry<MetricName, Metric>> it = metrics.entrySet().iterator(); it.hasNext();) { Map.Entry<MetricName, Metric> entry = it.next(); Metric metric = entry.getValue(); if(metric != null) { onMetricRemoved(entry.getKey(), m...
[ "public", "void", "removeAll", "(", ")", "{", "for", "(", "Iterator", "<", "Map", ".", "Entry", "<", "MetricName", ",", "Metric", ">", ">", "it", "=", "metrics", ".", "entrySet", "(", ")", ".", "iterator", "(", ")", ";", "it", ".", "hasNext", "(", ...
Removes all the metrics in registry.
[ "Removes", "all", "the", "metrics", "in", "registry", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/MetricRegistry.java#L245-L254
train
Removes all the metrics from the cache.
[ 30522, 2270, 11675, 6366, 8095, 1006, 1007, 1063, 2005, 1006, 2009, 6906, 4263, 1026, 4949, 1012, 4443, 1026, 12046, 18442, 1010, 12046, 1028, 1028, 2009, 1027, 12046, 2015, 1012, 4443, 13462, 1006, 1007, 1012, 2009, 6906, 4263, 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...
alibaba/canal
client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/service/RdbMirrorDbSyncService.java
RdbMirrorDbSyncService.sync
public void sync(List<Dml> dmls) { List<Dml> dmlList = new ArrayList<>(); for (Dml dml : dmls) { String destination = StringUtils.trimToEmpty(dml.getDestination()); String database = dml.getDatabase(); MirrorDbConfig mirrorDbConfig = mirrorDbConfigCache.get(destinatio...
java
public void sync(List<Dml> dmls) { List<Dml> dmlList = new ArrayList<>(); for (Dml dml : dmls) { String destination = StringUtils.trimToEmpty(dml.getDestination()); String database = dml.getDatabase(); MirrorDbConfig mirrorDbConfig = mirrorDbConfigCache.get(destinatio...
[ "public", "void", "sync", "(", "List", "<", "Dml", ">", "dmls", ")", "{", "List", "<", "Dml", ">", "dmlList", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Dml", "dml", ":", "dmls", ")", "{", "String", "destination", "=", "StringUtils"...
批量同步方法 @param dmls 批量 DML
[ "批量同步方法" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/service/RdbMirrorDbSyncService.java#L50-L113
train
Synchronize DMLs.
[ 30522, 2270, 11675, 26351, 1006, 2862, 1026, 1040, 19968, 1028, 1040, 19968, 2015, 1007, 1063, 2862, 1026, 1040, 19968, 1028, 1040, 19968, 9863, 1027, 2047, 9140, 9863, 1026, 1028, 1006, 1007, 1025, 2005, 1006, 1040, 19968, 1040, 19968, 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-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.rowtime
public Schema rowtime(Rowtime rowtime) { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).putAll(rowtime.toProperties()); lastField = null; return this; }
java
public Schema rowtime(Rowtime rowtime) { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).putAll(rowtime.toProperties()); lastField = null; return this; }
[ "public", "Schema", "rowtime", "(", "Rowtime", "rowtime", ")", "{", "if", "(", "lastField", "==", "null", ")", "{", "throw", "new", "ValidationException", "(", "\"No field defined previously. Use field() before.\"", ")", ";", "}", "tableSchema", ".", "get", "(", ...
Specifies the previously defined field as an event-time attribute. <p>E.g. field("rowtime", Types.SQL_TIMESTAMP).rowtime(...)
[ "Specifies", "the", "previously", "defined", "field", "as", "an", "event", "-", "time", "attribute", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java#L139-L146
train
Adds a rowtime to the schema.
[ 30522, 2270, 8040, 28433, 5216, 7292, 1006, 5216, 7292, 5216, 7292, 1007, 1063, 2065, 1006, 2197, 3790, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 27354, 10288, 24422, 1006, 1000, 2053, 2492, 4225, 3130, 1012, 2224, 2492, 1006, 1007, 2077, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/pregel/ComputeFunction.java
ComputeFunction.setNewVertexValue
public final void setNewVertexValue(VV newValue) { if (setNewVertexValueCalled) { throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex"); } setNewVertexValueCalled = true; outVertex.f1 = newValue; out.collect(Either.Left(outVertex)); }
java
public final void setNewVertexValue(VV newValue) { if (setNewVertexValueCalled) { throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex"); } setNewVertexValueCalled = true; outVertex.f1 = newValue; out.collect(Either.Left(outVertex)); }
[ "public", "final", "void", "setNewVertexValue", "(", "VV", "newValue", ")", "{", "if", "(", "setNewVertexValueCalled", ")", "{", "throw", "new", "IllegalStateException", "(", "\"setNewVertexValue should only be called at most once per updateVertex\"", ")", ";", "}", "setN...
Sets the new value of this vertex. <p>This should be called at most once per ComputeFunction. @param newValue The new vertex value.
[ "Sets", "the", "new", "value", "of", "this", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/ComputeFunction.java#L130-L139
train
Sets the new value of the vertex.
[ 30522, 2270, 2345, 11675, 2275, 2638, 2860, 16874, 10288, 10175, 5657, 1006, 1058, 2615, 2047, 10175, 5657, 1007, 1063, 2065, 1006, 2275, 2638, 2860, 16874, 10288, 10175, 5657, 9289, 3709, 1007, 1063, 5466, 2047, 6206, 9153, 17389, 2595, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java
Http2ServerInitializer.configureClearText
private void configureClearText(SocketChannel ch) { final ChannelPipeline p = ch.pipeline(); final HttpServerCodec sourceCodec = new HttpServerCodec(); p.addLast(sourceCodec); p.addLast(new HttpServerUpgradeHandler(sourceCodec, upgradeCodecFactory)); p.addLast(new SimpleChannelI...
java
private void configureClearText(SocketChannel ch) { final ChannelPipeline p = ch.pipeline(); final HttpServerCodec sourceCodec = new HttpServerCodec(); p.addLast(sourceCodec); p.addLast(new HttpServerUpgradeHandler(sourceCodec, upgradeCodecFactory)); p.addLast(new SimpleChannelI...
[ "private", "void", "configureClearText", "(", "SocketChannel", "ch", ")", "{", "final", "ChannelPipeline", "p", "=", "ch", ".", "pipeline", "(", ")", ";", "final", "HttpServerCodec", "sourceCodec", "=", "new", "HttpServerCodec", "(", ")", ";", "p", ".", "add...
Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.0
[ "Configure", "the", "pipeline", "for", "a", "cleartext", "upgrade", "from", "HTTP", "to", "HTTP", "/", "2", ".", "0" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java#L91-L111
train
Configure clear text.
[ 30522, 2797, 11675, 9530, 8873, 27390, 8586, 19738, 19731, 18413, 1006, 22278, 26058, 10381, 1007, 1063, 2345, 3149, 24548, 4179, 1052, 1027, 10381, 1012, 13117, 1006, 1007, 1025, 2345, 16770, 2121, 6299, 16044, 2278, 3120, 16044, 2278, 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/img/Img.java
Img.pressImage
public Img pressImage(Image pressImg, int x, int y, float alpha) { final int pressImgWidth = pressImg.getWidth(null); final int pressImgHeight = pressImg.getHeight(null); return pressImage(pressImg, new Rectangle(x, y, pressImgWidth, pressImgHeight), alpha); }
java
public Img pressImage(Image pressImg, int x, int y, float alpha) { final int pressImgWidth = pressImg.getWidth(null); final int pressImgHeight = pressImg.getHeight(null); return pressImage(pressImg, new Rectangle(x, y, pressImgWidth, pressImgHeight), alpha); }
[ "public", "Img", "pressImage", "(", "Image", "pressImg", ",", "int", "x", ",", "int", "y", ",", "float", "alpha", ")", "{", "final", "int", "pressImgWidth", "=", "pressImg", ".", "getWidth", "(", "null", ")", ";", "final", "int", "pressImgHeight", "=", ...
给图片添加图片水印 @param pressImg 水印图片,可以使用{@link ImageIO#read(File)}方法读取文件 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字 @return this
[ "给图片添加图片水印" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/Img.java#L433-L438
train
Press an image at the specified coordinates.
[ 30522, 2270, 10047, 2290, 2811, 9581, 3351, 1006, 3746, 2811, 5714, 2290, 1010, 20014, 1060, 1010, 20014, 1061, 1010, 14257, 6541, 1007, 1063, 2345, 20014, 2811, 5714, 2290, 9148, 11927, 2232, 1027, 2811, 5714, 2290, 1012, 2131, 9148, 11927...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/heap/HeapKeyedStateBackend.java
HeapKeyedStateBackend.create
@SuppressWarnings("unchecked") @Nonnull @Override public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed> KeyGroupedInternalPriorityQueue<T> create( @Nonnull String stateName, @Nonnull TypeSerializer<T> byteOrderedElementSerializer) { final HeapPriorityQueueSnapshotRestoreWrapper existingStat...
java
@SuppressWarnings("unchecked") @Nonnull @Override public <T extends HeapPriorityQueueElement & PriorityComparable & Keyed> KeyGroupedInternalPriorityQueue<T> create( @Nonnull String stateName, @Nonnull TypeSerializer<T> byteOrderedElementSerializer) { final HeapPriorityQueueSnapshotRestoreWrapper existingStat...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Nonnull", "@", "Override", "public", "<", "T", "extends", "HeapPriorityQueueElement", "&", "PriorityComparable", "&", "Keyed", ">", "KeyGroupedInternalPriorityQueue", "<", "T", ">", "create", "(", "@", "Non...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapKeyedStateBackend.java#L149-L180
train
Create a new priority queue.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 1030, 2512, 11231, 3363, 1030, 2058, 15637, 2270, 1026, 1056, 8908, 16721, 18098, 25346, 3012, 4226, 5657, 12260, 3672, 1004, 9470, 9006, 28689, 3468, 1004, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java
RadixSort.getKeyPrefixArrayCounts
private static long[][] getKeyPrefixArrayCounts( LongArray array, long startIndex, long numRecords, int startByteIndex, int endByteIndex) { long[][] counts = new long[8][]; long bitwiseMax = 0; long bitwiseMin = -1L; long baseOffset = array.getBaseOffset() + startIndex * 8L; long limit = baseO...
java
private static long[][] getKeyPrefixArrayCounts( LongArray array, long startIndex, long numRecords, int startByteIndex, int endByteIndex) { long[][] counts = new long[8][]; long bitwiseMax = 0; long bitwiseMin = -1L; long baseOffset = array.getBaseOffset() + startIndex * 8L; long limit = baseO...
[ "private", "static", "long", "[", "]", "[", "]", "getKeyPrefixArrayCounts", "(", "LongArray", "array", ",", "long", "startIndex", ",", "long", "numRecords", ",", "int", "startByteIndex", ",", "int", "endByteIndex", ")", "{", "long", "[", "]", "[", "]", "co...
Specialization of getCounts() for key-prefix arrays. We could probably combine this with getCounts with some added parameters but that seems to hurt in benchmarks.
[ "Specialization", "of", "getCounts", "()", "for", "key", "-", "prefix", "arrays", ".", "We", "could", "probably", "combine", "this", "with", "getCounts", "with", "some", "added", "parameters", "but", "that", "seems", "to", "hurt", "in", "benchmarks", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java#L214-L237
train
Get the key prefix array counts.
[ 30522, 2797, 10763, 2146, 1031, 1033, 1031, 1033, 2131, 14839, 28139, 8873, 18684, 11335, 2100, 3597, 16671, 2015, 1006, 2146, 2906, 9447, 9140, 1010, 2146, 2707, 22254, 10288, 1010, 2146, 16371, 2213, 2890, 27108, 5104, 1010, 20014, 2707, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/NeuralNetworkParser.java
NeuralNetworkParser.FORM
int FORM(final List<Integer> forms, int id) { return ((id != -1) ? (forms.get(id)) : kNilForm); }
java
int FORM(final List<Integer> forms, int id) { return ((id != -1) ? (forms.get(id)) : kNilForm); }
[ "int", "FORM", "(", "final", "List", "<", "Integer", ">", "forms", ",", "int", "id", ")", "{", "return", "(", "(", "id", "!=", "-", "1", ")", "?", "(", "forms", ".", "get", "(", "id", ")", ")", ":", "kNilForm", ")", ";", "}" ]
获取单词 @param forms 单词列表 @param id 单词下标 @return 单词
[ "获取单词" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/NeuralNetworkParser.java#L628-L631
train
Get the form from a list of forms.
[ 30522, 20014, 2433, 1006, 2345, 2862, 1026, 16109, 1028, 3596, 1010, 20014, 8909, 1007, 1063, 2709, 1006, 1006, 8909, 999, 1027, 1011, 1015, 1007, 1029, 1006, 3596, 1012, 2131, 1006, 8909, 1007, 1007, 1024, 14161, 4014, 14192, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java
Matrix.random
public static Matrix random(int m, int n) { Matrix A = new Matrix(m, n); double[][] X = A.getArray(); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { X[i][j] = Math.random(); } } return A; }
java
public static Matrix random(int m, int n) { Matrix A = new Matrix(m, n); double[][] X = A.getArray(); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { X[i][j] = Math.random(); } } return A; }
[ "public", "static", "Matrix", "random", "(", "int", "m", ",", "int", "n", ")", "{", "Matrix", "A", "=", "new", "Matrix", "(", "m", ",", "n", ")", ";", "double", "[", "]", "[", "]", "X", "=", "A", ".", "getArray", "(", ")", ";", "for", "(", ...
Generate matrix with random elements @param m Number of rows. @param n Number of colums. @return An m-by-n matrix with uniformly distributed random elements.
[ "Generate", "matrix", "with", "random", "elements" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java#L995-L1007
train
Random matrix.
[ 30522, 2270, 10763, 8185, 6721, 1006, 20014, 1049, 1010, 20014, 1050, 1007, 1063, 8185, 1037, 1027, 2047, 8185, 1006, 1049, 1010, 1050, 1007, 1025, 3313, 1031, 1033, 1031, 1033, 1060, 1027, 1037, 1012, 2131, 2906, 9447, 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...
netty/netty
transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java
AbstractBootstrap.option
public <T> B option(ChannelOption<T> option, T value) { if (option == null) { throw new NullPointerException("option"); } if (value == null) { synchronized (options) { options.remove(option); } } else { synchronized (options...
java
public <T> B option(ChannelOption<T> option, T value) { if (option == null) { throw new NullPointerException("option"); } if (value == null) { synchronized (options) { options.remove(option); } } else { synchronized (options...
[ "public", "<", "T", ">", "B", "option", "(", "ChannelOption", "<", "T", ">", "option", ",", "T", "value", ")", "{", "if", "(", "option", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"option\"", ")", ";", "}", "if", "(", "v...
Allow to specify a {@link ChannelOption} which is used for the {@link Channel} instances once they got created. Use a value of {@code null} to remove a previous set {@link ChannelOption}.
[ "Allow", "to", "specify", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java#L170-L184
train
Sets an option on the session.
[ 30522, 2270, 1026, 1056, 1028, 1038, 5724, 1006, 3149, 7361, 3508, 1026, 1056, 1028, 5724, 1010, 1056, 3643, 1007, 1063, 2065, 1006, 5724, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 19701, 8400, 7869, 2595, 24422, 1006, 1000, 5724, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/date/DateUtil.java
DateUtil.offsetSecond
public static DateTime offsetSecond(Date date, int offset) { return offset(date, DateField.SECOND, offset); }
java
public static DateTime offsetSecond(Date date, int offset) { return offset(date, DateField.SECOND, offset); }
[ "public", "static", "DateTime", "offsetSecond", "(", "Date", "date", ",", "int", "offset", ")", "{", "return", "offset", "(", "date", ",", "DateField", ".", "SECOND", ",", "offset", ")", ";", "}" ]
偏移秒数 @param date 日期 @param offset 偏移秒数,正数向未来偏移,负数向历史偏移 @return 偏移后的日期
[ "偏移秒数" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1131-L1133
train
Create an offset of the given date with the second field.
[ 30522, 2270, 10763, 3058, 7292, 16396, 3366, 8663, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.getUlong40
public final long getUlong40() { if (position + 4 >= origin + limit) throw new IllegalArgumentException("limit excceed: " + (position - origin + 4)); byte[] buf = buffer; return ((long) (0xff & buf[position++]))...
java
public final long getUlong40() { if (position + 4 >= origin + limit) throw new IllegalArgumentException("limit excceed: " + (position - origin + 4)); byte[] buf = buffer; return ((long) (0xff & buf[position++]))...
[ "public", "final", "long", "getUlong40", "(", ")", "{", "if", "(", "position", "+", "4", ">=", "origin", "+", "limit", ")", "throw", "new", "IllegalArgumentException", "(", "\"limit excceed: \"", "+", "(", "position", "-", "origin", "+", "4", ")", ")", "...
Return next 40-bit unsigned int from buffer. (little-endian)
[ "Return", "next", "40", "-", "bit", "unsigned", "int", "from", "buffer", ".", "(", "little", "-", "endian", ")" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L602-L610
train
Gets a 40 - bit unsigned long from the buffer.
[ 30522, 2270, 2345, 2146, 2131, 18845, 3070, 12740, 1006, 1007, 1063, 2065, 1006, 2597, 1009, 1018, 1028, 1027, 4761, 1009, 5787, 1007, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1000, 5787, 4654, 9468, 13089, 1024, 1000, 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...
networknt/light-4j
handler/src/main/java/com/networknt/handler/Handler.java
Handler.initHandlers
static void initHandlers() { if (config != null && config.getHandlers() != null) { // initialize handlers for (Object handler : config.getHandlers()) { // If the handler is configured as just a string, it's a fully qualified class // name with a default constructor. if (handler instanceof String) { ...
java
static void initHandlers() { if (config != null && config.getHandlers() != null) { // initialize handlers for (Object handler : config.getHandlers()) { // If the handler is configured as just a string, it's a fully qualified class // name with a default constructor. if (handler instanceof String) { ...
[ "static", "void", "initHandlers", "(", ")", "{", "if", "(", "config", "!=", "null", "&&", "config", ".", "getHandlers", "(", ")", "!=", "null", ")", "{", "// initialize handlers", "for", "(", "Object", "handler", ":", "config", ".", "getHandlers", "(", "...
Construct the named map of handlers. Note: All handlers in use for this microservice should be listed in this handlers list @throws Exception
[ "Construct", "the", "named", "map", "of", "handlers", ".", "Note", ":", "All", "handlers", "in", "use", "for", "this", "microservice", "should", "be", "listed", "in", "this", "handlers", "list" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/handler/src/main/java/com/networknt/handler/Handler.java#L82-L95
train
Initialize the handlers.
[ 30522, 10763, 11675, 1999, 26054, 4859, 12910, 1006, 1007, 1063, 2065, 1006, 9530, 8873, 2290, 999, 1027, 19701, 1004, 1004, 9530, 8873, 2290, 1012, 2131, 11774, 12910, 1006, 1007, 999, 1027, 19701, 1007, 1063, 1013, 1013, 3988, 4697, 28213...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/word/TfIdfCounter.java
TfIdfCounter.add
public int add(String text) { int id = tfMap.size(); add(id, text); return id; }
java
public int add(String text) { int id = tfMap.size(); add(id, text); return id; }
[ "public", "int", "add", "(", "String", "text", ")", "{", "int", "id", "=", "tfMap", ".", "size", "(", ")", ";", "add", "(", "id", ",", "text", ")", ";", "return", "id", ";", "}" ]
添加文档,自动分配id @param text
[ "添加文档,自动分配id" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word/TfIdfCounter.java#L133-L138
train
Add a new record to the record set.
[ 30522, 2270, 20014, 5587, 1006, 5164, 3793, 1007, 1063, 20014, 8909, 1027, 1056, 16715, 9331, 1012, 2946, 1006, 1007, 1025, 5587, 1006, 8909, 1010, 3793, 1007, 1025, 2709, 8909, 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/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/JoinedStreams.java
JoinedStreams.where
public <KEY> Where<KEY> where(KeySelector<T1, KEY> keySelector, TypeInformation<KEY> keyType) { requireNonNull(keySelector); requireNonNull(keyType); return new Where<>(input1.clean(keySelector), keyType); }
java
public <KEY> Where<KEY> where(KeySelector<T1, KEY> keySelector, TypeInformation<KEY> keyType) { requireNonNull(keySelector); requireNonNull(keyType); return new Where<>(input1.clean(keySelector), keyType); }
[ "public", "<", "KEY", ">", "Where", "<", "KEY", ">", "where", "(", "KeySelector", "<", "T1", ",", "KEY", ">", "keySelector", ",", "TypeInformation", "<", "KEY", ">", "keyType", ")", "{", "requireNonNull", "(", "keySelector", ")", ";", "requireNonNull", "...
Specifies a {@link KeySelector} for elements from the first input with explicit type information for the key type. @param keySelector The KeySelector to be used for extracting the first input's key for partitioning. @param keyType The type information describing the key type.
[ "Specifies", "a", "{", "@link", "KeySelector", "}", "for", "elements", "from", "the", "first", "input", "with", "explicit", "type", "information", "for", "the", "key", "type", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/JoinedStreams.java#L99-L103
train
Creates a new Where expression from the input.
[ 30522, 2270, 1026, 3145, 1028, 2073, 1026, 3145, 1028, 2073, 1006, 6309, 12260, 16761, 1026, 1056, 2487, 1010, 3145, 1028, 6309, 12260, 16761, 1010, 2828, 2378, 14192, 3370, 1026, 3145, 1028, 3145, 13874, 1007, 1063, 5478, 8540, 11231, 3363...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-dfa/src/main/java/cn/hutool/dfa/WordTree.java
WordTree.addWords
public void addWords(Collection<String> words){ if(false == (words instanceof Set)){ words = new HashSet<>(words); } for (String word : words) { addWord(word); } }
java
public void addWords(Collection<String> words){ if(false == (words instanceof Set)){ words = new HashSet<>(words); } for (String word : words) { addWord(word); } }
[ "public", "void", "addWords", "(", "Collection", "<", "String", ">", "words", ")", "{", "if", "(", "false", "==", "(", "words", "instanceof", "Set", ")", ")", "{", "words", "=", "new", "HashSet", "<>", "(", "words", ")", ";", "}", "for", "(", "Stri...
增加一组单词 @param words 单词集合
[ "增加一组单词" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-dfa/src/main/java/cn/hutool/dfa/WordTree.java#L49-L56
train
Adds a collection of words to the list of words.
[ 30522, 2270, 11675, 5587, 22104, 1006, 3074, 1026, 5164, 1028, 2616, 1007, 1063, 2065, 1006, 6270, 1027, 1027, 1006, 2616, 6013, 11253, 2275, 1007, 1007, 1063, 2616, 1027, 2047, 23325, 13462, 1026, 1028, 1006, 2616, 1007, 1025, 1065, 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...
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/sax/Excel07SaxReader.java
Excel07SaxReader.startElement
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { // 单元格元素 if (C_ELEMENT.equals(qName)) { // 获取当前列坐标 String tempCurCoordinate = attributes.getValue(R_ATTR); // 前一列为null,则将其设置为"@",A为第一列,ascii码为65,前一列即为@,ascii码64 if (preCo...
java
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { // 单元格元素 if (C_ELEMENT.equals(qName)) { // 获取当前列坐标 String tempCurCoordinate = attributes.getValue(R_ATTR); // 前一列为null,则将其设置为"@",A为第一列,ascii码为65,前一列即为@,ascii码64 if (preCo...
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "attributes", ")", "throws", "SAXException", "{", "// 单元格元素\r", "if", "(", "C_ELEMENT", ".", "equals", "(", "qName",...
读到一个xml开始标签时的回调处理方法
[ "读到一个xml开始标签时的回调处理方法" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/sax/Excel07SaxReader.java#L179-L200
train
Override startElement to add cell type attributes to the element.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2707, 12260, 3672, 1006, 5164, 24471, 2072, 1010, 5164, 2334, 18442, 1010, 5164, 1053, 18442, 1010, 12332, 12332, 1007, 11618, 24937, 2595, 24422, 1063, 1013, 1013, 100, 1769, 100, 1769, 100, 2065, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.newBigInteger
public static BigInteger newBigInteger(String str) { str = StrUtil.trimToNull(str); if (null == str) { return null; } int pos = 0; // 数字字符串位置 int radix = 10; boolean negate = false; // 负数与否 if (str.startsWith("-")) { negate = true; pos = 1; } if (str.startsWith("0x", pos) || str...
java
public static BigInteger newBigInteger(String str) { str = StrUtil.trimToNull(str); if (null == str) { return null; } int pos = 0; // 数字字符串位置 int radix = 10; boolean negate = false; // 负数与否 if (str.startsWith("-")) { negate = true; pos = 1; } if (str.startsWith("0x", pos) || str...
[ "public", "static", "BigInteger", "newBigInteger", "(", "String", "str", ")", "{", "str", "=", "StrUtil", ".", "trimToNull", "(", "str", ")", ";", "if", "(", "null", "==", "str", ")", "{", "return", "null", ";", "}", "int", "pos", "=", "0", ";", "/...
创建{@link BigInteger},支持16进制、10进制和8进制,如果传入空白串返回null<br> from Apache Common Lang @param str 数字字符串 @return {@link BigInteger} @since 3.2.1
[ "创建", "{", "@link", "BigInteger", "}", ",支持16进制、10进制和8进制,如果传入空白串返回null<br", ">", "from", "Apache", "Common", "Lang" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1989-L2021
train
Creates a BigInteger from the specified string.
[ 30522, 2270, 10763, 2502, 18447, 26320, 2047, 5638, 11528, 2618, 4590, 1006, 5164, 2358, 2099, 1007, 1063, 2358, 2099, 1027, 2358, 22134, 4014, 1012, 12241, 2669, 18083, 1006, 2358, 2099, 1007, 1025, 2065, 1006, 19701, 1027, 1027, 2358, 209...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/RdbAdapter.java
RdbAdapter.init
@Override public void init(OuterAdapterConfig configuration, Properties envProperties) { this.envProperties = envProperties; Map<String, MappingConfig> rdbMappingTmp = ConfigLoader.load(envProperties); // 过滤不匹配的key的配置 rdbMappingTmp.forEach((key, mappingConfig) -> { if ((m...
java
@Override public void init(OuterAdapterConfig configuration, Properties envProperties) { this.envProperties = envProperties; Map<String, MappingConfig> rdbMappingTmp = ConfigLoader.load(envProperties); // 过滤不匹配的key的配置 rdbMappingTmp.forEach((key, mappingConfig) -> { if ((m...
[ "@", "Override", "public", "void", "init", "(", "OuterAdapterConfig", "configuration", ",", "Properties", "envProperties", ")", "{", "this", ".", "envProperties", "=", "envProperties", ";", "Map", "<", "String", ",", "MappingConfig", ">", "rdbMappingTmp", "=", "...
初始化方法 @param configuration 外部适配器配置信息
[ "初始化方法" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/RdbAdapter.java#L69-L151
train
Initialize the base class.
[ 30522, 1030, 2058, 15637, 2270, 11675, 1999, 4183, 1006, 6058, 8447, 13876, 2121, 8663, 8873, 2290, 9563, 1010, 5144, 4372, 2615, 21572, 4842, 7368, 1007, 1063, 2023, 1012, 4372, 2615, 21572, 4842, 7368, 1027, 4372, 2615, 21572, 4842, 7368,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ModifierUtil.java
ModifierUtil.hasModifier
public static boolean hasModifier(Field field, ModifierType... modifierTypes) { if (null == field || ArrayUtil.isEmpty(modifierTypes)) { return false; } return 0 != (field.getModifiers() & modifiersToInt(modifierTypes)); }
java
public static boolean hasModifier(Field field, ModifierType... modifierTypes) { if (null == field || ArrayUtil.isEmpty(modifierTypes)) { return false; } return 0 != (field.getModifiers() & modifiersToInt(modifierTypes)); }
[ "public", "static", "boolean", "hasModifier", "(", "Field", "field", ",", "ModifierType", "...", "modifierTypes", ")", "{", "if", "(", "null", "==", "field", "||", "ArrayUtil", ".", "isEmpty", "(", "modifierTypes", ")", ")", "{", "return", "false", ";", "}...
是否同时存在一个或多个修饰符(可能有多个修饰符,如果有指定的修饰符则返回true) @param field 字段 @param modifierTypes 修饰符枚举 @return 是否有指定修饰符,如果有返回true,否则false,如果提供参数为null返回false
[ "是否同时存在一个或多个修饰符(可能有多个修饰符,如果有指定的修饰符则返回true)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ModifierUtil.java#L116-L121
train
Checks if the field has one of the given modifiers.
[ 30522, 2270, 10763, 22017, 20898, 2038, 5302, 4305, 8873, 2121, 1006, 2492, 2492, 1010, 16913, 18095, 13874, 1012, 1012, 1012, 16913, 18095, 13874, 2015, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 2492, 1064, 1064, 9140, 21823, 2140, 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/text/StrBuilder.java
StrBuilder.getChars
public StrBuilder getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) { if (srcBegin < 0) { srcBegin = 0; } if (srcEnd < 0) { srcEnd = 0; } else if (srcEnd > this.position) { srcEnd = this.position; } if (srcBegin > srcEnd) { throw new StringIndexOutOfBoundsException("srcBegin > srcEnd"...
java
public StrBuilder getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) { if (srcBegin < 0) { srcBegin = 0; } if (srcEnd < 0) { srcEnd = 0; } else if (srcEnd > this.position) { srcEnd = this.position; } if (srcBegin > srcEnd) { throw new StringIndexOutOfBoundsException("srcBegin > srcEnd"...
[ "public", "StrBuilder", "getChars", "(", "int", "srcBegin", ",", "int", "srcEnd", ",", "char", "[", "]", "dst", ",", "int", "dstBegin", ")", "{", "if", "(", "srcBegin", "<", "0", ")", "{", "srcBegin", "=", "0", ";", "}", "if", "(", "srcEnd", "<", ...
将指定段的字符列表写出到目标字符数组中 @param srcBegin 起始位置(包括) @param srcEnd 结束位置(不包括) @param dst 目标数组 @param dstBegin 目标起始位置(包括) @return this
[ "将指定段的字符列表写出到目标字符数组中" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java#L301-L315
train
Gets chars from the builder.
[ 30522, 2270, 2358, 15185, 19231, 4063, 2131, 7507, 2869, 1006, 20014, 5034, 27421, 13910, 2378, 1010, 20014, 5034, 23865, 1010, 25869, 1031, 1033, 16233, 2102, 1010, 20014, 16233, 2102, 4783, 11528, 1007, 1063, 2065, 1006, 5034, 27421, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/dictionary/TFDictionary.java
TFDictionary.combine
public static int combine(String... path) { TFDictionary dictionaryMain = new TFDictionary(); dictionaryMain.load(path[0]); int preSize = dictionaryMain.trie.size(); for (int i = 1; i < path.length; ++i) { TFDictionary dictionary = new TFDictionary(); ...
java
public static int combine(String... path) { TFDictionary dictionaryMain = new TFDictionary(); dictionaryMain.load(path[0]); int preSize = dictionaryMain.trie.size(); for (int i = 1; i < path.length; ++i) { TFDictionary dictionary = new TFDictionary(); ...
[ "public", "static", "int", "combine", "(", "String", "...", "path", ")", "{", "TFDictionary", "dictionaryMain", "=", "new", "TFDictionary", "(", ")", ";", "dictionaryMain", ".", "load", "(", "path", "[", "0", "]", ")", ";", "int", "preSize", "=", "dictio...
合并多个词典 @param path 多个词典的路径,第一个是主词典。主词典与其他词典的区别详见com.hankcs.hanlp.corpus.dictionary.TFDictionary#combine(com.hankcs.hanlp.corpus.dictionary.TFDictionary, int, boolean) @return 词条的增量
[ "合并多个词典" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/dictionary/TFDictionary.java#L81-L111
train
Combine the terms of a sequence of words into a single sequence of words.
[ 30522, 2270, 10763, 20014, 11506, 1006, 5164, 1012, 1012, 1012, 4130, 1007, 1063, 1056, 2546, 29201, 3258, 5649, 9206, 24238, 1027, 2047, 1056, 2546, 29201, 3258, 5649, 1006, 1007, 1025, 9206, 24238, 1012, 7170, 1006, 4130, 1031, 1014, 1033...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java
MainClassFinder.doWithMainClasses
static <T> T doWithMainClasses(File rootFolder, MainClassCallback<T> callback) throws IOException { if (!rootFolder.exists()) { return null; // nothing to do } if (!rootFolder.isDirectory()) { throw new IllegalArgumentException( "Invalid root folder '" + rootFolder + "'"); } String prefix = root...
java
static <T> T doWithMainClasses(File rootFolder, MainClassCallback<T> callback) throws IOException { if (!rootFolder.exists()) { return null; // nothing to do } if (!rootFolder.isDirectory()) { throw new IllegalArgumentException( "Invalid root folder '" + rootFolder + "'"); } String prefix = root...
[ "static", "<", "T", ">", "T", "doWithMainClasses", "(", "File", "rootFolder", ",", "MainClassCallback", "<", "T", ">", "callback", ")", "throws", "IOException", "{", "if", "(", "!", "rootFolder", ".", "exists", "(", ")", ")", "{", "return", "null", ";", ...
Perform the given callback operation on all main classes from the given root folder. @param <T> the result type @param rootFolder the root folder @param callback the callback @return the first callback result or {@code null} @throws IOException in case of I/O errors
[ "Perform", "the", "given", "callback", "operation", "on", "all", "main", "classes", "from", "the", "given", "root", "folder", "." ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java#L123-L157
train
Do with main classes in the given folder.
[ 30522, 10763, 1026, 1056, 1028, 1056, 23268, 8939, 24238, 26266, 2229, 1006, 5371, 7117, 10371, 2121, 1010, 2364, 26266, 9289, 20850, 8684, 1026, 1056, 1028, 2655, 5963, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 999, 7117, 10371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ssl/SslUtils.java
SslUtils.shortBE
@SuppressWarnings("deprecation") private static short shortBE(ByteBuf buffer, int offset) { return buffer.order() == ByteOrder.BIG_ENDIAN ? buffer.getShort(offset) : buffer.getShortLE(offset); }
java
@SuppressWarnings("deprecation") private static short shortBE(ByteBuf buffer, int offset) { return buffer.order() == ByteOrder.BIG_ENDIAN ? buffer.getShort(offset) : buffer.getShortLE(offset); }
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "private", "static", "short", "shortBE", "(", "ByteBuf", "buffer", ",", "int", "offset", ")", "{", "return", "buffer", ".", "order", "(", ")", "==", "ByteOrder", ".", "BIG_ENDIAN", "?", "buffer", ".", "...
Reads a big-endian short integer from the buffer
[ "Reads", "a", "big", "-", "endian", "short", "integer", "from", "the", "buffer" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslUtils.java#L246-L250
train
Get a short from the buffer in big - endian order.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 2139, 28139, 10719, 1000, 1007, 2797, 10763, 2460, 2460, 4783, 1006, 24880, 8569, 2546, 17698, 30524, 1035, 2203, 2937, 1029, 17698, 1012, 4152, 27794, 1006, 16396, 1007, 1024, 17698, 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/lang/Validator.java
Validator.validateBirthday
public static <T extends CharSequence> T validateBirthday(T value, String errorMsg) throws ValidateException { if (false == isBirthday(value)) { throw new ValidateException(errorMsg); } return value; }
java
public static <T extends CharSequence> T validateBirthday(T value, String errorMsg) throws ValidateException { if (false == isBirthday(value)) { throw new ValidateException(errorMsg); } return value; }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "validateBirthday", "(", "T", "value", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "false", "==", "isBirthday", "(", "value", ")", ")", "{", "throw", "new...
验证验证是否为生日 @param <T> 字符串类型 @param value 值 @param errorMsg 验证错误的信息 @return 验证后的值 @throws ValidateException 验证异常
[ "验证验证是否为生日" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L783-L788
train
Validate a Birthday value.
[ 30522, 2270, 10763, 1026, 1056, 8908, 25869, 3366, 4226, 5897, 1028, 1056, 9398, 3686, 17706, 2705, 10259, 1006, 1056, 3643, 1010, 5164, 7561, 5244, 2290, 1007, 11618, 9398, 3686, 10288, 24422, 1063, 2065, 1006, 6270, 1027, 1027, 2003, 1770...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
server/src/main/java/com/alibaba/otter/canal/common/MQMessageUtils.java
MQMessageUtils.messageConverter
public static List<FlatMessage> messageConverter(Message message) { try { if (message == null) { return null; } List<FlatMessage> flatMessages = new ArrayList<>(); List<CanalEntry.Entry> entrys = null; if (message.isRaw()) { ...
java
public static List<FlatMessage> messageConverter(Message message) { try { if (message == null) { return null; } List<FlatMessage> flatMessages = new ArrayList<>(); List<CanalEntry.Entry> entrys = null; if (message.isRaw()) { ...
[ "public", "static", "List", "<", "FlatMessage", ">", "messageConverter", "(", "Message", "message", ")", "{", "try", "{", "if", "(", "message", "==", "null", ")", "{", "return", "null", ";", "}", "List", "<", "FlatMessage", ">", "flatMessages", "=", "new...
将Message转换为FlatMessage @param message 原生message @return FlatMessage列表
[ "将Message转换为FlatMessage" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/server/src/main/java/com/alibaba/otter/canal/common/MQMessageUtils.java#L275-L400
train
Convert a message to flat message.
[ 30522, 2270, 10763, 2862, 1026, 4257, 7834, 3736, 3351, 1028, 4471, 8663, 16874, 2121, 1006, 4471, 4471, 1007, 1063, 3046, 1063, 2065, 1006, 4471, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 2862, 1026, 4257, 7834, 3736, 3351, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/runtime/hashtable/BinaryHashPartition.java
BinaryHashPartition.finalizeBuildPhase
int finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator) throws IOException { this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment(); this.partitionBuffers = this.buildSideWriteBuffer.close(); if (!isInMemory()) { // close the channel. this.buildS...
java
int finalizeBuildPhase(IOManager ioAccess, FileIOChannel.Enumerator probeChannelEnumerator) throws IOException { this.finalBufferLimit = this.buildSideWriteBuffer.getCurrentPositionInSegment(); this.partitionBuffers = this.buildSideWriteBuffer.close(); if (!isInMemory()) { // close the channel. this.buildS...
[ "int", "finalizeBuildPhase", "(", "IOManager", "ioAccess", ",", "FileIOChannel", ".", "Enumerator", "probeChannelEnumerator", ")", "throws", "IOException", "{", "this", ".", "finalBufferLimit", "=", "this", ".", "buildSideWriteBuffer", ".", "getCurrentPositionInSegment", ...
After build phase. @return build spill return buffer, if have spilled, it returns the current write buffer, because it was used all the time in build phase, so it can only be returned at this time.
[ "After", "build", "phase", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BinaryHashPartition.java#L332-L351
train
Finalize the build phase.
[ 30522, 20014, 2345, 4697, 8569, 4014, 18927, 14949, 2063, 1006, 22834, 24805, 4590, 22834, 6305, 9623, 2015, 1010, 5371, 3695, 26058, 1012, 4372, 17897, 16259, 15113, 26058, 2368, 17897, 16259, 1007, 11618, 22834, 10288, 24422, 1063, 2023, 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/seg/NShort/Path/NShortPath.java
NShortPath.getBestPath
public Integer[] getBestPath() { assert (vertexCount > 2); Stack<Integer> stack = new Stack<Integer>(); int curNode = vertexCount - 1, curIndex = 0; QueueElement element; element = fromArray[curNode - 1][curIndex].GetFirst(); stack.push(curNode); stack.push...
java
public Integer[] getBestPath() { assert (vertexCount > 2); Stack<Integer> stack = new Stack<Integer>(); int curNode = vertexCount - 1, curIndex = 0; QueueElement element; element = fromArray[curNode - 1][curIndex].GetFirst(); stack.push(curNode); stack.push...
[ "public", "Integer", "[", "]", "getBestPath", "(", ")", "{", "assert", "(", "vertexCount", ">", "2", ")", ";", "Stack", "<", "Integer", ">", "stack", "=", "new", "Stack", "<", "Integer", ">", "(", ")", ";", "int", "curNode", "=", "vertexCount", "-", ...
获取唯一一条最短路径,当然最短路径可能不只一条 @return
[ "获取唯一一条最短路径,当然最短路径可能不只一条" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/NShort/Path/NShortPath.java#L232-L254
train
Gets the best path of the sequence.
[ 30522, 2270, 16109, 1031, 1033, 2131, 12681, 25856, 8988, 1006, 1007, 1063, 20865, 1006, 19449, 3597, 16671, 1028, 1016, 1007, 1025, 9991, 1026, 16109, 1028, 9991, 1027, 2047, 9991, 1026, 16109, 1028, 1006, 1007, 1025, 20014, 30524, 1014, 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...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/sql/Wrapper.java
Wrapper.wrap
public Entity wrap(Entity entity){ if(null == entity) { return null; } final Entity wrapedEntity = new Entity(); //wrap table name wrapedEntity.setTableName(wrap(entity.getTableName())); //wrap fields for (Entry<String, Object> entry : entity.entrySet()) { wrapedEntity.set(wrap(...
java
public Entity wrap(Entity entity){ if(null == entity) { return null; } final Entity wrapedEntity = new Entity(); //wrap table name wrapedEntity.setTableName(wrap(entity.getTableName())); //wrap fields for (Entry<String, Object> entry : entity.entrySet()) { wrapedEntity.set(wrap(...
[ "public", "Entity", "wrap", "(", "Entity", "entity", ")", "{", "if", "(", "null", "==", "entity", ")", "{", "return", "null", ";", "}", "final", "Entity", "wrapedEntity", "=", "new", "Entity", "(", ")", ";", "//wrap table name\r", "wrapedEntity", ".", "s...
包装字段名<br> 有时字段与SQL的某些关键字冲突,导致SQL出错,因此需要将字段名用单引号或者反引号包装起来,避免冲突 @param entity 被包装的实体 @return 包装后的字段名
[ "包装字段名<br", ">", "有时字段与SQL的某些关键字冲突,导致SQL出错,因此需要将字段名用单引号或者反引号包装起来,避免冲突" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/Wrapper.java#L152-L168
train
Wraps the given entity in a new Entity object.
[ 30522, 2270, 9178, 10236, 1006, 9178, 9178, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 9178, 1007, 1063, 2709, 19701, 1025, 1065, 2345, 9178, 10236, 14728, 16778, 3723, 1027, 2047, 9178, 1006, 1007, 1025, 1013, 1013, 10236, 2795, 2171, 1023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/jobmanager/scheduler/Scheduler.java
Scheduler.processNewlyAvailableInstances
private void processNewlyAvailableInstances() { synchronized (globalLock) { Instance instance; while ((instance = newlyAvailableInstances.poll()) != null) { if (instance.hasResourcesAvailable()) { instancesWithAvailableResources.put(instance.getTaskManagerID(), instance); } } } }
java
private void processNewlyAvailableInstances() { synchronized (globalLock) { Instance instance; while ((instance = newlyAvailableInstances.poll()) != null) { if (instance.hasResourcesAvailable()) { instancesWithAvailableResources.put(instance.getTaskManagerID(), instance); } } } }
[ "private", "void", "processNewlyAvailableInstances", "(", ")", "{", "synchronized", "(", "globalLock", ")", "{", "Instance", "instance", ";", "while", "(", "(", "instance", "=", "newlyAvailableInstances", ".", "poll", "(", ")", ")", "!=", "null", ")", "{", "...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java#L811-L821
train
Process newly available instances.
[ 30522, 2797, 11675, 2832, 2638, 13668, 3148, 3567, 11733, 3468, 7076, 26897, 2015, 1006, 1007, 1063, 25549, 1006, 3795, 7878, 1007, 1063, 6013, 6013, 1025, 2096, 1006, 1006, 6013, 1027, 4397, 12462, 11733, 3468, 7076, 26897, 2015, 1012, 855...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java
ConnectTableDescriptor.withFormat
@Override public D withFormat(FormatDescriptor format) { formatDescriptor = Optional.of(Preconditions.checkNotNull(format)); return (D) this; }
java
@Override public D withFormat(FormatDescriptor format) { formatDescriptor = Optional.of(Preconditions.checkNotNull(format)); return (D) this; }
[ "@", "Override", "public", "D", "withFormat", "(", "FormatDescriptor", "format", ")", "{", "formatDescriptor", "=", "Optional", ".", "of", "(", "Preconditions", ".", "checkNotNull", "(", "format", ")", ")", ";", "return", "(", "D", ")", "this", ";", "}" ]
Specifies the format that defines how to read data from a connector.
[ "Specifies", "the", "format", "that", "defines", "how", "to", "read", "data", "from", "a", "connector", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/descriptors/ConnectTableDescriptor.java#L92-L96
train
Sets the format descriptor for the XML document.
[ 30522, 1030, 2058, 15637, 2270, 1040, 2007, 14192, 4017, 1006, 4289, 6155, 23235, 2953, 4289, 1007, 1063, 4289, 6155, 23235, 2953, 1027, 11887, 1012, 1997, 1006, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 4289, 1007, 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...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/Setting.java
Setting.getProperties
public Properties getProperties(String group) { final Properties properties = new Properties(); properties.putAll(getMap(group)); return properties; }
java
public Properties getProperties(String group) { final Properties properties = new Properties(); properties.putAll(getMap(group)); return properties; }
[ "public", "Properties", "getProperties", "(", "String", "group", ")", "{", "final", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "properties", ".", "putAll", "(", "getMap", "(", "group", ")", ")", ";", "return", "properties", ";", "...
获取group分组下所有配置键值对,组成新的{@link Properties} @param group 分组 @return Properties对象
[ "获取group分组下所有配置键值对,组成新的", "{", "@link", "Properties", "}" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L287-L291
train
Gets the properties for the specified group.
[ 30522, 2270, 5144, 2131, 21572, 4842, 7368, 1006, 5164, 2177, 1007, 1063, 2345, 5144, 5144, 1027, 2047, 5144, 1006, 1007, 1025, 5144, 1012, 2404, 8095, 1006, 2131, 2863, 2361, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/runtime/operators/windowing/TimestampedValue.java
TimestampedValue.getStreamRecord
public StreamRecord<T> getStreamRecord() { StreamRecord<T> streamRecord = new StreamRecord<>(value); if (hasTimestamp) { streamRecord.setTimestamp(timestamp); } return streamRecord; }
java
public StreamRecord<T> getStreamRecord() { StreamRecord<T> streamRecord = new StreamRecord<>(value); if (hasTimestamp) { streamRecord.setTimestamp(timestamp); } return streamRecord; }
[ "public", "StreamRecord", "<", "T", ">", "getStreamRecord", "(", ")", "{", "StreamRecord", "<", "T", ">", "streamRecord", "=", "new", "StreamRecord", "<>", "(", "value", ")", ";", "if", "(", "hasTimestamp", ")", "{", "streamRecord", ".", "setTimestamp", "(...
Creates a {@link StreamRecord} from this TimestampedValue.
[ "Creates", "a", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/TimestampedValue.java#L93-L99
train
Gets the stream record.
[ 30522, 2270, 5460, 2890, 27108, 2094, 1026, 1056, 1028, 4152, 25379, 2890, 27108, 2094, 1006, 1007, 1063, 5460, 2890, 27108, 2094, 1026, 1056, 1028, 5460, 2890, 27108, 2094, 1027, 2047, 5460, 2890, 27108, 2094, 1026, 1028, 1006, 3643, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/annotation/AnnotationUtil.java
AnnotationUtil.getAnnotation
public static <A extends Annotation> A getAnnotation(AnnotatedElement annotationEle, Class<A> annotationType) { return (null == annotationEle) ? null : toCombination(annotationEle).getAnnotation(annotationType); }
java
public static <A extends Annotation> A getAnnotation(AnnotatedElement annotationEle, Class<A> annotationType) { return (null == annotationEle) ? null : toCombination(annotationEle).getAnnotation(annotationType); }
[ "public", "static", "<", "A", "extends", "Annotation", ">", "A", "getAnnotation", "(", "AnnotatedElement", "annotationEle", ",", "Class", "<", "A", ">", "annotationType", ")", "{", "return", "(", "null", "==", "annotationEle", ")", "?", "null", ":", "toCombi...
获取指定注解 @param <A> 注解类型 @param annotationEle {@link AnnotatedElement},可以是Class、Method、Field、Constructor、ReflectPermission @param annotationType 注解类型 @return 注解对象
[ "获取指定注解" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/annotation/AnnotationUtil.java#L61-L63
train
Gets the annotation of the given type from the given annotated element.
[ 30522, 2270, 10763, 1026, 1037, 8908, 5754, 17287, 3508, 1028, 1037, 2131, 11639, 17287, 3508, 1006, 5754, 17287, 3064, 12260, 3672, 5754, 17287, 3508, 12260, 1010, 2465, 1026, 1037, 1028, 5754, 17287, 3508, 13874, 1007, 1063, 2709, 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...
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableWriter.java
S3RecoverableWriter.writer
public static S3RecoverableWriter writer( final FileSystem fs, final FunctionWithException<File, RefCountedFile, IOException> tempFileCreator, final S3AccessHelper s3AccessHelper, final Executor uploadThreadPool, final long userDefinedMinPartSize, final int maxConcurrentUploadsPerStream) { checkArg...
java
public static S3RecoverableWriter writer( final FileSystem fs, final FunctionWithException<File, RefCountedFile, IOException> tempFileCreator, final S3AccessHelper s3AccessHelper, final Executor uploadThreadPool, final long userDefinedMinPartSize, final int maxConcurrentUploadsPerStream) { checkArg...
[ "public", "static", "S3RecoverableWriter", "writer", "(", "final", "FileSystem", "fs", ",", "final", "FunctionWithException", "<", "File", ",", "RefCountedFile", ",", "IOException", ">", "tempFileCreator", ",", "final", "S3AccessHelper", "s3AccessHelper", ",", "final"...
--------------------------- Static Constructor ---------------------------
[ "---------------------------", "Static", "Constructor", "---------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableWriter.java#L145-L164
train
Create a new S3RecoverableWriter.
[ 30522, 2270, 10763, 1055, 2509, 2890, 3597, 26061, 3468, 15994, 3213, 1006, 2345, 6764, 27268, 6633, 1042, 2015, 1010, 2345, 3853, 24415, 10288, 24422, 1026, 5371, 1010, 25416, 3597, 16671, 2098, 8873, 2571, 1010, 22834, 10288, 24422, 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...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Binder.java
Binder.get
public static Binder get(Environment environment) { return new Binder(ConfigurationPropertySources.get(environment), new PropertySourcesPlaceholdersResolver(environment)); }
java
public static Binder get(Environment environment) { return new Binder(ConfigurationPropertySources.get(environment), new PropertySourcesPlaceholdersResolver(environment)); }
[ "public", "static", "Binder", "get", "(", "Environment", "environment", ")", "{", "return", "new", "Binder", "(", "ConfigurationPropertySources", ".", "get", "(", "environment", ")", ",", "new", "PropertySourcesPlaceholdersResolver", "(", "environment", ")", ")", ...
Create a new {@link Binder} instance from the specified environment. @param environment the environment source (must have attached {@link ConfigurationPropertySources}) @return a {@link Binder} instance
[ "Create", "a", "new", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Binder.java#L381-L384
train
Returns a new instance of the binder configured with the given environment.
[ 30522, 2270, 10763, 14187, 2121, 2131, 1006, 4044, 4044, 1007, 1063, 2709, 2047, 14187, 2121, 1006, 9563, 21572, 4842, 3723, 6499, 3126, 9623, 1012, 2131, 1006, 4044, 1007, 1010, 2047, 3200, 6499, 3126, 9623, 24759, 10732, 17794, 6072, 4747...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/thread/ThreadUtil.java
ThreadUtil.safeSleep
public static boolean safeSleep(Number millis) { long millisLong = millis.longValue(); long done = 0; while (done < millisLong) { long before = System.currentTimeMillis(); if (false == sleep(millisLong - done)) { return false; } long after = System.currentTimeMillis(); done += (after -...
java
public static boolean safeSleep(Number millis) { long millisLong = millis.longValue(); long done = 0; while (done < millisLong) { long before = System.currentTimeMillis(); if (false == sleep(millisLong - done)) { return false; } long after = System.currentTimeMillis(); done += (after -...
[ "public", "static", "boolean", "safeSleep", "(", "Number", "millis", ")", "{", "long", "millisLong", "=", "millis", ".", "longValue", "(", ")", ";", "long", "done", "=", "0", ";", "while", "(", "done", "<", "millisLong", ")", "{", "long", "before", "="...
考虑{@link Thread#sleep(long)}方法有可能时间不足给定毫秒数,此方法保证sleep时间不小于给定的毫秒数 @see ThreadUtil#sleep(Number) @param millis 给定的sleep时间 @return 被中断返回false,否则true
[ "考虑", "{", "@link", "Thread#sleep", "(", "long", ")", "}", "方法有可能时间不足给定毫秒数,此方法保证sleep时间不小于给定的毫秒数" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L244-L256
train
Synchronized sleep method.
[ 30522, 2270, 10763, 22017, 20898, 3647, 25016, 13699, 1006, 2193, 4971, 2483, 1007, 1063, 2146, 4971, 2483, 10052, 1027, 4971, 2483, 1012, 2146, 10175, 5657, 1006, 1007, 1025, 2146, 2589, 1027, 1014, 1025, 2096, 1006, 2589, 1026, 4971, 2483...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/CommonsLogger.java
CommonsLogger.debug
@Override public void debug(String format, Object arg) { if (logger.isDebugEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.debug(ft.getMessage(), ft.getThrowable()); } }
java
@Override public void debug(String format, Object arg) { if (logger.isDebugEnabled()) { FormattingTuple ft = MessageFormatter.format(format, arg); logger.debug(ft.getMessage(), ft.getThrowable()); } }
[ "@", "Override", "public", "void", "debug", "(", "String", "format", ",", "Object", "arg", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "FormattingTuple", "ft", "=", "MessageFormatter", ".", "format", "(", "format", ",", "arg...
Delegates to the {@link Log#debug(Object)} method of the underlying {@link Log} instance. <p> However, this form avoids superfluous object creation when the logger is disabled for level DEBUG. </p> @param format the format string @param arg the argument
[ "Delegates", "to", "the", "{", "@link", "Log#debug", "(", "Object", ")", "}", "method", "of", "the", "underlying", "{", "@link", "Log", "}", "instance", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/logging/CommonsLogger.java#L202-L208
train
Debug method.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2139, 8569, 2290, 1006, 5164, 4289, 1010, 4874, 12098, 2290, 1007, 1063, 2065, 1006, 8833, 4590, 1012, 2003, 3207, 8569, 6914, 3085, 2094, 1006, 1007, 1007, 1063, 4289, 3436, 8525, 10814, 3027, 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/seg/common/WordNet.java
WordNet.mergeContinuousNsIntoOne
public void mergeContinuousNsIntoOne() { for (int row = 0; row < vertexes.length - 1; ++row) { List<Vertex> vertexListFrom = vertexes[row]; ListIterator<Vertex> listIteratorFrom = vertexListFrom.listIterator(); while (listIteratorFrom.hasNext()) { ...
java
public void mergeContinuousNsIntoOne() { for (int row = 0; row < vertexes.length - 1; ++row) { List<Vertex> vertexListFrom = vertexes[row]; ListIterator<Vertex> listIteratorFrom = vertexListFrom.listIterator(); while (listIteratorFrom.hasNext()) { ...
[ "public", "void", "mergeContinuousNsIntoOne", "(", ")", "{", "for", "(", "int", "row", "=", "0", ";", "row", "<", "vertexes", ".", "length", "-", "1", ";", "++", "row", ")", "{", "List", "<", "Vertex", ">", "vertexListFrom", "=", "vertexes", "[", "ro...
将连续的ns节点合并为一个
[ "将连续的ns节点合并为一个" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/WordNet.java#L360-L389
train
Merge continuous NNs into one.
[ 30522, 2270, 11675, 13590, 8663, 7629, 8918, 3619, 18447, 7828, 2063, 1006, 1007, 1063, 2005, 1006, 20014, 5216, 1027, 1014, 1025, 5216, 1026, 19449, 2229, 1012, 3091, 1011, 1015, 1025, 1009, 1009, 5216, 1007, 1063, 2862, 1026, 19449, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java
MetricRegistryImpl.shutdown
public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (metricQueryServiceRpcSe...
java
public CompletableFuture<Void> shutdown() { synchronized (lock) { if (isShutdown) { return terminationFuture; } else { isShutdown = true; final Collection<CompletableFuture<Void>> terminationFutures = new ArrayList<>(3); final Time gracePeriod = Time.seconds(1L); if (metricQueryServiceRpcSe...
[ "public", "CompletableFuture", "<", "Void", ">", "shutdown", "(", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "isShutdown", ")", "{", "return", "terminationFuture", ";", "}", "else", "{", "isShutdown", "=", "true", ";", "final", "Collection...
Shuts down this registry and the associated {@link MetricReporter}. <p>NOTE: This operation is asynchronous and returns a future which is completed once the shutdown operation has been completed. @return Future which is completed once the {@link MetricRegistryImpl} is shut down.
[ "Shuts", "down", "this", "registry", "and", "the", "associated", "{", "@link", "MetricReporter", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java#L264-L315
train
Shutdown the metric reporters.
[ 30522, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 11675, 1028, 3844, 7698, 1006, 1007, 1063, 25549, 1006, 5843, 1007, 1063, 2065, 1006, 26354, 6979, 2102, 7698, 1007, 1063, 2709, 18287, 11263, 11244, 1025, 1065, 2842, 1063, 26354, 6979, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/LinkedOptionalMap.java
LinkedOptionalMap.optionalMapOf
public static <K, V> LinkedOptionalMap<K, V> optionalMapOf(Map<K, V> sourceMap, Function<K, String> keyNameGetter) { LinkedHashMap<String, KeyValue<K, V>> underlyingMap = new LinkedHashMap<>(sourceMap.size()); sourceMap.forEach((k, v) -> { String keyName = keyNameGetter.apply(k); underlyingMap.put(keyName, ...
java
public static <K, V> LinkedOptionalMap<K, V> optionalMapOf(Map<K, V> sourceMap, Function<K, String> keyNameGetter) { LinkedHashMap<String, KeyValue<K, V>> underlyingMap = new LinkedHashMap<>(sourceMap.size()); sourceMap.forEach((k, v) -> { String keyName = keyNameGetter.apply(k); underlyingMap.put(keyName, ...
[ "public", "static", "<", "K", ",", "V", ">", "LinkedOptionalMap", "<", "K", ",", "V", ">", "optionalMapOf", "(", "Map", "<", "K", ",", "V", ">", "sourceMap", ",", "Function", "<", "K", ",", "String", ">", "keyNameGetter", ")", "{", "LinkedHashMap", "...
Creates an {@code LinkedOptionalMap} from the provided map. <p>This method is the equivalent of {@link Optional#of(Object)} but for maps. To support more than one {@code NULL} key, an optional map requires a unique string name to be associated with each key (provided by keyNameGetter) @param sourceMap a source ma...
[ "Creates", "an", "{", "@code", "LinkedOptionalMap", "}", "from", "the", "provided", "map", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/LinkedOptionalMap.java#L62-L72
train
Creates an optional map from a map.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 5799, 7361, 3508, 2389, 2863, 2361, 1026, 1047, 1010, 1058, 1028, 11887, 2863, 6873, 2546, 1006, 4949, 1026, 1047, 1010, 1058, 1028, 3120, 2863, 2361, 1010, 3853, 1026, 1047, 1010, 5164, 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...
alibaba/canal
client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java
KafkaCanalConnector.disconnect
@Override public void disconnect() { if (kafkaConsumer != null) { kafkaConsumer.close(); kafkaConsumer = null; } if (kafkaConsumer2 != null) { kafkaConsumer2.close(); kafkaConsumer2 = null; } connected = false; }
java
@Override public void disconnect() { if (kafkaConsumer != null) { kafkaConsumer.close(); kafkaConsumer = null; } if (kafkaConsumer2 != null) { kafkaConsumer2.close(); kafkaConsumer2 = null; } connected = false; }
[ "@", "Override", "public", "void", "disconnect", "(", ")", "{", "if", "(", "kafkaConsumer", "!=", "null", ")", "{", "kafkaConsumer", ".", "close", "(", ")", ";", "kafkaConsumer", "=", "null", ";", "}", "if", "(", "kafkaConsumer2", "!=", "null", ")", "{...
关闭链接
[ "关闭链接" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaCanalConnector.java#L94-L106
train
Disconnect from the Kafka consumer and consumer2.
[ 30522, 1030, 2058, 15637, 2270, 11675, 12532, 10087, 6593, 1006, 1007, 1063, 2065, 1006, 10556, 24316, 22684, 3619, 17897, 2099, 999, 1027, 19701, 1007, 1063, 10556, 24316, 22684, 3619, 17897, 2099, 1012, 2485, 1006, 1007, 1025, 10556, 24316,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/EnvironmentInformation.java
EnvironmentInformation.getHadoopUser
public static String getHadoopUser() { try { Class<?> ugiClass = Class.forName( "org.apache.hadoop.security.UserGroupInformation", false, EnvironmentInformation.class.getClassLoader()); Method currentUserMethod = ugiClass.getMethod("getCurrentUser"); Method shortUserNameMethod = ugiClass.getMeth...
java
public static String getHadoopUser() { try { Class<?> ugiClass = Class.forName( "org.apache.hadoop.security.UserGroupInformation", false, EnvironmentInformation.class.getClassLoader()); Method currentUserMethod = ugiClass.getMethod("getCurrentUser"); Method shortUserNameMethod = ugiClass.getMeth...
[ "public", "static", "String", "getHadoopUser", "(", ")", "{", "try", "{", "Class", "<", "?", ">", "ugiClass", "=", "Class", ".", "forName", "(", "\"org.apache.hadoop.security.UserGroupInformation\"", ",", "false", ",", "EnvironmentInformation", ".", "class", ".", ...
Gets the name of the user that is running the JVM. @return The name of the user that is running the JVM.
[ "Gets", "the", "name", "of", "the", "user", "that", "is", "running", "the", "JVM", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java#L87-L113
train
Returns the user name of the current user.
[ 30522, 2270, 10763, 5164, 2131, 16102, 18589, 20330, 1006, 1007, 1063, 3046, 1063, 2465, 1026, 1029, 1028, 1057, 12863, 27102, 1027, 2465, 1012, 2005, 18442, 1006, 1000, 8917, 1012, 15895, 1012, 2018, 18589, 1012, 3036, 1012, 5310, 17058, 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...