repo
stringclasses
11 values
path
stringlengths
41
234
func_name
stringlengths
5
78
original_string
stringlengths
71
14.1k
language
stringclasses
1 value
code
stringlengths
71
14.1k
code_tokens
listlengths
22
2.65k
docstring
stringlengths
2
5.35k
docstring_tokens
listlengths
1
369
sha
stringclasses
11 values
url
stringlengths
129
339
partition
stringclasses
1 value
summary
stringlengths
7
175
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
looly/hutool
hutool-core/src/main/java/cn/hutool/core/codec/Base64Decoder.java
Base64Decoder.decode
public static byte[] decode(String source, String charset) { return decode(StrUtil.bytes(source, charset)); }
java
public static byte[] decode(String source, String charset) { return decode(StrUtil.bytes(source, charset)); }
[ "public", "static", "byte", "[", "]", "decode", "(", "String", "source", ",", "String", "charset", ")", "{", "return", "decode", "(", "StrUtil", ".", "bytes", "(", "source", ",", "charset", ")", ")", ";", "}" ]
base64解码 @param source 被解码的base64字符串 @param charset 字符集 @return 被加密后的字符串
[ "base64解码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/codec/Base64Decoder.java#L90-L92
train
Decodes a base64 string into a byte array.
[ 30522, 2270, 10763, 24880, 1031, 1033, 21933, 3207, 1006, 5164, 3120, 1010, 5164, 25869, 13462, 1007, 1063, 2709, 21933, 3207, 1006, 2358, 22134, 4014, 1012, 27507, 1006, 3120, 1010, 25869, 13462, 1007, 1007, 1025, 1065, 102, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ConstantPool.java
ConstantPool.valueOf
public T valueOf(Class<?> firstNameComponent, String secondNameComponent) { if (firstNameComponent == null) { throw new NullPointerException("firstNameComponent"); } if (secondNameComponent == null) { throw new NullPointerException("secondNameComponent"); } ...
java
public T valueOf(Class<?> firstNameComponent, String secondNameComponent) { if (firstNameComponent == null) { throw new NullPointerException("firstNameComponent"); } if (secondNameComponent == null) { throw new NullPointerException("secondNameComponent"); } ...
[ "public", "T", "valueOf", "(", "Class", "<", "?", ">", "firstNameComponent", ",", "String", "secondNameComponent", ")", "{", "if", "(", "firstNameComponent", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"firstNameComponent\"", ")", ";",...
Shortcut of {@link #valueOf(String) valueOf(firstNameComponent.getName() + "#" + secondNameComponent)}.
[ "Shortcut", "of", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/ConstantPool.java#L39-L48
train
Gets the value of the class with the given name.
[ 30522, 2270, 1056, 3643, 11253, 1006, 2465, 1026, 1029, 1028, 2034, 18442, 9006, 29513, 3372, 1010, 5164, 2117, 18442, 9006, 29513, 3372, 1007, 1063, 2065, 1006, 2034, 18442, 9006, 29513, 3372, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 197...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
buffer/src/main/java/io/netty/buffer/PoolChunk.java
PoolChunk.updateParentsFree
private void updateParentsFree(int id) { int logChild = depth(id) + 1; while (id > 1) { int parentId = id >>> 1; byte val1 = value(id); byte val2 = value(id ^ 1); logChild -= 1; // in first iteration equals log, subsequently reduce 1 from logChild as we tr...
java
private void updateParentsFree(int id) { int logChild = depth(id) + 1; while (id > 1) { int parentId = id >>> 1; byte val1 = value(id); byte val2 = value(id ^ 1); logChild -= 1; // in first iteration equals log, subsequently reduce 1 from logChild as we tr...
[ "private", "void", "updateParentsFree", "(", "int", "id", ")", "{", "int", "logChild", "=", "depth", "(", "id", ")", "+", "1", ";", "while", "(", "id", ">", "1", ")", "{", "int", "parentId", "=", "id", ">>>", "1", ";", "byte", "val1", "=", "value...
Update method used by free This needs to handle the special case when both children are completely free in which case parent be directly allocated on request of size = child-size * 2 @param id id
[ "Update", "method", "used", "by", "free", "This", "needs", "to", "handle", "the", "special", "case", "when", "both", "children", "are", "completely", "free", "in", "which", "case", "parent", "be", "directly", "allocated", "on", "request", "of", "size", "=", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/PoolChunk.java#L267-L284
train
Update parents free.
[ 30522, 2797, 11675, 10651, 19362, 11187, 23301, 1006, 20014, 8909, 1007, 1063, 20014, 8833, 19339, 1027, 5995, 1006, 8909, 1007, 1009, 1015, 1025, 2096, 1006, 8909, 1028, 1015, 1007, 1063, 20014, 6687, 3593, 1027, 8909, 1028, 1028, 1028, 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...
networknt/light-4j
mask/src/main/java/com/networknt/mask/Mask.java
Mask.maskJson
public static String maskJson(String input, String key) { DocumentContext ctx = JsonPath.parse(input); return maskJson(ctx, key); }
java
public static String maskJson(String input, String key) { DocumentContext ctx = JsonPath.parse(input); return maskJson(ctx, key); }
[ "public", "static", "String", "maskJson", "(", "String", "input", ",", "String", "key", ")", "{", "DocumentContext", "ctx", "=", "JsonPath", ".", "parse", "(", "input", ")", ";", "return", "maskJson", "(", "ctx", ",", "key", ")", ";", "}" ]
Replace values in JSON using json path @param input String The source of the string that needs to be masked @param key String The key maps to a list of json path for masking @return String Masked result
[ "Replace", "values", "in", "JSON", "using", "json", "path" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/mask/src/main/java/com/networknt/mask/Mask.java#L142-L145
train
Mask a JSON string.
[ 30522, 2270, 10763, 5164, 7308, 22578, 2239, 1006, 5164, 7953, 1010, 5164, 3145, 1007, 1063, 6254, 8663, 18209, 14931, 2595, 1027, 1046, 3385, 15069, 1012, 11968, 3366, 1006, 7953, 1007, 1025, 2709, 7308, 22578, 2239, 1006, 14931, 2595, 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...
looly/hutool
hutool-log/src/main/java/cn/hutool/log/dialect/tinylog/TinyLog.java
TinyLog.toTinyLevel
private Level toTinyLevel(cn.hutool.log.level.Level level) { Level tinyLevel; switch (level) { case TRACE: tinyLevel = Level.TRACE; break; case DEBUG: tinyLevel = Level.DEBUG; break; case INFO: tinyLevel = Level.INFO; break; case WARN: tinyLevel = Level.WARNING; break; ...
java
private Level toTinyLevel(cn.hutool.log.level.Level level) { Level tinyLevel; switch (level) { case TRACE: tinyLevel = Level.TRACE; break; case DEBUG: tinyLevel = Level.DEBUG; break; case INFO: tinyLevel = Level.INFO; break; case WARN: tinyLevel = Level.WARNING; break; ...
[ "private", "Level", "toTinyLevel", "(", "cn", ".", "hutool", ".", "log", ".", "level", ".", "Level", "level", ")", "{", "Level", "tinyLevel", ";", "switch", "(", "level", ")", "{", "case", "TRACE", ":", "tinyLevel", "=", "Level", ".", "TRACE", ";", "...
将Hutool的Level等级转换为Tinylog的Level等级 @param level Hutool的Level等级 @return Tinylog的Level @since 4.0.3
[ "将Hutool的Level等级转换为Tinylog的Level等级" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-log/src/main/java/cn/hutool/log/dialect/tinylog/TinyLog.java#L140-L165
train
Converts the Hutool log level.
[ 30522, 2797, 2504, 2000, 7629, 12844, 15985, 1006, 27166, 1012, 12570, 13669, 1012, 8833, 1012, 2504, 1012, 2504, 2504, 1007, 1063, 2504, 4714, 20414, 2884, 1025, 6942, 1006, 2504, 1007, 1063, 2553, 7637, 1024, 4714, 20414, 2884, 1027, 2504...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ZipUtil.java
ZipUtil.zip
public static File zip(File zipFile, String path, String data) throws UtilException { return zip(zipFile, path, data, DEFAULT_CHARSET); }
java
public static File zip(File zipFile, String path, String data) throws UtilException { return zip(zipFile, path, data, DEFAULT_CHARSET); }
[ "public", "static", "File", "zip", "(", "File", "zipFile", ",", "String", "path", ",", "String", "data", ")", "throws", "UtilException", "{", "return", "zip", "(", "zipFile", ",", "path", ",", "data", ",", "DEFAULT_CHARSET", ")", ";", "}" ]
对流中的数据加入到压缩文件,使用默认UTF-8编码 @param zipFile 生成的Zip文件,包括文件名。注意:zipPath不能是srcPath路径下的子文件夹 @param path 流数据在压缩文件中的路径或文件名 @param data 要压缩的数据 @return 压缩文件 @throws UtilException IO异常 @since 3.0.6
[ "对流中的数据加入到压缩文件,使用默认UTF", "-", "8编码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L191-L193
train
Creates a zip file with the specified path and data.
[ 30522, 2270, 10763, 5371, 14101, 1006, 5371, 14101, 8873, 2571, 1010, 5164, 4130, 1010, 5164, 2951, 1007, 11618, 21183, 9463, 2595, 24422, 1063, 2709, 14101, 1006, 14101, 8873, 2571, 1010, 4130, 1010, 2951, 1010, 12398, 1035, 25869, 13462, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
http-url/src/main/java/com/networknt/url/URLNormalizer.java
URLNormalizer.removeDotSegments
public URLNormalizer removeDotSegments() { String path = toURL().getPath().trim(); // (Bulleted comments are from RFC3986, section-5.2.4) // 1. The input buffer is initialized with the now-appended path // components and the output buffer is initialized to the empty // ...
java
public URLNormalizer removeDotSegments() { String path = toURL().getPath().trim(); // (Bulleted comments are from RFC3986, section-5.2.4) // 1. The input buffer is initialized with the now-appended path // components and the output buffer is initialized to the empty // ...
[ "public", "URLNormalizer", "removeDotSegments", "(", ")", "{", "String", "path", "=", "toURL", "(", ")", ".", "getPath", "(", ")", ".", "trim", "(", ")", ";", "// (Bulleted comments are from RFC3986, section-5.2.4)", "// 1. The input buffer is initialized with the now-ap...
<p>Removes the unnecessary "." and ".." segments from the URL path. </p> <p><b>As of 2.3.0</b>, the algorithm used to remove the dot segments is the one prescribed by <a href="http://tools.ietf.org/html/rfc3986#section-5.2.4">RFC3986</a>. </p> <code>http://www.example.com/../a/b/../c/./d.html &rarr; http://www.example....
[ "<p", ">", "Removes", "the", "unnecessary", ".", "and", "..", "segments", "from", "the", "URL", "path", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "As", "of", "2", ".", "3", ".", "0<", "/", "b", ">", "the", "algorithm", "used", "to", "remov...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/http-url/src/main/java/com/networknt/url/URLNormalizer.java#L422-L494
train
Remove dot segments from the URL.
[ 30522, 2270, 24471, 19666, 2953, 9067, 17629, 3718, 12868, 13910, 8163, 1006, 1007, 1063, 5164, 4130, 1027, 2778, 2140, 1006, 1007, 1012, 2131, 15069, 1006, 1007, 1012, 12241, 1006, 1007, 1025, 1013, 1013, 1006, 7960, 2098, 7928, 2024, 2013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/Convert.java
Convert.toStr
public static String toStr(Object value, String defaultValue) { return convert(String.class, value, defaultValue); }
java
public static String toStr(Object value, String defaultValue) { return convert(String.class, value, defaultValue); }
[ "public", "static", "String", "toStr", "(", "Object", "value", ",", "String", "defaultValue", ")", "{", "return", "convert", "(", "String", ".", "class", ",", "value", ",", "defaultValue", ")", ";", "}" ]
转换为字符串<br> 如果给定的值为null,或者转换失败,返回默认值<br> 转换失败不会报错 @param value 被转换的值 @param defaultValue 转换错误时的默认值 @return 结果
[ "转换为字符串<br", ">", "如果给定的值为null,或者转换失败,返回默认值<br", ">", "转换失败不会报错" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/Convert.java#L41-L43
train
Converts value to String.
[ 30522, 2270, 10763, 5164, 2000, 3367, 2099, 1006, 4874, 3643, 1010, 5164, 12398, 10175, 5657, 1007, 1063, 2709, 10463, 1006, 5164, 1012, 2465, 1010, 3643, 1010, 12398, 10175, 5657, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/operators/SingleInputOperator.java
SingleInputOperator.setInputs
@Deprecated @SuppressWarnings("unchecked") public void setInputs(List<Operator<IN>> inputs) { this.input = Operator.createUnionCascade(null, inputs.toArray(new Operator[inputs.size()])); }
java
@Deprecated @SuppressWarnings("unchecked") public void setInputs(List<Operator<IN>> inputs) { this.input = Operator.createUnionCascade(null, inputs.toArray(new Operator[inputs.size()])); }
[ "@", "Deprecated", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "setInputs", "(", "List", "<", "Operator", "<", "IN", ">", ">", "inputs", ")", "{", "this", ".", "input", "=", "Operator", ".", "createUnionCascade", "(", "null", ",",...
Sets the input to the union of the given operators. @param inputs The operator(s) that form the input. @deprecated This method will be removed in future versions. Use the {@link Union} operator instead.
[ "Sets", "the", "input", "to", "the", "union", "of", "the", "given", "operators", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/operators/SingleInputOperator.java#L129-L133
train
Sets the inputs of the union operation.
[ 30522, 1030, 2139, 28139, 12921, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 11675, 2275, 2378, 18780, 2015, 1006, 2862, 1026, 30524, 1007, 1063, 2023, 1012, 7953, 1027, 6872, 1012, 3443, 19496, 2239, 156...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/operators/AbstractStreamOperator.java
AbstractStreamOperator.dispose
@Override public void dispose() throws Exception { Exception exception = null; StreamTask<?, ?> containingTask = getContainingTask(); CloseableRegistry taskCloseableRegistry = containingTask != null ? containingTask.getCancelables() : null; try { if (taskCloseableRegistry == null || taskCloseab...
java
@Override public void dispose() throws Exception { Exception exception = null; StreamTask<?, ?> containingTask = getContainingTask(); CloseableRegistry taskCloseableRegistry = containingTask != null ? containingTask.getCancelables() : null; try { if (taskCloseableRegistry == null || taskCloseab...
[ "@", "Override", "public", "void", "dispose", "(", ")", "throws", "Exception", "{", "Exception", "exception", "=", "null", ";", "StreamTask", "<", "?", ",", "?", ">", "containingTask", "=", "getContainingTask", "(", ")", ";", "CloseableRegistry", "taskCloseabl...
This method is called at the very end of the operator's life, both in the case of a successful completion of the operation, and in the case of a failure and canceling. <p>This method is expected to make a thorough effort to release all resources that the operator has acquired.
[ "This", "method", "is", "called", "at", "the", "very", "end", "of", "the", "operator", "s", "life", "both", "in", "the", "case", "of", "a", "successful", "completion", "of", "the", "operation", "and", "in", "the", "case", "of", "a", "failure", "and", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java#L324-L371
train
Dispose of the state of the stream.
[ 30522, 1030, 2058, 15637, 2270, 11675, 27764, 1006, 1007, 11618, 6453, 1063, 6453, 6453, 1027, 19701, 1025, 5460, 10230, 2243, 1026, 1029, 1010, 1029, 1028, 4820, 10230, 2243, 1027, 2131, 8663, 18249, 2075, 10230, 2243, 1006, 1007, 1025, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/SlidingEventTimeWindows.java
SlidingEventTimeWindows.of
public static SlidingEventTimeWindows of(Time size, Time slide) { return new SlidingEventTimeWindows(size.toMilliseconds(), slide.toMilliseconds(), 0); }
java
public static SlidingEventTimeWindows of(Time size, Time slide) { return new SlidingEventTimeWindows(size.toMilliseconds(), slide.toMilliseconds(), 0); }
[ "public", "static", "SlidingEventTimeWindows", "of", "(", "Time", "size", ",", "Time", "slide", ")", "{", "return", "new", "SlidingEventTimeWindows", "(", "size", ".", "toMilliseconds", "(", ")", ",", "slide", ".", "toMilliseconds", "(", ")", ",", "0", ")", ...
Creates a new {@code SlidingEventTimeWindows} {@link WindowAssigner} that assigns elements to sliding time windows based on the element timestamp. @param size The size of the generated windows. @param slide The slide interval of the generated windows. @return The time policy.
[ "Creates", "a", "new", "{", "@code", "SlidingEventTimeWindows", "}", "{", "@link", "WindowAssigner", "}", "that", "assigns", "elements", "to", "sliding", "time", "windows", "based", "on", "the", "element", "timestamp", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/SlidingEventTimeWindows.java#L111-L113
train
Create a sliding event time windows with the specified size and slide time.
[ 30522, 2270, 10763, 8058, 18697, 3372, 7292, 11101, 15568, 1997, 1006, 2051, 2946, 1010, 2051, 7358, 1007, 1063, 2709, 2047, 8058, 18697, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/AsciiString.java
AsciiString.contentEqualsIgnoreCase
public boolean contentEqualsIgnoreCase(CharSequence string) { if (string == null || string.length() != length()) { return false; } if (string.getClass() == AsciiString.class) { AsciiString rhs = (AsciiString) string; for (int i = arrayOffset(), j = rhs.arrayO...
java
public boolean contentEqualsIgnoreCase(CharSequence string) { if (string == null || string.length() != length()) { return false; } if (string.getClass() == AsciiString.class) { AsciiString rhs = (AsciiString) string; for (int i = arrayOffset(), j = rhs.arrayO...
[ "public", "boolean", "contentEqualsIgnoreCase", "(", "CharSequence", "string", ")", "{", "if", "(", "string", "==", "null", "||", "string", ".", "length", "(", ")", "!=", "length", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "string", "...
Compares the specified string to this string ignoring the case of the characters and returns true if they are equal. @param string the string to compare. @return {@code true} if the specified string is equal to this string, {@code false} otherwise.
[ "Compares", "the", "specified", "string", "to", "this", "string", "ignoring", "the", "case", "of", "the", "characters", "and", "returns", "true", "if", "they", "are", "equal", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L524-L545
train
Test if the CharSequence is equals ignoring case.
[ 30522, 2270, 22017, 20898, 4180, 2063, 26426, 5332, 26745, 2890, 18382, 1006, 25869, 3366, 4226, 5897, 5164, 1007, 1063, 2065, 1006, 5164, 1027, 1027, 19701, 1064, 1064, 5164, 1012, 3091, 1006, 1007, 999, 1027, 3091, 1006, 1007, 1007, 1063,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.isSameDay
public static boolean isSameDay(Calendar cal1, Calendar cal2) { if (cal1 == null || cal2 == null) { throw new IllegalArgumentException("The date must not be null"); } return cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR) && // cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && // ...
java
public static boolean isSameDay(Calendar cal1, Calendar cal2) { if (cal1 == null || cal2 == null) { throw new IllegalArgumentException("The date must not be null"); } return cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR) && // cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && // ...
[ "public", "static", "boolean", "isSameDay", "(", "Calendar", "cal1", ",", "Calendar", "cal2", ")", "{", "if", "(", "cal1", "==", "null", "||", "cal2", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The date must not be null\"", ")"...
比较两个日期是否为同一天 @param cal1 日期1 @param cal2 日期2 @return 是否为同一天 @since 4.1.13
[ "比较两个日期是否为同一天" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1409-L1416
train
Checks if two calendars are the same day.
[ 30522, 2270, 10763, 22017, 20898, 26354, 14074, 10259, 1006, 8094, 10250, 2487, 1010, 8094, 10250, 2475, 1007, 1063, 2065, 1006, 10250, 2487, 1027, 1027, 19701, 1064, 1064, 10250, 2475, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, 2906, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-captcha/src/main/java/cn/hutool/captcha/ShearCaptcha.java
ShearCaptcha.drawInterfere
private void drawInterfere(Graphics g, int x1, int y1, int x2, int y2, int thickness, Color c) { // The thick line is in fact a filled polygon g.setColor(c); int dX = x2 - x1; int dY = y2 - y1; // line length double lineLength = Math.sqrt(dX * dX + dY * dY); double scale = (double) (thickness) ...
java
private void drawInterfere(Graphics g, int x1, int y1, int x2, int y2, int thickness, Color c) { // The thick line is in fact a filled polygon g.setColor(c); int dX = x2 - x1; int dY = y2 - y1; // line length double lineLength = Math.sqrt(dX * dX + dY * dY); double scale = (double) (thickness) ...
[ "private", "void", "drawInterfere", "(", "Graphics", "g", ",", "int", "x1", ",", "int", "y1", ",", "int", "x2", ",", "int", "y2", ",", "int", "thickness", ",", "Color", "c", ")", "{", "// The thick line is in fact a filled polygon\r", "g", ".", "setColor", ...
干扰线 @param g {@link Graphics} @param x1x1 @param y1 y1 @param x2 x2 @param y2 y2 @param thickness 粗细 @param c 颜色
[ "干扰线" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-captcha/src/main/java/cn/hutool/captcha/ShearCaptcha.java#L181-L215
train
Draws the interfere rectangle.
[ 30522, 2797, 11675, 4009, 18447, 2121, 7512, 2063, 1006, 8389, 1043, 1010, 20014, 1060, 2487, 1010, 20014, 1061, 2487, 1010, 20014, 1060, 2475, 1010, 20014, 1061, 2475, 1010, 20014, 14983, 1010, 3609, 1039, 1007, 1063, 1013, 1013, 1996, 431...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.formatHostnameForHttp
public static String formatHostnameForHttp(InetSocketAddress addr) { String hostString = NetUtil.getHostname(addr); if (NetUtil.isValidIpV6Address(hostString)) { if (!addr.isUnresolved()) { hostString = NetUtil.toAddressString(addr.getAddress()); } ret...
java
public static String formatHostnameForHttp(InetSocketAddress addr) { String hostString = NetUtil.getHostname(addr); if (NetUtil.isValidIpV6Address(hostString)) { if (!addr.isUnresolved()) { hostString = NetUtil.toAddressString(addr.getAddress()); } ret...
[ "public", "static", "String", "formatHostnameForHttp", "(", "InetSocketAddress", "addr", ")", "{", "String", "hostString", "=", "NetUtil", ".", "getHostname", "(", "addr", ")", ";", "if", "(", "NetUtil", ".", "isValidIpV6Address", "(", "hostString", ")", ")", ...
Formats the host string of an address so it can be used for computing an HTTP component such as an URL or a Host header @param addr the address @return the formatted String
[ "Formats", "the", "host", "string", "of", "an", "address", "so", "it", "can", "be", "used", "for", "computing", "an", "HTTP", "component", "such", "as", "an", "URL", "or", "a", "Host", "header" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L526-L535
train
Format hostname for http.
[ 30522, 2270, 10763, 5164, 4289, 15006, 2102, 18442, 29278, 11039, 25856, 1006, 1999, 8454, 7432, 12928, 14141, 8303, 5587, 2099, 1007, 1063, 5164, 6184, 18886, 3070, 1027, 5658, 21823, 2140, 1012, 2131, 15006, 2102, 18442, 1006, 5587, 2099, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CheckpointCoordinator.java
CheckpointCoordinator.discardSubtaskState
private void discardSubtaskState( final JobID jobId, final ExecutionAttemptID executionAttemptID, final long checkpointId, final TaskStateSnapshot subtaskState) { if (subtaskState != null) { executor.execute(new Runnable() { @Override public void run() { try { subtaskState.discardS...
java
private void discardSubtaskState( final JobID jobId, final ExecutionAttemptID executionAttemptID, final long checkpointId, final TaskStateSnapshot subtaskState) { if (subtaskState != null) { executor.execute(new Runnable() { @Override public void run() { try { subtaskState.discardS...
[ "private", "void", "discardSubtaskState", "(", "final", "JobID", "jobId", ",", "final", "ExecutionAttemptID", "executionAttemptID", ",", "final", "long", "checkpointId", ",", "final", "TaskStateSnapshot", "subtaskState", ")", "{", "if", "(", "subtaskState", "!=", "n...
Discards the given state object asynchronously belonging to the given job, execution attempt id and checkpoint id. @param jobId identifying the job to which the state object belongs @param executionAttemptID identifying the task to which the state object belongs @param checkpointId of the state object @param subtaskSt...
[ "Discards", "the", "given", "state", "object", "asynchronously", "belonging", "to", "the", "given", "job", "execution", "attempt", "id", "and", "checkpoint", "id", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java#L1355-L1375
train
Discards the state object of a subtask.
[ 30522, 2797, 11675, 5860, 18117, 12083, 10230, 5705, 12259, 1006, 2345, 3105, 3593, 3105, 3593, 1010, 2345, 7781, 19321, 6633, 13876, 3593, 7781, 19321, 6633, 13876, 3593, 1010, 2345, 2146, 26520, 3593, 1010, 2345, 8518, 12259, 2015, 2532, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.forEach
public static <T> void forEach(Enumeration<T> enumeration, Consumer<T> consumer) { int index = 0; while (enumeration.hasMoreElements()) { consumer.accept(enumeration.nextElement(), index); index++; } }
java
public static <T> void forEach(Enumeration<T> enumeration, Consumer<T> consumer) { int index = 0; while (enumeration.hasMoreElements()) { consumer.accept(enumeration.nextElement(), index); index++; } }
[ "public", "static", "<", "T", ">", "void", "forEach", "(", "Enumeration", "<", "T", ">", "enumeration", ",", "Consumer", "<", "T", ">", "consumer", ")", "{", "int", "index", "=", "0", ";", "while", "(", "enumeration", ".", "hasMoreElements", "(", ")", ...
循环遍历 {@link Enumeration},使用{@link Consumer} 接受遍历的每条数据,并针对每条数据做处理 @param <T> 集合元素类型 @param enumeration {@link Enumeration} @param consumer {@link Consumer} 遍历的每条数据处理器
[ "循环遍历", "{", "@link", "Enumeration", "}", ",使用", "{", "@link", "Consumer", "}", "接受遍历的每条数据,并针对每条数据做处理" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L2254-L2260
train
Iterates over the elements of an enumeration and passes the consumer to the next element.
[ 30522, 2270, 10763, 1026, 1056, 1028, 11675, 18921, 6776, 1006, 4372, 17897, 8156, 1026, 1056, 1028, 4372, 17897, 8156, 1010, 7325, 1026, 1056, 1028, 7325, 1007, 1063, 20014, 5950, 1027, 1014, 1025, 2096, 1006, 4372, 17897, 8156, 1012, 2038...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.fromTupleDataSet
public static <K, VV, EV> Graph<K, VV, EV> fromTupleDataSet(DataSet<Tuple3<K, K, EV>> edges, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { DataSet<Edge<K, EV>> edgeDataSet = edges .map(new Tuple3ToEdgeMap<>()) .name("Type conversion"); return fromDataSet(edgeDataSet, v...
java
public static <K, VV, EV> Graph<K, VV, EV> fromTupleDataSet(DataSet<Tuple3<K, K, EV>> edges, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { DataSet<Edge<K, EV>> edgeDataSet = edges .map(new Tuple3ToEdgeMap<>()) .name("Type conversion"); return fromDataSet(edgeDataSet, v...
[ "public", "static", "<", "K", ",", "VV", ",", "EV", ">", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "fromTupleDataSet", "(", "DataSet", "<", "Tuple3", "<", "K", ",", "K", ",", "EV", ">", ">", "edges", ",", "final", "MapFunction", "<", "K", "...
Creates a graph from a DataSet of Tuple3 objects for edges. <p>Each Tuple3 will become one Edge, where the source ID will be the first field of the Tuple2, the target ID will be the second field of the Tuple2 and the Edge value will be the third field of the Tuple3. <p>Vertices are created automatically and their val...
[ "Creates", "a", "graph", "from", "a", "DataSet", "of", "Tuple3", "objects", "for", "edges", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L321-L329
train
Creates a graph from a DataSet of Tuple3 objects.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 10629, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 2013, 8525, 21132, 6790, 13462, 1006, 2951, 13462, 1026, 10722, 10814, 2509, 1026, 1047, 1010, 1047, 1010, 23408, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/CompositePropertySource.java
CompositePropertySource.addFirstPropertySource
public void addFirstPropertySource(PropertySource<?> propertySource) { List<PropertySource<?>> existing = new ArrayList<PropertySource<?>>(this.propertySources); this.propertySources.clear(); this.propertySources.add(propertySource); this.propertySources.addAll(existing); }
java
public void addFirstPropertySource(PropertySource<?> propertySource) { List<PropertySource<?>> existing = new ArrayList<PropertySource<?>>(this.propertySources); this.propertySources.clear(); this.propertySources.add(propertySource); this.propertySources.addAll(existing); }
[ "public", "void", "addFirstPropertySource", "(", "PropertySource", "<", "?", ">", "propertySource", ")", "{", "List", "<", "PropertySource", "<", "?", ">", ">", "existing", "=", "new", "ArrayList", "<", "PropertySource", "<", "?", ">", ">", "(", "this", "....
Add the given {@link PropertySource} to the start of the chain. @param propertySource the PropertySource to add @since 4.1
[ "Add", "the", "given", "{", "@link", "PropertySource", "}", "to", "the", "start", "of", "the", "chain", "." ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/CompositePropertySource.java#L85-L90
train
Add a property source to the first property source.
[ 30522, 2270, 11675, 5587, 8873, 12096, 21572, 4842, 3723, 6499, 3126, 3401, 1006, 3200, 6499, 3126, 3401, 1026, 1029, 1028, 3200, 6499, 3126, 3401, 1007, 1063, 2862, 1026, 3200, 6499, 3126, 3401, 1026, 1029, 1028, 1028, 4493, 1027, 2047, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.copyFilesFromDir
public static File copyFilesFromDir(File src, File dest, boolean isOverride) throws IORuntimeException { return FileCopier.create(src, dest).setCopyContentIfDir(true).setOnlyCopyFile(true).setOverride(isOverride).copy(); }
java
public static File copyFilesFromDir(File src, File dest, boolean isOverride) throws IORuntimeException { return FileCopier.create(src, dest).setCopyContentIfDir(true).setOnlyCopyFile(true).setOverride(isOverride).copy(); }
[ "public", "static", "File", "copyFilesFromDir", "(", "File", "src", ",", "File", "dest", ",", "boolean", "isOverride", ")", "throws", "IORuntimeException", "{", "return", "FileCopier", ".", "create", "(", "src", ",", "dest", ")", ".", "setCopyContentIfDir", "(...
复制文件或目录<br> 情况如下: <pre> 1、src和dest都为目录,则讲src下所有文件(包括子目录)拷贝到dest下 2、src和dest都为文件,直接复制,名字为dest 3、src为文件,dest为目录,将src拷贝到dest目录下 </pre> @param src 源文件 @param dest 目标文件或目录,目标不存在会自动创建(目录、文件都创建) @param isOverride 是否覆盖目标文件 @return 目标目录或文件 @throws IORuntimeException IO异常 @since 4.1.5
[ "复制文件或目录<br", ">", "情况如下:" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1044-L1046
train
Copies files from a directory to a file.
[ 30522, 2270, 10763, 5371, 6100, 8873, 4244, 19699, 5358, 4305, 2099, 1006, 5371, 5034, 2278, 1010, 5371, 4078, 2102, 1010, 22017, 20898, 11163, 6299, 15637, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 5371, 3597, 14756, 2099, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/DataSet.java
DataSet.cross
public <R> CrossOperator.DefaultCross<T, R> cross(DataSet<R> other) { return new CrossOperator.DefaultCross<>(this, other, CrossHint.OPTIMIZER_CHOOSES, Utils.getCallLocationName()); }
java
public <R> CrossOperator.DefaultCross<T, R> cross(DataSet<R> other) { return new CrossOperator.DefaultCross<>(this, other, CrossHint.OPTIMIZER_CHOOSES, Utils.getCallLocationName()); }
[ "public", "<", "R", ">", "CrossOperator", ".", "DefaultCross", "<", "T", ",", "R", ">", "cross", "(", "DataSet", "<", "R", ">", "other", ")", "{", "return", "new", "CrossOperator", ".", "DefaultCross", "<>", "(", "this", ",", "other", ",", "CrossHint",...
Initiates a Cross transformation. <p>A Cross transformation combines the elements of two {@link DataSet DataSets} into one DataSet. It builds all pair combinations of elements of both DataSets, i.e., it builds a Cartesian product. <p>The resulting {@link org.apache.flink.api.java.operators.CrossOperator.DefaultCross...
[ "Initiates", "a", "Cross", "transformation", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/DataSet.java#L1056-L1058
train
Cross operation.
[ 30522, 2270, 1026, 1054, 1028, 2892, 25918, 8844, 1012, 12398, 16458, 1026, 1056, 1010, 1054, 1028, 2892, 1006, 2951, 13462, 1026, 1054, 1028, 2060, 1007, 1063, 2709, 2047, 2892, 25918, 8844, 1012, 12398, 16458, 1026, 1028, 1006, 2023, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
client/src/main/java/com/networknt/client/oauth/OauthHelper.java
OauthHelper.getKey
public static String getKey(KeyRequest keyRequest, String envTag) throws ClientException { final Http2Client client = Http2Client.getInstance(); final CountDownLatch latch = new CountDownLatch(1); final ClientConnection connection; try { if(keyRequest.getServerUrl() != null) ...
java
public static String getKey(KeyRequest keyRequest, String envTag) throws ClientException { final Http2Client client = Http2Client.getInstance(); final CountDownLatch latch = new CountDownLatch(1); final ClientConnection connection; try { if(keyRequest.getServerUrl() != null) ...
[ "public", "static", "String", "getKey", "(", "KeyRequest", "keyRequest", ",", "String", "envTag", ")", "throws", "ClientException", "{", "final", "Http2Client", "client", "=", "Http2Client", ".", "getInstance", "(", ")", ";", "final", "CountDownLatch", "latch", ...
Get the certificate from key distribution service of OAuth 2.0 provider with the kid. @param keyRequest One of the sub classes to get the key for access token or sign token. @param envTag the environment tag from the server.yml for the cluster lookup. @return String of the certificate @throws ClientException throw exc...
[ "Get", "the", "certificate", "from", "key", "distribution", "service", "of", "OAuth", "2", ".", "0", "provider", "with", "the", "kid", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/oauth/OauthHelper.java#L386-L423
train
Get the key from the keyRequest
[ 30522, 2270, 10763, 5164, 2131, 14839, 1006, 3145, 2890, 15500, 3145, 2890, 15500, 1010, 5164, 4372, 2615, 15900, 1007, 11618, 7396, 10288, 24422, 1063, 2345, 8299, 2475, 20464, 11638, 7396, 1027, 8299, 2475, 20464, 11638, 1012, 2131, 7076, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/source/ContinuousFileReaderOperator.java
ContinuousFileReaderOperator.snapshotState
@Override public void snapshotState(StateSnapshotContext context) throws Exception { super.snapshotState(context); checkState(checkpointedState != null, "The operator state has not been properly initialized."); int subtaskIdx = getRuntimeContext().getIndexOfThisSubtask(); checkpointedState.clear(); Li...
java
@Override public void snapshotState(StateSnapshotContext context) throws Exception { super.snapshotState(context); checkState(checkpointedState != null, "The operator state has not been properly initialized."); int subtaskIdx = getRuntimeContext().getIndexOfThisSubtask(); checkpointedState.clear(); Li...
[ "@", "Override", "public", "void", "snapshotState", "(", "StateSnapshotContext", "context", ")", "throws", "Exception", "{", "super", ".", "snapshotState", "(", "context", ")", ";", "checkState", "(", "checkpointedState", "!=", "null", ",", "\"The operator state has...
--------------------- Checkpointing --------------------------
[ "---------------------", "Checkpointing", "--------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileReaderOperator.java#L391-L420
train
This method is called by the state snapshot backend to snapshot the state of the underlying reader.
[ 30522, 1030, 2058, 15637, 2270, 11675, 20057, 12326, 9153, 2618, 1006, 2163, 2532, 4523, 12326, 8663, 18209, 6123, 1007, 11618, 6453, 1063, 3565, 1012, 20057, 12326, 9153, 2618, 1006, 6123, 1007, 1025, 14148, 12259, 1006, 26520, 2098, 9153, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java
ConnectedStreams.flatMap
public <R> SingleOutputStreamOperator<R> flatMap( CoFlatMapFunction<IN1, IN2, R> coFlatMapper) { TypeInformation<R> outTypeInfo = TypeExtractor.getBinaryOperatorReturnType( coFlatMapper, CoFlatMapFunction.class, 0, 1, 2, TypeExtractor.NO_INDEX, getType1(), getType2(), Utils.getCallLocat...
java
public <R> SingleOutputStreamOperator<R> flatMap( CoFlatMapFunction<IN1, IN2, R> coFlatMapper) { TypeInformation<R> outTypeInfo = TypeExtractor.getBinaryOperatorReturnType( coFlatMapper, CoFlatMapFunction.class, 0, 1, 2, TypeExtractor.NO_INDEX, getType1(), getType2(), Utils.getCallLocat...
[ "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "flatMap", "(", "CoFlatMapFunction", "<", "IN1", ",", "IN2", ",", "R", ">", "coFlatMapper", ")", "{", "TypeInformation", "<", "R", ">", "outTypeInfo", "=", "TypeExtractor", ".", "getBinary...
Applies a CoFlatMap transformation on a {@link ConnectedStreams} and maps the output to a common type. The transformation calls a {@link CoFlatMapFunction#flatMap1} for each element of the first input and {@link CoFlatMapFunction#flatMap2} for each element of the second input. Each CoFlatMapFunction call returns any nu...
[ "Applies", "a", "CoFlatMap", "transformation", "on", "a", "{", "@link", "ConnectedStreams", "}", "and", "maps", "the", "output", "to", "a", "common", "type", ".", "The", "transformation", "calls", "a", "{", "@link", "CoFlatMapFunction#flatMap1", "}", "for", "e...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java#L257-L273
train
Flat map.
[ 30522, 2270, 1026, 1054, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1054, 1028, 4257, 2863, 2361, 1006, 2522, 10258, 4017, 2863, 14376, 4609, 7542, 1026, 1999, 2487, 1010, 1999, 2475, 1010, 1054, 1028, 2522, 10258, 4017, 2863, 18620...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec/src/main/java/io/netty/handler/codec/MessageAggregator.java
MessageAggregator.setMaxCumulationBufferComponents
public final void setMaxCumulationBufferComponents(int maxCumulationBufferComponents) { if (maxCumulationBufferComponents < 2) { throw new IllegalArgumentException( "maxCumulationBufferComponents: " + maxCumulationBufferComponents + " (expected: >= 2)"); ...
java
public final void setMaxCumulationBufferComponents(int maxCumulationBufferComponents) { if (maxCumulationBufferComponents < 2) { throw new IllegalArgumentException( "maxCumulationBufferComponents: " + maxCumulationBufferComponents + " (expected: >= 2)"); ...
[ "public", "final", "void", "setMaxCumulationBufferComponents", "(", "int", "maxCumulationBufferComponents", ")", "{", "if", "(", "maxCumulationBufferComponents", "<", "2", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"maxCumulationBufferComponents: \"", "+",...
Sets the maximum number of components in the cumulation buffer. If the number of the components in the cumulation buffer exceeds this value, the components of the cumulation buffer are consolidated into a single component, involving memory copies. The default value of this property is {@value #DEFAULT_MAX_COMPOSITEBUF...
[ "Sets", "the", "maximum", "number", "of", "components", "in", "the", "cumulation", "buffer", ".", "If", "the", "number", "of", "the", "components", "in", "the", "cumulation", "buffer", "exceeds", "this", "value", "the", "components", "of", "the", "cumulation",...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/MessageAggregator.java#L177-L190
train
Sets the maximum number of cumulation buffers that should be used for a single message.
[ 30522, 2270, 2345, 11675, 2275, 17848, 24894, 9513, 8569, 12494, 9006, 29513, 7666, 1006, 20014, 4098, 24894, 9513, 8569, 12494, 9006, 29513, 7666, 1007, 1063, 2065, 1006, 4098, 24894, 9513, 8569, 12494, 9006, 29513, 7666, 1026, 1016, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java
ClusterClient.getAccumulators
public Map<String, OptionalFailure<Object>> getAccumulators(JobID jobID) throws Exception { return getAccumulators(jobID, ClassLoader.getSystemClassLoader()); }
java
public Map<String, OptionalFailure<Object>> getAccumulators(JobID jobID) throws Exception { return getAccumulators(jobID, ClassLoader.getSystemClassLoader()); }
[ "public", "Map", "<", "String", ",", "OptionalFailure", "<", "Object", ">", ">", "getAccumulators", "(", "JobID", "jobID", ")", "throws", "Exception", "{", "return", "getAccumulators", "(", "jobID", ",", "ClassLoader", ".", "getSystemClassLoader", "(", ")", ")...
Requests and returns the accumulators for the given job identifier. Accumulators can be requested while a is running or after it has finished. The default class loader is used to deserialize the incoming accumulator results. @param jobID The job identifier of a job. @return A Map containing the accumulator's name and i...
[ "Requests", "and", "returns", "the", "accumulators", "for", "the", "given", "job", "identifier", ".", "Accumulators", "can", "be", "requested", "while", "a", "is", "running", "or", "after", "it", "has", "finished", ".", "The", "default", "class", "loader", "...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java#L397-L399
train
Get the accumulators for the given job ID.
[ 30522, 2270, 4949, 1026, 5164, 1010, 11887, 7011, 4014, 5397, 1026, 4874, 1028, 1028, 2131, 6305, 24894, 20350, 2015, 1006, 3105, 3593, 3105, 3593, 1007, 11618, 6453, 1063, 2709, 2131, 6305, 24894, 20350, 2015, 1006, 3105, 3593, 1010, 2465,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java
HttpStaticFileServerHandler.setContentTypeHeader
private static void setContentTypeHeader(HttpResponse response, File file) { MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); response.headers().set(HttpHeaderNames.CONTENT_TYPE, mimeTypesMap.getContentType(file.getPath())); }
java
private static void setContentTypeHeader(HttpResponse response, File file) { MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); response.headers().set(HttpHeaderNames.CONTENT_TYPE, mimeTypesMap.getContentType(file.getPath())); }
[ "private", "static", "void", "setContentTypeHeader", "(", "HttpResponse", "response", ",", "File", "file", ")", "{", "MimetypesFileTypeMap", "mimeTypesMap", "=", "new", "MimetypesFileTypeMap", "(", ")", ";", "response", ".", "headers", "(", ")", ".", "set", "(",...
Sets the content type header for the HTTP Response @param response HTTP response @param file file to extract content type
[ "Sets", "the", "content", "type", "header", "for", "the", "HTTP", "Response" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java#L415-L418
train
Sets the content type header.
[ 30522, 2797, 10763, 11675, 2275, 8663, 6528, 15353, 5051, 4974, 2121, 1006, 30524, 11795, 14074, 2015, 1012, 4180, 1035, 2828, 1010, 2771, 11368, 18863, 26212, 2361, 1012, 2131, 8663, 6528, 15353, 5051, 1006, 5371, 1012, 2131, 15069, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/NShort/Path/CQueue.java
CQueue.enQueue
public void enQueue(QueueElement newElement) { QueueElement pCur = pHead, pPre = null; while (pCur != null && pCur.weight < newElement.weight) { pPre = pCur; pCur = pCur.next; } newElement.next = pCur; if (pPre == null) pHead = n...
java
public void enQueue(QueueElement newElement) { QueueElement pCur = pHead, pPre = null; while (pCur != null && pCur.weight < newElement.weight) { pPre = pCur; pCur = pCur.next; } newElement.next = pCur; if (pPre == null) pHead = n...
[ "public", "void", "enQueue", "(", "QueueElement", "newElement", ")", "{", "QueueElement", "pCur", "=", "pHead", ",", "pPre", "=", "null", ";", "while", "(", "pCur", "!=", "null", "&&", "pCur", ".", "weight", "<", "newElement", ".", "weight", ")", "{", ...
将QueueElement根据eWeight由小到大的顺序插入队列 @param newElement
[ "将QueueElement根据eWeight由小到大的顺序插入队列" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/NShort/Path/CQueue.java#L28-L44
train
Enqueuing an element in the queue.
[ 30522, 2270, 11675, 4372, 4226, 5657, 1006, 24240, 12260, 3672, 2047, 12260, 3672, 1007, 1063, 24240, 12260, 3672, 7473, 3126, 1027, 6887, 13775, 1010, 4903, 2890, 1027, 19701, 1025, 2096, 1006, 7473, 3126, 999, 1027, 19701, 1004, 1004, 747...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/corpus/dictionary/SuffixDictionary.java
SuffixDictionary.get
public int get(String suffix) { suffix = reverse(suffix); Integer length = trie.get(suffix); if (length == null) return 0; return length; }
java
public int get(String suffix) { suffix = reverse(suffix); Integer length = trie.get(suffix); if (length == null) return 0; return length; }
[ "public", "int", "get", "(", "String", "suffix", ")", "{", "suffix", "=", "reverse", "(", "suffix", ")", ";", "Integer", "length", "=", "trie", ".", "get", "(", "suffix", ")", ";", "if", "(", "length", "==", "null", ")", "return", "0", ";", "return...
查找是否有该后缀 @param suffix @return
[ "查找是否有该后缀" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/corpus/dictionary/SuffixDictionary.java#L62-L69
train
Gets the length of a sequence of tokens that have the specified suffix.
[ 30522, 2270, 20014, 2131, 1006, 5164, 16809, 1007, 1063, 16809, 1027, 7901, 1006, 16809, 1007, 1025, 16109, 3091, 1027, 13012, 2063, 1012, 2131, 1006, 16809, 1007, 1025, 2065, 1006, 3091, 1027, 1027, 19701, 1007, 2709, 1014, 1025, 2709, 309...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/qrcode/QrCodeUtil.java
QrCodeUtil.encode
public static BitMatrix encode(String content, int width, int height) { return encode(content, BarcodeFormat.QR_CODE, width, height); }
java
public static BitMatrix encode(String content, int width, int height) { return encode(content, BarcodeFormat.QR_CODE, width, height); }
[ "public", "static", "BitMatrix", "encode", "(", "String", "content", ",", "int", "width", ",", "int", "height", ")", "{", "return", "encode", "(", "content", ",", "BarcodeFormat", ".", "QR_CODE", ",", "width", ",", "height", ")", ";", "}" ]
将文本内容编码为二维码 @param content 文本内容 @param width 宽度 @param height 高度 @return {@link BitMatrix}
[ "将文本内容编码为二维码" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java#L209-L211
train
Encodes a String into a BitMatrix.
[ 30522, 2270, 10763, 2978, 18900, 17682, 4372, 16044, 1006, 5164, 4180, 1010, 20014, 9381, 1010, 20014, 4578, 1007, 1063, 2709, 4372, 16044, 1006, 4180, 1010, 3347, 16044, 14192, 4017, 1012, 1053, 2099, 1035, 3642, 1010, 9381, 1010, 4578, 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-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.registerOffsetMetrics
private void registerOffsetMetrics( MetricGroup consumerMetricGroup, List<KafkaTopicPartitionState<KPH>> partitionOffsetStates) { for (KafkaTopicPartitionState<KPH> ktp : partitionOffsetStates) { MetricGroup topicPartitionGroup = consumerMetricGroup .addGroup(OFFSETS_BY_TOPIC_METRICS_GROUP, ktp.getTopic...
java
private void registerOffsetMetrics( MetricGroup consumerMetricGroup, List<KafkaTopicPartitionState<KPH>> partitionOffsetStates) { for (KafkaTopicPartitionState<KPH> ktp : partitionOffsetStates) { MetricGroup topicPartitionGroup = consumerMetricGroup .addGroup(OFFSETS_BY_TOPIC_METRICS_GROUP, ktp.getTopic...
[ "private", "void", "registerOffsetMetrics", "(", "MetricGroup", "consumerMetricGroup", ",", "List", "<", "KafkaTopicPartitionState", "<", "KPH", ">", ">", "partitionOffsetStates", ")", "{", "for", "(", "KafkaTopicPartitionState", "<", "KPH", ">", "ktp", ":", "partit...
For each partition, register a new metric group to expose current offsets and committed offsets. Per-partition metric groups can be scoped by user variables {@link KafkaConsumerMetricConstants#OFFSETS_BY_TOPIC_METRICS_GROUP} and {@link KafkaConsumerMetricConstants#OFFSETS_BY_PARTITION_METRICS_GROUP}. <p>Note: this met...
[ "For", "each", "partition", "register", "a", "new", "metric", "group", "to", "expose", "current", "offsets", "and", "committed", "offsets", ".", "Per", "-", "partition", "metric", "groups", "can", "be", "scoped", "by", "user", "variables", "{", "@link", "Kaf...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L616-L631
train
Register offset metrics.
[ 30522, 2797, 11675, 4236, 27475, 3388, 12589, 2015, 1006, 12046, 17058, 7325, 12589, 17058, 1010, 2862, 1026, 10556, 24316, 10610, 24330, 19362, 3775, 9285, 12259, 1026, 1047, 8458, 1028, 1028, 13571, 27475, 8454, 12259, 2015, 1007, 1063, 200...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/AbstractService.java
AbstractService.stop
@Override public synchronized void stop() { if (state == STATE.STOPPED || state == STATE.INITED || state == STATE.NOTINITED) { // already stopped, or else it was never // started (eg another service failing canceled startup) return; } ensureCurrentState(STATE.STARTED); ...
java
@Override public synchronized void stop() { if (state == STATE.STOPPED || state == STATE.INITED || state == STATE.NOTINITED) { // already stopped, or else it was never // started (eg another service failing canceled startup) return; } ensureCurrentState(STATE.STARTED); ...
[ "@", "Override", "public", "synchronized", "void", "stop", "(", ")", "{", "if", "(", "state", "==", "STATE", ".", "STOPPED", "||", "state", "==", "STATE", ".", "INITED", "||", "state", "==", "STATE", ".", "NOTINITED", ")", "{", "// already stopped, or else...
{@inheritDoc} @throws IllegalStateException if the current service state does not permit this action
[ "{", "@inheritDoc", "}" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/AbstractService.java#L114-L126
train
Stop the service.
[ 30522, 1030, 2058, 15637, 2270, 25549, 11675, 2644, 1006, 1007, 1063, 2065, 1006, 2110, 1027, 1027, 2110, 1012, 3030, 1064, 1064, 2110, 1027, 1027, 2110, 1012, 1999, 17572, 1064, 1064, 2110, 1027, 1027, 2110, 1012, 2025, 5498, 3064, 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-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java
ExecutionVertex.checkInputDependencyConstraints
boolean checkInputDependencyConstraints() { if (getInputDependencyConstraint() == InputDependencyConstraint.ANY) { // InputDependencyConstraint == ANY return IntStream.range(0, inputEdges.length).anyMatch(this::isInputConsumable); } else { // InputDependencyConstraint == ALL return IntStream.range(0, in...
java
boolean checkInputDependencyConstraints() { if (getInputDependencyConstraint() == InputDependencyConstraint.ANY) { // InputDependencyConstraint == ANY return IntStream.range(0, inputEdges.length).anyMatch(this::isInputConsumable); } else { // InputDependencyConstraint == ALL return IntStream.range(0, in...
[ "boolean", "checkInputDependencyConstraints", "(", ")", "{", "if", "(", "getInputDependencyConstraint", "(", ")", "==", "InputDependencyConstraint", ".", "ANY", ")", "{", "// InputDependencyConstraint == ANY", "return", "IntStream", ".", "range", "(", "0", ",", "input...
Check whether the InputDependencyConstraint is satisfied for this vertex. @return whether the input constraint is satisfied
[ "Check", "whether", "the", "InputDependencyConstraint", "is", "satisfied", "for", "this", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java#L767-L775
train
Check if the input dependency constraint is satisfied.
[ 30522, 22017, 20898, 4638, 2378, 18780, 3207, 11837, 4181, 5666, 8663, 20528, 18447, 2015, 1006, 1007, 1063, 2065, 1006, 2131, 2378, 18780, 3207, 11837, 4181, 5666, 8663, 20528, 18447, 1006, 1007, 1027, 1027, 7953, 3207, 11837, 4181, 5666, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Assert.java
Assert.checkBetween
public static int checkBetween(int value, int min, int max) { if (value < min || value > max) { throw new IllegalArgumentException(StrUtil.format("Length must be between {} and {}.", min, max)); } return value; }
java
public static int checkBetween(int value, int min, int max) { if (value < min || value > max) { throw new IllegalArgumentException(StrUtil.format("Length must be between {} and {}.", min, max)); } return value; }
[ "public", "static", "int", "checkBetween", "(", "int", "value", ",", "int", "min", ",", "int", "max", ")", "{", "if", "(", "value", "<", "min", "||", "value", ">", "max", ")", "{", "throw", "new", "IllegalArgumentException", "(", "StrUtil", ".", "forma...
检查值是否在指定范围内 @param value 值 @param min 最小值(包含) @param max 最大值(包含) @return 检查后的长度值 @since 4.1.10
[ "检查值是否在指定范围内" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L574-L579
train
Checks if the given value is between the given range.
[ 30522, 2270, 10763, 20014, 4638, 20915, 28394, 2078, 1006, 20014, 3643, 1010, 20014, 8117, 1010, 20014, 4098, 1007, 1063, 2065, 1006, 3643, 1026, 8117, 1064, 1064, 3643, 1028, 4098, 1007, 1063, 5466, 2047, 6206, 2906, 22850, 15781, 2595, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/utility/TextUtility.java
TextUtility.isYearTime
public static boolean isYearTime(String snum) { if (snum != null) { int len = snum.length(); String first = snum.substring(0, 1); // 1992年, 98年,06年 if (isAllSingleByte(snum) && (len == 4 || len == 2 && (cint(first) > 4 || cint(firs...
java
public static boolean isYearTime(String snum) { if (snum != null) { int len = snum.length(); String first = snum.substring(0, 1); // 1992年, 98年,06年 if (isAllSingleByte(snum) && (len == 4 || len == 2 && (cint(first) > 4 || cint(firs...
[ "public", "static", "boolean", "isYearTime", "(", "String", "snum", ")", "{", "if", "(", "snum", "!=", "null", ")", "{", "int", "len", "=", "snum", ".", "length", "(", ")", ";", "String", "first", "=", "snum", ".", "substring", "(", "0", ",", "1", ...
判断字符串是否是年份 @param snum @return
[ "判断字符串是否是年份" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/utility/TextUtility.java#L381-L405
train
isYearTime Method returns true if the string snum is a year time.
[ 30522, 2270, 10763, 22017, 20898, 2003, 29100, 7292, 1006, 5164, 1055, 19172, 1007, 1063, 2065, 1006, 1055, 19172, 999, 1027, 19701, 1007, 1063, 20014, 18798, 1027, 1055, 19172, 1012, 3091, 1006, 1007, 1025, 5164, 2034, 1027, 1055, 19172, 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/checkpoint/RoundRobinOperatorStateRepartitioner.java
RoundRobinOperatorStateRepartitioner.groupByStateMode
@SuppressWarnings("unchecked, rawtype") private GroupByStateNameResults groupByStateMode(List<List<OperatorStateHandle>> previousParallelSubtaskStates) { //Reorganize: group by (State Name -> StreamStateHandle + StateMetaInfo) EnumMap<OperatorStateHandle.Mode, Map<String, List<Tuple2<StreamStateHandle, Operat...
java
@SuppressWarnings("unchecked, rawtype") private GroupByStateNameResults groupByStateMode(List<List<OperatorStateHandle>> previousParallelSubtaskStates) { //Reorganize: group by (State Name -> StreamStateHandle + StateMetaInfo) EnumMap<OperatorStateHandle.Mode, Map<String, List<Tuple2<StreamStateHandle, Operat...
[ "@", "SuppressWarnings", "(", "\"unchecked, rawtype\"", ")", "private", "GroupByStateNameResults", "groupByStateMode", "(", "List", "<", "List", "<", "OperatorStateHandle", ">", ">", "previousParallelSubtaskStates", ")", "{", "//Reorganize: group by (State Name -> StreamStateHa...
Group by the different named states.
[ "Group", "by", "the", "different", "named", "states", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java#L148-L190
train
Group by state mode.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1010, 6315, 13874, 1000, 1007, 2797, 2177, 3762, 9153, 6528, 14074, 6072, 11314, 2015, 2177, 3762, 9153, 18532, 10244, 1006, 2862, 1026, 2862, 1026, 9224, 12259, 11774, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshakerFactory.java
WebSocketClientHandshakerFactory.newHandshaker
public static WebSocketClientHandshaker newHandshaker( URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch, long forceCloseTimeoutMillis) { ...
java
public static WebSocketClientHandshaker newHandshaker( URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch, long forceCloseTimeoutMillis) { ...
[ "public", "static", "WebSocketClientHandshaker", "newHandshaker", "(", "URI", "webSocketURL", ",", "WebSocketVersion", "version", ",", "String", "subprotocol", ",", "boolean", "allowExtensions", ",", "HttpHeaders", "customHeaders", ",", "int", "maxFramePayloadLength", ","...
Creates a new handshaker. @param webSocketURL URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL. @param version Version of web socket specification to use to connect to the server @param subprotocol Sub protocol request sent to the server. Null if no...
[ "Creates", "a", "new", "handshaker", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshakerFactory.java#L141-L166
train
Create a new WebSocketClientHandshaker.
[ 30522, 2270, 10763, 4773, 6499, 19869, 13535, 8751, 3372, 11774, 7377, 5484, 2047, 11774, 7377, 5484, 1006, 24471, 2072, 4773, 6499, 19869, 20689, 2140, 1010, 4773, 6499, 19869, 9189, 2545, 3258, 2544, 1010, 5164, 4942, 21572, 3406, 25778, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ClassUtil.java
ClassUtil.getPackage
public static String getPackage(Class<?> clazz) { if (clazz == null) { return StrUtil.EMPTY; } final String className = clazz.getName(); int packageEndIndex = className.lastIndexOf(StrUtil.DOT); if (packageEndIndex == -1) { return StrUtil.EMPTY; } return className.substring(0, packageEndInd...
java
public static String getPackage(Class<?> clazz) { if (clazz == null) { return StrUtil.EMPTY; } final String className = clazz.getName(); int packageEndIndex = className.lastIndexOf(StrUtil.DOT); if (packageEndIndex == -1) { return StrUtil.EMPTY; } return className.substring(0, packageEndInd...
[ "public", "static", "String", "getPackage", "(", "Class", "<", "?", ">", "clazz", ")", "{", "if", "(", "clazz", "==", "null", ")", "{", "return", "StrUtil", ".", "EMPTY", ";", "}", "final", "String", "className", "=", "clazz", ".", "getName", "(", ")...
获得给定类所在包的名称<br> 例如:<br> com.xiaoleilu.hutool.util.ClassUtil =》 com.xiaoleilu.hutool.util @param clazz 类 @return 包名
[ "获得给定类所在包的名称<br", ">", "例如:<br", ">", "com", ".", "xiaoleilu", ".", "hutool", ".", "util", ".", "ClassUtil", "=", "》", "com", ".", "xiaoleilu", ".", "hutool", ".", "util" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassUtil.java#L946-L956
train
Gets the package name of the given class.
[ 30522, 2270, 10763, 5164, 2131, 23947, 4270, 1006, 2465, 1026, 1029, 1028, 18856, 10936, 2480, 1007, 1063, 2065, 1006, 18856, 10936, 2480, 1027, 1027, 19701, 1007, 1063, 2709, 2358, 22134, 4014, 1012, 4064, 1025, 1065, 2345, 5164, 2465, 184...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/copier/CopyOptions.java
CopyOptions.create
public static CopyOptions create(Class<?> editable, boolean ignoreNullValue, String... ignoreProperties) { return new CopyOptions(editable, ignoreNullValue, ignoreProperties); }
java
public static CopyOptions create(Class<?> editable, boolean ignoreNullValue, String... ignoreProperties) { return new CopyOptions(editable, ignoreNullValue, ignoreProperties); }
[ "public", "static", "CopyOptions", "create", "(", "Class", "<", "?", ">", "editable", ",", "boolean", "ignoreNullValue", ",", "String", "...", "ignoreProperties", ")", "{", "return", "new", "CopyOptions", "(", "editable", ",", "ignoreNullValue", ",", "ignoreProp...
创建拷贝选项 @param editable 限制的类或接口,必须为目标对象的实现接口或父类,用于限制拷贝的属性 @param ignoreNullValue 是否忽略空值,当源对象的值为null时,true: 忽略而不注入此值,false: 注入null @param ignoreProperties 忽略的属性列表,设置一个属性列表,不拷贝这些属性值 @return 拷贝选项
[ "创建拷贝选项" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/copier/CopyOptions.java#L47-L49
train
Create a new instance of CopyOptions
[ 30522, 2270, 10763, 6100, 7361, 9285, 3443, 1006, 2465, 1026, 1029, 1028, 10086, 3085, 1010, 22017, 20898, 8568, 11231, 3363, 10175, 5657, 1010, 5164, 1012, 1012, 1012, 8568, 21572, 4842, 7368, 1007, 1063, 2709, 2047, 6100, 7361, 9285, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java
BeanUtil.getProperty
public static Object getProperty(Object bean, String expression) { return BeanPath.create(expression).get(bean); }
java
public static Object getProperty(Object bean, String expression) { return BeanPath.create(expression).get(bean); }
[ "public", "static", "Object", "getProperty", "(", "Object", "bean", ",", "String", "expression", ")", "{", "return", "BeanPath", ".", "create", "(", "expression", ")", ".", "get", "(", "bean", ")", ";", "}" ]
解析Bean中的属性值 @param bean Bean对象,支持Map、List、Collection、Array @param expression 表达式,例如:person.friend[5].name @return Bean属性值 @see BeanPath#get(Object) @since 3.0.7
[ "解析Bean中的属性值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanUtil.java#L301-L303
train
Gets the property value of the given bean using the given expression.
[ 30522, 2270, 10763, 4874, 2131, 21572, 4842, 3723, 1006, 4874, 14068, 1010, 5164, 3670, 1007, 1063, 2709, 14068, 15069, 1012, 3443, 1006, 3670, 1007, 1012, 2131, 1006, 14068, 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-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java
ServletUtil.fillBean
public static <T> T fillBean(final ServletRequest request, T bean, CopyOptions copyOptions) { final String beanName = StrUtil.lowerFirst(bean.getClass().getSimpleName()); return BeanUtil.fillBean(bean, new ValueProvider<String>() { @Override public Object value(String key, Type valueType) { String va...
java
public static <T> T fillBean(final ServletRequest request, T bean, CopyOptions copyOptions) { final String beanName = StrUtil.lowerFirst(bean.getClass().getSimpleName()); return BeanUtil.fillBean(bean, new ValueProvider<String>() { @Override public Object value(String key, Type valueType) { String va...
[ "public", "static", "<", "T", ">", "T", "fillBean", "(", "final", "ServletRequest", "request", ",", "T", "bean", ",", "CopyOptions", "copyOptions", ")", "{", "final", "String", "beanName", "=", "StrUtil", ".", "lowerFirst", "(", "bean", ".", "getClass", "(...
ServletRequest 参数转Bean @param <T> Bean类型 @param request ServletRequest @param bean Bean @param copyOptions 注入时的设置 @return Bean @since 3.0.4
[ "ServletRequest", "参数转Bean" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java#L125-L148
train
Fill bean from request.
[ 30522, 2270, 10763, 1026, 1056, 1028, 1056, 6039, 4783, 2319, 1006, 2345, 14262, 2615, 7485, 2890, 15500, 5227, 1010, 1056, 14068, 1010, 6100, 7361, 9285, 6100, 7361, 9285, 1007, 1063, 2345, 5164, 14068, 18442, 1027, 2358, 22134, 4014, 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...
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Bzip2BlockDecompressor.java
Bzip2BlockDecompressor.read
public int read() { while (rleRepeat < 1) { if (bwtBytesDecoded == bwtBlockLength) { return -1; } int nextByte = decodeNextBWTByte(); if (nextByte != rleLastDecodedByte) { // New byte, restart accumulation rleLastDe...
java
public int read() { while (rleRepeat < 1) { if (bwtBytesDecoded == bwtBlockLength) { return -1; } int nextByte = decodeNextBWTByte(); if (nextByte != rleLastDecodedByte) { // New byte, restart accumulation rleLastDe...
[ "public", "int", "read", "(", ")", "{", "while", "(", "rleRepeat", "<", "1", ")", "{", "if", "(", "bwtBytesDecoded", "==", "bwtBlockLength", ")", "{", "return", "-", "1", ";", "}", "int", "nextByte", "=", "decodeNextBWTByte", "(", ")", ";", "if", "("...
Decodes a byte from the final Run-Length Encoding stage, pulling a new byte from the Burrows-Wheeler Transform stage when required. @return The decoded byte, or -1 if there are no more bytes
[ "Decodes", "a", "byte", "from", "the", "final", "Run", "-", "Length", "Encoding", "stage", "pulling", "a", "new", "byte", "from", "the", "Burrows", "-", "Wheeler", "Transform", "stage", "when", "required", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Bzip2BlockDecompressor.java#L273-L302
train
Read a single BWT byte from the stream.
[ 30522, 2270, 20014, 3191, 1006, 1007, 1063, 2096, 1006, 1054, 3917, 13699, 5243, 2102, 1026, 1015, 1007, 1063, 2065, 1006, 1038, 26677, 3762, 4570, 3207, 16044, 2094, 1027, 1027, 1038, 26677, 23467, 7770, 13512, 2232, 1007, 1063, 2709, 1011...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.next
private boolean next() throws IOException { if (valuesRead >= endOfPageValueCount) { if (valuesRead >= totalValueCount) { // How do we get here? Throw end of stream exception? return false; } readPage(); } ++valuesRead; // TODO: Don't read for flat schemas //repetit...
java
private boolean next() throws IOException { if (valuesRead >= endOfPageValueCount) { if (valuesRead >= totalValueCount) { // How do we get here? Throw end of stream exception? return false; } readPage(); } ++valuesRead; // TODO: Don't read for flat schemas //repetit...
[ "private", "boolean", "next", "(", ")", "throws", "IOException", "{", "if", "(", "valuesRead", ">=", "endOfPageValueCount", ")", "{", "if", "(", "valuesRead", ">=", "totalValueCount", ")", "{", "// How do we get here? Throw end of stream exception?", "return", "false"...
Advances to the next value. Returns true if the value is non-null.
[ "Advances", "to", "the", "next", "value", ".", "Returns", "true", "if", "the", "value", "is", "non", "-", "null", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java#L136-L148
train
Read the next value from the underlying stream.
[ 30522, 2797, 22017, 20898, 2279, 1006, 1007, 11618, 22834, 10288, 24422, 1063, 2065, 1006, 5300, 16416, 2094, 1028, 1027, 2203, 11253, 13704, 10175, 5657, 3597, 16671, 1007, 1063, 2065, 1006, 5300, 16416, 2094, 1028, 1027, 2561, 10175, 5657, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServer.java
HistoryServer.createOrGetFile
static FileWriter createOrGetFile(File folder, String name) throws IOException { File file = new File(folder, name + ".json"); if (!file.exists()) { Files.createFile(file.toPath()); } FileWriter fr = new FileWriter(file); return fr; }
java
static FileWriter createOrGetFile(File folder, String name) throws IOException { File file = new File(folder, name + ".json"); if (!file.exists()) { Files.createFile(file.toPath()); } FileWriter fr = new FileWriter(file); return fr; }
[ "static", "FileWriter", "createOrGetFile", "(", "File", "folder", ",", "String", "name", ")", "throws", "IOException", "{", "File", "file", "=", "new", "File", "(", "folder", ",", "name", "+", "\".json\"", ")", ";", "if", "(", "!", "file", ".", "exists",...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServer.java#L271-L278
train
Create or get file.
[ 30522, 10763, 5371, 15994, 3443, 21759, 3388, 8873, 2571, 1006, 5371, 19622, 1010, 5164, 2171, 1007, 11618, 22834, 10288, 24422, 1063, 5371, 5371, 1027, 2047, 5371, 1006, 19622, 1010, 2171, 1009, 1000, 1012, 1046, 3385, 1000, 1007, 1025, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-hcatalog/src/main/java/org/apache/flink/hcatalog/HCatInputFormatBase.java
HCatInputFormatBase.getFields
public HCatInputFormatBase<T> getFields(String... fields) throws IOException { // build output schema ArrayList<HCatFieldSchema> fieldSchemas = new ArrayList<HCatFieldSchema>(fields.length); for (String field : fields) { fieldSchemas.add(this.outputSchema.get(field)); } this.outputSchema = new HCatSchema(...
java
public HCatInputFormatBase<T> getFields(String... fields) throws IOException { // build output schema ArrayList<HCatFieldSchema> fieldSchemas = new ArrayList<HCatFieldSchema>(fields.length); for (String field : fields) { fieldSchemas.add(this.outputSchema.get(field)); } this.outputSchema = new HCatSchema(...
[ "public", "HCatInputFormatBase", "<", "T", ">", "getFields", "(", "String", "...", "fields", ")", "throws", "IOException", "{", "// build output schema", "ArrayList", "<", "HCatFieldSchema", ">", "fieldSchemas", "=", "new", "ArrayList", "<", "HCatFieldSchema", ">", ...
Specifies the fields which are returned by the InputFormat and their order. @param fields The fields and their order which are returned by the InputFormat. @return This InputFormat with specified return fields. @throws java.io.IOException
[ "Specifies", "the", "fields", "which", "are", "returned", "by", "the", "InputFormat", "and", "their", "order", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hcatalog/src/main/java/org/apache/flink/hcatalog/HCatInputFormatBase.java#L134-L147
train
Get the fields from the output schema.
[ 30522, 2270, 16731, 20363, 18780, 14192, 4017, 15058, 1026, 1056, 1028, 2131, 15155, 1006, 5164, 1012, 1012, 1012, 4249, 1007, 11618, 22834, 10288, 24422, 1063, 1013, 1013, 3857, 6434, 8040, 28433, 9140, 9863, 1026, 16731, 4017, 15155, 5403, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/instance/SimpleSlot.java
SimpleSlot.releaseSlot
@Override public CompletableFuture<?> releaseSlot(@Nullable Throwable cause) { if (!isCanceled()) { final CompletableFuture<?> terminationFuture; if (payload != null) { // trigger the failure of the slot payload payload.fail(cause != null ? cause : new FlinkException("TaskManager was lost/killed: " + ...
java
@Override public CompletableFuture<?> releaseSlot(@Nullable Throwable cause) { if (!isCanceled()) { final CompletableFuture<?> terminationFuture; if (payload != null) { // trigger the failure of the slot payload payload.fail(cause != null ? cause : new FlinkException("TaskManager was lost/killed: " + ...
[ "@", "Override", "public", "CompletableFuture", "<", "?", ">", "releaseSlot", "(", "@", "Nullable", "Throwable", "cause", ")", "{", "if", "(", "!", "isCanceled", "(", ")", ")", "{", "final", "CompletableFuture", "<", "?", ">", "terminationFuture", ";", "if...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/instance/SimpleSlot.java#L220-L259
train
Releases the slot.
[ 30522, 1030, 2058, 15637, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 1029, 1028, 7085, 10994, 1006, 1030, 19701, 3085, 5466, 3085, 3426, 1007, 1063, 2065, 1006, 999, 2003, 9336, 29109, 2098, 1006, 1007, 1007, 1063, 2345, 4012, 10814, 108...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/configuration/Configuration.java
Configuration.toMap
@Override public Map<String, String> toMap() { synchronized (this.confData){ Map<String, String> ret = new HashMap<>(this.confData.size()); for (Map.Entry<String, Object> entry : confData.entrySet()) { ret.put(entry.getKey(), entry.getValue().toString()); } return ret; } }
java
@Override public Map<String, String> toMap() { synchronized (this.confData){ Map<String, String> ret = new HashMap<>(this.confData.size()); for (Map.Entry<String, Object> entry : confData.entrySet()) { ret.put(entry.getKey(), entry.getValue().toString()); } return ret; } }
[ "@", "Override", "public", "Map", "<", "String", ",", "String", ">", "toMap", "(", ")", "{", "synchronized", "(", "this", ".", "confData", ")", "{", "Map", "<", "String", ",", "String", ">", "ret", "=", "new", "HashMap", "<>", "(", "this", ".", "co...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L750-L759
train
Returns a map of the configuration data.
[ 30522, 1030, 2058, 15637, 2270, 4949, 1026, 5164, 1010, 5164, 1028, 3419, 9331, 1006, 1007, 1063, 25549, 1006, 2023, 1012, 9530, 2546, 2850, 2696, 1007, 1063, 4949, 1026, 5164, 1010, 5164, 1028, 2128, 2102, 1027, 2047, 23325, 2863, 2361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Scheduler.java
Scheduler.schedule
public Scheduler schedule(Setting cronSetting) { if (CollectionUtil.isNotEmpty(cronSetting)) { String group; for (Entry<String, LinkedHashMap<String, String>> groupedEntry : cronSetting.getGroupedMap().entrySet()) { group = groupedEntry.getKey(); for (Entry<String, String> entry : groupedEntry.getV...
java
public Scheduler schedule(Setting cronSetting) { if (CollectionUtil.isNotEmpty(cronSetting)) { String group; for (Entry<String, LinkedHashMap<String, String>> groupedEntry : cronSetting.getGroupedMap().entrySet()) { group = groupedEntry.getKey(); for (Entry<String, String> entry : groupedEntry.getV...
[ "public", "Scheduler", "schedule", "(", "Setting", "cronSetting", ")", "{", "if", "(", "CollectionUtil", ".", "isNotEmpty", "(", "cronSetting", ")", ")", "{", "String", "group", ";", "for", "(", "Entry", "<", "String", ",", "LinkedHashMap", "<", "String", ...
批量加入配置文件中的定时任务<br> 配置文件格式为: xxx.xxx.xxx.Class.method = * * * * * @param cronSetting 定时任务设置文件 @return this
[ "批量加入配置文件中的定时任务<br", ">", "配置文件格式为:", "xxx", ".", "xxx", ".", "xxx", ".", "Class", ".", "method", "=", "*", "*", "*", "*", "*" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/Scheduler.java#L176-L197
train
Schedules a job based on a CronSetting.
[ 30522, 2270, 6134, 2099, 6134, 1006, 4292, 13675, 5644, 18319, 3070, 1007, 1063, 2065, 1006, 3074, 21823, 2140, 1012, 3475, 12184, 27718, 2100, 1006, 13675, 5644, 18319, 3070, 1007, 1007, 1063, 5164, 2177, 1025, 2005, 1006, 4443, 1026, 5164...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.compareTo
@Override public int compareTo(CharSequence string) { if (this == string) { return 0; } int result; int length1 = length(); int length2 = string.length(); int minLength = Math.min(length1, length2); for (int i = 0, j = arrayOffset(); i < minLength...
java
@Override public int compareTo(CharSequence string) { if (this == string) { return 0; } int result; int length1 = length(); int length2 = string.length(); int minLength = Math.min(length1, length2); for (int i = 0, j = arrayOffset(); i < minLength...
[ "@", "Override", "public", "int", "compareTo", "(", "CharSequence", "string", ")", "{", "if", "(", "this", "==", "string", ")", "{", "return", "0", ";", "}", "int", "result", ";", "int", "length1", "=", "length", "(", ")", ";", "int", "length2", "=",...
Compares the specified string to this string using the ASCII values of the characters. Returns 0 if the strings contain the same characters in the same order. Returns a negative integer if the first non-equal character in this string has an ASCII value which is less than the ASCII value of the character at the same pos...
[ "Compares", "the", "specified", "string", "to", "this", "string", "using", "the", "ASCII", "values", "of", "the", "characters", ".", "Returns", "0", "if", "the", "strings", "contain", "the", "same", "characters", "in", "the", "same", "order", ".", "Returns",...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L447-L465
train
Compare this sequence to another sequence.
[ 30522, 1030, 2058, 15637, 2270, 20014, 12826, 3406, 1006, 25869, 3366, 4226, 5897, 5164, 1007, 1063, 2065, 1006, 2023, 1027, 1027, 5164, 1007, 1063, 2709, 1014, 1025, 1065, 20014, 2765, 1025, 20014, 3091, 2487, 1027, 3091, 1006, 1007, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContext.java
SslContext.newServerContext
@Deprecated public static SslContext newServerContext(SslProvider provider, File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLExcepti...
java
@Deprecated public static SslContext newServerContext(SslProvider provider, File certChainFile, File keyFile, String keyPassword, Iterable<String> ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout) throws SSLExcepti...
[ "@", "Deprecated", "public", "static", "SslContext", "newServerContext", "(", "SslProvider", "provider", ",", "File", "certChainFile", ",", "File", "keyFile", ",", "String", "keyPassword", ",", "Iterable", "<", "String", ">", "ciphers", ",", "CipherSuiteFilter", "...
Creates a new server-side {@link SslContext}. @param provider the {@link SslContext} implementation to use. {@code null} to use the current default one. @param certChainFile an X.509 certificate chain file in PEM format @param keyFile a PKCS#8 private key file in PEM format @param keyPassword the password of the {@cod...
[ "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#L336-L343
train
Create a new server context using the specified SSL provider.
[ 30522, 1030, 2139, 28139, 12921, 2270, 10763, 7020, 22499, 10111, 18413, 2739, 2121, 6299, 8663, 18209, 1006, 7020, 14277, 12298, 18688, 10802, 1010, 5371, 8292, 5339, 24925, 2078, 8873, 2571, 1010, 5371, 3145, 8873, 2571, 1010, 5164, 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...
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java
Sftp.init
public void init(Session session, Charset charset) { this.session = session; init(JschUtil.openSftp(session), charset); }
java
public void init(Session session, Charset charset) { this.session = session; init(JschUtil.openSftp(session), charset); }
[ "public", "void", "init", "(", "Session", "session", ",", "Charset", "charset", ")", "{", "this", ".", "session", "=", "session", ";", "init", "(", "JschUtil", ".", "openSftp", "(", "session", ")", ",", "charset", ")", ";", "}" ]
初始化 @param session {@link Session} @param charset 编码
[ "初始化" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java#L120-L123
train
Initializes the handle.
[ 30522, 2270, 11675, 1999, 4183, 1006, 5219, 5219, 1010, 25869, 13462, 25869, 13462, 1007, 1063, 2023, 1012, 5219, 1027, 5219, 1025, 1999, 4183, 1006, 1046, 11624, 21823, 2140, 1012, 7480, 6199, 2361, 1006, 5219, 1007, 1010, 25869, 13462, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.move
public static void move(File src, File dest, boolean isOverride) throws IORuntimeException { // check if (false == src.exists()) { throw new IORuntimeException("File not found: " + src); } // 来源为文件夹,目标为文件 if (src.isDirectory() && dest.isFile()) { throw new IORuntimeException(StrUtil.format("Can...
java
public static void move(File src, File dest, boolean isOverride) throws IORuntimeException { // check if (false == src.exists()) { throw new IORuntimeException("File not found: " + src); } // 来源为文件夹,目标为文件 if (src.isDirectory() && dest.isFile()) { throw new IORuntimeException(StrUtil.format("Can...
[ "public", "static", "void", "move", "(", "File", "src", ",", "File", "dest", ",", "boolean", "isOverride", ")", "throws", "IORuntimeException", "{", "// check\r", "if", "(", "false", "==", "src", ".", "exists", "(", ")", ")", "{", "throw", "new", "IORunt...
移动文件或者目录 @param src 源文件或者目录 @param dest 目标文件或者目录 @param isOverride 是否覆盖目标,只有目标为文件才覆盖 @throws IORuntimeException IO异常
[ "移动文件或者目录" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1056-L1086
train
Move a file or directory to a file.
[ 30522, 2270, 10763, 11675, 2693, 1006, 5371, 5034, 2278, 1010, 5371, 4078, 2102, 1010, 22017, 20898, 11163, 6299, 15637, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 1013, 1013, 4638, 2065, 1006, 6270, 1027, 1027, 5034, 2278, 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-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getString
public String getString(String key, String defaultValue) { Object o = getRawValue(key); if (o == null) { return defaultValue; } else { return o.toString(); } }
java
public String getString(String key, String defaultValue) { Object o = getRawValue(key); if (o == null) { return defaultValue; } else { return o.toString(); } }
[ "public", "String", "getString", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "Object", "o", "=", "getRawValue", "(", "key", ")", ";", "if", "(", "o", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "else", "{", "return", ...
Returns the value associated with the given key as a string. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (default) value associated with the given key
[ "Returns", "the", "value", "associated", "with", "the", "given", "key", "as", "a", "string", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L134-L141
train
Returns the value of the specified key as a String.
[ 30522, 2270, 5164, 4152, 18886, 3070, 1006, 5164, 3145, 1010, 5164, 12398, 10175, 5657, 1007, 1063, 4874, 1051, 1027, 2131, 2527, 2860, 10175, 5657, 1006, 3145, 1007, 1025, 2065, 1006, 1051, 1027, 1027, 19701, 1007, 1063, 2709, 12398, 10175...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
common/src/main/java/io/netty/util/internal/PlatformDependent.java
PlatformDependent.allocateDirectNoCleaner
public static ByteBuffer allocateDirectNoCleaner(int capacity) { assert USE_DIRECT_BUFFER_NO_CLEANER; incrementMemoryCounter(capacity); try { return PlatformDependent0.allocateDirectNoCleaner(capacity); } catch (Throwable e) { decrementMemoryCounter(capacity); ...
java
public static ByteBuffer allocateDirectNoCleaner(int capacity) { assert USE_DIRECT_BUFFER_NO_CLEANER; incrementMemoryCounter(capacity); try { return PlatformDependent0.allocateDirectNoCleaner(capacity); } catch (Throwable e) { decrementMemoryCounter(capacity); ...
[ "public", "static", "ByteBuffer", "allocateDirectNoCleaner", "(", "int", "capacity", ")", "{", "assert", "USE_DIRECT_BUFFER_NO_CLEANER", ";", "incrementMemoryCounter", "(", "capacity", ")", ";", "try", "{", "return", "PlatformDependent0", ".", "allocateDirectNoCleaner", ...
Allocate a new {@link ByteBuffer} with the given {@code capacity}. {@link ByteBuffer}s allocated with this method <strong>MUST</strong> be deallocated via {@link #freeDirectNoCleaner(ByteBuffer)}.
[ "Allocate", "a", "new", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/PlatformDependent.java#L619-L630
train
Allocate a direct buffer of the given size without cleaning it.
[ 30522, 2270, 10763, 24880, 8569, 12494, 11095, 7442, 6593, 3630, 14321, 7231, 2099, 1006, 20014, 3977, 1007, 1063, 20865, 2224, 1035, 3622, 1035, 17698, 1035, 2053, 1035, 20133, 1025, 4297, 28578, 4765, 4168, 5302, 2854, 3597, 16671, 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...
apache/flink
flink-core/src/main/java/org/apache/flink/core/plugin/PluginManager.java
PluginManager.load
public <P extends Plugin> Iterator<P> load(Class<P> service) { ArrayList<Iterator<P>> combinedIterators = new ArrayList<>(pluginDescriptors.size()); for (PluginDescriptor pluginDescriptor : pluginDescriptors) { PluginLoader pluginLoader = new PluginLoader(pluginDescriptor, parentClassLoader); combinedIterator...
java
public <P extends Plugin> Iterator<P> load(Class<P> service) { ArrayList<Iterator<P>> combinedIterators = new ArrayList<>(pluginDescriptors.size()); for (PluginDescriptor pluginDescriptor : pluginDescriptors) { PluginLoader pluginLoader = new PluginLoader(pluginDescriptor, parentClassLoader); combinedIterator...
[ "public", "<", "P", "extends", "Plugin", ">", "Iterator", "<", "P", ">", "load", "(", "Class", "<", "P", ">", "service", ")", "{", "ArrayList", "<", "Iterator", "<", "P", ">>", "combinedIterators", "=", "new", "ArrayList", "<>", "(", "pluginDescriptors",...
Returns in iterator over all available implementations of the given service interface (SPI) in all the plugins known to this plugin manager instance. @param service the service interface (SPI) for which implementations are requested. @param <P> Type of the requested plugin service. @return Iterator over all implementa...
[ "Returns", "in", "iterator", "over", "all", "available", "implementations", "of", "the", "given", "service", "interface", "(", "SPI", ")", "in", "all", "the", "plugins", "known", "to", "this", "plugin", "manager", "instance", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/plugin/PluginManager.java#L61-L68
train
Load all plugins from the classpath.
[ 30522, 2270, 1026, 1052, 8908, 13354, 2378, 1028, 2009, 6906, 4263, 1026, 1052, 1028, 7170, 1006, 2465, 1026, 1052, 1028, 2326, 1007, 1063, 9140, 9863, 1026, 2009, 6906, 4263, 1026, 1052, 1028, 1028, 4117, 21646, 18926, 1027, 2047, 9140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpoint.java
HealthEndpoint.healthForComponent
@ReadOperation public Health healthForComponent(@Selector String component) { HealthIndicator indicator = getNestedHealthIndicator(this.healthIndicator, component); return (indicator != null) ? indicator.health() : null; }
java
@ReadOperation public Health healthForComponent(@Selector String component) { HealthIndicator indicator = getNestedHealthIndicator(this.healthIndicator, component); return (indicator != null) ? indicator.health() : null; }
[ "@", "ReadOperation", "public", "Health", "healthForComponent", "(", "@", "Selector", "String", "component", ")", "{", "HealthIndicator", "indicator", "=", "getNestedHealthIndicator", "(", "this", ".", "healthIndicator", ",", "component", ")", ";", "return", "(", ...
Return the {@link Health} of a particular component or {@code null} if such component does not exist. @param component the name of a particular {@link HealthIndicator} @return the {@link Health} for the component or {@code null}
[ "Return", "the", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpoint.java#L59-L64
train
Get the health for the specified component.
[ 30522, 1030, 3191, 25918, 3370, 2270, 2740, 2740, 29278, 9006, 29513, 3372, 1006, 1030, 27000, 5164, 6922, 1007, 1063, 2740, 22254, 5555, 4263, 17245, 1027, 2131, 5267, 3064, 20192, 24658, 22254, 5555, 4263, 1006, 2023, 1012, 2740, 22254, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/SqlRunner.java
SqlRunner.create
public static SqlRunner create(DataSource ds, String driverClassName) { return new SqlRunner(ds, DialectFactory.newDialect(driverClassName)); }
java
public static SqlRunner create(DataSource ds, String driverClassName) { return new SqlRunner(ds, DialectFactory.newDialect(driverClassName)); }
[ "public", "static", "SqlRunner", "create", "(", "DataSource", "ds", ",", "String", "driverClassName", ")", "{", "return", "new", "SqlRunner", "(", "ds", ",", "DialectFactory", ".", "newDialect", "(", "driverClassName", ")", ")", ";", "}" ]
创建SqlRunner @param ds 数据源 @param driverClassName 数据库连接驱动类名 @return SqlRunner
[ "创建SqlRunner" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlRunner.java#L73-L75
train
Creates a new SqlRunner instance with the specified driver class name.
[ 30522, 2270, 10763, 29296, 23195, 3443, 1006, 2951, 6499, 3126, 3401, 16233, 1010, 5164, 4062, 26266, 18442, 1007, 1063, 2709, 2047, 29296, 23195, 1006, 16233, 1010, 9329, 21450, 1012, 2047, 27184, 22471, 1006, 4062, 26266, 18442, 1007, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerSnapshot.java
PojoSerializerSnapshot.newPojoHasDifferentSubclassRegistrationOrder
private static boolean newPojoHasDifferentSubclassRegistrationOrder( LinkedOptionalMap<Class<?>, TypeSerializerSnapshot<?>> registeredSubclassSerializerSnapshots, PojoSerializer<?> newPojoSerializer) { Set<Class<?>> previousRegistrationOrder = registeredSubclassSerializerSnapshots.unwrapOptionals().keySet(); ...
java
private static boolean newPojoHasDifferentSubclassRegistrationOrder( LinkedOptionalMap<Class<?>, TypeSerializerSnapshot<?>> registeredSubclassSerializerSnapshots, PojoSerializer<?> newPojoSerializer) { Set<Class<?>> previousRegistrationOrder = registeredSubclassSerializerSnapshots.unwrapOptionals().keySet(); ...
[ "private", "static", "boolean", "newPojoHasDifferentSubclassRegistrationOrder", "(", "LinkedOptionalMap", "<", "Class", "<", "?", ">", ",", "TypeSerializerSnapshot", "<", "?", ">", ">", "registeredSubclassSerializerSnapshots", ",", "PojoSerializer", "<", "?", ">", "newP...
Checks whether the new {@link PojoSerializer} has a different subclass registration order compared to the previous one.
[ "Checks", "whether", "the", "new", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/PojoSerializerSnapshot.java#L388-L394
train
Checks if the new pojo serializer has a different registration order.
[ 30522, 2797, 10763, 22017, 20898, 2047, 6873, 5558, 14949, 4305, 12494, 11187, 12083, 26266, 2890, 24063, 8156, 8551, 2121, 1006, 5799, 7361, 3508, 2389, 2863, 2361, 1026, 2465, 1026, 1029, 1028, 1010, 4127, 11610, 28863, 2015, 2532, 4523, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/net/ConnectionUtils.java
ConnectionUtils.tryLocalHostBeforeReturning
private static InetAddress tryLocalHostBeforeReturning( InetAddress preliminaryResult, SocketAddress targetAddress, boolean logging) throws IOException { InetAddress localhostName = InetAddress.getLocalHost(); if (preliminaryResult.equals(localhostName)) { // preliminary result is equal to the local host n...
java
private static InetAddress tryLocalHostBeforeReturning( InetAddress preliminaryResult, SocketAddress targetAddress, boolean logging) throws IOException { InetAddress localhostName = InetAddress.getLocalHost(); if (preliminaryResult.equals(localhostName)) { // preliminary result is equal to the local host n...
[ "private", "static", "InetAddress", "tryLocalHostBeforeReturning", "(", "InetAddress", "preliminaryResult", ",", "SocketAddress", "targetAddress", ",", "boolean", "logging", ")", "throws", "IOException", "{", "InetAddress", "localhostName", "=", "InetAddress", ".", "getLo...
This utility method tries to connect to the JobManager using the InetAddress returned by InetAddress.getLocalHost(). The purpose of the utility is to have a final try connecting to the target address using the LocalHost before using the address returned. We do a second try because the JM might have been unavailable dur...
[ "This", "utility", "method", "tries", "to", "connect", "to", "the", "JobManager", "using", "the", "InetAddress", "returned", "by", "InetAddress", ".", "getLocalHost", "()", ".", "The", "purpose", "of", "the", "utility", "is", "to", "have", "a", "final", "try...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/net/ConnectionUtils.java#L187-L206
train
Try to connect to the local host before returning the result.
[ 30522, 2797, 10763, 1999, 12928, 14141, 8303, 3046, 4135, 9289, 15006, 2102, 4783, 29278, 7869, 22299, 2075, 1006, 1999, 12928, 14141, 8303, 8824, 6072, 11314, 1010, 22278, 4215, 16200, 4757, 4539, 4215, 16200, 4757, 1010, 22017, 20898, 15899...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollServerSocketChannelConfig.java
EpollServerSocketChannelConfig.setFreeBind
public EpollServerSocketChannelConfig setFreeBind(boolean freeBind) { try { ((EpollServerSocketChannel) channel).socket.setIpFreeBind(freeBind); return this; } catch (IOException e) { throw new ChannelException(e); } }
java
public EpollServerSocketChannelConfig setFreeBind(boolean freeBind) { try { ((EpollServerSocketChannel) channel).socket.setIpFreeBind(freeBind); return this; } catch (IOException e) { throw new ChannelException(e); } }
[ "public", "EpollServerSocketChannelConfig", "setFreeBind", "(", "boolean", "freeBind", ")", "{", "try", "{", "(", "(", "EpollServerSocketChannel", ")", "channel", ")", ".", "socket", ".", "setIpFreeBind", "(", "freeBind", ")", ";", "return", "this", ";", "}", ...
If {@code true} is used <a href="http://man7.org/linux/man-pages/man7/ip.7.html">IP_FREEBIND</a> is enabled, {@code false} for disable it. Default is disabled.
[ "If", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollServerSocketChannelConfig.java#L232-L239
train
Sets whether the free bind flag is set.
[ 30522, 2270, 4958, 14511, 8043, 14028, 7432, 3388, 26058, 8663, 8873, 2290, 2275, 23301, 8428, 2094, 1006, 22017, 20898, 2489, 8428, 2094, 1007, 1063, 3046, 1063, 1006, 1006, 4958, 14511, 8043, 14028, 7432, 3388, 26058, 1007, 3149, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronClassifier.java
PerceptronClassifier.trainAveragedPerceptron
private static LinearModel trainAveragedPerceptron(Instance[] instanceList, FeatureMap featureMap, int maxIteration) { float[] parameter = new float[featureMap.size()]; double[] sum = new double[featureMap.size()]; int[] time = new int[featureMap.size()]; AveragedPerceptron model = ...
java
private static LinearModel trainAveragedPerceptron(Instance[] instanceList, FeatureMap featureMap, int maxIteration) { float[] parameter = new float[featureMap.size()]; double[] sum = new double[featureMap.size()]; int[] time = new int[featureMap.size()]; AveragedPerceptron model = ...
[ "private", "static", "LinearModel", "trainAveragedPerceptron", "(", "Instance", "[", "]", "instanceList", ",", "FeatureMap", "featureMap", ",", "int", "maxIteration", ")", "{", "float", "[", "]", "parameter", "=", "new", "float", "[", "featureMap", ".", "size", ...
平均感知机训练算法 @param instanceList 训练实例 @param featureMap 特征函数 @param maxIteration 训练迭代次数
[ "平均感知机训练算法" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/PerceptronClassifier.java#L79-L100
train
Train Averaged Perceptron model.
[ 30522, 2797, 10763, 7399, 5302, 9247, 3345, 22208, 18655, 4842, 3401, 13876, 4948, 1006, 6013, 1031, 1033, 6013, 9863, 1010, 3444, 2863, 2361, 3444, 2863, 2361, 1010, 20014, 21510, 14621, 3508, 1007, 1063, 14257, 1031, 1033, 16381, 1027, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/Setting.java
Setting.putAll
public Setting putAll(String group, Map<? extends String, ? extends String> m) { this.groupedMap.putAll(group, m); return this; }
java
public Setting putAll(String group, Map<? extends String, ? extends String> m) { this.groupedMap.putAll(group, m); return this; }
[ "public", "Setting", "putAll", "(", "String", "group", ",", "Map", "<", "?", "extends", "String", ",", "?", "extends", "String", ">", "m", ")", "{", "this", ".", "groupedMap", ".", "putAll", "(", "group", ",", "m", ")", ";", "return", "this", ";", ...
加入多个键值对到某个分组下 @param group 分组 @param m 键值对 @return this
[ "加入多个键值对到某个分组下" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L443-L446
train
Adds all values from a Map to the specified group.
[ 30522, 2270, 4292, 2404, 8095, 1006, 5164, 2177, 1010, 4949, 1026, 1029, 8908, 5164, 1010, 1029, 8908, 5164, 1028, 1049, 1007, 1063, 2023, 1012, 15131, 2863, 2361, 1012, 2404, 8095, 1006, 2177, 1010, 1049, 1007, 1025, 2709, 2023, 1025, 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-json/src/main/java/cn/hutool/json/JSONArray.java
JSONArray.toJSONString
@Override public String toJSONString(int indentFactor) throws JSONException { StringWriter sw = new StringWriter(); synchronized (sw.getBuffer()) { return this.write(sw, indentFactor, 0).toString(); } }
java
@Override public String toJSONString(int indentFactor) throws JSONException { StringWriter sw = new StringWriter(); synchronized (sw.getBuffer()) { return this.write(sw, indentFactor, 0).toString(); } }
[ "@", "Override", "public", "String", "toJSONString", "(", "int", "indentFactor", ")", "throws", "JSONException", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "synchronized", "(", "sw", ".", "getBuffer", "(", ")", ")", "{", "return", ...
转为JSON字符串,指定缩进值 @param indentFactor 缩进值,既缩进空格数 @return JSON字符串 @throws JSONException JSON写入异常
[ "转为JSON字符串,指定缩进值" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONArray.java#L491-L497
train
Returns a JSON string representation of this object.
[ 30522, 1030, 2058, 15637, 2270, 5164, 2000, 22578, 5644, 18886, 3070, 1006, 20014, 27427, 4765, 7011, 16761, 1007, 11618, 1046, 3385, 10288, 24422, 1063, 5164, 15994, 25430, 1027, 2047, 5164, 15994, 1006, 1007, 1025, 25549, 1006, 25430, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONTokener.java
JSONTokener.nextTo
public String nextTo(String delimiters) throws JSONException { char c; StringBuilder sb = new StringBuilder(); for (;;) { c = this.next(); if (delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r') { if (c != 0) { this.back(); } return sb.toString().trim(); } sb.append(c); ...
java
public String nextTo(String delimiters) throws JSONException { char c; StringBuilder sb = new StringBuilder(); for (;;) { c = this.next(); if (delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r') { if (c != 0) { this.back(); } return sb.toString().trim(); } sb.append(c); ...
[ "public", "String", "nextTo", "(", "String", "delimiters", ")", "throws", "JSONException", "{", "char", "c", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", ";", ";", ")", "{", "c", "=", "this", ".", "next", "(", "...
Get the text up but not including one of the specified delimiter characters or the end of line, whichever comes first. @param delimiters A set of delimiter characters. @return A string, trimmed.
[ "Get", "the", "text", "up", "but", "not", "including", "one", "of", "the", "specified", "delimiter", "characters", "or", "the", "end", "of", "line", "whichever", "comes", "first", "." ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONTokener.java#L277-L290
train
Get the next value in the JSON string.
[ 30522, 2270, 5164, 2279, 3406, 1006, 5164, 3972, 27605, 7747, 1007, 11618, 1046, 3385, 10288, 24422, 1063, 25869, 1039, 1025, 5164, 8569, 23891, 2099, 24829, 1027, 2047, 5164, 8569, 23891, 2099, 1006, 1007, 1025, 2005, 1006, 1025, 1025, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java
RecordWriter.notifyFlusherException
private void notifyFlusherException(Throwable t) { if (flusherException == null) { LOG.error("An exception happened while flushing the outputs", t); flusherException = t; } }
java
private void notifyFlusherException(Throwable t) { if (flusherException == null) { LOG.error("An exception happened while flushing the outputs", t); flusherException = t; } }
[ "private", "void", "notifyFlusherException", "(", "Throwable", "t", ")", "{", "if", "(", "flusherException", "==", "null", ")", "{", "LOG", ".", "error", "(", "\"An exception happened while flushing the outputs\"", ",", "t", ")", ";", "flusherException", "=", "t",...
Notifies the writer that the output flusher thread encountered an exception. @param t The exception to report.
[ "Notifies", "the", "writer", "that", "the", "output", "flusher", "thread", "encountered", "an", "exception", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/RecordWriter.java#L292-L297
train
Notifies the flusher exception.
[ 30522, 2797, 11675, 2025, 8757, 10258, 20668, 7869, 2595, 24422, 1006, 5466, 3085, 1056, 1007, 1063, 2065, 1006, 13862, 7869, 2595, 24422, 1027, 1027, 19701, 1007, 1063, 8833, 1012, 7561, 1006, 1000, 2019, 6453, 3047, 2096, 23519, 1996, 278...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/rpc/FencedRpcEndpoint.java
FencedRpcEndpoint.callAsyncWithoutFencing
protected <V> CompletableFuture<V> callAsyncWithoutFencing(Callable<V> callable, Time timeout) { if (rpcServer instanceof FencedMainThreadExecutable) { return ((FencedMainThreadExecutable) rpcServer).callAsyncWithoutFencing(callable, timeout); } else { throw new RuntimeException("FencedRpcEndpoint has not bee...
java
protected <V> CompletableFuture<V> callAsyncWithoutFencing(Callable<V> callable, Time timeout) { if (rpcServer instanceof FencedMainThreadExecutable) { return ((FencedMainThreadExecutable) rpcServer).callAsyncWithoutFencing(callable, timeout); } else { throw new RuntimeException("FencedRpcEndpoint has not bee...
[ "protected", "<", "V", ">", "CompletableFuture", "<", "V", ">", "callAsyncWithoutFencing", "(", "Callable", "<", "V", ">", "callable", ",", "Time", "timeout", ")", "{", "if", "(", "rpcServer", "instanceof", "FencedMainThreadExecutable", ")", "{", "return", "("...
Run the given callable in the main thread of the RpcEndpoint without checking the fencing token. This allows to run operations outside of the fencing token scope. @param callable to run in the main thread of the rpc endpoint without checkint the fencing token. @param timeout for the operation. @return Future containin...
[ "Run", "the", "given", "callable", "in", "the", "main", "thread", "of", "the", "RpcEndpoint", "without", "checking", "the", "fencing", "token", ".", "This", "allows", "to", "run", "operations", "outside", "of", "the", "fencing", "token", "scope", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java#L133-L139
train
Call the given callable without fencing.
[ 30522, 5123, 1026, 1058, 1028, 4012, 10814, 10880, 11263, 11244, 1026, 1058, 1028, 2655, 3022, 6038, 2278, 24415, 5833, 18940, 6129, 1006, 2655, 3085, 1026, 1058, 1028, 2655, 3085, 1010, 2051, 2051, 5833, 1007, 1063, 2065, 1006, 1054, 15042...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/configuration/ConfigOption.java
ConfigOption.withDescription
public ConfigOption<T> withDescription(final Description description) { return new ConfigOption<>(key, description, defaultValue, fallbackKeys); }
java
public ConfigOption<T> withDescription(final Description description) { return new ConfigOption<>(key, description, defaultValue, fallbackKeys); }
[ "public", "ConfigOption", "<", "T", ">", "withDescription", "(", "final", "Description", "description", ")", "{", "return", "new", "ConfigOption", "<>", "(", "key", ",", "description", ",", "defaultValue", ",", "fallbackKeys", ")", ";", "}" ]
Creates a new config option, using this option's key and default value, and adding the given description. The given description is used when generation the configuration documention. @param description The description for this option. @return A new config option, with given description.
[ "Creates", "a", "new", "config", "option", "using", "this", "option", "s", "key", "and", "default", "value", "and", "adding", "the", "given", "description", ".", "The", "given", "description", "is", "used", "when", "generation", "the", "configuration", "docume...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java#L168-L170
train
Create a new config option with a description.
[ 30522, 2270, 9530, 8873, 3995, 16790, 1026, 1056, 1028, 2007, 6155, 23235, 3258, 1006, 2345, 6412, 6412, 1007, 1063, 2709, 2047, 9530, 8873, 3995, 16790, 1026, 1028, 1006, 3145, 1010, 6412, 1010, 12398, 10175, 5657, 1010, 2991, 5963, 14839,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpServerUpgradeHandler.java
HttpServerUpgradeHandler.splitHeader
private static List<CharSequence> splitHeader(CharSequence header) { final StringBuilder builder = new StringBuilder(header.length()); final List<CharSequence> protocols = new ArrayList<CharSequence>(4); for (int i = 0; i < header.length(); ++i) { char c = header.charAt(i); ...
java
private static List<CharSequence> splitHeader(CharSequence header) { final StringBuilder builder = new StringBuilder(header.length()); final List<CharSequence> protocols = new ArrayList<CharSequence>(4); for (int i = 0; i < header.length(); ++i) { char c = header.charAt(i); ...
[ "private", "static", "List", "<", "CharSequence", ">", "splitHeader", "(", "CharSequence", "header", ")", "{", "final", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", "header", ".", "length", "(", ")", ")", ";", "final", "List", "<", "CharSequ...
Splits a comma-separated header value. The returned set is case-insensitive and contains each part with whitespace removed.
[ "Splits", "a", "comma", "-", "separated", "header", "value", ".", "The", "returned", "set", "is", "case", "-", "insensitive", "and", "contains", "each", "part", "with", "whitespace", "removed", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerUpgradeHandler.java#L367-L391
train
Split the header into a list of protocol strings.
[ 30522, 2797, 10763, 2862, 1026, 25869, 3366, 4226, 5897, 1028, 3975, 4974, 2121, 1006, 25869, 3366, 4226, 5897, 20346, 1007, 1063, 2345, 5164, 8569, 23891, 2099, 12508, 1027, 2047, 5164, 8569, 23891, 2099, 1006, 20346, 1012, 3091, 1006, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
service/src/main/java/com/networknt/service/SingletonServiceFactory.java
SingletonServiceFactory.handleSingletonClass
private static void handleSingletonClass(String key, String value) throws Exception { Object object = handleValue(value); if(key.contains(",")) { String[] interfaces = key.split(","); for (String anInterface : interfaces) { serviceMap.put(anInterface, object); ...
java
private static void handleSingletonClass(String key, String value) throws Exception { Object object = handleValue(value); if(key.contains(",")) { String[] interfaces = key.split(","); for (String anInterface : interfaces) { serviceMap.put(anInterface, object); ...
[ "private", "static", "void", "handleSingletonClass", "(", "String", "key", ",", "String", "value", ")", "throws", "Exception", "{", "Object", "object", "=", "handleValue", "(", "value", ")", ";", "if", "(", "key", ".", "contains", "(", "\",\"", ")", ")", ...
For each singleton definition, create object with the initializer class and method, and push it into the service map with the key of the class name. @param key String class name of the object that needs to be initialized @param value String class name of initializer class and method separated by "::" @throws Exception...
[ "For", "each", "singleton", "definition", "create", "object", "with", "the", "initializer", "class", "and", "method", "and", "push", "it", "into", "the", "service", "map", "with", "the", "key", "of", "the", "class", "name", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/service/src/main/java/com/networknt/service/SingletonServiceFactory.java#L178-L188
train
Handle singleton class.
[ 30522, 2797, 10763, 11675, 16024, 2075, 19263, 26266, 1006, 5164, 3145, 1010, 5164, 3643, 1007, 11618, 6453, 1063, 4874, 4874, 1027, 5047, 10175, 5657, 1006, 3643, 1007, 1025, 2065, 1006, 3145, 1012, 3397, 1006, 1000, 1010, 1000, 1007, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableFsDataOutputStream.java
S3RecoverableFsDataOutputStream.persist
@Override public RecoverableWriter.ResumeRecoverable persist() throws IOException { lock(); try { fileStream.flush(); openNewPartIfNecessary(userDefinedMinPartSize); // We do not stop writing to the current file, we merely limit the upload to the // first n bytes of the current file return upload....
java
@Override public RecoverableWriter.ResumeRecoverable persist() throws IOException { lock(); try { fileStream.flush(); openNewPartIfNecessary(userDefinedMinPartSize); // We do not stop writing to the current file, we merely limit the upload to the // first n bytes of the current file return upload....
[ "@", "Override", "public", "RecoverableWriter", ".", "ResumeRecoverable", "persist", "(", ")", "throws", "IOException", "{", "lock", "(", ")", ";", "try", "{", "fileStream", ".", "flush", "(", ")", ";", "openNewPartIfNecessary", "(", "userDefinedMinPartSize", ")...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableFsDataOutputStream.java#L145-L160
train
This method is called by the RecoverableWriter to resume writing to the current file.
[ 30522, 1030, 2058, 15637, 2270, 8980, 3085, 15994, 1012, 13746, 2890, 3597, 26061, 3468, 29486, 1006, 1007, 11618, 22834, 10288, 24422, 1063, 5843, 1006, 1007, 1025, 3046, 1063, 6764, 25379, 1012, 13862, 1006, 1007, 1025, 2330, 2638, 2860, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
CliFrontend.runClusterAction
private <T> void runClusterAction(CustomCommandLine<T> activeCommandLine, CommandLine commandLine, ClusterAction<T> clusterAction) throws FlinkException { final ClusterDescriptor<T> clusterDescriptor = activeCommandLine.createClusterDescriptor(commandLine); final T clusterId = activeCommandLine.getClusterId(comman...
java
private <T> void runClusterAction(CustomCommandLine<T> activeCommandLine, CommandLine commandLine, ClusterAction<T> clusterAction) throws FlinkException { final ClusterDescriptor<T> clusterDescriptor = activeCommandLine.createClusterDescriptor(commandLine); final T clusterId = activeCommandLine.getClusterId(comman...
[ "private", "<", "T", ">", "void", "runClusterAction", "(", "CustomCommandLine", "<", "T", ">", "activeCommandLine", ",", "CommandLine", "commandLine", ",", "ClusterAction", "<", "T", ">", "clusterAction", ")", "throws", "FlinkException", "{", "final", "ClusterDesc...
Retrieves the {@link ClusterClient} from the given {@link CustomCommandLine} and runs the given {@link ClusterAction} against it. @param activeCommandLine to create the {@link ClusterDescriptor} from @param commandLine containing the parsed command line options @param clusterAction the cluster action to run against th...
[ "Retrieves", "the", "{", "@link", "ClusterClient", "}", "from", "the", "given", "{", "@link", "CustomCommandLine", "}", "and", "runs", "the", "given", "{", "@link", "ClusterAction", "}", "against", "it", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L905-L934
train
Run cluster action.
[ 30522, 2797, 1026, 1056, 1028, 11675, 2448, 20464, 19966, 6906, 7542, 1006, 7661, 9006, 2386, 19422, 3170, 1026, 1056, 1028, 3161, 9006, 2386, 19422, 3170, 1010, 3094, 4179, 3094, 4179, 1010, 9324, 18908, 3258, 1026, 1056, 1028, 9324, 18908...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java
KeyedStream.process
@Deprecated @Override @Internal public <R> SingleOutputStreamOperator<R> process( ProcessFunction<T, R> processFunction, TypeInformation<R> outputType) { LegacyKeyedProcessOperator<KEY, T, R> operator = new LegacyKeyedProcessOperator<>(clean(processFunction)); return transform("Process", outputType, oper...
java
@Deprecated @Override @Internal public <R> SingleOutputStreamOperator<R> process( ProcessFunction<T, R> processFunction, TypeInformation<R> outputType) { LegacyKeyedProcessOperator<KEY, T, R> operator = new LegacyKeyedProcessOperator<>(clean(processFunction)); return transform("Process", outputType, oper...
[ "@", "Deprecated", "@", "Override", "@", "Internal", "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "process", "(", "ProcessFunction", "<", "T", ",", "R", ">", "processFunction", ",", "TypeInformation", "<", "R", ">", "outputType", ")"...
Applies the given {@link ProcessFunction} on the input stream, thereby creating a transformed output stream. <p>The function will be called for every element in the input streams and can produce zero or more output elements. Contrary to the {@link DataStream#flatMap(FlatMapFunction)} function, this function can also q...
[ "Applies", "the", "given", "{", "@link", "ProcessFunction", "}", "on", "the", "input", "stream", "thereby", "creating", "a", "transformed", "output", "stream", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java#L334-L344
train
Process a single input stream.
[ 30522, 1030, 2139, 28139, 12921, 1030, 2058, 15637, 1030, 4722, 2270, 1026, 1054, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1054, 1028, 2832, 1006, 2832, 11263, 27989, 1026, 1056, 1010, 1054, 1028, 2832, 11263, 27989, 1010, 2828, 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/rpc/MainThreadValidatorUtil.java
MainThreadValidatorUtil.isRunningInExpectedThread
public static boolean isRunningInExpectedThread(@Nullable Thread expected) { Thread actual = Thread.currentThread(); if (expected != actual) { String violationMsg = "Violation of main thread constraint detected: expected <" + expected + "> but running in <" + actual + ">."; LOG.warn(violationMsg, new Ex...
java
public static boolean isRunningInExpectedThread(@Nullable Thread expected) { Thread actual = Thread.currentThread(); if (expected != actual) { String violationMsg = "Violation of main thread constraint detected: expected <" + expected + "> but running in <" + actual + ">."; LOG.warn(violationMsg, new Ex...
[ "public", "static", "boolean", "isRunningInExpectedThread", "(", "@", "Nullable", "Thread", "expected", ")", "{", "Thread", "actual", "=", "Thread", ".", "currentThread", "(", ")", ";", "if", "(", "expected", "!=", "actual", ")", "{", "String", "violationMsg",...
Returns true iff the current thread is equals to the provided expected thread and logs violations. @param expected the expected main thread. @return true iff the current thread is equals to the provided expected thread.
[ "Returns", "true", "iff", "the", "current", "thread", "is", "equals", "to", "the", "provided", "expected", "thread", "and", "logs", "violations", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/MainThreadValidatorUtil.java#L61-L74
train
Checks if the current thread is running in the expected thread.
[ 30522, 2270, 10763, 22017, 20898, 2003, 15532, 5582, 3170, 2595, 5051, 10985, 2705, 16416, 2094, 1006, 1030, 19701, 3085, 11689, 3517, 1007, 1063, 11689, 5025, 1027, 11689, 1012, 2783, 2705, 16416, 2094, 1006, 1007, 1025, 2065, 1006, 3517, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.writeFrameHeader
public static void writeFrameHeader(ByteBuf out, int payloadLength, byte type, Http2Flags flags, int streamId) { out.ensureWritable(FRAME_HEADER_LENGTH + payloadLength); writeFrameHeaderInternal(out, payloadLength, type, flags, streamId); }
java
public static void writeFrameHeader(ByteBuf out, int payloadLength, byte type, Http2Flags flags, int streamId) { out.ensureWritable(FRAME_HEADER_LENGTH + payloadLength); writeFrameHeaderInternal(out, payloadLength, type, flags, streamId); }
[ "public", "static", "void", "writeFrameHeader", "(", "ByteBuf", "out", ",", "int", "payloadLength", ",", "byte", "type", ",", "Http2Flags", "flags", ",", "int", "streamId", ")", "{", "out", ".", "ensureWritable", "(", "FRAME_HEADER_LENGTH", "+", "payloadLength",...
Writes an HTTP/2 frame header to the output buffer.
[ "Writes", "an", "HTTP", "/", "2", "frame", "header", "to", "the", "output", "buffer", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2CodecUtil.java#L205-L209
train
Write the header of a HTTP2 frame.
[ 30522, 2270, 10763, 11675, 4339, 15643, 4974, 2121, 1006, 24880, 8569, 2546, 2041, 1010, 20014, 18093, 7770, 13512, 2232, 1010, 24880, 2828, 1010, 8299, 2475, 10258, 26454, 9245, 1010, 20014, 5460, 3593, 1007, 1063, 2041, 1012, 5676, 13088, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/Convert.java
Convert.toList
@SuppressWarnings("unchecked") public static <T> List<T> toList(Class<T> elementType, Object value) { return (List<T>) toCollection(ArrayList.class, elementType, value); }
java
@SuppressWarnings("unchecked") public static <T> List<T> toList(Class<T> elementType, Object value) { return (List<T>) toCollection(ArrayList.class, elementType, value); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "List", "<", "T", ">", "toList", "(", "Class", "<", "T", ">", "elementType", ",", "Object", "value", ")", "{", "return", "(", "List", "<", "T", ">", ")", "toCollec...
转换为ArrayList @param <T> 元素类型 @param elementType 集合中元素类型 @param value 被转换的值 @return {@link List} @since 4.1.20
[ "转换为ArrayList" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/Convert.java#L524-L527
train
Creates a list of objects of the specified type and value.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1056, 1028, 2862, 1026, 1056, 1028, 2000, 9863, 1006, 2465, 1026, 1056, 1028, 5783, 13874, 1010, 4874, 3643, 1007, 1063, 2709, 1006, 2862, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.createRemoteEnvironment
public static StreamExecutionEnvironment createRemoteEnvironment( String host, int port, String... jarFiles) { return new RemoteStreamEnvironment(host, port, jarFiles); }
java
public static StreamExecutionEnvironment createRemoteEnvironment( String host, int port, String... jarFiles) { return new RemoteStreamEnvironment(host, port, jarFiles); }
[ "public", "static", "StreamExecutionEnvironment", "createRemoteEnvironment", "(", "String", "host", ",", "int", "port", ",", "String", "...", "jarFiles", ")", "{", "return", "new", "RemoteStreamEnvironment", "(", "host", ",", "port", ",", "jarFiles", ")", ";", "...
Creates a {@link RemoteStreamEnvironment}. The remote environment sends (parts of) the program to a cluster for execution. Note that all file paths used in the program must be accessible from the cluster. The execution will use no parallelism, unless the parallelism is set explicitly via {@link #setParallelism}. @para...
[ "Creates", "a", "{", "@link", "RemoteStreamEnvironment", "}", ".", "The", "remote", "environment", "sends", "(", "parts", "of", ")", "the", "program", "to", "a", "cluster", "for", "execution", ".", "Note", "that", "all", "file", "paths", "used", "in", "the...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1682-L1685
train
Create a remote environment.
[ 30522, 2270, 10763, 5460, 10288, 8586, 13700, 2368, 21663, 2239, 3672, 3443, 28578, 12184, 2368, 21663, 2239, 3672, 1006, 5164, 3677, 1010, 20014, 3417, 1010, 5164, 1012, 1012, 1012, 15723, 8873, 4244, 1007, 1063, 2709, 2047, 6556, 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-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamSourceContexts.java
StreamSourceContexts.getSourceContext
public static <OUT> SourceFunction.SourceContext<OUT> getSourceContext( TimeCharacteristic timeCharacteristic, ProcessingTimeService processingTimeService, Object checkpointLock, StreamStatusMaintainer streamStatusMaintainer, Output<StreamRecord<OUT>> output, long watermarkInterval, long idleTimeou...
java
public static <OUT> SourceFunction.SourceContext<OUT> getSourceContext( TimeCharacteristic timeCharacteristic, ProcessingTimeService processingTimeService, Object checkpointLock, StreamStatusMaintainer streamStatusMaintainer, Output<StreamRecord<OUT>> output, long watermarkInterval, long idleTimeou...
[ "public", "static", "<", "OUT", ">", "SourceFunction", ".", "SourceContext", "<", "OUT", ">", "getSourceContext", "(", "TimeCharacteristic", "timeCharacteristic", ",", "ProcessingTimeService", "processingTimeService", ",", "Object", "checkpointLock", ",", "StreamStatusMai...
Depending on the {@link TimeCharacteristic}, this method will return the adequate {@link org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext}. That is: <ul> <li>{@link TimeCharacteristic#IngestionTime} = {@code AutomaticWatermarkContext}</li> <li>{@link TimeCharacteristic#ProcessingTime} = {@co...
[ "Depending", "on", "the", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamSourceContexts.java#L46-L83
train
Gets the SourceContext.
[ 30522, 2270, 10763, 1026, 2041, 1028, 3120, 11263, 27989, 1012, 3120, 8663, 18209, 1026, 2041, 1028, 4152, 8162, 3401, 8663, 18209, 1006, 2051, 7507, 22648, 3334, 6553, 2051, 7507, 22648, 3334, 6553, 1010, 6364, 7292, 8043, 7903, 2063, 6364...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java
HttpPostRequestEncoder.encodeNextChunkUrlEncoded
private HttpContent encodeNextChunkUrlEncoded(int sizeleft) throws ErrorDataEncoderException { if (currentData == null) { return null; } int size = sizeleft; ByteBuf buffer; // Set name= if (isKey) { String key = currentData.getName(); ...
java
private HttpContent encodeNextChunkUrlEncoded(int sizeleft) throws ErrorDataEncoderException { if (currentData == null) { return null; } int size = sizeleft; ByteBuf buffer; // Set name= if (isKey) { String key = currentData.getName(); ...
[ "private", "HttpContent", "encodeNextChunkUrlEncoded", "(", "int", "sizeleft", ")", "throws", "ErrorDataEncoderException", "{", "if", "(", "currentData", "==", "null", ")", "{", "return", "null", ";", "}", "int", "size", "=", "sizeleft", ";", "ByteBuf", "buffer"...
From the current context (currentBuffer and currentData), returns the next HttpChunk (if possible) trying to get sizeleft bytes more into the currentBuffer. This is the UrlEncoded version. @param sizeleft the number of bytes to try to get from currentData @return the next HttpChunk or null if not enough bytes were fou...
[ "From", "the", "current", "context", "(", "currentBuffer", "and", "currentData", ")", "returns", "the", "next", "HttpChunk", "(", "if", "possible", ")", "trying", "to", "get", "sizeleft", "bytes", "more", "into", "the", "currentBuffer", ".", "This", "is", "t...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestEncoder.java#L937-L1017
train
Encode the next chunk of data in a URL encoded form.
[ 30522, 2797, 8299, 8663, 6528, 2102, 4372, 16044, 2638, 18413, 20760, 8950, 3126, 7770, 16044, 2094, 1006, 20014, 2946, 2571, 6199, 1007, 11618, 7561, 2850, 2696, 2368, 16044, 2890, 2595, 24422, 1063, 2065, 1006, 2783, 2850, 2696, 1027, 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-http/src/main/java/cn/hutool/http/HttpRequest.java
HttpRequest.send
private void send() throws HttpException { try { if (Method.POST.equals(this.method) || Method.PUT.equals(this.method) || Method.DELETE.equals(this.method) || this.isRest) { if (CollectionUtil.isEmpty(this.fileForm)) { sendFormUrlEncoded();// 普通表单 } else { sendMultipart(); // 文件上传表单 } ...
java
private void send() throws HttpException { try { if (Method.POST.equals(this.method) || Method.PUT.equals(this.method) || Method.DELETE.equals(this.method) || this.isRest) { if (CollectionUtil.isEmpty(this.fileForm)) { sendFormUrlEncoded();// 普通表单 } else { sendMultipart(); // 文件上传表单 } ...
[ "private", "void", "send", "(", ")", "throws", "HttpException", "{", "try", "{", "if", "(", "Method", ".", "POST", ".", "equals", "(", "this", ".", "method", ")", "||", "Method", ".", "PUT", ".", "equals", "(", "this", ".", "method", ")", "||", "Me...
发送数据流 @throws IOException
[ "发送数据流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java#L980-L994
train
Send the request to the server.
[ 30522, 2797, 11675, 4604, 1006, 1007, 11618, 8299, 10288, 24422, 1063, 3046, 1063, 2065, 1006, 4118, 1012, 2695, 1012, 19635, 1006, 30524, 4118, 1012, 2404, 1012, 19635, 1006, 2023, 1012, 4118, 1007, 1064, 1064, 4118, 1012, 3972, 12870, 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...
netty/netty
buffer/src/main/java/io/netty/buffer/Unpooled.java
Unpooled.copiedBuffer
public static ByteBuf copiedBuffer(byte[] array, int offset, int length) { if (length == 0) { return EMPTY_BUFFER; } byte[] copy = PlatformDependent.allocateUninitializedArray(length); System.arraycopy(array, offset, copy, 0, length); return wrappedBuffer(copy); }
java
public static ByteBuf copiedBuffer(byte[] array, int offset, int length) { if (length == 0) { return EMPTY_BUFFER; } byte[] copy = PlatformDependent.allocateUninitializedArray(length); System.arraycopy(array, offset, copy, 0, length); return wrappedBuffer(copy); }
[ "public", "static", "ByteBuf", "copiedBuffer", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "length", "==", "0", ")", "{", "return", "EMPTY_BUFFER", ";", "}", "byte", "[", "]", "copy", "=", "Platfor...
Creates a new big-endian buffer whose content is a copy of the specified {@code array}'s sub-region. The new buffer's {@code readerIndex} and {@code writerIndex} are {@code 0} and the specified {@code length} respectively.
[ "Creates", "a", "new", "big", "-", "endian", "buffer", "whose", "content", "is", "a", "copy", "of", "the", "specified", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/Unpooled.java#L372-L379
train
Creates a copy of the specified byte array.
[ 30522, 2270, 10763, 24880, 8569, 2546, 15826, 8569, 12494, 1006, 24880, 1031, 1033, 9140, 1010, 20014, 16396, 1010, 20014, 3091, 1007, 1063, 2065, 1006, 3091, 1027, 1027, 1014, 1007, 1063, 2709, 4064, 1035, 17698, 1025, 1065, 24880, 1031, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/crf/crfpp/Encoder.java
Encoder.learn
public boolean learn(String templFile, String trainFile, String modelFile, boolean textModelFile, int maxitr, int freq, double eta, double C, int threadNum, int shrinkingSize, Algorithm algorithm) { if (eta <= 0) { System.err.println("eta...
java
public boolean learn(String templFile, String trainFile, String modelFile, boolean textModelFile, int maxitr, int freq, double eta, double C, int threadNum, int shrinkingSize, Algorithm algorithm) { if (eta <= 0) { System.err.println("eta...
[ "public", "boolean", "learn", "(", "String", "templFile", ",", "String", "trainFile", ",", "String", "modelFile", ",", "boolean", "textModelFile", ",", "int", "maxitr", ",", "int", "freq", ",", "double", "eta", ",", "double", "C", ",", "int", "threadNum", ...
训练 @param templFile 模板文件 @param trainFile 训练文件 @param modelFile 模型文件 @param textModelFile 是否输出文本形式的模型文件 @param maxitr 最大迭代次数 @param freq 特征最低频次 @param eta 收敛阈值 @param C cost-factor @param threadNum 线程数 @param shrinkingSize @param algorithm 训练算法 @return
[ "训练" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/crf/crfpp/Encoder.java#L68-L197
train
This method is used to learn a single language model from a templ file.
[ 30522, 2270, 22017, 20898, 4553, 1006, 5164, 8915, 8737, 10270, 9463, 1010, 5164, 3345, 8873, 2571, 1010, 5164, 2944, 8873, 2571, 1010, 22017, 20898, 3793, 5302, 9247, 8873, 2571, 1010, 20014, 21510, 16344, 1010, 20014, 10424, 2063, 4160, 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/spark
common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDB.java
LevelDB.getTypeInfo
LevelDBTypeInfo getTypeInfo(Class<?> type) throws Exception { LevelDBTypeInfo ti = types.get(type); if (ti == null) { LevelDBTypeInfo tmp = new LevelDBTypeInfo(this, type, getTypeAlias(type)); ti = types.putIfAbsent(type, tmp); if (ti == null) { ti = tmp; } } return ti; ...
java
LevelDBTypeInfo getTypeInfo(Class<?> type) throws Exception { LevelDBTypeInfo ti = types.get(type); if (ti == null) { LevelDBTypeInfo tmp = new LevelDBTypeInfo(this, type, getTypeAlias(type)); ti = types.putIfAbsent(type, tmp); if (ti == null) { ti = tmp; } } return ti; ...
[ "LevelDBTypeInfo", "getTypeInfo", "(", "Class", "<", "?", ">", "type", ")", "throws", "Exception", "{", "LevelDBTypeInfo", "ti", "=", "types", ".", "get", "(", "type", ")", ";", "if", "(", "ti", "==", "null", ")", "{", "LevelDBTypeInfo", "tmp", "=", "n...
Returns metadata about indices for the given type.
[ "Returns", "metadata", "about", "indices", "for", "the", "given", "type", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDB.java#L247-L257
train
Gets the type information.
[ 30522, 2504, 18939, 13874, 2378, 14876, 2131, 13874, 2378, 14876, 1006, 2465, 1026, 1029, 1028, 2828, 1007, 11618, 6453, 1063, 2504, 18939, 13874, 2378, 14876, 14841, 1027, 4127, 1012, 2131, 1006, 2828, 1007, 1025, 2065, 1006, 14841, 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/minicluster/MiniCluster.java
MiniCluster.closeAsync
@Override public CompletableFuture<Void> closeAsync() { synchronized (lock) { if (running) { LOG.info("Shutting down Flink Mini Cluster"); try { final long shutdownTimeoutMillis = miniClusterConfiguration.getConfiguration().getLong(ClusterOptions.CLUSTER_SERVICES_SHUTDOWN_TIMEOUT); final int num...
java
@Override public CompletableFuture<Void> closeAsync() { synchronized (lock) { if (running) { LOG.info("Shutting down Flink Mini Cluster"); try { final long shutdownTimeoutMillis = miniClusterConfiguration.getConfiguration().getLong(ClusterOptions.CLUSTER_SERVICES_SHUTDOWN_TIMEOUT); final int num...
[ "@", "Override", "public", "CompletableFuture", "<", "Void", ">", "closeAsync", "(", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "running", ")", "{", "LOG", ".", "info", "(", "\"Shutting down Flink Mini Cluster\"", ")", ";", "try", "{", "fi...
Shuts down the mini cluster, failing all currently executing jobs. The mini cluster can be started again by calling the {@link #start()} method again. <p>This method shuts down all started services and components, even if an exception occurs in the process of shutting down some component. @return Future which is comp...
[ "Shuts", "down", "the", "mini", "cluster", "failing", "all", "currently", "executing", "jobs", ".", "The", "mini", "cluster", "can", "be", "started", "again", "by", "calling", "the", "{", "@link", "#start", "()", "}", "method", "again", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java#L413-L460
train
Close the Flink Mini Cluster asynchronously.
[ 30522, 1030, 2058, 15637, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 11675, 1028, 2485, 3022, 6038, 2278, 1006, 1007, 1063, 25549, 1006, 5843, 1007, 1063, 2065, 1006, 2770, 1007, 1063, 8833, 1012, 18558, 1006, 1000, 17521, 2091, 13109, 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/broadcast/BroadcastVariableMaterialization.java
BroadcastVariableMaterialization.getVariable
public List<T> getVariable() throws InitializationTypeConflictException { if (!materialized) { throw new IllegalStateException("The Broadcast Variable has not yet been materialized."); } if (disposed) { throw new IllegalStateException("The Broadcast Variable has been disposed"); } synchronized (referen...
java
public List<T> getVariable() throws InitializationTypeConflictException { if (!materialized) { throw new IllegalStateException("The Broadcast Variable has not yet been materialized."); } if (disposed) { throw new IllegalStateException("The Broadcast Variable has been disposed"); } synchronized (referen...
[ "public", "List", "<", "T", ">", "getVariable", "(", ")", "throws", "InitializationTypeConflictException", "{", "if", "(", "!", "materialized", ")", "{", "throw", "new", "IllegalStateException", "(", "\"The Broadcast Variable has not yet been materialized.\"", ")", ";",...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/broadcast/BroadcastVariableMaterialization.java#L200-L222
train
Gets the variable.
[ 30522, 2270, 2862, 1026, 1056, 1028, 2131, 10755, 19210, 1006, 1007, 11618, 3988, 3989, 13874, 8663, 29301, 10288, 24422, 1063, 2065, 1006, 999, 27075, 1007, 1063, 5466, 2047, 6206, 9153, 17389, 2595, 24422, 1006, 1000, 1996, 3743, 8023, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.isCanceledOrFailed
public boolean isCanceledOrFailed() { return executionState == ExecutionState.CANCELING || executionState == ExecutionState.CANCELED || executionState == ExecutionState.FAILED; }
java
public boolean isCanceledOrFailed() { return executionState == ExecutionState.CANCELING || executionState == ExecutionState.CANCELED || executionState == ExecutionState.FAILED; }
[ "public", "boolean", "isCanceledOrFailed", "(", ")", "{", "return", "executionState", "==", "ExecutionState", ".", "CANCELING", "||", "executionState", "==", "ExecutionState", ".", "CANCELED", "||", "executionState", "==", "ExecutionState", ".", "FAILED", ";", "}" ]
Checks whether the task has failed, is canceled, or is being canceled at the moment. @return True is the task in state FAILED, CANCELING, or CANCELED, false otherwise.
[ "Checks", "whether", "the", "task", "has", "failed", "is", "canceled", "or", "is", "being", "canceled", "at", "the", "moment", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L513-L517
train
Returns true if the task is in canceled or failed state.
[ 30522, 2270, 22017, 20898, 2003, 9336, 29109, 26010, 12881, 17440, 1006, 1007, 1063, 2709, 22679, 12259, 1027, 1027, 22679, 12259, 1012, 17542, 2075, 1064, 1064, 22679, 12259, 1027, 1027, 22679, 12259, 1012, 13261, 1064, 1064, 22679, 12259, 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/rest/handler/legacy/ExecutionGraphCache.java
ExecutionGraphCache.cleanup
public void cleanup() { long currentTime = System.currentTimeMillis(); // remove entries which have exceeded their time to live cachedExecutionGraphs.values().removeIf( (ExecutionGraphEntry entry) -> currentTime >= entry.getTTL()); }
java
public void cleanup() { long currentTime = System.currentTimeMillis(); // remove entries which have exceeded their time to live cachedExecutionGraphs.values().removeIf( (ExecutionGraphEntry entry) -> currentTime >= entry.getTTL()); }
[ "public", "void", "cleanup", "(", ")", "{", "long", "currentTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "// remove entries which have exceeded their time to live", "cachedExecutionGraphs", ".", "values", "(", ")", ".", "removeIf", "(", "(", "Execu...
Perform the cleanup of out dated {@link ExecutionGraphEntry}.
[ "Perform", "the", "cleanup", "of", "out", "dated", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/ExecutionGraphCache.java#L143-L149
train
Cleanup the cache.
[ 30522, 2270, 11675, 27686, 1006, 1007, 1063, 2146, 2783, 7292, 1027, 2291, 1012, 2783, 7292, 19912, 2483, 1006, 1007, 1025, 1013, 1013, 6366, 10445, 2029, 2031, 14872, 2037, 2051, 2000, 2444, 17053, 3207, 2595, 8586, 13700, 27341, 1012, 530...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java
JSONTokener.nextString
public String nextString(char quote) throws JSONException { /* * For strings that are free of escape sequences, we can just extract the result * as a substring of the input. But if we encounter an escape sequence, we need to * use a StringBuilder to compose the result. */ StringBuilder builder = null; ...
java
public String nextString(char quote) throws JSONException { /* * For strings that are free of escape sequences, we can just extract the result * as a substring of the input. But if we encounter an escape sequence, we need to * use a StringBuilder to compose the result. */ StringBuilder builder = null; ...
[ "public", "String", "nextString", "(", "char", "quote", ")", "throws", "JSONException", "{", "/*\n\t\t * For strings that are free of escape sequences, we can just extract the result\n\t\t * as a substring of the input. But if we encounter an escape sequence, we need to\n\t\t * use a StringBuild...
Returns the string up to but not including {@code quote}, unescaping any character escape sequences encountered along the way. The opening quote should have already been read. This consumes the closing quote, but does not include it in the returned string. @param quote either ' or ". @return the string up to but not in...
[ "Returns", "the", "string", "up", "to", "but", "not", "including", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java#L191-L229
train
Returns the next string in the input.
[ 30522, 2270, 5164, 2279, 3367, 4892, 1006, 25869, 14686, 1007, 11618, 1046, 3385, 10288, 24422, 1063, 1013, 1008, 1008, 2005, 7817, 2008, 2024, 2489, 1997, 4019, 10071, 1010, 2057, 2064, 2074, 14817, 1996, 2765, 1008, 2004, 1037, 4942, 3367...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java
PythonDataStream.flat_map
public PythonDataStream<SingleOutputStreamOperator<PyObject>> flat_map( FlatMapFunction<PyObject, Object> flat_mapper) throws IOException { return new PythonSingleOutputStreamOperator(stream.flatMap(new PythonFlatMapFunction(flat_mapper))); }
java
public PythonDataStream<SingleOutputStreamOperator<PyObject>> flat_map( FlatMapFunction<PyObject, Object> flat_mapper) throws IOException { return new PythonSingleOutputStreamOperator(stream.flatMap(new PythonFlatMapFunction(flat_mapper))); }
[ "public", "PythonDataStream", "<", "SingleOutputStreamOperator", "<", "PyObject", ">", ">", "flat_map", "(", "FlatMapFunction", "<", "PyObject", ",", "Object", ">", "flat_mapper", ")", "throws", "IOException", "{", "return", "new", "PythonSingleOutputStreamOperator", ...
A thin wrapper layer over {@link DataStream#flatMap(FlatMapFunction)}. @param flat_mapper The FlatMapFunction that is called for each element of the DataStream @return The transformed {@link PythonDataStream}.
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "DataStream#flatMap", "(", "FlatMapFunction", ")", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java#L124-L127
train
Flat map function.
[ 30522, 2270, 18750, 2850, 10230, 25379, 1026, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1052, 7677, 2497, 20614, 1028, 1028, 4257, 1035, 4949, 1006, 4257, 2863, 14376, 4609, 7542, 1026, 1052, 7677, 2497, 20614, 1010, 4874, 1028, 4257, 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/date/DateUtil.java
DateUtil.beginOfWeek
public static Calendar beginOfWeek(Calendar calendar, boolean isMondayAsFirstDay) { if(isMondayAsFirstDay) { calendar.setFirstDayOfWeek(Calendar.MONDAY); } return truncate(calendar, DateField.WEEK_OF_MONTH); }
java
public static Calendar beginOfWeek(Calendar calendar, boolean isMondayAsFirstDay) { if(isMondayAsFirstDay) { calendar.setFirstDayOfWeek(Calendar.MONDAY); } return truncate(calendar, DateField.WEEK_OF_MONTH); }
[ "public", "static", "Calendar", "beginOfWeek", "(", "Calendar", "calendar", ",", "boolean", "isMondayAsFirstDay", ")", "{", "if", "(", "isMondayAsFirstDay", ")", "{", "calendar", ".", "setFirstDayOfWeek", "(", "Calendar", ".", "MONDAY", ")", ";", "}", "return", ...
获取某周的开始时间,周一定为一周的开始时间 @param calendar 日期 {@link Calendar} @param isMondayAsFirstDay 是否周一做为一周的第一天(false表示周日做为第一天) @return {@link Calendar} @since 3.1.2
[ "获取某周的开始时间,周一定为一周的开始时间" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L897-L902
train
Creates a new calendar in the beginning of the week of the month.
[ 30522, 2270, 10763, 8094, 4088, 11253, 28075, 1006, 8094, 8094, 1010, 22017, 20898, 2003, 11442, 12186, 22747, 18894, 2102, 10259, 1007, 1063, 2065, 1006, 2003, 11442, 12186, 22747, 18894, 2102, 10259, 1007, 1063, 8094, 1012, 2275, 8873, 1209...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/RdbAdapter.java
RdbAdapter.sync
@Override public void sync(List<Dml> dmls) { if (dmls == null || dmls.isEmpty()) { return; } try { rdbSyncService.sync(mappingConfigCache, dmls, envProperties); rdbMirrorDbSyncService.sync(dmls); } catch (Exception e) { throw new Runtim...
java
@Override public void sync(List<Dml> dmls) { if (dmls == null || dmls.isEmpty()) { return; } try { rdbSyncService.sync(mappingConfigCache, dmls, envProperties); rdbMirrorDbSyncService.sync(dmls); } catch (Exception e) { throw new Runtim...
[ "@", "Override", "public", "void", "sync", "(", "List", "<", "Dml", ">", "dmls", ")", "{", "if", "(", "dmls", "==", "null", "||", "dmls", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "try", "{", "rdbSyncService", ".", "sync", "(", "map...
同步方法 @param dmls 数据包
[ "同步方法" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/RdbAdapter.java#L158-L169
train
Synchronize the DMLs.
[ 30522, 1030, 2058, 15637, 2270, 11675, 26351, 1006, 2862, 1026, 1040, 19968, 1028, 30524, 6169, 2121, 7903, 2063, 1012, 26351, 1006, 12375, 8663, 8873, 18195, 15395, 1010, 1040, 19968, 2015, 1010, 4372, 2615, 21572, 4842, 7368, 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/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
UnsafeRow.copy
@Override public UnsafeRow copy() { UnsafeRow rowCopy = new UnsafeRow(numFields); final byte[] rowDataCopy = new byte[sizeInBytes]; Platform.copyMemory( baseObject, baseOffset, rowDataCopy, Platform.BYTE_ARRAY_OFFSET, sizeInBytes ); rowCopy.pointTo(rowDataCopy, Platfo...
java
@Override public UnsafeRow copy() { UnsafeRow rowCopy = new UnsafeRow(numFields); final byte[] rowDataCopy = new byte[sizeInBytes]; Platform.copyMemory( baseObject, baseOffset, rowDataCopy, Platform.BYTE_ARRAY_OFFSET, sizeInBytes ); rowCopy.pointTo(rowDataCopy, Platfo...
[ "@", "Override", "public", "UnsafeRow", "copy", "(", ")", "{", "UnsafeRow", "rowCopy", "=", "new", "UnsafeRow", "(", "numFields", ")", ";", "final", "byte", "[", "]", "rowDataCopy", "=", "new", "byte", "[", "sizeInBytes", "]", ";", "Platform", ".", "copy...
Copies this row, returning a self-contained UnsafeRow that stores its data in an internal byte array rather than referencing data stored in a data page.
[ "Copies", "this", "row", "returning", "a", "self", "-", "contained", "UnsafeRow", "that", "stores", "its", "data", "in", "an", "internal", "byte", "array", "rather", "than", "referencing", "data", "stored", "in", "a", "data", "page", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java#L456-L469
train
Copy the data in this row.
[ 30522, 1030, 2058, 15637, 2270, 25135, 10524, 6100, 1006, 1007, 1063, 25135, 10524, 5216, 3597, 7685, 1027, 2047, 25135, 10524, 1006, 16371, 2213, 15155, 1007, 1025, 2345, 24880, 1031, 1033, 5216, 2850, 2696, 3597, 7685, 1027, 2047, 24880, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.getCharset
public static Charset getCharset(CharSequence contentTypeValue) { if (contentTypeValue != null) { return getCharset(contentTypeValue, CharsetUtil.ISO_8859_1); } else { return CharsetUtil.ISO_8859_1; } }
java
public static Charset getCharset(CharSequence contentTypeValue) { if (contentTypeValue != null) { return getCharset(contentTypeValue, CharsetUtil.ISO_8859_1); } else { return CharsetUtil.ISO_8859_1; } }
[ "public", "static", "Charset", "getCharset", "(", "CharSequence", "contentTypeValue", ")", "{", "if", "(", "contentTypeValue", "!=", "null", ")", "{", "return", "getCharset", "(", "contentTypeValue", ",", "CharsetUtil", ".", "ISO_8859_1", ")", ";", "}", "else", ...
Fetch charset from Content-Type header value. @param contentTypeValue Content-Type header value to parse @return the charset from message's Content-Type header or {@link CharsetUtil#ISO_8859_1} if charset is not presented or unparsable
[ "Fetch", "charset", "from", "Content", "-", "Type", "header", "value", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L355-L361
train
Get the charset from the content type value.
[ 30522, 2270, 10763, 25869, 13462, 2131, 7507, 22573, 2102, 1006, 25869, 3366, 4226, 5897, 4180, 13874, 10175, 5657, 1007, 1063, 2065, 1006, 4180, 13874, 10175, 5657, 999, 1027, 19701, 1007, 1063, 2709, 2131, 7507, 22573, 2102, 1006, 4180, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/utility/ByteUtil.java
ByteUtil.bytesToInt
public static int bytesToInt(byte[] bytes, int start) { int num = bytes[start] & 0xFF; num |= ((bytes[start + 1] << 8) & 0xFF00); num |= ((bytes[start + 2] << 16) & 0xFF0000); num |= ((bytes[start + 3] << 24) & 0xFF000000); return num; }
java
public static int bytesToInt(byte[] bytes, int start) { int num = bytes[start] & 0xFF; num |= ((bytes[start + 1] << 8) & 0xFF00); num |= ((bytes[start + 2] << 16) & 0xFF0000); num |= ((bytes[start + 3] << 24) & 0xFF000000); return num; }
[ "public", "static", "int", "bytesToInt", "(", "byte", "[", "]", "bytes", ",", "int", "start", ")", "{", "int", "num", "=", "bytes", "[", "start", "]", "&", "0xFF", ";", "num", "|=", "(", "(", "bytes", "[", "start", "+", "1", "]", "<<", "8", ")"...
字节数组和整型的转换 @param bytes 字节数组 @return 整型
[ "字节数组和整型的转换" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/utility/ByteUtil.java#L222-L229
train
Convert the bytes in a CRS record to an int.
[ 30522, 2270, 10763, 20014, 27507, 3406, 18447, 1006, 24880, 1031, 1033, 27507, 1010, 20014, 2707, 1007, 1063, 20014, 16371, 2213, 1027, 27507, 1031, 2707, 1033, 1004, 1014, 2595, 4246, 1025, 16371, 2213, 1064, 1027, 1006, 1006, 27507, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/TwoInputUdfOperator.java
TwoInputUdfOperator.withForwardedFieldsSecond
@SuppressWarnings("unchecked") public O withForwardedFieldsSecond(String... forwardedFieldsSecond) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } ...
java
@SuppressWarnings("unchecked") public O withForwardedFieldsSecond(String... forwardedFieldsSecond) { if (this.udfSemantics == null || this.analyzedUdfSemantics) { // extract semantic properties from function annotations setSemanticProperties(extractSemanticAnnotationsFromUdf(getFunction().getClass())); } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "O", "withForwardedFieldsSecond", "(", "String", "...", "forwardedFieldsSecond", ")", "{", "if", "(", "this", ".", "udfSemantics", "==", "null", "||", "this", ".", "analyzedUdfSemantics", ")", "{", "/...
Adds semantic information about forwarded fields of the second input of the user-defined function. The forwarded fields information declares fields which are never modified by the function and which are forwarded at the same position to the output or unchanged copied to another position in the output. <p>Fields that a...
[ "Adds", "semantic", "information", "about", "forwarded", "fields", "of", "the", "second", "input", "of", "the", "user", "-", "defined", "function", ".", "The", "forwarded", "fields", "information", "declares", "fields", "which", "are", "never", "modified", "by",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/operators/TwoInputUdfOperator.java#L215-L240
train
Adds forwarded field information to the second input of this operator.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 1051, 2007, 29278, 7652, 2098, 15155, 3366, 8663, 2094, 1006, 5164, 1012, 1012, 1012, 2830, 2098, 15155, 3366, 8663, 2094, 1007, 1063, 2065, 1006, 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...
networknt/light-4j
config/src/main/java/com/networknt/config/CentralizedManagement.java
CentralizedManagement.merge
private static void merge(Object m1) { if (m1 instanceof Map) { Iterator<Object> fieldNames = ((Map<Object, Object>) m1).keySet().iterator(); String fieldName = null; while (fieldNames.hasNext()) { fieldName = String.valueOf(fieldNames.next()); ...
java
private static void merge(Object m1) { if (m1 instanceof Map) { Iterator<Object> fieldNames = ((Map<Object, Object>) m1).keySet().iterator(); String fieldName = null; while (fieldNames.hasNext()) { fieldName = String.valueOf(fieldNames.next()); ...
[ "private", "static", "void", "merge", "(", "Object", "m1", ")", "{", "if", "(", "m1", "instanceof", "Map", ")", "{", "Iterator", "<", "Object", ">", "fieldNames", "=", "(", "(", "Map", "<", "Object", ",", "Object", ">", ")", "m1", ")", ".", "keySet...
Search the config map recursively, expand List and Map level by level util no further expand
[ "Search", "the", "config", "map", "recursively", "expand", "List", "and", "Map", "level", "by", "level", "util", "no", "further", "expand" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/config/src/main/java/com/networknt/config/CentralizedManagement.java#L47-L78
train
Merge the two objects.
[ 30522, 2797, 10763, 11675, 13590, 1006, 4874, 30524, 1007, 1012, 2009, 6906, 4263, 1006, 1007, 1025, 5164, 2492, 18442, 1027, 19701, 1025, 2096, 1006, 2492, 18442, 2015, 1012, 8440, 10288, 2102, 1006, 1007, 1007, 1063, 2492, 18442, 1027, 51...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/operators/AbstractStreamOperator.java
AbstractStreamOperator.snapshotState
public void snapshotState(StateSnapshotContext context) throws Exception { final KeyedStateBackend<?> keyedStateBackend = getKeyedStateBackend(); //TODO all of this can be removed once heap-based timers are integrated with RocksDB incremental snapshots if (keyedStateBackend instanceof AbstractKeyedStateBackend &&...
java
public void snapshotState(StateSnapshotContext context) throws Exception { final KeyedStateBackend<?> keyedStateBackend = getKeyedStateBackend(); //TODO all of this can be removed once heap-based timers are integrated with RocksDB incremental snapshots if (keyedStateBackend instanceof AbstractKeyedStateBackend &&...
[ "public", "void", "snapshotState", "(", "StateSnapshotContext", "context", ")", "throws", "Exception", "{", "final", "KeyedStateBackend", "<", "?", ">", "keyedStateBackend", "=", "getKeyedStateBackend", "(", ")", ";", "//TODO all of this can be removed once heap-based timer...
Stream operators with state, which want to participate in a snapshot need to override this hook method. @param context context that provides information and means required for taking a snapshot
[ "Stream", "operators", "with", "state", "which", "want", "to", "participate", "in", "a", "snapshot", "need", "to", "override", "this", "hook", "method", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java#L433-L468
train
This method is called to snapshot the state of the operator.
[ 30522, 2270, 11675, 20057, 12326, 9153, 2618, 1006, 2163, 2532, 4523, 12326, 8663, 18209, 6123, 1007, 11618, 6453, 1063, 2345, 3145, 2098, 9153, 2618, 5963, 10497, 1026, 1029, 1028, 3145, 2098, 9153, 2618, 5963, 10497, 1027, 2131, 14839, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
buffer/src/main/java/io/netty/buffer/Unpooled.java
Unpooled.copiedBuffer
public static ByteBuf copiedBuffer(ByteBuf buffer) { int readable = buffer.readableBytes(); if (readable > 0) { ByteBuf copy = buffer(readable); copy.writeBytes(buffer, buffer.readerIndex(), readable); return copy; } else { return EMPTY_BUFFER; ...
java
public static ByteBuf copiedBuffer(ByteBuf buffer) { int readable = buffer.readableBytes(); if (readable > 0) { ByteBuf copy = buffer(readable); copy.writeBytes(buffer, buffer.readerIndex(), readable); return copy; } else { return EMPTY_BUFFER; ...
[ "public", "static", "ByteBuf", "copiedBuffer", "(", "ByteBuf", "buffer", ")", "{", "int", "readable", "=", "buffer", ".", "readableBytes", "(", ")", ";", "if", "(", "readable", ">", "0", ")", "{", "ByteBuf", "copy", "=", "buffer", "(", "readable", ")", ...
Creates a new buffer whose content is a copy of the specified {@code buffer}'s readable bytes. The new buffer's {@code readerIndex} and {@code writerIndex} are {@code 0} and {@code buffer.readableBytes} respectively.
[ "Creates", "a", "new", "buffer", "whose", "content", "is", "a", "copy", "of", "the", "specified", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/Unpooled.java#L406-L415
train
This method returns a copied buffer of the specified byte buffer.
[ 30522, 2270, 10763, 24880, 8569, 2546, 15826, 8569, 12494, 1006, 24880, 8569, 2546, 17698, 1007, 1063, 20014, 3191, 3085, 1027, 17698, 1012, 3191, 3085, 3762, 4570, 1006, 1007, 1025, 2065, 1006, 3191, 3085, 1028, 1014, 1007, 1063, 24880, 85...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.offsetWeek
public static DateTime offsetWeek(Date date, int offset) { return offset(date, DateField.WEEK_OF_YEAR, offset); }
java
public static DateTime offsetWeek(Date date, int offset) { return offset(date, DateField.WEEK_OF_YEAR, offset); }
[ "public", "static", "DateTime", "offsetWeek", "(", "Date", "date", ",", "int", "offset", ")", "{", "return", "offset", "(", "date", ",", "DateField", ".", "WEEK_OF_YEAR", ",", "offset", ")", ";", "}" ]
偏移周 @param date 日期 @param offset 偏移周数,正数向未来偏移,负数向历史偏移 @return 偏移后的日期
[ "偏移周" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1175-L1177
train
Create an offset to the week of the year.
[ 30522, 2270, 10763, 3058, 7292, 16396, 28075, 1006, 3058, 3058, 1010, 20014, 16396, 1007, 1063, 2709, 16396, 1006, 3058, 1010, 3058, 3790, 1012, 2733, 1035, 1997, 1035, 2095, 1010, 16396, 1007, 1025, 1065, 30524, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/SlotPoolImpl.java
SlotPoolImpl.failAllocation
@Override public Optional<ResourceID> failAllocation(final AllocationID allocationID, final Exception cause) { componentMainThreadExecutor.assertRunningInMainThread(); final PendingRequest pendingRequest = pendingRequests.removeKeyB(allocationID); if (pendingRequest != null) { // request was still pending ...
java
@Override public Optional<ResourceID> failAllocation(final AllocationID allocationID, final Exception cause) { componentMainThreadExecutor.assertRunningInMainThread(); final PendingRequest pendingRequest = pendingRequests.removeKeyB(allocationID); if (pendingRequest != null) { // request was still pending ...
[ "@", "Override", "public", "Optional", "<", "ResourceID", ">", "failAllocation", "(", "final", "AllocationID", "allocationID", ",", "final", "Exception", "cause", ")", "{", "componentMainThreadExecutor", ".", "assertRunningInMainThread", "(", ")", ";", "final", "Pen...
Fail the specified allocation and release the corresponding slot if we have one. This may triggered by JobManager when some slot allocation failed with rpcTimeout. Or this could be triggered by TaskManager, when it finds out something went wrong with the slot, and decided to take it back. @param allocationID Represent...
[ "Fail", "the", "specified", "allocation", "and", "release", "the", "corresponding", "slot", "if", "we", "have", "one", ".", "This", "may", "triggered", "by", "JobManager", "when", "some", "slot", "allocation", "failed", "with", "rpcTimeout", ".", "Or", "this",...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L635-L651
train
Fail an allocation.
[ 30522, 1030, 2058, 15637, 2270, 11887, 1026, 7692, 3593, 1028, 8246, 8095, 23909, 1006, 2345, 16169, 3593, 16169, 3593, 1010, 2345, 6453, 3426, 1007, 1063, 6922, 24238, 2705, 16416, 3207, 2595, 8586, 16161, 2099, 1012, 20865, 15532, 5582, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/Img.java
Img.pressText
public Img pressText(String pressText, Color color, Font font, int x, int y, float alpha) { final BufferedImage targetImage = getValidSrcImg(); final Graphics2D g = targetImage.createGraphics(); if(null == font) { // 默认字体 font = new Font("Courier", Font.PLAIN, (int)(targetImage.getHeight() * 0.75))...
java
public Img pressText(String pressText, Color color, Font font, int x, int y, float alpha) { final BufferedImage targetImage = getValidSrcImg(); final Graphics2D g = targetImage.createGraphics(); if(null == font) { // 默认字体 font = new Font("Courier", Font.PLAIN, (int)(targetImage.getHeight() * 0.75))...
[ "public", "Img", "pressText", "(", "String", "pressText", ",", "Color", "color", ",", "Font", "font", ",", "int", "x", ",", "int", "y", ",", "float", "alpha", ")", "{", "final", "BufferedImage", "targetImage", "=", "getValidSrcImg", "(", ")", ";", "final...
给图片添加文字水印<br> 此方法并不关闭流 @param pressText 水印文字 @param color 水印的字体颜色 @param font {@link Font} 字体相关信息 @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字 @return 处理后的图像
[ "给图片添加文字水印<br", ">", "此方法并不关闭流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/Img.java#L398-L422
train
Creates a new image with the specified color and font and pressText.
[ 30522, 2270, 10047, 2290, 2811, 18209, 1006, 5164, 2811, 18209, 1010, 3609, 3609, 1010, 15489, 15489, 1010, 20014, 1060, 1010, 20014, 1061, 1010, 14257, 6541, 1007, 1063, 2345, 17698, 2098, 9581, 3351, 4539, 9581, 3351, 1027, 2131, 10175, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...