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
apache/flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/Schema.java
Schema.proctime
public Schema proctime() { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).put(SCHEMA_PROCTIME, "true"); lastField = null; return this; }
java
public Schema proctime() { if (lastField == null) { throw new ValidationException("No field defined previously. Use field() before."); } tableSchema.get(lastField).put(SCHEMA_PROCTIME, "true"); lastField = null; return this; }
[ "public", "Schema", "proctime", "(", ")", "{", "if", "(", "lastField", "==", "null", ")", "{", "throw", "new", "ValidationException", "(", "\"No field defined previously. Use field() before.\"", ")", ";", "}", "tableSchema", ".", "get", "(", "lastField", ")", "....
Specifies the previously defined field as a processing-time attribute. <p>E.g. field("proctime", Types.SQL_TIMESTAMP).proctime()
[ "Specifies", "the", "previously", "defined", "field", "as", "a", "processing", "-", "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#L125-L132
train
Sets the schema to be proctime.
[ 30522, 2270, 8040, 28433, 4013, 6593, 14428, 1006, 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, 1012, 1000, 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-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/utils/DataOutputEncoder.java
DataOutputEncoder.writeString
@Override public void writeString(String str) throws IOException { byte[] bytes = Utf8.getBytesFor(str); writeBytes(bytes, 0, bytes.length); }
java
@Override public void writeString(String str) throws IOException { byte[] bytes = Utf8.getBytesFor(str); writeBytes(bytes, 0, bytes.length); }
[ "@", "Override", "public", "void", "writeString", "(", "String", "str", ")", "throws", "IOException", "{", "byte", "[", "]", "bytes", "=", "Utf8", ".", "getBytesFor", "(", "str", ")", ";", "writeBytes", "(", "bytes", ",", "0", ",", "bytes", ".", "lengt...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/utils/DataOutputEncoder.java#L110-L114
train
Write a string to the output stream.
[ 30522, 1030, 2058, 15637, 2270, 11675, 7009, 18886, 3070, 1006, 5164, 2358, 2099, 1007, 11618, 22834, 10288, 24422, 1063, 24880, 1031, 1033, 27507, 1027, 21183, 2546, 2620, 1012, 2131, 3762, 4570, 29278, 1006, 2358, 2099, 1007, 1025, 4339, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.put
public String put(String group, String key, String value) { return this.groupedMap.put(group, key, value); }
java
public String put(String group, String key, String value) { return this.groupedMap.put(group, key, value); }
[ "public", "String", "put", "(", "String", "group", ",", "String", "key", ",", "String", "value", ")", "{", "return", "this", ".", "groupedMap", ".", "put", "(", "group", ",", "key", ",", "value", ")", ";", "}" ]
将键值对加入到对应分组中 @param group 分组 @param key 键 @param value 值 @return 此key之前存在的值,如果没有返回null
[ "将键值对加入到对应分组中" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L421-L423
train
Put a value into the group.
[ 30522, 2270, 5164, 2404, 1006, 5164, 2177, 1010, 5164, 3145, 1010, 5164, 3643, 1007, 1063, 2709, 2023, 1012, 15131, 2863, 2361, 1012, 2404, 1006, 2177, 1010, 3145, 1010, 3643, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.disjunction
public static <T> Collection<T> disjunction(Collection<T> coll1, Collection<T> coll2) { if (isEmpty(coll1)) { return coll2; } if (isEmpty(coll2)) { return coll1; } final ArrayList<T> result = new ArrayList<>(); final Map<T, Integer> map1 = countMap(coll1); final Map<T, Integer> map2 = cou...
java
public static <T> Collection<T> disjunction(Collection<T> coll1, Collection<T> coll2) { if (isEmpty(coll1)) { return coll2; } if (isEmpty(coll2)) { return coll1; } final ArrayList<T> result = new ArrayList<>(); final Map<T, Integer> map1 = countMap(coll1); final Map<T, Integer> map2 = cou...
[ "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "disjunction", "(", "Collection", "<", "T", ">", "coll1", ",", "Collection", "<", "T", ">", "coll2", ")", "{", "if", "(", "isEmpty", "(", "coll1", ")", ")", "{", "return", "coll2", ";"...
两个集合的差集<br> 针对一个集合中存在多个相同元素的情况,计算两个集合中此元素的个数,保留两个集合中此元素个数差的个数<br> 例如:集合1:[a, b, c, c, c],集合2:[a, b, c, c]<br> 结果:[c],此结果中只保留了一个<br> 任意一个集合为空,返回另一个集合<br> 两个集合无交集则返回两个集合的组合 @param <T> 集合元素类型 @param coll1 集合1 @param coll2 集合2 @return 差集的集合,返回 {@link ArrayList}
[ "两个集合的差集<br", ">", "针对一个集合中存在多个相同元素的情况,计算两个集合中此元素的个数,保留两个集合中此元素个数差的个数<br", ">", "例如:集合1:", "[", "a", "b", "c", "c", "c", "]", ",集合2:", "[", "a", "b", "c", "c", "]", "<br", ">", "结果:", "[", "c", "]", ",此结果中只保留了一个<br", ">", "任意一个集合为空,返回另一个集合<br", ">", "两个集合无交集...
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L185-L206
train
Returns the disjunction of two collections.
[ 30522, 2270, 10763, 1026, 1056, 1028, 3074, 1026, 1056, 1028, 4487, 2015, 19792, 7542, 1006, 3074, 1026, 1056, 1028, 8902, 2140, 2487, 1010, 3074, 1026, 1056, 1028, 8902, 2140, 2475, 1007, 1063, 2065, 1006, 2003, 6633, 13876, 2100, 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...
redisson/redisson
redisson/src/main/java/org/redisson/RedissonPriorityQueue.java
RedissonPriorityQueue.calcClassSign
private static String calcClassSign(String name) { try { Class<?> clazz = Class.forName(name); ByteArrayOutputStream result = new ByteArrayOutputStream(); ObjectOutputStream outputStream = new ObjectOutputStream(result); outputStream.writeObject(clazz); ...
java
private static String calcClassSign(String name) { try { Class<?> clazz = Class.forName(name); ByteArrayOutputStream result = new ByteArrayOutputStream(); ObjectOutputStream outputStream = new ObjectOutputStream(result); outputStream.writeObject(clazz); ...
[ "private", "static", "String", "calcClassSign", "(", "String", "name", ")", "{", "try", "{", "Class", "<", "?", ">", "clazz", "=", "Class", ".", "forName", "(", "name", ")", ";", "ByteArrayOutputStream", "result", "=", "new", "ByteArrayOutputStream", "(", ...
TODO cache result
[ "TODO", "cache", "result" ]
d3acc0249b2d5d658d36d99e2c808ce49332ea44
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/RedissonPriorityQueue.java#L142-L159
train
Calculate the sign of a class.
[ 30522, 2797, 10763, 5164, 10250, 9468, 27102, 5332, 16206, 1006, 5164, 2171, 1007, 1063, 3046, 1063, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1027, 2465, 1012, 2005, 18442, 1006, 2171, 1007, 1025, 24880, 2906, 9447, 5833, 18780, 21422, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java
NetworkEnvironmentConfiguration.createNettyConfig
@Nullable private static NettyConfig createNettyConfig( Configuration configuration, boolean localTaskManagerCommunication, InetAddress taskManagerAddress, int dataport) { final NettyConfig nettyConfig; if (!localTaskManagerCommunication) { final InetSocketAddress taskManagerInetSocketAddress = new Ine...
java
@Nullable private static NettyConfig createNettyConfig( Configuration configuration, boolean localTaskManagerCommunication, InetAddress taskManagerAddress, int dataport) { final NettyConfig nettyConfig; if (!localTaskManagerCommunication) { final InetSocketAddress taskManagerInetSocketAddress = new Ine...
[ "@", "Nullable", "private", "static", "NettyConfig", "createNettyConfig", "(", "Configuration", "configuration", ",", "boolean", "localTaskManagerCommunication", ",", "InetAddress", "taskManagerAddress", ",", "int", "dataport", ")", "{", "final", "NettyConfig", "nettyConf...
Generates {@link NettyConfig} from Flink {@link Configuration}. @param configuration configuration object @param localTaskManagerCommunication true, to skip initializing the network stack @param taskManagerAddress identifying the IP address under which the TaskManager will be accessible @param dataport data port for c...
[ "Generates", "{", "@link", "NettyConfig", "}", "from", "Flink", "{", "@link", "Configuration", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java#L424-L442
train
Create a NettyConfig object.
[ 30522, 1030, 19701, 3085, 2797, 10763, 5658, 3723, 8663, 8873, 2290, 3443, 15361, 2100, 8663, 8873, 2290, 1006, 9563, 9563, 1010, 22017, 20898, 2334, 10230, 22287, 5162, 4590, 9006, 23041, 21261, 1010, 1999, 12928, 14141, 8303, 4708, 24805, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/py/String2PinyinConverter.java
String2PinyinConverter.convert
public static List<Pinyin> convert(String complexText, boolean removeTone) { List<Pinyin> pinyinList = convert(complexText); if (removeTone) { makeToneToTheSame(pinyinList); } return pinyinList; }
java
public static List<Pinyin> convert(String complexText, boolean removeTone) { List<Pinyin> pinyinList = convert(complexText); if (removeTone) { makeToneToTheSame(pinyinList); } return pinyinList; }
[ "public", "static", "List", "<", "Pinyin", ">", "convert", "(", "String", "complexText", ",", "boolean", "removeTone", ")", "{", "List", "<", "Pinyin", ">", "pinyinList", "=", "convert", "(", "complexText", ")", ";", "if", "(", "removeTone", ")", "{", "m...
文本转拼音 @param complexText 文本 @param removeTone 是否将所有的音调都同一化 @return
[ "文本转拼音" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/py/String2PinyinConverter.java#L97-L105
train
Convert a complex text to a list of Pinyin objects.
[ 30522, 2270, 10763, 2862, 1026, 9973, 1028, 10463, 1006, 5164, 3375, 18209, 1010, 22017, 20898, 6366, 5524, 1007, 1063, 2862, 1026, 9973, 1028, 9973, 9863, 1027, 10463, 1006, 3375, 18209, 1007, 1025, 2065, 1006, 6366, 5524, 1007, 1063, 2191...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.isLess
public static boolean isLess(BigDecimal bigNum1, BigDecimal bigNum2) { Assert.notNull(bigNum1); Assert.notNull(bigNum2); return bigNum1.compareTo(bigNum2) < 0; }
java
public static boolean isLess(BigDecimal bigNum1, BigDecimal bigNum2) { Assert.notNull(bigNum1); Assert.notNull(bigNum2); return bigNum1.compareTo(bigNum2) < 0; }
[ "public", "static", "boolean", "isLess", "(", "BigDecimal", "bigNum1", ",", "BigDecimal", "bigNum2", ")", "{", "Assert", ".", "notNull", "(", "bigNum1", ")", ";", "Assert", ".", "notNull", "(", "bigNum2", ")", ";", "return", "bigNum1", ".", "compareTo", "(...
比较大小,参数1 &lt; 参数2 返回true @param bigNum1 数字1 @param bigNum2 数字2 @return 是否小于 @since 3,0.9
[ "比较大小,参数1", "&lt", ";", "参数2", "返回true" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L1650-L1654
train
Checks if the first argument is less than the second argument.
[ 30522, 2270, 10763, 22017, 20898, 14195, 2015, 1006, 2502, 3207, 6895, 9067, 2502, 19172, 2487, 1010, 2502, 3207, 6895, 9067, 2502, 19172, 2475, 1007, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 2502, 19172, 2487, 1007, 1025, 20865, 1012, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.deduceModality
private SqlModality deduceModality(SqlNode query) { if (query instanceof SqlSelect) { SqlSelect select = (SqlSelect) query; return select.getModifierNode(SqlSelectKeyword.STREAM) != null ? SqlModality.STREAM : SqlModality.RELATION; } else if (query.getKind() == SqlKind.VALUES) { return SqlModality....
java
private SqlModality deduceModality(SqlNode query) { if (query instanceof SqlSelect) { SqlSelect select = (SqlSelect) query; return select.getModifierNode(SqlSelectKeyword.STREAM) != null ? SqlModality.STREAM : SqlModality.RELATION; } else if (query.getKind() == SqlKind.VALUES) { return SqlModality....
[ "private", "SqlModality", "deduceModality", "(", "SqlNode", "query", ")", "{", "if", "(", "query", "instanceof", "SqlSelect", ")", "{", "SqlSelect", "select", "=", "(", "SqlSelect", ")", "query", ";", "return", "select", ".", "getModifierNode", "(", "SqlSelect...
Return the intended modality of a SELECT or set-op.
[ "Return", "the", "intended", "modality", "of", "a", "SELECT", "or", "set", "-", "op", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3574-L3587
train
deduce modality from a query
[ 30522, 2797, 29296, 5302, 9305, 3012, 2139, 8566, 3401, 5302, 9305, 3012, 1006, 29296, 3630, 3207, 23032, 1007, 1063, 2065, 1006, 23032, 6013, 11253, 29296, 11246, 22471, 1007, 1063, 29296, 11246, 22471, 7276, 1027, 1006, 29296, 11246, 22471,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/concurrent/SingleThreadEventExecutor.java
SingleThreadEventExecutor.addShutdownHook
public void addShutdownHook(final Runnable task) { if (inEventLoop()) { shutdownHooks.add(task); } else { execute(new Runnable() { @Override public void run() { shutdownHooks.add(task); } }); ...
java
public void addShutdownHook(final Runnable task) { if (inEventLoop()) { shutdownHooks.add(task); } else { execute(new Runnable() { @Override public void run() { shutdownHooks.add(task); } }); ...
[ "public", "void", "addShutdownHook", "(", "final", "Runnable", "task", ")", "{", "if", "(", "inEventLoop", "(", ")", ")", "{", "shutdownHooks", ".", "add", "(", "task", ")", ";", "}", "else", "{", "execute", "(", "new", "Runnable", "(", ")", "{", "@"...
Add a {@link Runnable} which will be executed on shutdown of this instance
[ "Add", "a", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java#L499-L510
train
Add a shutdown hook to the Runnable.
[ 30522, 2270, 11675, 9909, 6979, 2102, 7698, 6806, 6559, 1006, 2345, 2448, 22966, 4708, 1007, 1063, 2065, 1006, 1999, 18697, 3372, 4135, 7361, 1006, 1007, 1007, 1063, 3844, 7698, 6806, 6559, 2015, 1012, 5587, 1006, 4708, 1007, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/ExecutionGraphCache.java
ExecutionGraphCache.getExecutionGraph
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { return getExecutionGraphInternal(jobId, restfulGateway).thenApply(Function.identity()); }
java
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { return getExecutionGraphInternal(jobId, restfulGateway).thenApply(Function.identity()); }
[ "public", "CompletableFuture", "<", "AccessExecutionGraph", ">", "getExecutionGraph", "(", "JobID", "jobId", ",", "RestfulGateway", "restfulGateway", ")", "{", "return", "getExecutionGraphInternal", "(", "jobId", ",", "restfulGateway", ")", ".", "thenApply", "(", "Fun...
Gets the {@link AccessExecutionGraph} for the given {@link JobID} and caches it. The {@link AccessExecutionGraph} will be requested again after the refresh interval has passed or if the graph could not be retrieved from the given gateway. @param jobId identifying the {@link ArchivedExecutionGraph} to get @param restfu...
[ "Gets", "the", "{", "@link", "AccessExecutionGraph", "}", "for", "the", "given", "{", "@link", "JobID", "}", "and", "caches", "it", ".", "The", "{", "@link", "AccessExecutionGraph", "}", "will", "be", "requested", "again", "after", "the", "refresh", "interva...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/ExecutionGraphCache.java#L83-L85
train
Get the access execution graph for the given job id.
[ 30522, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 3229, 10288, 8586, 13700, 14413, 1028, 2131, 10288, 8586, 13700, 14413, 1006, 3105, 3593, 3105, 3593, 1010, 2717, 3993, 5867, 4576, 2717, 3993, 5867, 4576, 1007, 1063, 2709, 2131, 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...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/Setting.java
Setting.getMap
public Map<String, String> getMap(String group) { final LinkedHashMap<String, String> map = this.groupedMap.get(group); return (null != map) ? map : new LinkedHashMap<String, String>(0); }
java
public Map<String, String> getMap(String group) { final LinkedHashMap<String, String> map = this.groupedMap.get(group); return (null != map) ? map : new LinkedHashMap<String, String>(0); }
[ "public", "Map", "<", "String", ",", "String", ">", "getMap", "(", "String", "group", ")", "{", "final", "LinkedHashMap", "<", "String", ",", "String", ">", "map", "=", "this", ".", "groupedMap", ".", "get", "(", "group", ")", ";", "return", "(", "nu...
获得指定分组的所有键值对,此方法获取的是原始键值对,获取的键值对可以被修改 @param group 分组 @return map
[ "获得指定分组的所有键值对,此方法获取的是原始键值对,获取的键值对可以被修改" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L264-L267
train
Gets the map of the specified group.
[ 30522, 2270, 4949, 1026, 5164, 1010, 5164, 1028, 2131, 2863, 2361, 1006, 5164, 2177, 1007, 1063, 2345, 5799, 14949, 22444, 2361, 1026, 5164, 1010, 5164, 1028, 4949, 1027, 2023, 1012, 15131, 2863, 2361, 1012, 2131, 1006, 2177, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.binary
public static void binary(Image srcImage, OutputStream out, String imageType) { binary(srcImage, getImageOutputStream(out), imageType); }
java
public static void binary(Image srcImage, OutputStream out, String imageType) { binary(srcImage, getImageOutputStream(out), imageType); }
[ "public", "static", "void", "binary", "(", "Image", "srcImage", ",", "OutputStream", "out", ",", "String", "imageType", ")", "{", "binary", "(", "srcImage", ",", "getImageOutputStream", "(", "out", ")", ",", "imageType", ")", ";", "}" ]
彩色转为黑白二值化图片<br> 此方法并不关闭流,输出JPG格式 @param srcImage 源图像流 @param out 目标图像流 @param imageType 图片格式(扩展名) @since 4.0.5
[ "彩色转为黑白二值化图片<br", ">", "此方法并不关闭流,输出JPG格式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L712-L714
train
Copies the binary image to the output stream.
[ 30522, 2270, 10763, 11675, 12441, 1006, 3746, 5034, 6895, 26860, 1010, 27852, 25379, 2041, 1010, 5164, 3746, 13874, 1007, 1063, 12441, 1006, 5034, 6895, 26860, 1010, 2131, 9581, 3351, 5833, 18780, 21422, 1006, 2041, 1007, 1010, 3746, 13874, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java
RecordWriter.getBufferBuilder
private BufferBuilder getBufferBuilder(int targetChannel) throws IOException, InterruptedException { if (bufferBuilders[targetChannel].isPresent()) { return bufferBuilders[targetChannel].get(); } else { return requestNewBufferBuilder(targetChannel); } }
java
private BufferBuilder getBufferBuilder(int targetChannel) throws IOException, InterruptedException { if (bufferBuilders[targetChannel].isPresent()) { return bufferBuilders[targetChannel].get(); } else { return requestNewBufferBuilder(targetChannel); } }
[ "private", "BufferBuilder", "getBufferBuilder", "(", "int", "targetChannel", ")", "throws", "IOException", ",", "InterruptedException", "{", "if", "(", "bufferBuilders", "[", "targetChannel", "]", ".", "isPresent", "(", ")", ")", "{", "return", "bufferBuilders", "...
The {@link BufferBuilder} may already exist if not filled up last time, otherwise we need request a new one for this target channel.
[ "The", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java#L245-L251
train
Get the buffer builder for the given channel.
[ 30522, 2797, 17698, 8569, 23891, 2099, 2131, 8569, 12494, 8569, 23891, 2099, 1006, 20014, 4539, 26058, 1007, 11618, 22834, 10288, 24422, 1010, 7153, 10288, 24422, 1063, 2065, 1006, 17698, 8569, 23891, 2869, 1031, 4539, 26058, 1033, 1012, 2003...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.newerThan
public static boolean newerThan(File file, long timeMillis) { if (null == file || false == file.exists()) { return false;// 不存在的文件一定比任何时间旧 } return file.lastModified() > timeMillis; }
java
public static boolean newerThan(File file, long timeMillis) { if (null == file || false == file.exists()) { return false;// 不存在的文件一定比任何时间旧 } return file.lastModified() > timeMillis; }
[ "public", "static", "boolean", "newerThan", "(", "File", "file", ",", "long", "timeMillis", ")", "{", "if", "(", "null", "==", "file", "||", "false", "==", "file", ".", "exists", "(", ")", ")", "{", "return", "false", ";", "// 不存在的文件一定比任何时间旧\r", "}", "...
给定文件或目录的最后修改时间是否晚于给定时间 @param file 文件或目录 @param timeMillis 做为对比的时间 @return 是否晚于给定时间
[ "给定文件或目录的最后修改时间是否晚于给定时间" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L580-L585
train
Checks if the given file is newer than the given time.
[ 30522, 2270, 10763, 22017, 20898, 10947, 21604, 1006, 5371, 5371, 1010, 2146, 2051, 19912, 2483, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 5371, 1064, 1064, 6270, 1027, 1027, 5371, 1012, 6526, 1006, 1007, 1007, 1063, 2709, 6270, 1025, 1013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/api/yaml/YamlOrchestrationShardingDataSourceFactory.java
YamlOrchestrationShardingDataSourceFactory.createDataSource
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException { YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlFile); return createDataSource(dataSourceMap, config.getShardingRule(), config.getProps(), conf...
java
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException { YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlFile); return createDataSource(dataSourceMap, config.getShardingRule(), config.getProps(), conf...
[ "public", "static", "DataSource", "createDataSource", "(", "final", "Map", "<", "String", ",", "DataSource", ">", "dataSourceMap", ",", "final", "File", "yamlFile", ")", "throws", "SQLException", ",", "IOException", "{", "YamlOrchestrationShardingRuleConfiguration", "...
Create sharding data source. @param dataSourceMap data source map @param yamlFile YAML file for rule configuration of databases and tables sharding without data sources @return sharding data source @throws SQLException SQL exception @throws IOException IO exception
[ "Create", "sharding", "data", "source", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationShardingDataSourceFactory.java#L74-L77
train
Create a DataSource from a yaml file.
[ 30522, 2270, 10763, 2951, 6499, 3126, 3401, 2580, 6790, 6499, 3126, 3401, 1006, 2345, 4949, 1026, 5164, 1010, 2951, 6499, 3126, 3401, 1028, 2951, 6499, 3126, 3401, 2863, 2361, 1010, 2345, 5371, 8038, 19968, 8873, 2571, 1007, 11618, 29296, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/nosql/mongo/MongoFactory.java
MongoFactory.getDS
public static MongoDS getDS(Setting setting, String... groups) { final String key = setting.getSettingPath() + GROUP_SEPRATER + ArrayUtil.join(groups, GROUP_SEPRATER); MongoDS ds = dsMap.get(key); if (null == ds) { // 没有在池中加入之 ds = new MongoDS(setting, groups); dsMap.put(key, ds); } return ...
java
public static MongoDS getDS(Setting setting, String... groups) { final String key = setting.getSettingPath() + GROUP_SEPRATER + ArrayUtil.join(groups, GROUP_SEPRATER); MongoDS ds = dsMap.get(key); if (null == ds) { // 没有在池中加入之 ds = new MongoDS(setting, groups); dsMap.put(key, ds); } return ...
[ "public", "static", "MongoDS", "getDS", "(", "Setting", "setting", ",", "String", "...", "groups", ")", "{", "final", "String", "key", "=", "setting", ".", "getSettingPath", "(", ")", "+", "GROUP_SEPRATER", "+", "ArrayUtil", ".", "join", "(", "groups", ","...
获取MongoDB数据源<br> @param setting 设定文件 @param groups 分组列表 @return MongoDB连接
[ "获取MongoDB数据源<br", ">" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/nosql/mongo/MongoFactory.java#L90-L100
train
Gets the DS object.
[ 30522, 2270, 10763, 12256, 3995, 5104, 2131, 5104, 1006, 4292, 4292, 1010, 5164, 1012, 1012, 1012, 2967, 1007, 1063, 2345, 5164, 3145, 1027, 4292, 1012, 4152, 18319, 3070, 15069, 1006, 1007, 1009, 2177, 1035, 19802, 11657, 2099, 1009, 9140,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStreamBuilder.java
PatternStreamBuilder.forStreamAndPattern
static <IN> PatternStreamBuilder<IN> forStreamAndPattern(final DataStream<IN> inputStream, final Pattern<IN, ?> pattern) { return new PatternStreamBuilder<>(inputStream, pattern, null, null); }
java
static <IN> PatternStreamBuilder<IN> forStreamAndPattern(final DataStream<IN> inputStream, final Pattern<IN, ?> pattern) { return new PatternStreamBuilder<>(inputStream, pattern, null, null); }
[ "static", "<", "IN", ">", "PatternStreamBuilder", "<", "IN", ">", "forStreamAndPattern", "(", "final", "DataStream", "<", "IN", ">", "inputStream", ",", "final", "Pattern", "<", "IN", ",", "?", ">", "pattern", ")", "{", "return", "new", "PatternStreamBuilder...
---------------------------------------- factory-like methods ---------------------------------------- //
[ "----------------------------------------", "factory", "-", "like", "methods", "----------------------------------------", "//" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStreamBuilder.java#L151-L153
train
Create a PatternStreamBuilder for a DataStream and a Pattern.
[ 30522, 10763, 1026, 1999, 1028, 7060, 25379, 8569, 23891, 2099, 1026, 1999, 1028, 2005, 21422, 5685, 4502, 12079, 2078, 1006, 2345, 2951, 21422, 1026, 1999, 1028, 20407, 25379, 1010, 2345, 5418, 1026, 1999, 1010, 1029, 1028, 5418, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/CoreBiGramTableDictionary.java
CoreBiGramTableDictionary.reload
public static boolean reload() { String biGramDictionaryPath = HanLP.Config.BiGramDictionaryPath; IOUtil.deleteFile(biGramDictionaryPath + ".table" + Predefine.BIN_EXT); return load(biGramDictionaryPath); }
java
public static boolean reload() { String biGramDictionaryPath = HanLP.Config.BiGramDictionaryPath; IOUtil.deleteFile(biGramDictionaryPath + ".table" + Predefine.BIN_EXT); return load(biGramDictionaryPath); }
[ "public", "static", "boolean", "reload", "(", ")", "{", "String", "biGramDictionaryPath", "=", "HanLP", ".", "Config", ".", "BiGramDictionaryPath", ";", "IOUtil", ".", "deleteFile", "(", "biGramDictionaryPath", "+", "\".table\"", "+", "Predefine", ".", "BIN_EXT", ...
热更新二元接续词典<br> 集群环境(或其他IOAdapter)需要自行删除缓存文件 @return 是否成功
[ "热更新二元接续词典<br", ">", "集群环境(或其他IOAdapter)需要自行删除缓存文件" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/CoreBiGramTableDictionary.java#L302-L308
train
Reload the NCBI SECTYPE
[ 30522, 2270, 10763, 22017, 20898, 2128, 11066, 1006, 1007, 1063, 5164, 2502, 6444, 29201, 3258, 5649, 15069, 1027, 7658, 14277, 1012, 9530, 8873, 2290, 1012, 2502, 6444, 29201, 3258, 5649, 15069, 1025, 22834, 21823, 2140, 1012, 3972, 12870, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Environment.java
Environment.merge
public static Environment merge(Environment env1, Environment env2) { final Environment mergedEnv = new Environment(); // merge tables final Map<String, TableEntry> tables = new LinkedHashMap<>(env1.getTables()); tables.putAll(env2.getTables()); mergedEnv.tables = tables; // merge functions final Map<St...
java
public static Environment merge(Environment env1, Environment env2) { final Environment mergedEnv = new Environment(); // merge tables final Map<String, TableEntry> tables = new LinkedHashMap<>(env1.getTables()); tables.putAll(env2.getTables()); mergedEnv.tables = tables; // merge functions final Map<St...
[ "public", "static", "Environment", "merge", "(", "Environment", "env1", ",", "Environment", "env2", ")", "{", "final", "Environment", "mergedEnv", "=", "new", "Environment", "(", ")", ";", "// merge tables", "final", "Map", "<", "String", ",", "TableEntry", ">...
Merges two environments. The properties of the first environment might be overwritten by the second one.
[ "Merges", "two", "environments", ".", "The", "properties", "of", "the", "first", "environment", "might", "be", "overwritten", "by", "the", "second", "one", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/Environment.java#L164-L184
train
Merge two environments.
[ 30522, 2270, 10763, 4044, 13590, 1006, 4044, 4372, 2615, 2487, 1010, 4044, 4372, 2615, 2475, 1007, 1063, 2345, 4044, 5314, 2368, 2615, 1027, 2047, 4044, 1006, 1007, 1025, 1013, 1013, 13590, 7251, 2345, 4949, 1026, 5164, 1010, 2795, 4765, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/StateSerializerProvider.java
StateSerializerProvider.previousSchemaSerializer
@Nonnull public final TypeSerializer<T> previousSchemaSerializer() { if (cachedRestoredSerializer != null) { return cachedRestoredSerializer; } if (previousSerializerSnapshot == null) { throw new UnsupportedOperationException( "This provider does not contain the state's previous serializer's snapshot....
java
@Nonnull public final TypeSerializer<T> previousSchemaSerializer() { if (cachedRestoredSerializer != null) { return cachedRestoredSerializer; } if (previousSerializerSnapshot == null) { throw new UnsupportedOperationException( "This provider does not contain the state's previous serializer's snapshot....
[ "@", "Nonnull", "public", "final", "TypeSerializer", "<", "T", ">", "previousSchemaSerializer", "(", ")", "{", "if", "(", "cachedRestoredSerializer", "!=", "null", ")", "{", "return", "cachedRestoredSerializer", ";", "}", "if", "(", "previousSerializerSnapshot", "...
Gets the serializer that recognizes the previous serialization schema of the state. This is the serializer that should be used for restoring the state, i.e. when the state is still in the previous serialization schema. <p>This method only returns a serializer if this provider has the previous serializer's snapshot. Ot...
[ "Gets", "the", "serializer", "that", "recognizes", "the", "previous", "serialization", "schema", "of", "the", "state", ".", "This", "is", "the", "serializer", "that", "should", "be", "used", "for", "restoring", "the", "state", "i", ".", "e", ".", "when", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/StateSerializerProvider.java#L178-L191
train
Returns the serializer for the previous schema.
[ 30522, 1030, 2512, 11231, 3363, 2270, 2345, 4127, 11610, 28863, 1026, 1056, 1028, 3025, 22842, 9335, 11610, 28863, 1006, 1007, 1063, 2065, 1006, 17053, 16200, 23809, 2098, 8043, 4818, 17629, 999, 1027, 19701, 1007, 1063, 2709, 17053, 16200, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsResp.java
TFetchResultsResp.isSet
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case STATUS: return isSetStatus(); case HAS_MORE_ROWS: return isSetHasMoreRows(); case RESULTS: return isSetResults(); } throw new IllegalStateExce...
java
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case STATUS: return isSetStatus(); case HAS_MORE_ROWS: return isSetHasMoreRows(); case RESULTS: return isSetResults(); } throw new IllegalStateExce...
[ "public", "boolean", "isSet", "(", "_Fields", "field", ")", "{", "if", "(", "field", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "switch", "(", "field", ")", "{", "case", "STATUS", ":", "return", "isSetStatus",...
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
[ "Returns", "true", "if", "field", "corresponding", "to", "fieldID", "is", "set", "(", "has", "been", "assigned", "a", "value", ")", "and", "false", "otherwise" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsResp.java#L281-L295
train
Checks if field is set to a value of a CRAsCTYPE object.
[ 30522, 2270, 22017, 20898, 26354, 3388, 1006, 1035, 4249, 2492, 1007, 1063, 2065, 1006, 2492, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 1006, 1007, 1025, 1065, 6942, 1006, 2492, 1007, 1063, 2553, 3570...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers/ContinuousEventTimeTrigger.java
ContinuousEventTimeTrigger.of
public static <W extends Window> ContinuousEventTimeTrigger<W> of(Time interval) { return new ContinuousEventTimeTrigger<>(interval.toMilliseconds()); }
java
public static <W extends Window> ContinuousEventTimeTrigger<W> of(Time interval) { return new ContinuousEventTimeTrigger<>(interval.toMilliseconds()); }
[ "public", "static", "<", "W", "extends", "Window", ">", "ContinuousEventTimeTrigger", "<", "W", ">", "of", "(", "Time", "interval", ")", "{", "return", "new", "ContinuousEventTimeTrigger", "<>", "(", "interval", ".", "toMilliseconds", "(", ")", ")", ";", "}"...
Creates a trigger that continuously fires based on the given interval. @param interval The time interval at which to fire. @param <W> The type of {@link Window Windows} on which this trigger can operate.
[ "Creates", "a", "trigger", "that", "continuously", "fires", "based", "on", "the", "given", "interval", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers/ContinuousEventTimeTrigger.java#L139-L141
train
Create a new continuous event time trigger.
[ 30522, 2270, 10763, 1026, 1059, 8908, 3332, 1028, 7142, 18697, 3372, 7292, 18886, 13327, 1026, 1059, 1028, 1997, 1006, 2051, 13483, 1007, 1063, 2709, 2047, 7142, 18697, 3372, 7292, 18886, 13327, 1026, 1028, 1006, 13483, 1012, 3419, 8591, 55...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readString
public static String readString(String path, String charsetName) throws IORuntimeException { return readString(file(path), charsetName); }
java
public static String readString(String path, String charsetName) throws IORuntimeException { return readString(file(path), charsetName); }
[ "public", "static", "String", "readString", "(", "String", "path", ",", "String", "charsetName", ")", "throws", "IORuntimeException", "{", "return", "readString", "(", "file", "(", "path", ")", ",", "charsetName", ")", ";", "}" ]
读取文件内容 @param path 文件路径 @param charsetName 字符集 @return 内容 @throws IORuntimeException IO异常
[ "读取文件内容" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2114-L2116
train
Reads a string from a file.
[ 30522, 2270, 10763, 5164, 9631, 18886, 3070, 1006, 5164, 4130, 1010, 5164, 25869, 13462, 18442, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 9631, 18886, 3070, 1006, 5371, 1006, 4130, 1007, 1010, 25869, 13462, 18442, 1007, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java
MemorySegment.putLongBigEndian
public final void putLongBigEndian(int index, long value) { if (LITTLE_ENDIAN) { putLong(index, Long.reverseBytes(value)); } else { putLong(index, value); } }
java
public final void putLongBigEndian(int index, long value) { if (LITTLE_ENDIAN) { putLong(index, Long.reverseBytes(value)); } else { putLong(index, value); } }
[ "public", "final", "void", "putLongBigEndian", "(", "int", "index", ",", "long", "value", ")", "{", "if", "(", "LITTLE_ENDIAN", ")", "{", "putLong", "(", "index", ",", "Long", ".", "reverseBytes", "(", "value", ")", ")", ";", "}", "else", "{", "putLong...
Writes the given long value (64bit, 8 bytes) to the given position in big endian byte order. This method's speed depends on the system's native byte order, and it is possibly slower than {@link #putLong(int, long)}. For most cases (such as transient storage in memory or serialization for I/O and network), it suffices t...
[ "Writes", "the", "given", "long", "value", "(", "64bit", "8", "bytes", ")", "to", "the", "given", "position", "in", "big", "endian", "byte", "order", ".", "This", "method", "s", "speed", "depends", "on", "the", "system", "s", "native", "byte", "order", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java#L956-L962
train
Puts a long value into the buffer at the given index in big - endian order.
[ 30522, 2270, 2345, 11675, 2404, 10052, 5638, 6914, 11692, 1006, 20014, 5950, 1010, 2146, 3643, 1007, 1063, 2065, 1006, 2210, 1035, 2203, 2937, 1007, 1063, 2404, 10052, 1006, 5950, 1010, 2146, 1012, 7901, 3762, 4570, 1006, 3643, 1007, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/hbase/src/main/java/com/alibaba/otter/canal/client/adapter/hbase/service/HbaseSyncService.java
HbaseSyncService.insert
private void insert(MappingConfig config, Dml dml) { List<Map<String, Object>> data = dml.getData(); if (data == null || data.isEmpty()) { return; } MappingConfig.HbaseMapping hbaseMapping = config.getHbaseMapping(); // if (!validHTable(config)) { // logger....
java
private void insert(MappingConfig config, Dml dml) { List<Map<String, Object>> data = dml.getData(); if (data == null || data.isEmpty()) { return; } MappingConfig.HbaseMapping hbaseMapping = config.getHbaseMapping(); // if (!validHTable(config)) { // logger....
[ "private", "void", "insert", "(", "MappingConfig", "config", ",", "Dml", "dml", ")", "{", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "data", "=", "dml", ".", "getData", "(", ")", ";", "if", "(", "data", "==", "null", "||", "data", ...
插入操作 @param config 配置项 @param dml DML数据
[ "插入操作" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/hbase/src/main/java/com/alibaba/otter/canal/client/adapter/hbase/service/HbaseSyncService.java#L53-L97
train
Insert data in a DML file.
[ 30522, 2797, 11675, 19274, 1006, 12375, 8663, 8873, 2290, 9530, 8873, 2290, 1010, 1040, 19968, 1040, 19968, 1007, 1063, 2862, 1026, 4949, 1026, 5164, 1010, 4874, 1028, 1028, 2951, 1027, 1040, 19968, 1012, 2131, 2850, 2696, 1006, 1007, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-swift-fs-hadoop/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.set
public void set(String name, String value, String source) { Preconditions.checkArgument( name != null, "Property name must not be null"); Preconditions.checkArgument( value != null, "The value of property " + name + " must not be null"); name = name.trim(); DeprecationCon...
java
public void set(String name, String value, String source) { Preconditions.checkArgument( name != null, "Property name must not be null"); Preconditions.checkArgument( value != null, "The value of property " + name + " must not be null"); name = name.trim(); DeprecationCon...
[ "public", "void", "set", "(", "String", "name", ",", "String", "value", ",", "String", "source", ")", "{", "Preconditions", ".", "checkArgument", "(", "name", "!=", "null", ",", "\"Property name must not be null\"", ")", ";", "Preconditions", ".", "checkArgument...
Set the <code>value</code> of the <code>name</code> property. If <code>name</code> is deprecated, it also sets the <code>value</code> to the keys that replace the deprecated key. Name will be trimmed before put into configuration. @param name property name. @param value property value. @param source the place that thi...
[ "Set", "the", "<code", ">", "value<", "/", "code", ">", "of", "the", "<code", ">", "name<", "/", "code", ">", "property", ".", "If", "<code", ">", "name<", "/", "code", ">", "is", "deprecated", "it", "also", "sets", "the", "<code", ">", "value<", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-swift-fs-hadoop/src/main/java/org/apache/hadoop/conf/Configuration.java#L1104-L1142
train
Sets the value of the specified property.
[ 30522, 2270, 11675, 2275, 1006, 5164, 2171, 1010, 5164, 3643, 1010, 5164, 3120, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 2906, 22850, 4765, 1006, 2171, 999, 1027, 19701, 1010, 1000, 3200, 2171, 2442, 2025, 2022, 19701, 1000, 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/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/engine/YamlEngine.java
YamlEngine.unmarshal
public static <T extends YamlConfiguration> T unmarshal(final byte[] yamlBytes, final Class<T> classType) throws IOException { try (InputStream inputStream = new ByteArrayInputStream(yamlBytes)) { return new Yaml(new Constructor(classType)).loadAs(inputStream, classType); } }
java
public static <T extends YamlConfiguration> T unmarshal(final byte[] yamlBytes, final Class<T> classType) throws IOException { try (InputStream inputStream = new ByteArrayInputStream(yamlBytes)) { return new Yaml(new Constructor(classType)).loadAs(inputStream, classType); } }
[ "public", "static", "<", "T", "extends", "YamlConfiguration", ">", "T", "unmarshal", "(", "final", "byte", "[", "]", "yamlBytes", ",", "final", "Class", "<", "T", ">", "classType", ")", "throws", "IOException", "{", "try", "(", "InputStream", "inputStream", ...
Unmarshal YAML. @param yamlBytes YAML bytes @param classType class type @param <T> type of class @return object from YAML @throws IOException IO Exception
[ "Unmarshal", "YAML", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/yaml/engine/YamlEngine.java#L72-L76
train
Unmarshals a YAML configuration from a byte array.
[ 30522, 2270, 10763, 1026, 1056, 8908, 8038, 19968, 8663, 8873, 27390, 3370, 1028, 1056, 4895, 7849, 7377, 2140, 1006, 2345, 24880, 1031, 1033, 8038, 19968, 3762, 4570, 1010, 2345, 2465, 1026, 1056, 1028, 2465, 13874, 1007, 11618, 22834, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/CharsetUtil.java
CharsetUtil.convert
public static String convert(String source, String srcCharset, String destCharset) { return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset)); }
java
public static String convert(String source, String srcCharset, String destCharset) { return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset)); }
[ "public", "static", "String", "convert", "(", "String", "source", ",", "String", "srcCharset", ",", "String", "destCharset", ")", "{", "return", "convert", "(", "source", ",", "Charset", ".", "forName", "(", "srcCharset", ")", ",", "Charset", ".", "forName",...
转换字符串的字符集编码 @param source 字符串 @param srcCharset 源字符集,默认ISO-8859-1 @param destCharset 目标字符集,默认UTF-8 @return 转换后的字符集
[ "转换字符串的字符集编码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/CharsetUtil.java#L48-L50
train
Convert a String to a String using the specified charset.
[ 30522, 2270, 10763, 5164, 10463, 1006, 5164, 3120, 1010, 5164, 5034, 9468, 8167, 13462, 1010, 5164, 4078, 10649, 11650, 3388, 1007, 1063, 2709, 10463, 1006, 3120, 1010, 25869, 13462, 1012, 2005, 18442, 1006, 5034, 9468, 8167, 13462, 1007, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/Broker.java
Broker.handIn
public void handIn(String key, V obj) { if (!retrieveSharedQueue(key).offer(obj)) { throw new RuntimeException("Could not register the given element, broker slot is already occupied."); } }
java
public void handIn(String key, V obj) { if (!retrieveSharedQueue(key).offer(obj)) { throw new RuntimeException("Could not register the given element, broker slot is already occupied."); } }
[ "public", "void", "handIn", "(", "String", "key", ",", "V", "obj", ")", "{", "if", "(", "!", "retrieveSharedQueue", "(", "key", ")", ".", "offer", "(", "obj", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Could not register the given element, br...
Hand in the object to share.
[ "Hand", "in", "the", "object", "to", "share", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/Broker.java#L36-L40
train
Hand in an element to the shared queue.
[ 30522, 2270, 11675, 2192, 2378, 1006, 5164, 3145, 1010, 1058, 27885, 3501, 1007, 1063, 2065, 1006, 999, 12850, 7377, 5596, 4226, 5657, 1006, 3145, 1007, 1012, 3749, 1006, 27885, 3501, 1007, 1007, 1063, 5466, 2047, 2448, 7292, 10288, 24422, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
resolver-dns/src/main/java/io/netty/resolver/dns/DnsResolveContext.java
DnsResolveContext.handleRedirect
private boolean handleRedirect( DnsQuestion question, AddressedEnvelope<DnsResponse, InetSocketAddress> envelope, final DnsQueryLifecycleObserver queryLifecycleObserver, Promise<List<T>> promise) { final DnsResponse res = envelope.content(); // Check if we have answers, if not t...
java
private boolean handleRedirect( DnsQuestion question, AddressedEnvelope<DnsResponse, InetSocketAddress> envelope, final DnsQueryLifecycleObserver queryLifecycleObserver, Promise<List<T>> promise) { final DnsResponse res = envelope.content(); // Check if we have answers, if not t...
[ "private", "boolean", "handleRedirect", "(", "DnsQuestion", "question", ",", "AddressedEnvelope", "<", "DnsResponse", ",", "InetSocketAddress", ">", "envelope", ",", "final", "DnsQueryLifecycleObserver", "queryLifecycleObserver", ",", "Promise", "<", "List", "<", "T", ...
Handles a redirect answer if needed and returns {@code true} if a redirect query has been made.
[ "Handles", "a", "redirect", "answer", "if", "needed", "and", "returns", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsResolveContext.java#L527-L570
train
Handle a redirect.
[ 30522, 2797, 22017, 20898, 28213, 2098, 7442, 6593, 1006, 1040, 3619, 15500, 3258, 3160, 1010, 8280, 2368, 15985, 17635, 1026, 1040, 3619, 6072, 26029, 3366, 1010, 1999, 8454, 7432, 12928, 14141, 8303, 1028, 11255, 1010, 2345, 1040, 3619, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/executiongraph/ExecutionGraph.java
ExecutionGraph.updateAccumulators
public void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot) { Map<String, Accumulator<?, ?>> userAccumulators; try { userAccumulators = accumulatorSnapshot.deserializeUserAccumulators(userClassLoader); ExecutionAttemptID execID = accumulatorSnapshot.getExecutionAttemptID(); Execution execution...
java
public void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot) { Map<String, Accumulator<?, ?>> userAccumulators; try { userAccumulators = accumulatorSnapshot.deserializeUserAccumulators(userClassLoader); ExecutionAttemptID execID = accumulatorSnapshot.getExecutionAttemptID(); Execution execution...
[ "public", "void", "updateAccumulators", "(", "AccumulatorSnapshot", "accumulatorSnapshot", ")", "{", "Map", "<", "String", ",", "Accumulator", "<", "?", ",", "?", ">", ">", "userAccumulators", ";", "try", "{", "userAccumulators", "=", "accumulatorSnapshot", ".", ...
Updates the accumulators during the runtime of a job. Final accumulator results are transferred through the UpdateTaskExecutionState message. @param accumulatorSnapshot The serialized flink and user-defined accumulators
[ "Updates", "the", "accumulators", "during", "the", "runtime", "of", "a", "job", ".", "Final", "accumulator", "results", "are", "transferred", "through", "the", "UpdateTaskExecutionState", "message", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java#L1666-L1681
train
Updates the accumulators for the given accumulator snapshot.
[ 30522, 2270, 11675, 10651, 6305, 24894, 20350, 2015, 1006, 16222, 2819, 20350, 2015, 2532, 4523, 12326, 16222, 2819, 20350, 2015, 2532, 4523, 12326, 1007, 1063, 4949, 1026, 5164, 1010, 16222, 2819, 20350, 1026, 1029, 1010, 1029, 1028, 1028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/CharsetUtil.java
CharsetUtil.decoder
public static CharsetDecoder decoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction) { checkNotNull(charset, "charset"); CharsetDecoder d = charset.newDecoder(); d.onMalformedInput(malformedInputAction...
java
public static CharsetDecoder decoder(Charset charset, CodingErrorAction malformedInputAction, CodingErrorAction unmappableCharacterAction) { checkNotNull(charset, "charset"); CharsetDecoder d = charset.newDecoder(); d.onMalformedInput(malformedInputAction...
[ "public", "static", "CharsetDecoder", "decoder", "(", "Charset", "charset", ",", "CodingErrorAction", "malformedInputAction", ",", "CodingErrorAction", "unmappableCharacterAction", ")", "{", "checkNotNull", "(", "charset", ",", "\"charset\"", ")", ";", "CharsetDecoder", ...
Returns a new {@link CharsetDecoder} for the {@link Charset} with specified error actions. @param charset The specified charset @param malformedInputAction The decoder's action for malformed-input errors @param unmappableCharacterAction The decoder's action for unmappable-character errors @return The decoder for the s...
[ "Returns", "a", "new", "{", "@link", "CharsetDecoder", "}", "for", "the", "{", "@link", "Charset", "}", "with", "specified", "error", "actions", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/CharsetUtil.java#L144-L150
train
Gets a CharsetDecoder instance.
[ 30522, 2270, 10763, 25869, 13462, 3207, 16044, 2099, 21933, 4063, 1006, 25869, 13462, 25869, 13462, 1010, 16861, 2121, 29165, 18908, 3258, 15451, 29021, 2378, 18780, 18908, 3258, 1010, 16861, 2121, 29165, 18908, 3258, 4895, 2863, 13944, 3468, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/highavailability/FsNegativeRunningJobsRegistry.java
FsNegativeRunningJobsRegistry.setJobRunning
@Override public void setJobRunning(JobID jobID) throws IOException { checkNotNull(jobID, "jobID"); final Path filePath = createMarkerFilePath(RUNNING_PREFIX, jobID); // create the file // to avoid an exception if the job already exists, set overwrite=true createFile(filePath, true); }
java
@Override public void setJobRunning(JobID jobID) throws IOException { checkNotNull(jobID, "jobID"); final Path filePath = createMarkerFilePath(RUNNING_PREFIX, jobID); // create the file // to avoid an exception if the job already exists, set overwrite=true createFile(filePath, true); }
[ "@", "Override", "public", "void", "setJobRunning", "(", "JobID", "jobID", ")", "throws", "IOException", "{", "checkNotNull", "(", "jobID", ",", "\"jobID\"", ")", ";", "final", "Path", "filePath", "=", "createMarkerFilePath", "(", "RUNNING_PREFIX", ",", "jobID",...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/FsNegativeRunningJobsRegistry.java#L115-L123
train
Sets the running state of the job.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2275, 5558, 19892, 4609, 5582, 1006, 3105, 3593, 3105, 3593, 1007, 11618, 22834, 10288, 24422, 1063, 4638, 17048, 11231, 3363, 1006, 3105, 3593, 1010, 1000, 3105, 3593, 1000, 1007, 1025, 2345, 4130, 53...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/pattern/CronPattern.java
CronPattern.parseSinglePattern
private void parseSinglePattern(String pattern) { final String[] parts = pattern.split("\\s"); int offset = 0;// 偏移量用于兼容Quartz表达式,当表达式有6或7项时,第一项为秒 if (parts.length == 6 || parts.length == 7) { offset = 1; } else if (parts.length != 5) { throw new CronException("Pattern [{}] is invalid, it must be ...
java
private void parseSinglePattern(String pattern) { final String[] parts = pattern.split("\\s"); int offset = 0;// 偏移量用于兼容Quartz表达式,当表达式有6或7项时,第一项为秒 if (parts.length == 6 || parts.length == 7) { offset = 1; } else if (parts.length != 5) { throw new CronException("Pattern [{}] is invalid, it must be ...
[ "private", "void", "parseSinglePattern", "(", "String", "pattern", ")", "{", "final", "String", "[", "]", "parts", "=", "pattern", ".", "split", "(", "\"\\\\s\"", ")", ";", "int", "offset", "=", "0", ";", "// 偏移量用于兼容Quartz表达式,当表达式有6或7项时,第一项为秒\r", "if", "(", ...
解析单一定时任务表达式 @param pattern 表达式
[ "解析单一定时任务表达式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/pattern/CronPattern.java#L234-L295
train
Parses a single pattern.
[ 30522, 2797, 11675, 11968, 8583, 2075, 2571, 4502, 12079, 2078, 1006, 5164, 5418, 1007, 1063, 2345, 5164, 1031, 1033, 3033, 1027, 5418, 1012, 3975, 1006, 1000, 1032, 1032, 1055, 1000, 1007, 1025, 20014, 16396, 1027, 1014, 1025, 1013, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/generated/GeneratedClass.java
GeneratedClass.newInstance
@SuppressWarnings("unchecked") public T newInstance(ClassLoader classLoader) { try { return (T) compile(classLoader).getConstructor(Object[].class) // Because Constructor.newInstance(Object... initargs), we need to load // references into a new Object[], otherwise it cannot be compiled. .newInstanc...
java
@SuppressWarnings("unchecked") public T newInstance(ClassLoader classLoader) { try { return (T) compile(classLoader).getConstructor(Object[].class) // Because Constructor.newInstance(Object... initargs), we need to load // references into a new Object[], otherwise it cannot be compiled. .newInstanc...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "newInstance", "(", "ClassLoader", "classLoader", ")", "{", "try", "{", "return", "(", "T", ")", "compile", "(", "classLoader", ")", ".", "getConstructor", "(", "Object", "[", "]", ".", "cl...
Create a new instance of this generated class.
[ "Create", "a", "new", "instance", "of", "this", "generated", "class", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/generated/GeneratedClass.java#L49-L60
train
Creates a new instance of the generated class using the specified ClassLoader.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 1056, 2047, 7076, 26897, 1006, 2465, 11066, 2121, 2465, 11066, 2121, 1007, 1063, 3046, 1063, 2709, 1006, 1056, 1007, 4012, 22090, 1006, 2465, 11066, 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...
netty/netty
transport/src/main/java/io/netty/channel/embedded/EmbeddedChannel.java
EmbeddedChannel.readOutbound
@SuppressWarnings("unchecked") public <T> T readOutbound() { T message = (T) poll(outboundMessages); if (message != null) { ReferenceCountUtil.touch(message, "Caller of readOutbound() will handle the message from this point."); } return message; }
java
@SuppressWarnings("unchecked") public <T> T readOutbound() { T message = (T) poll(outboundMessages); if (message != null) { ReferenceCountUtil.touch(message, "Caller of readOutbound() will handle the message from this point."); } return message; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "readOutbound", "(", ")", "{", "T", "message", "=", "(", "T", ")", "poll", "(", "outboundMessages", ")", ";", "if", "(", "message", "!=", "null", ")", "{", "ReferenceCoun...
Read data from the outbound. This may return {@code null} if nothing is readable.
[ "Read", "data", "from", "the", "outbound", ".", "This", "may", "return", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/embedded/EmbeddedChannel.java#L301-L308
train
Reads a message from the outbound messages queue.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 1026, 1056, 1028, 1056, 3191, 5833, 15494, 1006, 1007, 1063, 1056, 4471, 1027, 1006, 1056, 1007, 8554, 1006, 2041, 15494, 7834, 3736, 8449, 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.print
public void print(NumberFormat format, int width) { print(new PrintWriter(System.out, true), format, width); }
java
public void print(NumberFormat format, int width) { print(new PrintWriter(System.out, true), format, width); }
[ "public", "void", "print", "(", "NumberFormat", "format", ",", "int", "width", ")", "{", "print", "(", "new", "PrintWriter", "(", "System", ".", "out", ",", "true", ")", ",", "format", ",", "width", ")", ";", "}" ]
Print the matrix to stdout. Line the elements up in columns. Use the format object, and right justify within columns of width characters. Note that is the matrix is to be read back in, you probably will want to use a NumberFormat that is set to US Locale. @param format A Formatting object for individual elements. @p...
[ "Print", "the", "matrix", "to", "stdout", ".", "Line", "the", "elements", "up", "in", "columns", ".", "Use", "the", "format", "object", "and", "right", "justify", "within", "columns", "of", "width", "characters", ".", "Note", "that", "is", "the", "matrix",...
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java#L1077-L1080
train
Print the sequence of tokens to stdout.
[ 30522, 2270, 11675, 6140, 1006, 2193, 14192, 4017, 4289, 1010, 20014, 9381, 1007, 1063, 6140, 1006, 2047, 6140, 15994, 1006, 2291, 1012, 2041, 1010, 2995, 1007, 1010, 4289, 1010, 9381, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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-json/src/main/java/cn/hutool/json/JSONUtil.java
JSONUtil.wrap
public static Object wrap(Object object, boolean ignoreNullValue) { if (object == null) { return ignoreNullValue ? null : JSONNull.NULL; } if (object instanceof JSON // || JSONNull.NULL.equals(object) // || object instanceof JSONString // || object instanceof CharSequence // || object i...
java
public static Object wrap(Object object, boolean ignoreNullValue) { if (object == null) { return ignoreNullValue ? null : JSONNull.NULL; } if (object instanceof JSON // || JSONNull.NULL.equals(object) // || object instanceof JSONString // || object instanceof CharSequence // || object i...
[ "public", "static", "Object", "wrap", "(", "Object", "object", ",", "boolean", "ignoreNullValue", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "ignoreNullValue", "?", "null", ":", "JSONNull", ".", "NULL", ";", "}", "if", "(", "object"...
在需要的时候包装对象<br> 包装包括: <ul> <li><code>null</code> =》 <code>JSONNull.NULL</code></li> <li>array or collection =》 JSONArray</li> <li>map =》 JSONObject</li> <li>standard property (Double, String, et al) =》 原对象</li> <li>来自于java包 =》 字符串</li> <li>其它 =》 尝试包装为JSONObject,否则返回<code>null</code></li> </ul> @param object 被包装的对象 @par...
[ "在需要的时候包装对象<br", ">", "包装包括:", "<ul", ">", "<li", ">", "<code", ">", "null<", "/", "code", ">", "=", "》", "<code", ">", "JSONNull", ".", "NULL<", "/", "code", ">", "<", "/", "li", ">", "<li", ">", "array", "or", "collection", "=", "》", "JSONArray<"...
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONUtil.java#L574-L623
train
Creates a new instance of the specified object with all the necessary fields.
[ 30522, 2270, 10763, 4874, 10236, 1006, 4874, 4874, 1010, 22017, 20898, 8568, 11231, 3363, 10175, 5657, 1007, 1063, 2065, 1006, 4874, 1027, 1027, 19701, 1007, 1063, 2709, 8568, 11231, 3363, 10175, 5657, 1029, 19701, 1024, 1046, 3385, 11231, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.getNthExpr
private SqlNode getNthExpr(SqlNode query, int ordinal, int sourceCount) { if (query instanceof SqlInsert) { SqlInsert insert = (SqlInsert) query; if (insert.getTargetColumnList() != null) { return insert.getTargetColumnList().get(ordinal); } else { return getNthExpr( insert.getSource(), ord...
java
private SqlNode getNthExpr(SqlNode query, int ordinal, int sourceCount) { if (query instanceof SqlInsert) { SqlInsert insert = (SqlInsert) query; if (insert.getTargetColumnList() != null) { return insert.getTargetColumnList().get(ordinal); } else { return getNthExpr( insert.getSource(), ord...
[ "private", "SqlNode", "getNthExpr", "(", "SqlNode", "query", ",", "int", "ordinal", ",", "int", "sourceCount", ")", "{", "if", "(", "query", "instanceof", "SqlInsert", ")", "{", "SqlInsert", "insert", "=", "(", "SqlInsert", ")", "query", ";", "if", "(", ...
Locates the n'th expression in an INSERT or UPDATE query. @param query Query @param ordinal Ordinal of expression @param sourceCount Number of expressions @return Ordinal'th expression, never null
[ "Locates", "the", "n", "th", "expression", "in", "an", "INSERT", "or", "UPDATE", "query", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4511-L4544
train
Gets the nth expression.
[ 30522, 2797, 29296, 3630, 3207, 2131, 3372, 5369, 2595, 18098, 1006, 29296, 3630, 3207, 23032, 1010, 20014, 2030, 18979, 2140, 1010, 20014, 3120, 3597, 16671, 1007, 1063, 2065, 1006, 23032, 6013, 11253, 29296, 7076, 8743, 1007, 1063, 29296, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.readX509Certificate
public static Certificate readX509Certificate(InputStream in, char[] password, String alias) { return KeyUtil.readX509Certificate(in, password, alias); }
java
public static Certificate readX509Certificate(InputStream in, char[] password, String alias) { return KeyUtil.readX509Certificate(in, password, alias); }
[ "public", "static", "Certificate", "readX509Certificate", "(", "InputStream", "in", ",", "char", "[", "]", "password", ",", "String", "alias", ")", "{", "return", "KeyUtil", ".", "readX509Certificate", "(", "in", ",", "password", ",", "alias", ")", ";", "}" ...
读取X.509 Certification文件<br> Certification为证书文件<br> see: http://snowolf.iteye.com/blog/391931 @param in {@link InputStream} 如果想从文件读取.cer文件,使用 {@link FileUtil#getInputStream(java.io.File)} 读取 @param password 密码 @param alias 别名 @return {@link KeyStore} @since 4.4.1
[ "读取X", ".", "509", "Certification文件<br", ">", "Certification为证书文件<br", ">", "see", ":", "http", ":", "//", "snowolf", ".", "iteye", ".", "com", "/", "blog", "/", "391931" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L335-L337
train
Read a X509 certificate from an input stream.
[ 30522, 2270, 10763, 8196, 3191, 2595, 12376, 2683, 17119, 3775, 8873, 16280, 1006, 20407, 25379, 1999, 1010, 25869, 1031, 1033, 20786, 1010, 5164, 14593, 1007, 1063, 2709, 3145, 21823, 2140, 1012, 3191, 2595, 12376, 2683, 17119, 3775, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-system/src/main/java/cn/hutool/system/SystemUtil.java
SystemUtil.get
public static String get(String name, String defaultValue) { return StrUtil.nullToDefault(get(name, false), defaultValue); }
java
public static String get(String name, String defaultValue) { return StrUtil.nullToDefault(get(name, false), defaultValue); }
[ "public", "static", "String", "get", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "return", "StrUtil", ".", "nullToDefault", "(", "get", "(", "name", ",", "false", ")", ",", "defaultValue", ")", ";", "}" ]
取得系统属性,如果因为Java安全的限制而失败,则将错误打在Log中,然后返回 <code>null</code>。 @param name 属性名 @param defaultValue 默认值 @return 属性值或<code>null</code>
[ "取得系统属性,如果因为Java安全的限制而失败,则将错误打在Log中,然后返回", "<code", ">", "null<", "/", "code", ">", "。" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-system/src/main/java/cn/hutool/system/SystemUtil.java#L106-L108
train
Returns the value of the specified property as a String or defaultValue if the property is not set.
[ 30522, 2270, 10763, 5164, 2131, 1006, 5164, 2171, 1010, 5164, 12398, 10175, 5657, 1007, 1063, 2709, 2358, 22134, 4014, 1012, 19701, 3406, 3207, 7011, 11314, 1006, 2131, 1006, 2171, 1010, 6270, 1007, 1010, 12398, 10175, 5657, 1007, 1025, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/remote/RemoteWebDriverBuilder.java
RemoteWebDriverBuilder.oneOf
public RemoteWebDriverBuilder oneOf(Capabilities maybeThis, Capabilities... orOneOfThese) { options.clear(); addAlternative(maybeThis); for (Capabilities anOrOneOfThese : orOneOfThese) { addAlternative(anOrOneOfThese); } return this; }
java
public RemoteWebDriverBuilder oneOf(Capabilities maybeThis, Capabilities... orOneOfThese) { options.clear(); addAlternative(maybeThis); for (Capabilities anOrOneOfThese : orOneOfThese) { addAlternative(anOrOneOfThese); } return this; }
[ "public", "RemoteWebDriverBuilder", "oneOf", "(", "Capabilities", "maybeThis", ",", "Capabilities", "...", "orOneOfThese", ")", "{", "options", ".", "clear", "(", ")", ";", "addAlternative", "(", "maybeThis", ")", ";", "for", "(", "Capabilities", "anOrOneOfThese",...
Clears the current set of alternative browsers and instead sets the list of possible choices to the arguments given to this method.
[ "Clears", "the", "current", "set", "of", "alternative", "browsers", "and", "instead", "sets", "the", "list", "of", "possible", "choices", "to", "the", "arguments", "given", "to", "this", "method", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/RemoteWebDriverBuilder.java#L106-L113
train
Sets the alternative capabilities to be used.
[ 30522, 2270, 6556, 8545, 2497, 23663, 15185, 19231, 4063, 2028, 11253, 1006, 9859, 2672, 15222, 2015, 1010, 9859, 1012, 1012, 1012, 20298, 23585, 6199, 15689, 2063, 1007, 1063, 7047, 1012, 3154, 1006, 1007, 1025, 5587, 2389, 16451, 8082, 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-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/MetricConfig.java
MetricConfig.getDouble
public double getDouble(String key, double defaultValue) { String argument = getProperty(key, null); return argument == null ? defaultValue : Double.parseDouble(argument); }
java
public double getDouble(String key, double defaultValue) { String argument = getProperty(key, null); return argument == null ? defaultValue : Double.parseDouble(argument); }
[ "public", "double", "getDouble", "(", "String", "key", ",", "double", "defaultValue", ")", "{", "String", "argument", "=", "getProperty", "(", "key", ",", "null", ")", ";", "return", "argument", "==", "null", "?", "defaultValue", ":", "Double", ".", "parse...
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found. @param key the hashtable key. @param de...
[ "Searches", "for", "the", "property", "with", "the", "specified", "key", "in", "this", "property", "list", ".", "If", "the", "key", "is", "not", "found", "in", "this", "property", "list", "the", "default", "property", "list", "and", "its", "defaults", "rec...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/MetricConfig.java#L93-L98
train
Get the double value for the given key.
[ 30522, 2270, 3313, 2131, 26797, 3468, 1006, 5164, 3145, 1010, 3313, 12398, 10175, 5657, 1007, 1063, 5164, 6685, 1027, 2131, 21572, 4842, 3723, 1006, 3145, 1010, 19701, 1007, 1025, 2709, 6685, 1027, 1027, 19701, 1029, 12398, 10175, 5657, 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...
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/ui/Select.java
Select.deselectByValue
@Override public void deselectByValue(String value) { if (!isMultiple()) { throw new UnsupportedOperationException( "You may only deselect options of a multi-select"); } for (WebElement option : findOptionsByValue(value)) { setSelected(option, false); } }
java
@Override public void deselectByValue(String value) { if (!isMultiple()) { throw new UnsupportedOperationException( "You may only deselect options of a multi-select"); } for (WebElement option : findOptionsByValue(value)) { setSelected(option, false); } }
[ "@", "Override", "public", "void", "deselectByValue", "(", "String", "value", ")", "{", "if", "(", "!", "isMultiple", "(", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"You may only deselect options of a multi-select\"", ")", ";", "}", "f...
Deselect all options that have a value matching the argument. That is, when given "foo" this would deselect an option like: &lt;option value="foo"&gt;Bar&lt;/option&gt; @param value The value to match against @throws NoSuchElementException If no matching option elements are found @throws UnsupportedOperationException...
[ "Deselect", "all", "options", "that", "have", "a", "value", "matching", "the", "argument", ".", "That", "is", "when", "given", "foo", "this", "would", "deselect", "an", "option", "like", ":" ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/ui/Select.java#L222-L232
train
Deselect all options with a value.
[ 30522, 1030, 2058, 15637, 2270, 11675, 4078, 12260, 6593, 3762, 10175, 5657, 1006, 5164, 3643, 1007, 1063, 2065, 1006, 999, 2003, 12274, 7096, 11514, 2571, 1006, 1007, 1007, 1063, 5466, 2047, 4895, 6342, 9397, 15613, 25918, 3370, 10288, 244...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.setField
public void setField(int fieldNum, Value value) { // range check if (fieldNum < 0) { throw new IndexOutOfBoundsException(); } // if the field number is beyond the size, the tuple is expanded if (fieldNum >= this.numFields) { setNumFields(fieldNum + 1); } internallySetField(fieldNum, value); }
java
public void setField(int fieldNum, Value value) { // range check if (fieldNum < 0) { throw new IndexOutOfBoundsException(); } // if the field number is beyond the size, the tuple is expanded if (fieldNum >= this.numFields) { setNumFields(fieldNum + 1); } internallySetField(fieldNum, value); }
[ "public", "void", "setField", "(", "int", "fieldNum", ",", "Value", "value", ")", "{", "// range check", "if", "(", "fieldNum", "<", "0", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "// if the field number is beyond the size, the tup...
Sets the field at the given position to the given value. If the field position is larger or equal than the current number of fields in the record, than the record is expanded to host as many columns. <p> The value is kept as a reference in the record until the binary representation is synchronized. Until that point, al...
[ "Sets", "the", "field", "at", "the", "given", "position", "to", "the", "given", "value", ".", "If", "the", "field", "position", "is", "larger", "or", "equal", "than", "the", "current", "number", "of", "fields", "in", "the", "record", "than", "the", "reco...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L402-L413
train
Sets the value of the specified field.
[ 30522, 2270, 11675, 2275, 3790, 1006, 20014, 2492, 19172, 1010, 3643, 3643, 1007, 1063, 1013, 1013, 2846, 4638, 2065, 1006, 2492, 19172, 1026, 1014, 1007, 1063, 5466, 2047, 5950, 5833, 11253, 15494, 3366, 2595, 24422, 1006, 1007, 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...
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
UTF8String.fromBytes
public static UTF8String fromBytes(byte[] bytes) { if (bytes != null) { return new UTF8String(bytes, BYTE_ARRAY_OFFSET, bytes.length); } else { return null; } }
java
public static UTF8String fromBytes(byte[] bytes) { if (bytes != null) { return new UTF8String(bytes, BYTE_ARRAY_OFFSET, bytes.length); } else { return null; } }
[ "public", "static", "UTF8String", "fromBytes", "(", "byte", "[", "]", "bytes", ")", "{", "if", "(", "bytes", "!=", "null", ")", "{", "return", "new", "UTF8String", "(", "bytes", ",", "BYTE_ARRAY_OFFSET", ",", "bytes", ".", "length", ")", ";", "}", "els...
Creates an UTF8String from byte array, which should be encoded in UTF-8. Note: `bytes` will be hold by returned UTF8String.
[ "Creates", "an", "UTF8String", "from", "byte", "array", "which", "should", "be", "encoded", "in", "UTF", "-", "8", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L110-L116
train
Create a UTF8String from the given byte array.
[ 30522, 2270, 10763, 21183, 2546, 2620, 3367, 4892, 2013, 3762, 4570, 1006, 24880, 1031, 1033, 27507, 1007, 1063, 2065, 1006, 27507, 999, 1027, 19701, 1007, 1063, 2709, 2047, 21183, 2546, 2620, 3367, 4892, 1006, 27507, 1010, 24880, 1035, 914...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
store/src/main/java/com/alibaba/otter/canal/store/helper/CanalEventUtils.java
CanalEventUtils.createPosition
public static LogPosition createPosition(Event event) { EntryPosition position = new EntryPosition(); position.setJournalName(event.getJournalName()); position.setPosition(event.getPosition()); position.setTimestamp(event.getExecuteTime()); // add serverId at 2016-06-28 p...
java
public static LogPosition createPosition(Event event) { EntryPosition position = new EntryPosition(); position.setJournalName(event.getJournalName()); position.setPosition(event.getPosition()); position.setTimestamp(event.getExecuteTime()); // add serverId at 2016-06-28 p...
[ "public", "static", "LogPosition", "createPosition", "(", "Event", "event", ")", "{", "EntryPosition", "position", "=", "new", "EntryPosition", "(", ")", ";", "position", ".", "setJournalName", "(", "event", ".", "getJournalName", "(", ")", ")", ";", "position...
根据entry创建对应的Position对象
[ "根据entry创建对应的Position对象" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/store/src/main/java/com/alibaba/otter/canal/store/helper/CanalEventUtils.java#L48-L62
train
Create a log position object from an event.
[ 30522, 2270, 10763, 8833, 26994, 3443, 26994, 1006, 2724, 2724, 1007, 1063, 4443, 26994, 2597, 1027, 2047, 4443, 26994, 1006, 1007, 1025, 2597, 1012, 2275, 23099, 12789, 19666, 14074, 1006, 2724, 1012, 2131, 23099, 12789, 19666, 14074, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/ObjectArrayTypeInfo.java
ObjectArrayTypeInfo.getInfoFor
@SuppressWarnings("unchecked") @PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(TypeInformation<C> componentInfo) { checkNotNull(componentInfo); return new ObjectArrayTypeInfo<T, C>( (Class<T>)Array.newInstance(componentInfo.getTypeClass(), 0).getClass(), componentInfo); }
java
@SuppressWarnings("unchecked") @PublicEvolving public static <T, C> ObjectArrayTypeInfo<T, C> getInfoFor(TypeInformation<C> componentInfo) { checkNotNull(componentInfo); return new ObjectArrayTypeInfo<T, C>( (Class<T>)Array.newInstance(componentInfo.getTypeClass(), 0).getClass(), componentInfo); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "PublicEvolving", "public", "static", "<", "T", ",", "C", ">", "ObjectArrayTypeInfo", "<", "T", ",", "C", ">", "getInfoFor", "(", "TypeInformation", "<", "C", ">", "componentInfo", ")", "{", "checkNotN...
Creates a new {@link org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo} from a {@link TypeInformation} for the component type. <p> This must be used in cases where the complete type of the array is not available as a {@link java.lang.reflect.Type} or {@link java.lang.Class}.
[ "Creates", "a", "new", "{", "@link", "org", ".", "apache", ".", "flink", ".", "api", ".", "java", ".", "typeutils", ".", "ObjectArrayTypeInfo", "}", "from", "a", "{", "@link", "TypeInformation", "}", "for", "the", "component", "type", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/ObjectArrayTypeInfo.java#L147-L155
train
Gets the ObjectArrayTypeInfo for the given type information.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 1030, 2270, 6777, 4747, 6455, 2270, 10763, 1026, 1056, 1010, 1039, 1028, 4874, 2906, 9447, 13874, 2378, 14876, 1026, 1056, 1010, 1039, 1028, 2131, 2378, 14876,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
body/src/main/java/com/networknt/body/BodyHandler.java
BodyHandler.attachJsonBody
private void attachJsonBody(final HttpServerExchange exchange, String string) throws IOException { Object body; if (string != null) { string = string.trim(); if (string.startsWith("{")) { body = Config.getInstance().getMapper().readValue(string, new TypeReference<...
java
private void attachJsonBody(final HttpServerExchange exchange, String string) throws IOException { Object body; if (string != null) { string = string.trim(); if (string.startsWith("{")) { body = Config.getInstance().getMapper().readValue(string, new TypeReference<...
[ "private", "void", "attachJsonBody", "(", "final", "HttpServerExchange", "exchange", ",", "String", "string", ")", "throws", "IOException", "{", "Object", "body", ";", "if", "(", "string", "!=", "null", ")", "{", "string", "=", "string", ".", "trim", "(", ...
Method used to parse the body into a Map or a List and attach it into exchange @param exchange exchange to be attached @param string unparsed request body @throws IOException
[ "Method", "used", "to", "parse", "the", "body", "into", "a", "Map", "or", "a", "List", "and", "attach", "it", "into", "exchange" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/body/src/main/java/com/networknt/body/BodyHandler.java#L143-L160
train
Attach a json body to the exchange.
[ 30522, 2797, 11675, 22476, 22578, 2239, 23684, 1006, 2345, 16770, 2121, 28943, 2595, 22305, 2063, 3863, 1010, 5164, 5164, 1007, 11618, 22834, 10288, 24422, 1063, 4874, 2303, 1025, 2065, 1006, 5164, 999, 1027, 19701, 1007, 1063, 5164, 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-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java
Sftp.init
public void init(String sshHost, int sshPort, String sshUser, String sshPass, Charset charset) { this.host = sshHost; this.port = sshPort; this.user = sshUser; this.password = sshPass; init(JschUtil.getSession(sshHost, sshPort, sshUser, sshPass), charset); }
java
public void init(String sshHost, int sshPort, String sshUser, String sshPass, Charset charset) { this.host = sshHost; this.port = sshPort; this.user = sshUser; this.password = sshPass; init(JschUtil.getSession(sshHost, sshPort, sshUser, sshPass), charset); }
[ "public", "void", "init", "(", "String", "sshHost", ",", "int", "sshPort", ",", "String", "sshUser", ",", "String", "sshPass", ",", "Charset", "charset", ")", "{", "this", ".", "host", "=", "sshHost", ";", "this", ".", "port", "=", "sshPort", ";", "thi...
构造 @param sshHost 远程主机 @param sshPort 远程主机端口 @param sshUser 远程主机用户名 @param sshPass 远程主机密码 @param charset 编码
[ "构造" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java#L106-L112
train
Initializes the connection to the remote server.
[ 30522, 2270, 11675, 1999, 4183, 1006, 5164, 7020, 23644, 14122, 1010, 20014, 7020, 22269, 11589, 1010, 5164, 7020, 9825, 2121, 1010, 5164, 7020, 22269, 12054, 1010, 25869, 13462, 25869, 13462, 1007, 1063, 2023, 1012, 3677, 1027, 7020, 23644, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ReferenceCountedOpenSslContext.java
ReferenceCountedOpenSslContext.toBIO
static long toBIO(ByteBufAllocator allocator, X509Certificate... certChain) throws Exception { if (certChain == null) { return 0; } if (certChain.length == 0) { throw new IllegalArgumentException("certChain can't be empty"); } PemEncoded pem = PemX509Cer...
java
static long toBIO(ByteBufAllocator allocator, X509Certificate... certChain) throws Exception { if (certChain == null) { return 0; } if (certChain.length == 0) { throw new IllegalArgumentException("certChain can't be empty"); } PemEncoded pem = PemX509Cer...
[ "static", "long", "toBIO", "(", "ByteBufAllocator", "allocator", ",", "X509Certificate", "...", "certChain", ")", "throws", "Exception", "{", "if", "(", "certChain", "==", "null", ")", "{", "return", "0", ";", "}", "if", "(", "certChain", ".", "length", "=...
Return the pointer to a <a href="https://www.openssl.org/docs/crypto/BIO_get_mem_ptr.html">in-memory BIO</a> or {@code 0} if the {@code certChain} is {@code null}. The BIO contains the content of the {@code certChain}.
[ "Return", "the", "pointer", "to", "a", "<a", "href", "=", "https", ":", "//", "www", ".", "openssl", ".", "org", "/", "docs", "/", "crypto", "/", "BIO_get_mem_ptr", ".", "html", ">", "in", "-", "memory", "BIO<", "/", "a", ">", "or", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslContext.java#L833-L848
train
Convert a list of X509Certificate to a BIO.
[ 30522, 10763, 2146, 2000, 26282, 1006, 24880, 8569, 13976, 24755, 4263, 2035, 24755, 4263, 1010, 1060, 12376, 2683, 17119, 3775, 8873, 16280, 1012, 1012, 1012, 8292, 5339, 24925, 2078, 1007, 11618, 6453, 1063, 2065, 1006, 8292, 5339, 24925, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/SslContext.java
SslContext.newServerContext
@Deprecated public static SslContext newServerContext(File certChainFile, File keyFile) throws SSLException { return newServerContext(certChainFile, keyFile, null); }
java
@Deprecated public static SslContext newServerContext(File certChainFile, File keyFile) throws SSLException { return newServerContext(certChainFile, keyFile, null); }
[ "@", "Deprecated", "public", "static", "SslContext", "newServerContext", "(", "File", "certChainFile", ",", "File", "keyFile", ")", "throws", "SSLException", "{", "return", "newServerContext", "(", "certChainFile", ",", "keyFile", ",", "null", ")", ";", "}" ]
Creates a new server-side {@link SslContext}. @param certChainFile an X.509 certificate chain file in PEM format @param keyFile a PKCS#8 private key file in PEM format @return a new server-side {@link SslContext} @deprecated Replaced by {@link SslContextBuilder}
[ "Creates", "a", "new", "server", "-", "side", "{", "@link", "SslContext", "}", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L135-L138
train
Create a new server context using the specified certificate and key files.
[ 30522, 1030, 2139, 28139, 12921, 2270, 10763, 7020, 22499, 10111, 18413, 2739, 2121, 6299, 8663, 18209, 1006, 5371, 8292, 5339, 24925, 2078, 8873, 2571, 1010, 5371, 3145, 8873, 2571, 1007, 11618, 7020, 2571, 2595, 24422, 1063, 2709, 2739, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/common/Vertex.java
Vertex.newB
public static Vertex newB() { return new Vertex(Predefine.TAG_BIGIN, " ", new CoreDictionary.Attribute(Nature.begin, Predefine.MAX_FREQUENCY / 10), CoreDictionary.getWordID(Predefine.TAG_BIGIN)); }
java
public static Vertex newB() { return new Vertex(Predefine.TAG_BIGIN, " ", new CoreDictionary.Attribute(Nature.begin, Predefine.MAX_FREQUENCY / 10), CoreDictionary.getWordID(Predefine.TAG_BIGIN)); }
[ "public", "static", "Vertex", "newB", "(", ")", "{", "return", "new", "Vertex", "(", "Predefine", ".", "TAG_BIGIN", ",", "\" \"", ",", "new", "CoreDictionary", ".", "Attribute", "(", "Nature", ".", "begin", ",", "Predefine", ".", "MAX_FREQUENCY", "/", "10"...
生成线程安全的起始节点 @return
[ "生成线程安全的起始节点" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/Vertex.java#L453-L456
train
Create a new BIGIN Vertex.
[ 30522, 2270, 10763, 19449, 2047, 2497, 1006, 1007, 1063, 2709, 2047, 19449, 1006, 3653, 3207, 23460, 1012, 6415, 1035, 2502, 2378, 1010, 1000, 1000, 1010, 2047, 4563, 29201, 3258, 5649, 1012, 17961, 1006, 3267, 1012, 4088, 1010, 3653, 3207,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.cleanInvalid
public static String cleanInvalid(String fileName) { return StrUtil.isBlank(fileName) ? fileName : ReUtil.delAll(FILE_NAME_INVALID_PATTERN_WIN, fileName); }
java
public static String cleanInvalid(String fileName) { return StrUtil.isBlank(fileName) ? fileName : ReUtil.delAll(FILE_NAME_INVALID_PATTERN_WIN, fileName); }
[ "public", "static", "String", "cleanInvalid", "(", "String", "fileName", ")", "{", "return", "StrUtil", ".", "isBlank", "(", "fileName", ")", "?", "fileName", ":", "ReUtil", ".", "delAll", "(", "FILE_NAME_INVALID_PATTERN_WIN", ",", "fileName", ")", ";", "}" ]
清除文件名中的在Windows下不支持的非法字符,包括: \ / : * ? " &lt; &gt; | @param fileName 文件名(必须不包括路径,否则路径符将被替换) @return 清理后的文件名 @since 3.3.1
[ "清除文件名中的在Windows下不支持的非法字符,包括:", "\\", "/", ":", "*", "?", "&lt", ";", "&gt", ";", "|" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3255-L3257
train
Removes invalid characters from the given file name.
[ 30522, 2270, 10763, 5164, 4550, 2378, 10175, 3593, 1006, 5164, 5371, 18442, 1007, 1063, 2709, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 5371, 18442, 1007, 1029, 5371, 18442, 1024, 2128, 21823, 2140, 1012, 3972, 8095, 1006, 5371, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-http/src/main/java/cn/hutool/http/HttpUtil.java
HttpUtil.getCharset
public static String getCharset(HttpURLConnection conn) { if (conn == null) { return null; } return ReUtil.get(CHARSET_PATTERN, conn.getContentType(), 1); }
java
public static String getCharset(HttpURLConnection conn) { if (conn == null) { return null; } return ReUtil.get(CHARSET_PATTERN, conn.getContentType(), 1); }
[ "public", "static", "String", "getCharset", "(", "HttpURLConnection", "conn", ")", "{", "if", "(", "conn", "==", "null", ")", "{", "return", "null", ";", "}", "return", "ReUtil", ".", "get", "(", "CHARSET_PATTERN", ",", "conn", ".", "getContentType", "(", ...
从Http连接的头信息中获得字符集<br> 从ContentType中获取 @param conn HTTP连接对象 @return 字符集
[ "从Http连接的头信息中获得字符集<br", ">", "从ContentType中获取" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java#L662-L667
train
Returns the charset of the given connection.
[ 30522, 2270, 10763, 5164, 2131, 7507, 22573, 2102, 1006, 8299, 3126, 22499, 10087, 7542, 9530, 2078, 1007, 1063, 2065, 1006, 9530, 2078, 1027, 1027, 19701, 1007, 1063, 2709, 19701, 1025, 1065, 2709, 2128, 21823, 2140, 1012, 2131, 1006, 2586...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.moveToElement
public Actions moveToElement(WebElement target, int xOffset, int yOffset) { if (isBuildingActions()) { action.addAction(new MoveToOffsetAction(jsonMouse, (Locatable) target, xOffset, yOffset)); } // Of course, this is the offset from the centre of the element. We have no idea what the width // an...
java
public Actions moveToElement(WebElement target, int xOffset, int yOffset) { if (isBuildingActions()) { action.addAction(new MoveToOffsetAction(jsonMouse, (Locatable) target, xOffset, yOffset)); } // Of course, this is the offset from the centre of the element. We have no idea what the width // an...
[ "public", "Actions", "moveToElement", "(", "WebElement", "target", ",", "int", "xOffset", ",", "int", "yOffset", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "MoveToOffsetAction", "(", "jsonMouse", ","...
Moves the mouse to an offset from the top-left corner of the element. The element is scrolled into view and its location is calculated using getBoundingClientRect. @param target element to move to. @param xOffset Offset from the top-left corner. A negative value means coordinates left from the element. @param yOffset O...
[ "Moves", "the", "mouse", "to", "an", "offset", "from", "the", "top", "-", "left", "corner", "of", "the", "element", ".", "The", "element", "is", "scrolled", "into", "view", "and", "its", "location", "is", "calculated", "using", "getBoundingClientRect", "." ]
7af172729f17b20269c8ca4ea6f788db48616535
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L376-L385
train
Move the mouse to the specified element.
[ 30522, 2270, 4506, 2693, 3406, 12260, 3672, 1006, 4773, 12260, 3672, 4539, 1010, 20014, 1060, 27475, 3388, 1010, 20014, 10930, 21807, 3388, 1007, 1063, 2065, 1006, 2003, 25820, 18908, 8496, 1006, 1007, 1007, 1063, 2895, 1012, 5587, 18908, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/Ordering.java
Ordering.createNewOrderingUpToIndex
public Ordering createNewOrderingUpToIndex(int exclusiveIndex) { if (exclusiveIndex == 0) { return null; } final Ordering newOrdering = new Ordering(); for (int i = 0; i < exclusiveIndex; i++) { newOrdering.appendOrdering(this.indexes.get(i), this.types.get(i), this.orders.get(i)); } return newOrderin...
java
public Ordering createNewOrderingUpToIndex(int exclusiveIndex) { if (exclusiveIndex == 0) { return null; } final Ordering newOrdering = new Ordering(); for (int i = 0; i < exclusiveIndex; i++) { newOrdering.appendOrdering(this.indexes.get(i), this.types.get(i), this.orders.get(i)); } return newOrderin...
[ "public", "Ordering", "createNewOrderingUpToIndex", "(", "int", "exclusiveIndex", ")", "{", "if", "(", "exclusiveIndex", "==", "0", ")", "{", "return", "null", ";", "}", "final", "Ordering", "newOrdering", "=", "new", "Ordering", "(", ")", ";", "for", "(", ...
Creates a new ordering the represents an ordering on a prefix of the fields. If the exclusive index up to which to create the ordering is <code>0</code>, then there is no resulting ordering and this method return <code>null</code>. @param exclusiveIndex The index (exclusive) up to which to create the ordering. @return...
[ "Creates", "a", "new", "ordering", "the", "represents", "an", "ordering", "on", "a", "prefix", "of", "the", "fields", ".", "If", "the", "exclusive", "index", "up", "to", "which", "to", "create", "the", "ordering", "is", "<code", ">", "0<", "/", "code", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/Ordering.java#L196-L205
train
Creates a new ordering up to the given index.
[ 30522, 2270, 13063, 3443, 2638, 18351, 7999, 29441, 28765, 3207, 2595, 1006, 20014, 7262, 22254, 10288, 1007, 1063, 2065, 1006, 7262, 22254, 10288, 1027, 1027, 1014, 1007, 1063, 2709, 19701, 1025, 1065, 2345, 13063, 2047, 8551, 7999, 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/checkpoint/StateAssignmentOperation.java
StateAssignmentOperation.getKeyedStateHandles
public static List<KeyedStateHandle> getKeyedStateHandles( Collection<? extends KeyedStateHandle> keyedStateHandles, KeyGroupRange subtaskKeyGroupRange) { List<KeyedStateHandle> subtaskKeyedStateHandles = new ArrayList<>(keyedStateHandles.size()); for (KeyedStateHandle keyedStateHandle : keyedStateHandles) { ...
java
public static List<KeyedStateHandle> getKeyedStateHandles( Collection<? extends KeyedStateHandle> keyedStateHandles, KeyGroupRange subtaskKeyGroupRange) { List<KeyedStateHandle> subtaskKeyedStateHandles = new ArrayList<>(keyedStateHandles.size()); for (KeyedStateHandle keyedStateHandle : keyedStateHandles) { ...
[ "public", "static", "List", "<", "KeyedStateHandle", ">", "getKeyedStateHandles", "(", "Collection", "<", "?", "extends", "KeyedStateHandle", ">", "keyedStateHandles", ",", "KeyGroupRange", "subtaskKeyGroupRange", ")", "{", "List", "<", "KeyedStateHandle", ">", "subta...
Determine the subset of {@link KeyGroupsStateHandle KeyGroupsStateHandles} with correct key group index for the given subtask {@link KeyGroupRange}. <p>This is publicly visible to be used in tests.
[ "Determine", "the", "subset", "of", "{", "@link", "KeyGroupsStateHandle", "KeyGroupsStateHandles", "}", "with", "correct", "key", "group", "index", "for", "the", "given", "subtask", "{", "@link", "KeyGroupRange", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java#L629-L644
train
Get the subset of the given keyed state handles.
[ 30522, 2270, 10763, 2862, 1026, 3145, 2098, 9153, 2618, 11774, 2571, 1028, 2131, 14839, 2098, 9153, 2618, 11774, 4244, 1006, 3074, 1026, 1029, 8908, 3145, 2098, 9153, 2618, 11774, 2571, 1028, 3145, 2098, 9153, 2618, 11774, 4244, 1010, 3145,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-optimize/src/main/java/org/apache/shardingsphere/core/optimize/condition/ShardingConditions.java
ShardingConditions.isAlwaysFalse
public boolean isAlwaysFalse() { if (shardingConditions.isEmpty()) { return false; } for (ShardingCondition each : shardingConditions) { if (!(each instanceof AlwaysFalseShardingCondition)) { return false; } } return true; }
java
public boolean isAlwaysFalse() { if (shardingConditions.isEmpty()) { return false; } for (ShardingCondition each : shardingConditions) { if (!(each instanceof AlwaysFalseShardingCondition)) { return false; } } return true; }
[ "public", "boolean", "isAlwaysFalse", "(", ")", "{", "if", "(", "shardingConditions", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "ShardingCondition", "each", ":", "shardingConditions", ")", "{", "if", "(", "!", "(", "eac...
Judge sharding conditions is always false or not. @return sharding conditions is always false or not
[ "Judge", "sharding", "conditions", "is", "always", "false", "or", "not", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-optimize/src/main/java/org/apache/shardingsphere/core/optimize/condition/ShardingConditions.java#L43-L53
train
Is always false.
[ 30522, 2270, 22017, 20898, 18061, 2140, 14035, 7011, 4877, 2063, 1006, 1007, 1063, 2065, 1006, 21146, 17080, 3070, 8663, 20562, 2015, 1012, 2003, 6633, 13876, 2100, 1006, 1007, 1007, 1063, 2709, 6270, 1025, 1065, 2005, 1006, 21146, 17080, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java
HpackEncoder.encodeInteger
private static void encodeInteger(ByteBuf out, int mask, int n, int i) { encodeInteger(out, mask, n, (long) i); }
java
private static void encodeInteger(ByteBuf out, int mask, int n, int i) { encodeInteger(out, mask, n, (long) i); }
[ "private", "static", "void", "encodeInteger", "(", "ByteBuf", "out", ",", "int", "mask", ",", "int", "n", ",", "int", "i", ")", "{", "encodeInteger", "(", "out", ",", "mask", ",", "n", ",", "(", "long", ")", "i", ")", ";", "}" ]
Encode integer according to <a href="https://tools.ietf.org/html/rfc7541#section-5.1">Section 5.1</a>.
[ "Encode", "integer", "according", "to", "<a", "href", "=", "https", ":", "//", "tools", ".", "ietf", ".", "org", "/", "html", "/", "rfc7541#section", "-", "5", ".", "1", ">", "Section", "5", ".", "1<", "/", "a", ">", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java#L227-L229
train
Encode a single integer into the buffer.
[ 30522, 2797, 10763, 11675, 4372, 16044, 18447, 26320, 1006, 24880, 8569, 2546, 2041, 1010, 20014, 7308, 1010, 20014, 1050, 1010, 20014, 1045, 1007, 1063, 4372, 16044, 18447, 26320, 1006, 2041, 1010, 7308, 1010, 1050, 1010, 1006, 2146, 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/spark
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java
VectorizedColumnReader.readBooleanBatch
private void readBooleanBatch(int rowId, int num, WritableColumnVector column) throws IOException { if (column.dataType() != DataTypes.BooleanType) { throw constructConvertNotSupportedException(descriptor, column); } defColumn.readBooleans( num, column, rowId, maxDefLevel, (VectorizedVal...
java
private void readBooleanBatch(int rowId, int num, WritableColumnVector column) throws IOException { if (column.dataType() != DataTypes.BooleanType) { throw constructConvertNotSupportedException(descriptor, column); } defColumn.readBooleans( num, column, rowId, maxDefLevel, (VectorizedVal...
[ "private", "void", "readBooleanBatch", "(", "int", "rowId", ",", "int", "num", ",", "WritableColumnVector", "column", ")", "throws", "IOException", "{", "if", "(", "column", ".", "dataType", "(", ")", "!=", "DataTypes", ".", "BooleanType", ")", "{", "throw",...
For all the read*Batch functions, reads `num` values from this columnReader into column. It is guaranteed that num is smaller than the number of values left in the current page.
[ "For", "all", "the", "read", "*", "Batch", "functions", "reads", "num", "values", "from", "this", "columnReader", "into", "column", ".", "It", "is", "guaranteed", "that", "num", "is", "smaller", "than", "the", "number", "of", "values", "left", "in", "the",...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java#L397-L404
train
Read a batch of boolean values from the column vector.
[ 30522, 2797, 11675, 3191, 5092, 9890, 2319, 14479, 2818, 1006, 20014, 5216, 3593, 1010, 20014, 16371, 2213, 1010, 25697, 3085, 25778, 2819, 2078, 3726, 16761, 5930, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 5930, 1012, 2951, 13874, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/filesystem/Bucket.java
Bucket.getNew
static <IN, BucketID> Bucket<IN, BucketID> getNew( final RecoverableWriter fsWriter, final int subtaskIndex, final BucketID bucketId, final Path bucketPath, final long initialPartCounter, final PartFileWriter.PartFileFactory<IN, BucketID> partFileFactory, final RollingPolicy<IN, BucketID> rollingPo...
java
static <IN, BucketID> Bucket<IN, BucketID> getNew( final RecoverableWriter fsWriter, final int subtaskIndex, final BucketID bucketId, final Path bucketPath, final long initialPartCounter, final PartFileWriter.PartFileFactory<IN, BucketID> partFileFactory, final RollingPolicy<IN, BucketID> rollingPo...
[ "static", "<", "IN", ",", "BucketID", ">", "Bucket", "<", "IN", ",", "BucketID", ">", "getNew", "(", "final", "RecoverableWriter", "fsWriter", ",", "final", "int", "subtaskIndex", ",", "final", "BucketID", "bucketId", ",", "final", "Path", "bucketPath", ",",...
Creates a new empty {@code Bucket}. @param fsWriter the filesystem-specific {@link RecoverableWriter}. @param subtaskIndex the index of the subtask creating the bucket. @param bucketId the identifier of the bucket, as returned by the {@link BucketAssigner}. @param bucketPath the path to where the part files for the buc...
[ "Creates", "a", "new", "empty", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/filesystem/Bucket.java#L367-L376
train
Create a new instance of a bucket.
[ 30522, 10763, 1026, 1999, 1010, 13610, 3593, 1028, 13610, 1026, 1999, 1010, 13610, 3593, 1028, 2131, 2638, 2860, 1006, 2345, 8980, 3085, 15994, 1042, 26760, 17625, 2099, 1010, 2345, 20014, 4942, 10230, 18824, 10288, 1010, 2345, 13610, 3593, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.getFixString
public final String getFixString(final int len, String charsetName) { if (position + len > origin + limit) throw new IllegalArgumentException("limit excceed: " + (position + len - origin)); final int from = position; ...
java
public final String getFixString(final int len, String charsetName) { if (position + len > origin + limit) throw new IllegalArgumentException("limit excceed: " + (position + len - origin)); final int from = position; ...
[ "public", "final", "String", "getFixString", "(", "final", "int", "len", ",", "String", "charsetName", ")", "{", "if", "(", "position", "+", "len", ">", "origin", "+", "limit", ")", "throw", "new", "IllegalArgumentException", "(", "\"limit excceed: \"", "+", ...
Return next fix length string from buffer.
[ "Return", "next", "fix", "length", "string", "from", "buffer", "." ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L1082-L1100
train
Gets the string of the specified length from the buffer.
[ 30522, 2270, 2345, 5164, 2131, 8873, 2595, 3367, 4892, 1006, 2345, 20014, 18798, 1010, 5164, 25869, 13462, 18442, 1007, 1063, 2065, 1006, 2597, 1009, 18798, 1028, 4761, 1009, 5787, 1007, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24422, 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-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java
FlinkKinesisConsumer.initializeState
@Override public void initializeState(FunctionInitializationContext context) throws Exception { TypeInformation<Tuple2<StreamShardMetadata, SequenceNumber>> shardsStateTypeInfo = new TupleTypeInfo<>( TypeInformation.of(StreamShardMetadata.class), TypeInformation.of(SequenceNumber.class)); sequenceNumsStateF...
java
@Override public void initializeState(FunctionInitializationContext context) throws Exception { TypeInformation<Tuple2<StreamShardMetadata, SequenceNumber>> shardsStateTypeInfo = new TupleTypeInfo<>( TypeInformation.of(StreamShardMetadata.class), TypeInformation.of(SequenceNumber.class)); sequenceNumsStateF...
[ "@", "Override", "public", "void", "initializeState", "(", "FunctionInitializationContext", "context", ")", "throws", "Exception", "{", "TypeInformation", "<", "Tuple2", "<", "StreamShardMetadata", ",", "SequenceNumber", ">", ">", "shardsStateTypeInfo", "=", "new", "T...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumer.java#L370-L398
train
This method is called by the FlinkKinesisConsumer to initialize the state of the FlinkKinesisConsumer.
[ 30522, 1030, 2058, 15637, 2270, 11675, 3988, 10057, 12259, 1006, 3853, 5498, 20925, 3989, 8663, 18209, 6123, 1007, 11618, 6453, 1063, 2828, 2378, 14192, 3370, 1026, 10722, 10814, 2475, 1026, 9199, 11783, 11368, 8447, 2696, 1010, 5537, 19172, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/RowTypeInfo.java
RowTypeInfo.schemaEquals
public boolean schemaEquals(Object obj) { return equals(obj) && Arrays.equals(fieldNames, ((RowTypeInfo) obj).fieldNames); }
java
public boolean schemaEquals(Object obj) { return equals(obj) && Arrays.equals(fieldNames, ((RowTypeInfo) obj).fieldNames); }
[ "public", "boolean", "schemaEquals", "(", "Object", "obj", ")", "{", "return", "equals", "(", "obj", ")", "&&", "Arrays", ".", "equals", "(", "fieldNames", ",", "(", "(", "RowTypeInfo", ")", "obj", ")", ".", "fieldNames", ")", ";", "}" ]
Tests whether an other object describes the same, schema-equivalent row information.
[ "Tests", "whether", "an", "other", "object", "describes", "the", "same", "schema", "-", "equivalent", "row", "information", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/RowTypeInfo.java#L295-L297
train
Returns true if this object is equal to the given object.
[ 30522, 2270, 22017, 20898, 8040, 28433, 2063, 26426, 2015, 1006, 4874, 27885, 3501, 1007, 1063, 2709, 19635, 1006, 27885, 3501, 1007, 1004, 1004, 27448, 1012, 19635, 1006, 2492, 18442, 2015, 1010, 1006, 1006, 5216, 13874, 2378, 14876, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java
UnsortedGrouping.aggregate
private AggregateOperator<T> aggregate(Aggregations agg, int field, String callLocationName) { return new AggregateOperator<T>(this, agg, field, callLocationName); }
java
private AggregateOperator<T> aggregate(Aggregations agg, int field, String callLocationName) { return new AggregateOperator<T>(this, agg, field, callLocationName); }
[ "private", "AggregateOperator", "<", "T", ">", "aggregate", "(", "Aggregations", "agg", ",", "int", "field", ",", "String", "callLocationName", ")", "{", "return", "new", "AggregateOperator", "<", "T", ">", "(", "this", ",", "agg", ",", "field", ",", "call...
private helper that allows to set a different call location name
[ "private", "helper", "that", "allows", "to", "set", "a", "different", "call", "location", "name" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java#L92-L94
train
Create an aggregate operator.
[ 30522, 2797, 9572, 25918, 8844, 1026, 1056, 1028, 9572, 1006, 28041, 2015, 12943, 2290, 1010, 20014, 2492, 1010, 5164, 2655, 4135, 10719, 18442, 1007, 1063, 2709, 2047, 9572, 25918, 8844, 1026, 1056, 1028, 1006, 2023, 1010, 12943, 2290, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/state/StateDescriptor.java
StateDescriptor.writeObject
private void writeObject(final ObjectOutputStream out) throws IOException { // write all the non-transient fields out.defaultWriteObject(); // write the non-serializable default value field if (defaultValue == null) { // we don't have a default value out.writeBoolean(false); } else { // we have a de...
java
private void writeObject(final ObjectOutputStream out) throws IOException { // write all the non-transient fields out.defaultWriteObject(); // write the non-serializable default value field if (defaultValue == null) { // we don't have a default value out.writeBoolean(false); } else { // we have a de...
[ "private", "void", "writeObject", "(", "final", "ObjectOutputStream", "out", ")", "throws", "IOException", "{", "// write all the non-transient fields", "out", ".", "defaultWriteObject", "(", ")", ";", "// write the non-serializable default value field", "if", "(", "default...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/state/StateDescriptor.java#L334-L364
train
Writes the object.
[ 30522, 2797, 11675, 4339, 16429, 20614, 1006, 2345, 4874, 5833, 18780, 21422, 2041, 1007, 11618, 22834, 10288, 24422, 1063, 1013, 1013, 4339, 2035, 1996, 2512, 1011, 25354, 4249, 2041, 1012, 12398, 26373, 16429, 20614, 1006, 1007, 1025, 1013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.wrap
public static Double[] wrap(double... values) { if (null == values) { return null; } final int length = values.length; if (0 == length) { return new Double[0]; } final Double[] array = new Double[length]; for (int i = 0; i < length; i++) { array[i] = Double.valueOf(values[i]); } ...
java
public static Double[] wrap(double... values) { if (null == values) { return null; } final int length = values.length; if (0 == length) { return new Double[0]; } final Double[] array = new Double[length]; for (int i = 0; i < length; i++) { array[i] = Double.valueOf(values[i]); } ...
[ "public", "static", "Double", "[", "]", "wrap", "(", "double", "...", "values", ")", "{", "if", "(", "null", "==", "values", ")", "{", "return", "null", ";", "}", "final", "int", "length", "=", "values", ".", "length", ";", "if", "(", "0", "==", ...
将原始类型数组包装为包装类型 @param values 原始类型数组 @return 包装类型数组
[ "将原始类型数组包装为包装类型" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L1663-L1677
train
Wraps the specified double array with the same amount of values.
[ 30522, 2270, 10763, 3313, 1031, 1033, 10236, 1006, 3313, 1012, 1012, 1012, 5300, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 5300, 1007, 1063, 2709, 19701, 1025, 1065, 2345, 20014, 3091, 1027, 5300, 1012, 3091, 1025, 2065, 1006, 1014, 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/thread/ThreadUtil.java
ThreadUtil.sleep
public static boolean sleep(Number millis) { if (millis == null) { return true; } try { Thread.sleep(millis.longValue()); } catch (InterruptedException e) { return false; } return true; }
java
public static boolean sleep(Number millis) { if (millis == null) { return true; } try { Thread.sleep(millis.longValue()); } catch (InterruptedException e) { return false; } return true; }
[ "public", "static", "boolean", "sleep", "(", "Number", "millis", ")", "{", "if", "(", "millis", "==", "null", ")", "{", "return", "true", ";", "}", "try", "{", "Thread", ".", "sleep", "(", "millis", ".", "longValue", "(", ")", ")", ";", "}", "catch...
挂起当前线程 @param millis 挂起的毫秒数 @return 被中断返回false,否则true
[ "挂起当前线程" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L224-L235
train
Sleep for the specified number of milliseconds.
[ 30522, 2270, 10763, 22017, 20898, 3637, 1006, 2193, 4971, 2483, 1007, 1063, 2065, 1006, 4971, 2483, 1027, 1027, 19701, 1007, 1063, 2709, 2995, 1025, 1065, 3046, 1063, 11689, 1012, 3637, 1006, 4971, 2483, 1012, 2146, 10175, 5657, 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/lang/Singleton.java
Singleton.get
public static <T> T get(String className, Object... params) { final Class<T> clazz = ClassUtil.loadClass(className); return get(clazz, params); }
java
public static <T> T get(String className, Object... params) { final Class<T> clazz = ClassUtil.loadClass(className); return get(clazz, params); }
[ "public", "static", "<", "T", ">", "T", "get", "(", "String", "className", ",", "Object", "...", "params", ")", "{", "final", "Class", "<", "T", ">", "clazz", "=", "ClassUtil", ".", "loadClass", "(", "className", ")", ";", "return", "get", "(", "claz...
获得指定类的单例对象<br> 对象存在于池中返回,否则创建,每次调用此方法获得的对象为同一个对象<br> 注意:单例针对的是类和对象,因此get方法第一次调用时创建的对象始终唯一,也就是说就算参数变更,返回的依旧是第一次创建的对象 @param <T> 单例对象类型 @param className 类名 @param params 构造参数 @return 单例对象
[ "获得指定类的单例对象<br", ">", "对象存在于池中返回,否则创建,每次调用此方法获得的对象为同一个对象<br", ">", "注意:单例针对的是类和对象,因此get方法第一次调用时创建的对象始终唯一,也就是说就算参数变更,返回的依旧是第一次创建的对象" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Singleton.java#L60-L63
train
Gets an object from a class name.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 2131, 1006, 5164, 2465, 18442, 1010, 4874, 1012, 1012, 1012, 11498, 5244, 1007, 1063, 2345, 2465, 1026, 1056, 1028, 18856, 10936, 2480, 1027, 2465, 21823, 2140, 1012, 7170, 26266, 1006, 2465, 1844...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.copyToView
public static void copyToView( MemorySegment[] segments, int offset, int sizeInBytes, DataOutputView target) throws IOException { for (MemorySegment sourceSegment : segments) { int curSegRemain = sourceSegment.size() - offset; if (curSegRemain > 0) { int copySize = Math.min(curSegRemain, sizeInB...
java
public static void copyToView( MemorySegment[] segments, int offset, int sizeInBytes, DataOutputView target) throws IOException { for (MemorySegment sourceSegment : segments) { int curSegRemain = sourceSegment.size() - offset; if (curSegRemain > 0) { int copySize = Math.min(curSegRemain, sizeInB...
[ "public", "static", "void", "copyToView", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ",", "int", "sizeInBytes", ",", "DataOutputView", "target", ")", "throws", "IOException", "{", "for", "(", "MemorySegment", "sourceSegment", ":", "segment...
Copy bytes of segments to output view. Note: It just copies the data in, not include the length. @param segments source segments @param offset offset for segments @param sizeInBytes size in bytes @param target target output view
[ "Copy", "bytes", "of", "segments", "to", "output", "view", ".", "Note", ":", "It", "just", "copies", "the", "data", "in", "not", "include", "the", "length", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L209-L238
train
Copy the contents of the given array of MemorySegments to the given output view.
[ 30522, 2270, 10763, 11675, 6100, 26525, 2666, 2860, 1006, 3638, 3366, 21693, 4765, 1031, 1033, 9214, 1010, 20014, 16396, 1010, 20014, 2946, 2378, 3762, 4570, 1010, 2951, 5833, 18780, 8584, 4539, 1007, 11618, 22834, 10288, 24422, 1063, 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...
apache/flink
flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonRowSchemaConverter.java
JsonRowSchemaConverter.convert
@SuppressWarnings("unchecked") public static <T> TypeInformation<T> convert(String jsonSchema) { Preconditions.checkNotNull(jsonSchema, "JSON schema"); final ObjectMapper mapper = new ObjectMapper(); mapper.getFactory() .enable(JsonParser.Feature.ALLOW_COMMENTS) .enable(JsonParser.Feature.ALLOW_UNQUOTED_FI...
java
@SuppressWarnings("unchecked") public static <T> TypeInformation<T> convert(String jsonSchema) { Preconditions.checkNotNull(jsonSchema, "JSON schema"); final ObjectMapper mapper = new ObjectMapper(); mapper.getFactory() .enable(JsonParser.Feature.ALLOW_COMMENTS) .enable(JsonParser.Feature.ALLOW_UNQUOTED_FI...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "TypeInformation", "<", "T", ">", "convert", "(", "String", "jsonSchema", ")", "{", "Preconditions", ".", "checkNotNull", "(", "jsonSchema", ",", "\"JSON schema\"", ")", ";"...
Converts a JSON schema into Flink's type information. Throws an exception if the schema cannot converted because of loss of precision or too flexible schema. <p>The converter can resolve simple schema references to solve those cases where entities are defined at the beginning and then used throughout a document.
[ "Converts", "a", "JSON", "schema", "into", "Flink", "s", "type", "information", ".", "Throws", "an", "exception", "if", "the", "schema", "cannot", "converted", "because", "of", "loss", "of", "precision", "or", "too", "flexible", "schema", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonRowSchemaConverter.java#L97-L113
train
Converts a JSON schema to a type information.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1056, 1028, 2828, 2378, 14192, 3370, 1026, 1056, 1028, 10463, 1006, 5164, 1046, 23345, 5403, 2863, 1007, 1063, 3653, 8663, 20562, 2015, 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...
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.registerFrom
private SqlNode registerFrom( SqlValidatorScope parentScope, SqlValidatorScope usingScope, boolean register, final SqlNode node, SqlNode enclosingNode, String alias, SqlNodeList extendList, boolean forceNullable, final boolean lateral) { final SqlKind kind = node.getKind(); SqlNode expr; SqlNod...
java
private SqlNode registerFrom( SqlValidatorScope parentScope, SqlValidatorScope usingScope, boolean register, final SqlNode node, SqlNode enclosingNode, String alias, SqlNodeList extendList, boolean forceNullable, final boolean lateral) { final SqlKind kind = node.getKind(); SqlNode expr; SqlNod...
[ "private", "SqlNode", "registerFrom", "(", "SqlValidatorScope", "parentScope", ",", "SqlValidatorScope", "usingScope", ",", "boolean", "register", ",", "final", "SqlNode", "node", ",", "SqlNode", "enclosingNode", ",", "String", "alias", ",", "SqlNodeList", "extendList...
Registers scopes and namespaces implied a relational expression in the FROM clause. <p>{@code parentScope} and {@code usingScope} are often the same. They differ when the namespace are not visible within the parent. (Example needed.) <p>Likewise, {@code enclosingNode} and {@code node} are often the same. {@code enclo...
[ "Registers", "scopes", "and", "namespaces", "implied", "a", "relational", "expression", "in", "the", "FROM", "clause", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L1981-L2283
train
Register from statement.
[ 30522, 2797, 29296, 3630, 3207, 4236, 19699, 5358, 1006, 29296, 10175, 8524, 6591, 16186, 3008, 16186, 1010, 29296, 10175, 8524, 6591, 16186, 2478, 26127, 1010, 22017, 20898, 4236, 1010, 2345, 29296, 3630, 3207, 13045, 1010, 29296, 3630, 3207...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/ExcelFileUtil.java
ExcelFileUtil.isXls
public static boolean isXls(InputStream in) { final PushbackInputStream pin = IoUtil.toPushbackStream(in, 8); try { return FileMagic.valueOf(pin) == FileMagic.OLE2; } catch (IOException e) { throw new IORuntimeException(e); } }
java
public static boolean isXls(InputStream in) { final PushbackInputStream pin = IoUtil.toPushbackStream(in, 8); try { return FileMagic.valueOf(pin) == FileMagic.OLE2; } catch (IOException e) { throw new IORuntimeException(e); } }
[ "public", "static", "boolean", "isXls", "(", "InputStream", "in", ")", "{", "final", "PushbackInputStream", "pin", "=", "IoUtil", ".", "toPushbackStream", "(", "in", ",", "8", ")", ";", "try", "{", "return", "FileMagic", ".", "valueOf", "(", "pin", ")", ...
是否为XLS格式的Excel文件(HSSF)<br> XLS文件主要用于Excel 97~2003创建 @param in excel输入流 @return 是否为XLS格式的Excel文件(HSSF)
[ "是否为XLS格式的Excel文件(HSSF)<br", ">", "XLS文件主要用于Excel", "97~2003创建" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelFileUtil.java#L28-L35
train
Checks if the given input stream is a XLS file.
[ 30522, 2270, 10763, 22017, 20898, 2003, 2595, 4877, 1006, 20407, 25379, 1999, 1007, 1063, 2345, 5245, 5963, 2378, 18780, 21422, 9231, 1027, 22834, 21823, 2140, 1012, 2327, 20668, 12221, 25379, 1006, 1999, 1010, 1022, 1007, 1025, 3046, 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-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonDualInputSender.java
PythonDualInputSender.sendBuffer1
public int sendBuffer1(SingleElementPushBackIterator<IN1> input) throws IOException { if (serializer1 == null) { IN1 value = input.next(); serializer1 = getSerializer(value); input.pushBack(value); } return sendBuffer(input, serializer1); }
java
public int sendBuffer1(SingleElementPushBackIterator<IN1> input) throws IOException { if (serializer1 == null) { IN1 value = input.next(); serializer1 = getSerializer(value); input.pushBack(value); } return sendBuffer(input, serializer1); }
[ "public", "int", "sendBuffer1", "(", "SingleElementPushBackIterator", "<", "IN1", ">", "input", ")", "throws", "IOException", "{", "if", "(", "serializer1", "==", "null", ")", "{", "IN1", "value", "=", "input", ".", "next", "(", ")", ";", "serializer1", "=...
Extracts records from an iterator and writes them to the memory-mapped file. This method assumes that all values in the iterator are of the same type. This method does NOT take care of synchronization. The caller must guarantee that the file may be written to before calling this method. @param input iterator containin...
[ "Extracts", "records", "from", "an", "iterator", "and", "writes", "them", "to", "the", "memory", "-", "mapped", "file", ".", "This", "method", "assumes", "that", "all", "values", "in", "the", "iterator", "are", "of", "the", "same", "type", ".", "This", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-python/src/main/java/org/apache/flink/python/api/streaming/data/PythonDualInputSender.java#L51-L58
train
Sends a single element iterator to the server.
[ 30522, 2270, 20014, 4604, 8569, 12494, 2487, 1006, 2309, 12260, 3672, 12207, 2232, 5963, 21646, 8844, 1026, 1999, 2487, 1028, 7953, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 7642, 17629, 2487, 1027, 1027, 19701, 1007, 1063, 1999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/map/MapUtil.java
MapUtil.getInt
public static Integer getInt(Map<?, ?> map, Object key) { return get(map, key, Integer.class); }
java
public static Integer getInt(Map<?, ?> map, Object key) { return get(map, key, Integer.class); }
[ "public", "static", "Integer", "getInt", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "Object", "key", ")", "{", "return", "get", "(", "map", ",", "key", ",", "Integer", ".", "class", ")", ";", "}" ]
获取Map指定key的值,并转换为Integer @param map Map @param key 键 @return 值 @since 4.0.6
[ "获取Map指定key的值,并转换为Integer" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L768-L770
train
Gets the Integer value from the map.
[ 30522, 2270, 10763, 16109, 2131, 18447, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 4949, 1010, 4874, 3145, 1007, 1063, 2709, 2131, 1006, 4949, 1010, 3145, 1010, 16109, 1012, 2465, 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...
looly/hutool
hutool-log/src/main/java/cn/hutool/log/GlobalLogFactory.java
GlobalLogFactory.set
public static LogFactory set(Class<? extends LogFactory> logFactoryClass) { try { return set(logFactoryClass.newInstance()); } catch (Exception e) { throw new IllegalArgumentException("Can not instance LogFactory class!", e); } }
java
public static LogFactory set(Class<? extends LogFactory> logFactoryClass) { try { return set(logFactoryClass.newInstance()); } catch (Exception e) { throw new IllegalArgumentException("Can not instance LogFactory class!", e); } }
[ "public", "static", "LogFactory", "set", "(", "Class", "<", "?", "extends", "LogFactory", ">", "logFactoryClass", ")", "{", "try", "{", "return", "set", "(", "logFactoryClass", ".", "newInstance", "(", ")", ")", ";", "}", "catch", "(", "Exception", "e", ...
自定义日志实现 @see Slf4jLogFactory @see Log4jLogFactory @see Log4j2LogFactory @see ApacheCommonsLogFactory @see JdkLogFactory @see ConsoleLogFactory @param logFactoryClass 日志工厂类 @return 自定义的日志工厂类
[ "自定义日志实现" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-log/src/main/java/cn/hutool/log/GlobalLogFactory.java#L50-L56
train
Set the LogFactory instance with the given class.
[ 30522, 2270, 10763, 8833, 21450, 2275, 1006, 2465, 1026, 1029, 8908, 8833, 21450, 1028, 8833, 21450, 26266, 1007, 1063, 3046, 1063, 2709, 2275, 1006, 8833, 21450, 26266, 1012, 2047, 7076, 26897, 1006, 1007, 1007, 1025, 1065, 4608, 1006, 645...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
PackagedProgram.extractContainedLibraries
public static List<File> extractContainedLibraries(URL jarFile) throws ProgramInvocationException { Random rnd = new Random(); JarFile jar = null; try { jar = new JarFile(new File(jarFile.toURI())); final List<JarEntry> containedJarFileEntries = new ArrayList<JarEntry>(); Enumeration<JarEntry> entries...
java
public static List<File> extractContainedLibraries(URL jarFile) throws ProgramInvocationException { Random rnd = new Random(); JarFile jar = null; try { jar = new JarFile(new File(jarFile.toURI())); final List<JarEntry> containedJarFileEntries = new ArrayList<JarEntry>(); Enumeration<JarEntry> entries...
[ "public", "static", "List", "<", "File", ">", "extractContainedLibraries", "(", "URL", "jarFile", ")", "throws", "ProgramInvocationException", "{", "Random", "rnd", "=", "new", "Random", "(", ")", ";", "JarFile", "jar", "=", "null", ";", "try", "{", "jar", ...
Takes all JAR files that are contained in this program's JAR file and extracts them to the system's temp directory. @return The file names of the extracted temporary files. @throws ProgramInvocationException Thrown, if the extraction process failed.
[ "Takes", "all", "JAR", "files", "that", "are", "contained", "in", "this", "program", "s", "JAR", "file", "and", "extracts", "them", "to", "the", "system", "s", "temp", "directory", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java#L666-L764
train
Extract the nested libraries from the given jar file.
[ 30522, 2270, 10763, 2862, 1026, 5371, 1028, 14817, 8663, 28055, 29521, 19848, 3111, 1006, 24471, 2140, 15723, 8873, 2571, 1007, 11618, 2565, 2378, 19152, 10288, 24422, 1063, 6721, 29300, 2094, 1027, 2047, 6721, 1006, 1007, 1025, 15723, 8873, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/bigram/BigramDependencyModel.java
BigramDependencyModel.get
public static String get(String fromWord, String fromPos, String toWord, String toPos) { String dependency = get(fromWord + "@" + toWord); if (dependency == null) dependency = get(fromWord + "@" + WordNatureWeightModelMaker.wrapTag(toPos)); if (dependency == null) dependency = get(WordNature...
java
public static String get(String fromWord, String fromPos, String toWord, String toPos) { String dependency = get(fromWord + "@" + toWord); if (dependency == null) dependency = get(fromWord + "@" + WordNatureWeightModelMaker.wrapTag(toPos)); if (dependency == null) dependency = get(WordNature...
[ "public", "static", "String", "get", "(", "String", "fromWord", ",", "String", "fromPos", ",", "String", "toWord", ",", "String", "toPos", ")", "{", "String", "dependency", "=", "get", "(", "fromWord", "+", "\"@\"", "+", "toWord", ")", ";", "if", "(", ...
获取一个词和另一个词最可能的依存关系 @param fromWord @param fromPos @param toWord @param toPos @return
[ "获取一个词和另一个词最可能的依存关系" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/bigram/BigramDependencyModel.java#L119-L128
train
Get the dependency from the two words.
[ 30522, 2270, 10763, 5164, 2131, 1006, 5164, 2013, 18351, 1010, 5164, 2013, 6873, 2015, 1010, 5164, 15805, 8551, 1010, 5164, 2327, 2891, 1007, 1063, 5164, 24394, 1027, 2131, 1006, 2013, 18351, 1009, 1000, 1030, 1000, 1009, 15805, 8551, 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/DaoTemplate.java
DaoTemplate.update
public int update(Entity record, Entity where) throws SQLException{ if (CollectionUtil.isEmpty(record)) { return 0; } return db.update(fixEntity(record), where); }
java
public int update(Entity record, Entity where) throws SQLException{ if (CollectionUtil.isEmpty(record)) { return 0; } return db.update(fixEntity(record), where); }
[ "public", "int", "update", "(", "Entity", "record", ",", "Entity", "where", ")", "throws", "SQLException", "{", "if", "(", "CollectionUtil", ".", "isEmpty", "(", "record", ")", ")", "{", "return", "0", ";", "}", "return", "db", ".", "update", "(", "fix...
按照条件更新 @param record 更新的内容 @param where 条件 @return 更新条目数 @throws SQLException SQL执行异常
[ "按照条件更新" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java#L168-L173
train
Updates an entity in the database.
[ 30522, 2270, 20014, 10651, 1006, 9178, 2501, 1010, 9178, 2073, 1007, 11618, 29296, 10288, 24422, 1063, 2065, 1006, 3074, 21823, 2140, 1012, 2003, 6633, 13876, 2100, 1006, 2501, 1007, 1007, 1063, 2709, 1014, 1025, 1065, 2709, 16962, 1012, 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...
netty/netty
resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java
DnsNameResolver.query
public Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> query(DnsQuestion question) { return query(nextNameServerAddress(), question); }
java
public Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> query(DnsQuestion question) { return query(nextNameServerAddress(), question); }
[ "public", "Future", "<", "AddressedEnvelope", "<", "DnsResponse", ",", "InetSocketAddress", ">", ">", "query", "(", "DnsQuestion", "question", ")", "{", "return", "query", "(", "nextNameServerAddress", "(", ")", ",", "question", ")", ";", "}" ]
Sends a DNS query with the specified question.
[ "Sends", "a", "DNS", "query", "with", "the", "specified", "question", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java#L1043-L1045
train
Query for a DNS question.
[ 30522, 2270, 2925, 1026, 8280, 2368, 15985, 17635, 1026, 1040, 3619, 6072, 26029, 3366, 1010, 1999, 8454, 7432, 12928, 14141, 8303, 1028, 1028, 23032, 1006, 1040, 3619, 15500, 3258, 3160, 1007, 1063, 2709, 23032, 1006, 2279, 18442, 8043, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java
MutableHashTable.ensureNumBuffersReturned
final void ensureNumBuffersReturned(final int minRequiredAvailable) { if (minRequiredAvailable > this.availableMemory.size() + this.writeBehindBuffersAvailable) { throw new IllegalArgumentException("More buffers requested available than totally available."); } try { while (this.availableMemory.size() < m...
java
final void ensureNumBuffersReturned(final int minRequiredAvailable) { if (minRequiredAvailable > this.availableMemory.size() + this.writeBehindBuffersAvailable) { throw new IllegalArgumentException("More buffers requested available than totally available."); } try { while (this.availableMemory.size() < m...
[ "final", "void", "ensureNumBuffersReturned", "(", "final", "int", "minRequiredAvailable", ")", "{", "if", "(", "minRequiredAvailable", ">", "this", ".", "availableMemory", ".", "size", "(", ")", "+", "this", ".", "writeBehindBuffersAvailable", ")", "{", "throw", ...
This method makes sure that at least a certain number of memory segments is in the list of free segments. Free memory can be in the list of free segments, or in the return-queue where segments used to write behind are put. The number of segments that are in that return-queue, but are actually reclaimable is tracked. Th...
[ "This", "method", "makes", "sure", "that", "at", "least", "a", "certain", "number", "of", "memory", "segments", "is", "in", "the", "list", "of", "free", "segments", ".", "Free", "memory", "can", "be", "in", "the", "list", "of", "free", "segments", "or", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/MutableHashTable.java#L1331-L1345
train
Ensure that the number of buffers returned by the Hash Join has been requested.
[ 30522, 2345, 11675, 5676, 19172, 8569, 12494, 21338, 3388, 21737, 2094, 1006, 2345, 20014, 8117, 2890, 15549, 5596, 12462, 11733, 3468, 1007, 1063, 2065, 1006, 8117, 2890, 15549, 5596, 12462, 11733, 3468, 1028, 2023, 1012, 2800, 4168, 5302, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/jobmaster/slotpool/SchedulerImpl.java
SchedulerImpl.allocateSingleSlot
private CompletableFuture<LogicalSlot> allocateSingleSlot( SlotRequestId slotRequestId, SlotProfile slotProfile, boolean allowQueuedScheduling, Time allocationTimeout) { Optional<SlotAndLocality> slotAndLocality = tryAllocateFromAvailable(slotRequestId, slotProfile); if (slotAndLocality.isPresent()) { ...
java
private CompletableFuture<LogicalSlot> allocateSingleSlot( SlotRequestId slotRequestId, SlotProfile slotProfile, boolean allowQueuedScheduling, Time allocationTimeout) { Optional<SlotAndLocality> slotAndLocality = tryAllocateFromAvailable(slotRequestId, slotProfile); if (slotAndLocality.isPresent()) { ...
[ "private", "CompletableFuture", "<", "LogicalSlot", ">", "allocateSingleSlot", "(", "SlotRequestId", "slotRequestId", ",", "SlotProfile", "slotProfile", ",", "boolean", "allowQueuedScheduling", ",", "Time", "allocationTimeout", ")", "{", "Optional", "<", "SlotAndLocality"...
---------------------------
[ "---------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SchedulerImpl.java#L164-L196
train
Allocate a single logical slot.
[ 30522, 2797, 4012, 10814, 10880, 11263, 11244, 1026, 11177, 14540, 4140, 1028, 2035, 24755, 4570, 2075, 4244, 10994, 1006, 10453, 2890, 15500, 3593, 10453, 2890, 15500, 3593, 1010, 10453, 21572, 8873, 2571, 10453, 21572, 8873, 2571, 1010, 220...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.append
@SafeVarargs public static <T> Object append(Object array, T... newElements) { if(isEmpty(array)) { return newElements; } return insert(array, length(array), newElements); }
java
@SafeVarargs public static <T> Object append(Object array, T... newElements) { if(isEmpty(array)) { return newElements; } return insert(array, length(array), newElements); }
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "Object", "append", "(", "Object", "array", ",", "T", "...", "newElements", ")", "{", "if", "(", "isEmpty", "(", "array", ")", ")", "{", "return", "newElements", ";", "}", "return", "insert", "(", ...
将新元素添加到已有数组中<br> 添加新元素会生成一个新的数组,不影响原数组 @param <T> 数组元素类型 @param array 已有数组 @param newElements 新元素 @return 新数组
[ "将新元素添加到已有数组中<br", ">", "添加新元素会生成一个新的数组,不影响原数组" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L399-L405
train
Append the elements to the end of the array.
[ 30522, 1030, 3647, 24516, 10623, 2015, 2270, 10763, 1026, 1056, 1028, 4874, 10439, 10497, 1006, 4874, 9140, 1010, 1056, 1012, 1012, 1012, 2047, 12260, 8163, 1007, 1063, 2065, 1006, 2003, 6633, 13876, 2100, 1006, 9140, 1007, 1007, 1063, 2709...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/dartsclone/details/AutoBytePool.java
AutoBytePool.resize
void resize(int size, byte value) { if (size > _capacity) { resizeBuf(size); } while (_size < size) { _buf[_size++] = value; } }
java
void resize(int size, byte value) { if (size > _capacity) { resizeBuf(size); } while (_size < size) { _buf[_size++] = value; } }
[ "void", "resize", "(", "int", "size", ",", "byte", "value", ")", "{", "if", "(", "size", ">", "_capacity", ")", "{", "resizeBuf", "(", "size", ")", ";", "}", "while", "(", "_size", "<", "size", ")", "{", "_buf", "[", "_size", "++", "]", "=", "v...
重设大小,并且在末尾加一个值 @param size 大小 @param value 值
[ "重设大小,并且在末尾加一个值" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/dartsclone/details/AutoBytePool.java#L112-L122
train
Resize the buffer to a given size.
[ 30522, 11675, 24501, 4697, 1006, 20014, 2946, 1010, 24880, 3643, 1007, 1063, 2065, 1006, 2946, 1028, 1035, 3977, 1007, 1063, 24501, 4697, 8569, 2546, 1006, 2946, 1007, 1025, 1065, 2096, 1006, 1035, 2946, 1026, 2946, 1007, 1063, 1035, 20934,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/Graph.java
Graph.runScatterGatherIteration
public <M> Graph<K, VV, EV> runScatterGatherIteration( ScatterFunction<K, VV, M, EV> scatterFunction, org.apache.flink.graph.spargel.GatherFunction<K, VV, M> gatherFunction, int maximumNumberOfIterations, ScatterGatherConfiguration parameters) { ScatterGatherIteration<K, VV, M, EV> iteration = ScatterGather...
java
public <M> Graph<K, VV, EV> runScatterGatherIteration( ScatterFunction<K, VV, M, EV> scatterFunction, org.apache.flink.graph.spargel.GatherFunction<K, VV, M> gatherFunction, int maximumNumberOfIterations, ScatterGatherConfiguration parameters) { ScatterGatherIteration<K, VV, M, EV> iteration = ScatterGather...
[ "public", "<", "M", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "runScatterGatherIteration", "(", "ScatterFunction", "<", "K", ",", "VV", ",", "M", ",", "EV", ">", "scatterFunction", ",", "org", ".", "apache", ".", "flink", ".", "graph", ".", ...
Runs a ScatterGather iteration on the graph with configuration options. @param scatterFunction the scatter function @param gatherFunction the gather function @param maximumNumberOfIterations maximum number of iterations to perform @param parameters the iteration configuration parameters @return the updated Graph afte...
[ "Runs", "a", "ScatterGather", "iteration", "on", "the", "graph", "with", "configuration", "options", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1750-L1763
train
Runs a ScatterGather iteration on the graph.
[ 30522, 2270, 1026, 1049, 1028, 10629, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 3216, 11266, 3334, 20697, 5886, 21646, 3370, 1006, 8040, 20097, 11263, 27989, 1026, 1047, 1010, 1058, 2615, 1010, 1049, 1010, 23408, 1028, 8040, 20097, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java
ChannelOutboundBuffer.remove
public boolean remove() { Entry e = flushedEntry; if (e == null) { clearNioBuffers(); return false; } Object msg = e.msg; ChannelPromise promise = e.promise; int size = e.pendingSize; removeEntry(e); if (!e.cancelled) { ...
java
public boolean remove() { Entry e = flushedEntry; if (e == null) { clearNioBuffers(); return false; } Object msg = e.msg; ChannelPromise promise = e.promise; int size = e.pendingSize; removeEntry(e); if (!e.cancelled) { ...
[ "public", "boolean", "remove", "(", ")", "{", "Entry", "e", "=", "flushedEntry", ";", "if", "(", "e", "==", "null", ")", "{", "clearNioBuffers", "(", ")", ";", "return", "false", ";", "}", "Object", "msg", "=", "e", ".", "msg", ";", "ChannelPromise",...
Will remove the current message, mark its {@link ChannelPromise} as success and return {@code true}. If no flushed message exists at the time this method is called it will return {@code false} to signal that no more messages are ready to be handled.
[ "Will", "remove", "the", "current", "message", "mark", "its", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java#L254-L278
train
Removes the entry from the cache.
[ 30522, 2270, 22017, 20898, 6366, 1006, 1007, 1063, 4443, 1041, 1027, 12953, 4765, 2854, 1025, 2065, 1006, 1041, 1027, 1027, 19701, 1007, 1063, 3154, 27678, 8569, 12494, 2015, 1006, 1007, 1025, 2709, 6270, 1025, 1065, 4874, 5796, 2290, 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-streaming-java/src/main/java/org/apache/flink/streaming/experimental/SocketStreamIterator.java
SocketStreamIterator.notifyOfError
public void notifyOfError(Throwable error) { if (error != null && this.error == null) { this.error = error; // this should wake up any blocking calls try { connectedSocket.close(); } catch (Throwable ignored) {} try { socket.close(); } catch (Throwable ignored) {} } }
java
public void notifyOfError(Throwable error) { if (error != null && this.error == null) { this.error = error; // this should wake up any blocking calls try { connectedSocket.close(); } catch (Throwable ignored) {} try { socket.close(); } catch (Throwable ignored) {} } }
[ "public", "void", "notifyOfError", "(", "Throwable", "error", ")", "{", "if", "(", "error", "!=", "null", "&&", "this", ".", "error", "==", "null", ")", "{", "this", ".", "error", "=", "error", ";", "// this should wake up any blocking calls", "try", "{", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/experimental/SocketStreamIterator.java#L199-L211
train
Notifies the server that an error has occurred.
[ 30522, 2270, 11675, 2025, 8757, 11253, 2121, 29165, 1006, 5466, 3085, 7561, 1007, 1063, 2065, 1006, 7561, 999, 1027, 19701, 1004, 1004, 2023, 1012, 7561, 1027, 1027, 19701, 1007, 1063, 2023, 1012, 7561, 1027, 7561, 1025, 1013, 1013, 2023, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/types/Record.java
Record.makeSpace
public void makeSpace(int numFields) { final int oldNumFields = this.numFields; // increase the number of fields in the arrays if (this.offsets == null) { this.offsets = new int[numFields]; } else if (this.offsets.length < numFields) { int[] newOffs = new int[Math.max(numFields + 1, oldNumFields << 1)];...
java
public void makeSpace(int numFields) { final int oldNumFields = this.numFields; // increase the number of fields in the arrays if (this.offsets == null) { this.offsets = new int[numFields]; } else if (this.offsets.length < numFields) { int[] newOffs = new int[Math.max(numFields + 1, oldNumFields << 1)];...
[ "public", "void", "makeSpace", "(", "int", "numFields", ")", "{", "final", "int", "oldNumFields", "=", "this", ".", "numFields", ";", "// increase the number of fields in the arrays", "if", "(", "this", ".", "offsets", "==", "null", ")", "{", "this", ".", "off...
Reserves space for at least the given number of fields in the internal arrays. @param numFields The number of fields to reserve space for.
[ "Reserves", "space", "for", "at", "least", "the", "given", "number", "of", "fields", "in", "the", "internal", "arrays", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/Record.java#L168-L206
train
Make space for the given number of fields.
[ 30522, 2270, 11675, 3084, 15327, 1006, 20014, 16371, 2213, 15155, 1007, 1063, 2345, 20014, 2214, 19172, 15155, 1027, 2023, 1012, 16371, 2213, 15155, 1025, 1013, 1013, 3623, 1996, 2193, 1997, 4249, 1999, 1996, 27448, 2065, 1006, 2023, 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...
apache/spark
examples/src/main/java/org/apache/spark/examples/streaming/JavaCustomReceiver.java
JavaCustomReceiver.receive
private void receive() { try { Socket socket = null; BufferedReader reader = null; try { // connect to the server socket = new Socket(host, port); reader = new BufferedReader( new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8)); // Un...
java
private void receive() { try { Socket socket = null; BufferedReader reader = null; try { // connect to the server socket = new Socket(host, port); reader = new BufferedReader( new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8)); // Un...
[ "private", "void", "receive", "(", ")", "{", "try", "{", "Socket", "socket", "=", "null", ";", "BufferedReader", "reader", "=", "null", ";", "try", "{", "// connect to the server", "socket", "=", "new", "Socket", "(", "host", ",", "port", ")", ";", "read...
Create a socket connection and receive data until receiver is stopped
[ "Create", "a", "socket", "connection", "and", "receive", "data", "until", "receiver", "is", "stopped" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/examples/src/main/java/org/apache/spark/examples/streaming/JavaCustomReceiver.java#L106-L133
train
Receives data from the server.
[ 30522, 2797, 11675, 4374, 1006, 1007, 1063, 3046, 1063, 22278, 22278, 1027, 19701, 1025, 17698, 2098, 16416, 4063, 8068, 1027, 19701, 1025, 3046, 1063, 1013, 1013, 7532, 2000, 1996, 8241, 22278, 1027, 2047, 22278, 1006, 3677, 1010, 3417, 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/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dml/delete/DeleteParserFactory.java
DeleteParserFactory.newInstance
public static AbstractDeleteParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLDeleteParser(shardingRule, lexerEngine); case Oracle: ...
java
public static AbstractDeleteParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLDeleteParser(shardingRule, lexerEngine); case Oracle: ...
[ "public", "static", "AbstractDeleteParser", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "LexerEngine", "lexerEngine", ")", "{", "switch", "(", "dbType", ")", "{", "case", "H2", ":", "case", "...
Create delete parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine. @return delete parser instance
[ "Create", "delete", "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/delete/DeleteParserFactory.java#L46-L60
train
Create delete parser instance.
[ 30522, 2270, 10763, 10061, 9247, 12870, 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-poi/src/main/java/cn/hutool/poi/excel/sax/Excel03SaxReader.java
Excel03SaxReader.processCellValue
private void processCellValue(Record record) { Object value = null; switch (record.getSid()) { case BlankRecord.sid: // 空白记录 BlankRecord brec = (BlankRecord) record; rowCellList.add(brec.getColumn(), StrUtil.EMPTY); break; case BoolErrRecord.sid: // 布尔类型 BoolErrRecord berec = (BoolEr...
java
private void processCellValue(Record record) { Object value = null; switch (record.getSid()) { case BlankRecord.sid: // 空白记录 BlankRecord brec = (BlankRecord) record; rowCellList.add(brec.getColumn(), StrUtil.EMPTY); break; case BoolErrRecord.sid: // 布尔类型 BoolErrRecord berec = (BoolEr...
[ "private", "void", "processCellValue", "(", "Record", "record", ")", "{", "Object", "value", "=", "null", ";", "switch", "(", "record", ".", "getSid", "(", ")", ")", "{", "case", "BlankRecord", ".", "sid", ":", "// 空白记录\r", "BlankRecord", "brec", "=", "(...
处理单元格值 @param record 单元格
[ "处理单元格值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/sax/Excel03SaxReader.java#L200-L272
train
Process a cell value.
[ 30522, 2797, 11675, 2832, 29109, 22144, 7630, 2063, 1006, 2501, 2501, 1007, 1063, 4874, 3643, 1027, 19701, 1025, 6942, 1006, 2501, 1012, 4152, 3593, 1006, 1007, 1007, 1063, 2553, 8744, 2890, 27108, 2094, 1012, 15765, 1024, 1013, 1013, 1930,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
utility/src/main/java/com/networknt/utility/NioUtils.java
NioUtils.toByteBuffer
public static ByteBuffer toByteBuffer(File file) { ByteBuffer buffer = ByteBuffer.allocateDirect((int) file.length()); try { buffer.put(toByteArray(new FileInputStream(file))); } catch (IOException e) { logger.error("Failed to write file to byte array: " + e.getMessage())...
java
public static ByteBuffer toByteBuffer(File file) { ByteBuffer buffer = ByteBuffer.allocateDirect((int) file.length()); try { buffer.put(toByteArray(new FileInputStream(file))); } catch (IOException e) { logger.error("Failed to write file to byte array: " + e.getMessage())...
[ "public", "static", "ByteBuffer", "toByteBuffer", "(", "File", "file", ")", "{", "ByteBuffer", "buffer", "=", "ByteBuffer", ".", "allocateDirect", "(", "(", "int", ")", "file", ".", "length", "(", ")", ")", ";", "try", "{", "buffer", ".", "put", "(", "...
Convert a File into a ByteBuffer @param file File to be converted @return ByteBuffer containing the file
[ "Convert", "a", "File", "into", "a", "ByteBuffer" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/NioUtils.java#L263-L272
train
Convert a file to a byte array.
[ 30522, 2270, 10763, 24880, 8569, 12494, 11291, 2618, 8569, 12494, 1006, 5371, 5371, 1007, 1063, 24880, 8569, 12494, 17698, 1027, 24880, 8569, 12494, 1012, 11095, 7442, 6593, 1006, 1006, 20014, 1007, 5371, 1012, 3091, 1006, 1007, 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
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java
Http2CodecUtil.getEmbeddedHttp2Exception
public static Http2Exception getEmbeddedHttp2Exception(Throwable cause) { while (cause != null) { if (cause instanceof Http2Exception) { return (Http2Exception) cause; } cause = cause.getCause(); } return null; }
java
public static Http2Exception getEmbeddedHttp2Exception(Throwable cause) { while (cause != null) { if (cause instanceof Http2Exception) { return (Http2Exception) cause; } cause = cause.getCause(); } return null; }
[ "public", "static", "Http2Exception", "getEmbeddedHttp2Exception", "(", "Throwable", "cause", ")", "{", "while", "(", "cause", "!=", "null", ")", "{", "if", "(", "cause", "instanceof", "Http2Exception", ")", "{", "return", "(", "Http2Exception", ")", "cause", ...
Iteratively looks through the causality chain for the given exception and returns the first {@link Http2Exception} or {@code null} if none.
[ "Iteratively", "looks", "through", "the", "causality", "chain", "for", "the", "given", "exception", "and", "returns", "the", "first", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java#L173-L181
train
Gets the embedded Http2Exception from a Throwable.
[ 30522, 2270, 10763, 8299, 2475, 10288, 24422, 2131, 6633, 8270, 5732, 11039, 25856, 2475, 10288, 24422, 1006, 5466, 3085, 3426, 1007, 30524, 24422, 1007, 1063, 2709, 1006, 8299, 2475, 10288, 24422, 1007, 3426, 1025, 1065, 3426, 1027, 3426, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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.getBeUint24
public final int getBeUint24(final int pos) { final int position = origin + pos; if (pos + 2 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + 2))); byte[] buf = ...
java
public final int getBeUint24(final int pos) { final int position = origin + pos; if (pos + 2 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + 2))); byte[] buf = ...
[ "public", "final", "int", "getBeUint24", "(", "final", "int", "pos", ")", "{", "final", "int", "position", "=", "origin", "+", "pos", ";", "if", "(", "pos", "+", "2", ">=", "limit", "||", "pos", "<", "0", ")", "throw", "new", "IllegalArgumentException"...
Return 24-bit unsigned int from buffer. (big-endian) @see mysql-5.6.10/include/myisampack.h - mi_usint3korr
[ "Return", "24", "-", "bit", "unsigned", "int", "from", "buffer", ".", "(", "big", "-", "endian", ")" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L441-L449
train
Gets a 8 - bit unsigned integer from the buffer.
[ 30522, 2270, 2345, 20014, 2131, 4783, 20023, 2102, 18827, 1006, 2345, 20014, 13433, 2015, 1007, 1063, 2345, 20014, 2597, 1027, 4761, 1009, 13433, 2015, 1025, 2065, 1006, 13433, 2015, 1009, 1016, 1028, 1027, 5787, 1064, 1064, 13433, 2015, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java
ThreadUtil.newExecutor
public static ThreadPoolExecutor newExecutor(int corePoolSize, int maximumPoolSize) { return ExecutorBuilder.create().setCorePoolSize(corePoolSize).setMaxPoolSize(maximumPoolSize).build(); }
java
public static ThreadPoolExecutor newExecutor(int corePoolSize, int maximumPoolSize) { return ExecutorBuilder.create().setCorePoolSize(corePoolSize).setMaxPoolSize(maximumPoolSize).build(); }
[ "public", "static", "ThreadPoolExecutor", "newExecutor", "(", "int", "corePoolSize", ",", "int", "maximumPoolSize", ")", "{", "return", "ExecutorBuilder", ".", "create", "(", ")", ".", "setCorePoolSize", "(", "corePoolSize", ")", ".", "setMaxPoolSize", "(", "maxim...
获得一个新的线程池<br> 如果maximumPoolSize =》 corePoolSize,在没有新任务加入的情况下,多出的线程将最多保留60s @param corePoolSize 初始线程池大小 @param maximumPoolSize 最大线程池大小 @return {@link ThreadPoolExecutor}
[ "获得一个新的线程池<br", ">", "如果maximumPoolSize", "=", "》", "corePoolSize,在没有新任务加入的情况下,多出的线程将最多保留60s" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L59-L61
train
Creates a new ThreadPoolExecutor with the specified parameters.
[ 30522, 2270, 10763, 11689, 16869, 10288, 8586, 16161, 2099, 2047, 10288, 8586, 16161, 2099, 1006, 20014, 4563, 16869, 5332, 4371, 1010, 20014, 4555, 16869, 5332, 4371, 1007, 1063, 2709, 4654, 8586, 16161, 15185, 19231, 4063, 1012, 3443, 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...
networknt/light-4j
consul/src/main/java/com/networknt/consul/ConsulRegistry.java
ConsulRegistry.startListenerThreadIfNewService
private void startListenerThreadIfNewService(URL url) { String serviceName = url.getPath(); if (!lookupServices.containsKey(serviceName)) { Long value = lookupServices.putIfAbsent(serviceName, 0L); if (value == null) { ServiceLookupThread lookupThread = new Servic...
java
private void startListenerThreadIfNewService(URL url) { String serviceName = url.getPath(); if (!lookupServices.containsKey(serviceName)) { Long value = lookupServices.putIfAbsent(serviceName, 0L); if (value == null) { ServiceLookupThread lookupThread = new Servic...
[ "private", "void", "startListenerThreadIfNewService", "(", "URL", "url", ")", "{", "String", "serviceName", "=", "url", ".", "getPath", "(", ")", ";", "if", "(", "!", "lookupServices", ".", "containsKey", "(", "serviceName", ")", ")", "{", "Long", "value", ...
if new service registered, start a new lookup thread each serviceName start a lookup thread to discover service @param url
[ "if", "new", "service", "registered", "start", "a", "new", "lookup", "thread", "each", "serviceName", "start", "a", "lookup", "thread", "to", "discover", "service" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/consul/src/main/java/com/networknt/consul/ConsulRegistry.java#L118-L128
train
Start listener thread if new service.
[ 30522, 2797, 11675, 2707, 9863, 24454, 2705, 16416, 4305, 2546, 2638, 9333, 2121, 7903, 2063, 1006, 24471, 2140, 24471, 2140, 1007, 1063, 5164, 2326, 18442, 1027, 24471, 2140, 1012, 2131, 15069, 1006, 1007, 1025, 2065, 1006, 999, 2298, 2226...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonStreamExecutionEnvironment.java
PythonStreamExecutionEnvironment.read_text_file
public PythonDataStream read_text_file(String path) throws IOException { return new PythonDataStream<>(env.readTextFile(path).map(new AdapterMap<String>())); }
java
public PythonDataStream read_text_file(String path) throws IOException { return new PythonDataStream<>(env.readTextFile(path).map(new AdapterMap<String>())); }
[ "public", "PythonDataStream", "read_text_file", "(", "String", "path", ")", "throws", "IOException", "{", "return", "new", "PythonDataStream", "<>", "(", "env", ".", "readTextFile", "(", "path", ")", ".", "map", "(", "new", "AdapterMap", "<", "String", ">", ...
A thin wrapper layer over {@link StreamExecutionEnvironment#readTextFile(java.lang.String)}. @param path The path of the file, as a URI (e.g., "file:///some/local/file" or "hdfs://host:port/file/path"). @return The data stream that represents the data read from the given file as text lines @throws IOException
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "StreamExecutionEnvironment#readTextFile", "(", "java", ".", "lang", ".", "String", ")", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonStreamExecutionEnvironment.java#L188-L190
train
Read a text file.
[ 30522, 2270, 18750, 2850, 10230, 25379, 3191, 1035, 3793, 1035, 5371, 1006, 5164, 4130, 1007, 11618, 22834, 10288, 24422, 1063, 2709, 2047, 18750, 2850, 10230, 25379, 1026, 1028, 1006, 4372, 2615, 1012, 3191, 18209, 8873, 2571, 1006, 4130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java
MailUtil.send
public static void send(String to, String cc, String bcc, String subject, String content, boolean isHtml, File... files) { send(splitAddress(to), splitAddress(cc), splitAddress(bcc), subject, content, isHtml, files); }
java
public static void send(String to, String cc, String bcc, String subject, String content, boolean isHtml, File... files) { send(splitAddress(to), splitAddress(cc), splitAddress(bcc), subject, content, isHtml, files); }
[ "public", "static", "void", "send", "(", "String", "to", ",", "String", "cc", ",", "String", "bcc", ",", "String", "subject", ",", "String", "content", ",", "boolean", "isHtml", ",", "File", "...", "files", ")", "{", "send", "(", "splitAddress", "(", "...
使用配置文件中设置的账户发送邮件,发送单个或多个收件人<br> 多个收件人、抄送人、密送人可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param to 收件人,可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param cc 抄送人,可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param bcc 密送人,可以使用逗号“,”分隔,也可以通过分号“;”分隔 @param subject 标题 @param content 正文 @param isHtml 是否为HTML @param files 附件列表 @since 4.0.3
[ "使用配置文件中设置的账户发送邮件,发送单个或多个收件人<br", ">", "多个收件人、抄送人、密送人可以使用逗号“", "”分隔,也可以通过分号“", ";", "”分隔" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java#L73-L75
train
Sends a message to the specified recipients using the specified content.
[ 30522, 2270, 10763, 11675, 4604, 1006, 5164, 2000, 1010, 5164, 10507, 1010, 5164, 4647, 2278, 1010, 5164, 3395, 1010, 5164, 4180, 1010, 22017, 20898, 2003, 11039, 19968, 1010, 5371, 1012, 1012, 1012, 6764, 1007, 1063, 4604, 1006, 3975, 4215...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...