repo
stringclasses
11 values
path
stringlengths
41
234
func_name
stringlengths
5
78
original_string
stringlengths
71
14.1k
language
stringclasses
1 value
code
stringlengths
71
14.1k
code_tokens
listlengths
22
2.65k
docstring
stringlengths
2
5.35k
docstring_tokens
listlengths
1
369
sha
stringclasses
11 values
url
stringlengths
129
339
partition
stringclasses
1 value
summary
stringlengths
7
175
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
apache/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2/Catalogs.java
Catalogs.catalogOptions
private static CaseInsensitiveStringMap catalogOptions(String name, SQLConf conf) { Map<String, String> allConfs = mapAsJavaMapConverter(conf.getAllConfs()).asJava(); Pattern prefix = Pattern.compile("^spark\\.sql\\.catalog\\." + name + "\\.(.+)"); HashMap<String, String> options = new HashMap<>(); for...
java
private static CaseInsensitiveStringMap catalogOptions(String name, SQLConf conf) { Map<String, String> allConfs = mapAsJavaMapConverter(conf.getAllConfs()).asJava(); Pattern prefix = Pattern.compile("^spark\\.sql\\.catalog\\." + name + "\\.(.+)"); HashMap<String, String> options = new HashMap<>(); for...
[ "private", "static", "CaseInsensitiveStringMap", "catalogOptions", "(", "String", "name", ",", "SQLConf", "conf", ")", "{", "Map", "<", "String", ",", "String", ">", "allConfs", "=", "mapAsJavaMapConverter", "(", "conf", ".", "getAllConfs", "(", ")", ")", ".",...
Extracts a named catalog's configuration from a SQLConf. @param name a catalog name @param conf a SQLConf @return a case insensitive string map of options starting with spark.sql.catalog.(name).
[ "Extracts", "a", "named", "catalog", "s", "configuration", "from", "a", "SQLConf", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2/Catalogs.java#L98-L111
train
Get catalog options from configuration
[ 30522, 2797, 10763, 2553, 7076, 6132, 13043, 3367, 4892, 2863, 2361, 12105, 7361, 9285, 1006, 5164, 2171, 1010, 29296, 8663, 2546, 9530, 2546, 1007, 1063, 4949, 1026, 5164, 1010, 30524, 10343, 1006, 1007, 1007, 1012, 2004, 3900, 3567, 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/common/Graph.java
Graph.parsePath
public List<Vertex> parsePath(int[] path) { List<Vertex> vertexList = new LinkedList<Vertex>(); for (int i : path) { vertexList.add(vertexes[i]); } return vertexList; }
java
public List<Vertex> parsePath(int[] path) { List<Vertex> vertexList = new LinkedList<Vertex>(); for (int i : path) { vertexList.add(vertexes[i]); } return vertexList; }
[ "public", "List", "<", "Vertex", ">", "parsePath", "(", "int", "[", "]", "path", ")", "{", "List", "<", "Vertex", ">", "vertexList", "=", "new", "LinkedList", "<", "Vertex", ">", "(", ")", ";", "for", "(", "int", "i", ":", "path", ")", "{", "vert...
根据节点下标数组解释出对应的路径 @param path @return
[ "根据节点下标数组解释出对应的路径" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/Graph.java#L100-L109
train
Parse a path of a CRA to a CRA list of Vertices.
[ 30522, 2270, 2862, 1026, 19449, 1028, 11968, 3366, 15069, 1006, 20014, 1031, 1033, 4130, 1007, 1063, 2862, 1026, 19449, 1028, 19449, 9863, 1027, 2047, 5799, 9863, 1026, 19449, 1028, 1006, 1007, 1025, 2005, 1006, 20014, 1045, 1024, 4130, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.betweenYear
public static long betweenYear(Date beginDate, Date endDate, boolean isReset) { return new DateBetween(beginDate, endDate).betweenYear(isReset); }
java
public static long betweenYear(Date beginDate, Date endDate, boolean isReset) { return new DateBetween(beginDate, endDate).betweenYear(isReset); }
[ "public", "static", "long", "betweenYear", "(", "Date", "beginDate", ",", "Date", "endDate", ",", "boolean", "isReset", ")", "{", "return", "new", "DateBetween", "(", "beginDate", ",", "endDate", ")", ".", "betweenYear", "(", "isReset", ")", ";", "}" ]
计算两个日期相差年数<br> 在非重置情况下,如果起始日期的月小于结束日期的月,年数要少算1(不足1年) @param beginDate 起始日期 @param endDate 结束日期 @param isReset 是否重置时间为起始时间(重置月天时分秒) @return 相差年数 @since 3.0.8
[ "计算两个日期相差年数<br", ">", "在非重置情况下,如果起始日期的月小于结束日期的月,年数要少算1(不足1年)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1306-L1308
train
Gets the number of days between two year.
[ 30522, 2270, 10763, 2146, 2090, 29100, 1006, 3058, 4088, 13701, 1010, 3058, 2203, 13701, 1010, 22017, 20898, 2003, 6072, 3388, 1007, 1063, 2709, 2047, 3058, 20915, 28394, 2078, 1006, 4088, 13701, 1010, 2203, 13701, 1007, 1012, 2090, 29100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/NativeLibraryUtil.java
NativeLibraryUtil.loadLibrary
public static void loadLibrary(String libName, boolean absolute) { if (absolute) { System.load(libName); } else { System.loadLibrary(libName); } }
java
public static void loadLibrary(String libName, boolean absolute) { if (absolute) { System.load(libName); } else { System.loadLibrary(libName); } }
[ "public", "static", "void", "loadLibrary", "(", "String", "libName", ",", "boolean", "absolute", ")", "{", "if", "(", "absolute", ")", "{", "System", ".", "load", "(", "libName", ")", ";", "}", "else", "{", "System", ".", "loadLibrary", "(", "libName", ...
Delegate the calling to {@link System#load(String)} or {@link System#loadLibrary(String)}. @param libName - The native library path or name @param absolute - Whether the native library will be loaded by path or by name
[ "Delegate", "the", "calling", "to", "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/NativeLibraryUtil.java#L34-L40
train
Load the class file.
[ 30522, 2270, 10763, 11675, 7170, 29521, 19848, 2100, 1006, 5164, 5622, 24700, 14074, 1010, 22017, 20898, 7619, 1007, 1063, 2065, 1006, 7619, 1007, 1063, 2291, 1012, 7170, 1006, 5622, 24700, 14074, 1007, 1025, 1065, 2842, 1063, 2291, 1012, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
RemoteInputChannel.sendTaskEvent
@Override void sendTaskEvent(TaskEvent event) throws IOException { checkState(!isReleased.get(), "Tried to send task event to producer after channel has been released."); checkState(partitionRequestClient != null, "Tried to send task event to producer before requesting a queue."); checkError(); partitionRequ...
java
@Override void sendTaskEvent(TaskEvent event) throws IOException { checkState(!isReleased.get(), "Tried to send task event to producer after channel has been released."); checkState(partitionRequestClient != null, "Tried to send task event to producer before requesting a queue."); checkError(); partitionRequ...
[ "@", "Override", "void", "sendTaskEvent", "(", "TaskEvent", "event", ")", "throws", "IOException", "{", "checkState", "(", "!", "isReleased", ".", "get", "(", ")", ",", "\"Tried to send task event to producer after channel has been released.\"", ")", ";", "checkState", ...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java#L209-L217
train
Sends a task event to the producer.
[ 30522, 1030, 2058, 15637, 11675, 4604, 10230, 3489, 15338, 1006, 4708, 18697, 3372, 2724, 1007, 11618, 22834, 10288, 24422, 1063, 14148, 12259, 1006, 999, 2003, 16570, 25063, 1012, 2131, 1006, 1007, 1010, 1000, 2699, 2000, 4604, 4708, 2724, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/file/FileWriter.java
FileWriter.writeLines
public <T> File writeLines(Collection<T> list, boolean isAppend) throws IORuntimeException { return writeLines(list, null, isAppend); }
java
public <T> File writeLines(Collection<T> list, boolean isAppend) throws IORuntimeException { return writeLines(list, null, isAppend); }
[ "public", "<", "T", ">", "File", "writeLines", "(", "Collection", "<", "T", ">", "list", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "writeLines", "(", "list", ",", "null", ",", "isAppend", ")", ";", "}" ]
将列表写入文件 @param <T> 集合元素类型 @param list 列表 @param isAppend 是否追加 @return 目标文件 @throws IORuntimeException IO异常
[ "将列表写入文件" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L182-L184
train
Write a collection of lines to a file.
[ 30522, 2270, 1026, 1056, 1028, 5371, 4339, 12735, 1006, 3074, 1026, 1056, 1028, 2862, 1010, 22017, 20898, 18061, 21512, 4859, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 2709, 4339, 12735, 1006, 2862, 1010, 19701, 1010, 18061, 21512,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/MessageCombiner.java
MessageCombiner.sendCombinedMessage
public final void sendCombinedMessage(Message combinedMessage) { outValue.f1 = Either.Right(combinedMessage); out.collect(outValue); }
java
public final void sendCombinedMessage(Message combinedMessage) { outValue.f1 = Either.Right(combinedMessage); out.collect(outValue); }
[ "public", "final", "void", "sendCombinedMessage", "(", "Message", "combinedMessage", ")", "{", "outValue", ".", "f1", "=", "Either", ".", "Right", "(", "combinedMessage", ")", ";", "out", ".", "collect", "(", "outValue", ")", ";", "}" ]
Sends the combined message to the target vertex. @param combinedMessage @throws Exception
[ "Sends", "the", "combined", "message", "to", "the", "target", "vertex", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/pregel/MessageCombiner.java#L64-L67
train
Sends a combined message to the server.
[ 30522, 2270, 2345, 11675, 4604, 18274, 21280, 7834, 3736, 3351, 1006, 4471, 4117, 7834, 3736, 3351, 1007, 1063, 2041, 10175, 5657, 1012, 20069, 1027, 2593, 1012, 2157, 1006, 4117, 7834, 3736, 3351, 1007, 1025, 2041, 1012, 8145, 1006, 2041, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/SniHandler.java
SniHandler.replaceHandler
protected void replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext) throws Exception { SslHandler sslHandler = null; try { sslHandler = newSslHandler(sslContext, ctx.alloc()); ctx.pipeline().replace(this, SslHandler.class.getName(), sslHandler); ...
java
protected void replaceHandler(ChannelHandlerContext ctx, String hostname, SslContext sslContext) throws Exception { SslHandler sslHandler = null; try { sslHandler = newSslHandler(sslContext, ctx.alloc()); ctx.pipeline().replace(this, SslHandler.class.getName(), sslHandler); ...
[ "protected", "void", "replaceHandler", "(", "ChannelHandlerContext", "ctx", ",", "String", "hostname", ",", "SslContext", "sslContext", ")", "throws", "Exception", "{", "SslHandler", "sslHandler", "=", "null", ";", "try", "{", "sslHandler", "=", "newSslHandler", "...
The default implementation of this method will simply replace {@code this} {@link SniHandler} instance with a {@link SslHandler}. Users may override this method to implement custom behavior. Please be aware that this method may get called after a client has already disconnected and custom implementations must take it ...
[ "The", "default", "implementation", "of", "this", "method", "will", "simply", "replace", "{", "@code", "this", "}", "{", "@link", "SniHandler", "}", "instance", "with", "a", "{", "@link", "SslHandler", "}", ".", "Users", "may", "override", "this", "method", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SniHandler.java#L130-L144
train
Replace the SslHandler in the pipeline with the SslHandler.
[ 30522, 5123, 11675, 5672, 11774, 3917, 1006, 3149, 11774, 3917, 8663, 18209, 14931, 2595, 1010, 5164, 3677, 18442, 1010, 7020, 22499, 10111, 18413, 7020, 22499, 10111, 18413, 1007, 11618, 6453, 1063, 7020, 2140, 11774, 3917, 7020, 2140, 11774...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java
KeyMap.traverseMaps
public static <K, V> void traverseMaps( final KeyMap<K, V>[] maps, final TraversalEvaluator<K, V> visitor, final long touchedTag) throws Exception { // we need to work on the maps in descending size Arrays.sort(maps, CapacityDescendingComparator.INSTANCE); final int[] shifts = new int[maps.lengt...
java
public static <K, V> void traverseMaps( final KeyMap<K, V>[] maps, final TraversalEvaluator<K, V> visitor, final long touchedTag) throws Exception { // we need to work on the maps in descending size Arrays.sort(maps, CapacityDescendingComparator.INSTANCE); final int[] shifts = new int[maps.lengt...
[ "public", "static", "<", "K", ",", "V", ">", "void", "traverseMaps", "(", "final", "KeyMap", "<", "K", ",", "V", ">", "[", "]", "maps", ",", "final", "TraversalEvaluator", "<", "K", ",", "V", ">", "visitor", ",", "final", "long", "touchedTag", ")", ...
Performs a traversal about logical the multi-map that results from the union of the given maps. This method does not actually build a union of the map, but traverses the hash maps together. @param maps The array uf maps whose union should be traversed. @param visitor The visitor that is called for each key and all val...
[ "Performs", "a", "traversal", "about", "logical", "the", "multi", "-", "map", "that", "results", "from", "the", "union", "of", "the", "given", "maps", ".", "This", "method", "does", "not", "actually", "build", "a", "union", "of", "the", "map", "but", "tr...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/KeyMap.java#L499-L558
train
Traverses the given key maps and stores the result in the given visitor.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 11675, 20811, 2863, 4523, 1006, 2345, 3145, 2863, 2361, 1026, 1047, 1010, 1058, 1028, 1031, 1033, 7341, 1010, 2345, 29053, 9453, 10175, 6692, 4263, 1026, 1047, 1010, 1058, 1028, 10367, 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...
apache/flink
flink-core/src/main/java/org/apache/flink/core/fs/Path.java
Path.checkAndTrimPathArg
private String checkAndTrimPathArg(String path) { // disallow construction of a Path from an empty string if (path == null) { throw new IllegalArgumentException("Can not create a Path from a null string"); } path = path.trim(); if (path.length() == 0) { throw new IllegalArgumentException("Can not create...
java
private String checkAndTrimPathArg(String path) { // disallow construction of a Path from an empty string if (path == null) { throw new IllegalArgumentException("Can not create a Path from a null string"); } path = path.trim(); if (path.length() == 0) { throw new IllegalArgumentException("Can not create...
[ "private", "String", "checkAndTrimPathArg", "(", "String", "path", ")", "{", "// disallow construction of a Path from an empty string", "if", "(", "path", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Can not create a Path from a null string\"", ...
Checks if the provided path string is either null or has zero length and throws a {@link IllegalArgumentException} if any of the two conditions apply. In addition, leading and tailing whitespaces are removed. @param path the path string to be checked @return The checked and trimmed path.
[ "Checks", "if", "the", "provided", "path", "string", "is", "either", "null", "or", "has", "zero", "length", "and", "throws", "a", "{", "@link", "IllegalArgumentException", "}", "if", "any", "of", "the", "two", "conditions", "apply", ".", "In", "addition", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/Path.java#L161-L171
train
Check if the path argument is not null and trim it.
[ 30522, 2797, 5164, 4638, 5685, 18886, 8737, 8988, 2906, 2290, 1006, 5164, 4130, 1007, 1063, 1013, 1013, 4487, 12002, 8261, 2810, 1997, 1037, 4130, 2013, 2019, 4064, 5164, 2065, 1006, 4130, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 6206, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java
ThreadUtil.sleep
public static boolean sleep(Number timeout, TimeUnit timeUnit) { try { timeUnit.sleep(timeout.longValue()); } catch (InterruptedException e) { return false; } return true; }
java
public static boolean sleep(Number timeout, TimeUnit timeUnit) { try { timeUnit.sleep(timeout.longValue()); } catch (InterruptedException e) { return false; } return true; }
[ "public", "static", "boolean", "sleep", "(", "Number", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "try", "{", "timeUnit", ".", "sleep", "(", "timeout", ".", "longValue", "(", ")", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{",...
挂起当前线程 @param timeout 挂起的时长 @param timeUnit 时长单位 @return 被中断返回false,否则true
[ "挂起当前线程" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L209-L216
train
Sleep for the specified amount of time.
[ 30522, 2270, 10763, 22017, 20898, 3637, 1006, 2193, 2051, 5833, 1010, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/traffic/GlobalTrafficShapingHandler.java
GlobalTrafficShapingHandler.createGlobalTrafficCounter
void createGlobalTrafficCounter(ScheduledExecutorService executor) { if (executor == null) { throw new NullPointerException("executor"); } TrafficCounter tc = new TrafficCounter(this, executor, "GlobalTC", checkInterval); setTrafficCounter(tc); tc.start(); }
java
void createGlobalTrafficCounter(ScheduledExecutorService executor) { if (executor == null) { throw new NullPointerException("executor"); } TrafficCounter tc = new TrafficCounter(this, executor, "GlobalTC", checkInterval); setTrafficCounter(tc); tc.start(); }
[ "void", "createGlobalTrafficCounter", "(", "ScheduledExecutorService", "executor", ")", "{", "if", "(", "executor", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"executor\"", ")", ";", "}", "TrafficCounter", "tc", "=", "new", "TrafficCoun...
Create the global TrafficCounter.
[ "Create", "the", "global", "TrafficCounter", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/traffic/GlobalTrafficShapingHandler.java#L105-L112
train
Create a TrafficCounter for the global thread.
[ 30522, 11675, 3443, 23296, 16429, 2389, 6494, 26989, 21408, 16671, 2121, 30524, 7869, 2595, 24422, 1006, 1000, 4654, 8586, 16161, 2099, 1000, 1007, 1025, 1065, 4026, 3597, 16671, 2121, 22975, 1027, 2047, 4026, 3597, 16671, 2121, 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...
apache/flink
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/ProgramTargetDescriptor.java
ProgramTargetDescriptor.of
public static <C> ProgramTargetDescriptor of(C clusterId, JobID jobId, String webInterfaceUrl) { String clusterIdString; try { // check if cluster id has a toString method clusterId.getClass().getDeclaredMethod("toString"); clusterIdString = clusterId.toString(); } catch (NoSuchMethodException e) { cl...
java
public static <C> ProgramTargetDescriptor of(C clusterId, JobID jobId, String webInterfaceUrl) { String clusterIdString; try { // check if cluster id has a toString method clusterId.getClass().getDeclaredMethod("toString"); clusterIdString = clusterId.toString(); } catch (NoSuchMethodException e) { cl...
[ "public", "static", "<", "C", ">", "ProgramTargetDescriptor", "of", "(", "C", "clusterId", ",", "JobID", "jobId", ",", "String", "webInterfaceUrl", ")", "{", "String", "clusterIdString", ";", "try", "{", "// check if cluster id has a toString method", "clusterId", "...
Creates a program target description from deployment classes. @param clusterId cluster id @param jobId job id @param <C> cluster id type @return program target descriptor
[ "Creates", "a", "program", "target", "description", "from", "deployment", "classes", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/ProgramTargetDescriptor.java#L69-L79
train
Create a program target descriptor from a cluster id and job id.
[ 30522, 2270, 10763, 1026, 1039, 1028, 2565, 7559, 18150, 6155, 23235, 2953, 1997, 1006, 1039, 9324, 3593, 1010, 3105, 3593, 3105, 3593, 1010, 5164, 4773, 18447, 2121, 12172, 3126, 2140, 1007, 1063, 5164, 9324, 9821, 18886, 3070, 1025, 3046,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.checksum
public static Checksum checksum(InputStream in, Checksum checksum) throws IORuntimeException { Assert.notNull(in, "InputStream is null !"); if (null == checksum) { checksum = new CRC32(); } try { in = new CheckedInputStream(in, checksum); IoUtil.copy(in, new NullOutputStream()); } finally { ...
java
public static Checksum checksum(InputStream in, Checksum checksum) throws IORuntimeException { Assert.notNull(in, "InputStream is null !"); if (null == checksum) { checksum = new CRC32(); } try { in = new CheckedInputStream(in, checksum); IoUtil.copy(in, new NullOutputStream()); } finally { ...
[ "public", "static", "Checksum", "checksum", "(", "InputStream", "in", ",", "Checksum", "checksum", ")", "throws", "IORuntimeException", "{", "Assert", ".", "notNull", "(", "in", ",", "\"InputStream is null !\"", ")", ";", "if", "(", "null", "==", "checksum", "...
计算流的校验码,计算后关闭流 @param in 流 @param checksum {@link Checksum} @return Checksum @throws IORuntimeException IO异常 @since 4.0.10
[ "计算流的校验码,计算后关闭流" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L1126-L1138
train
Reads the contents of the specified input stream and returns the checksum.
[ 30522, 2270, 10763, 14148, 2819, 14148, 2819, 1006, 20407, 25379, 1999, 1010, 14148, 2819, 14148, 2819, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 20865, 1012, 2025, 11231, 3363, 1006, 1999, 1010, 1000, 20407, 25379, 2003, 19701, 99...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
common/network-common/src/main/java/org/apache/spark/network/TransportContext.java
TransportContext.createChannelHandler
private TransportChannelHandler createChannelHandler(Channel channel, RpcHandler rpcHandler) { TransportResponseHandler responseHandler = new TransportResponseHandler(channel); TransportClient client = new TransportClient(channel, responseHandler); TransportRequestHandler requestHandler = new TransportReque...
java
private TransportChannelHandler createChannelHandler(Channel channel, RpcHandler rpcHandler) { TransportResponseHandler responseHandler = new TransportResponseHandler(channel); TransportClient client = new TransportClient(channel, responseHandler); TransportRequestHandler requestHandler = new TransportReque...
[ "private", "TransportChannelHandler", "createChannelHandler", "(", "Channel", "channel", ",", "RpcHandler", "rpcHandler", ")", "{", "TransportResponseHandler", "responseHandler", "=", "new", "TransportResponseHandler", "(", "channel", ")", ";", "TransportClient", "client", ...
Creates the server- and client-side handler which is used to handle both RequestMessages and ResponseMessages. The channel is expected to have been successfully created, though certain properties (such as the remoteAddress()) may not be available yet.
[ "Creates", "the", "server", "-", "and", "client", "-", "side", "handler", "which", "is", "used", "to", "handle", "both", "RequestMessages", "and", "ResponseMessages", ".", "The", "channel", "is", "expected", "to", "have", "been", "successfully", "created", "th...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/TransportContext.java#L217-L224
train
Create a channel handler.
[ 30522, 2797, 3665, 26058, 11774, 3917, 3443, 26058, 11774, 3917, 1006, 3149, 3149, 1010, 1054, 15042, 11774, 3917, 1054, 15042, 11774, 3917, 1007, 1063, 3665, 6072, 26029, 3366, 11774, 3917, 3433, 11774, 3917, 1027, 2047, 3665, 6072, 26029, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java
CLIService.getResultSetMetadata
@Override public TableSchema getResultSetMetadata(OperationHandle opHandle) throws HiveSQLException { TableSchema tableSchema = sessionManager.getOperationManager() .getOperation(opHandle).getParentSession().getResultSetMetadata(opHandle); LOG.debug(opHandle + ": getResultSetMetadata()"); re...
java
@Override public TableSchema getResultSetMetadata(OperationHandle opHandle) throws HiveSQLException { TableSchema tableSchema = sessionManager.getOperationManager() .getOperation(opHandle).getParentSession().getResultSetMetadata(opHandle); LOG.debug(opHandle + ": getResultSetMetadata()"); re...
[ "@", "Override", "public", "TableSchema", "getResultSetMetadata", "(", "OperationHandle", "opHandle", ")", "throws", "HiveSQLException", "{", "TableSchema", "tableSchema", "=", "sessionManager", ".", "getOperationManager", "(", ")", ".", "getOperation", "(", "opHandle",...
/* (non-Javadoc) @see org.apache.hive.service.cli.ICLIService#getResultSetMetadata(org.apache.hive.service.cli.OperationHandle)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java#L432-L439
train
Get the result set metadata table schema for the given operation handle.
[ 30522, 1030, 2058, 15637, 2270, 7251, 5403, 2863, 2131, 6072, 11314, 13462, 11368, 8447, 2696, 1006, 3169, 11774, 2571, 6728, 11774, 2571, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1063, 7251, 5403, 2863, 7251, 5403, 2863, 1027, 52...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/thread/GlobalThreadPool.java
GlobalThreadPool.execute
public static void execute(Runnable runnable) { try { executor.execute(runnable); } catch (Exception e) { throw new UtilException(e, "Exception when running task!"); } }
java
public static void execute(Runnable runnable) { try { executor.execute(runnable); } catch (Exception e) { throw new UtilException(e, "Exception when running task!"); } }
[ "public", "static", "void", "execute", "(", "Runnable", "runnable", ")", "{", "try", "{", "executor", ".", "execute", "(", "runnable", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "UtilException", "(", "e", ",", "\"Exception w...
直接在公共线程池中执行线程 @param runnable 可运行对象
[ "直接在公共线程池中执行线程" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/GlobalThreadPool.java#L64-L70
train
Execute a Runnable.
[ 30522, 2270, 10763, 11675, 15389, 1006, 2448, 22966, 2448, 22966, 1007, 1063, 3046, 1063, 4654, 8586, 16161, 2099, 1012, 15389, 1006, 2448, 22966, 1007, 1025, 1065, 4608, 1006, 6453, 1041, 1007, 1063, 5466, 2047, 21183, 9463, 2595, 24422, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
TypeExtractor.createTypeInfo
@SuppressWarnings("unchecked") @PublicEvolving public static <OUT> TypeInformation<OUT> createTypeInfo(Object instance, Class<?> baseClass, Class<?> clazz, int returnParamPos) { if (instance instanceof ResultTypeQueryable) { return ((ResultTypeQueryable<OUT>) instance).getProducedType(); } else { return cre...
java
@SuppressWarnings("unchecked") @PublicEvolving public static <OUT> TypeInformation<OUT> createTypeInfo(Object instance, Class<?> baseClass, Class<?> clazz, int returnParamPos) { if (instance instanceof ResultTypeQueryable) { return ((ResultTypeQueryable<OUT>) instance).getProducedType(); } else { return cre...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "PublicEvolving", "public", "static", "<", "OUT", ">", "TypeInformation", "<", "OUT", ">", "createTypeInfo", "(", "Object", "instance", ",", "Class", "<", "?", ">", "baseClass", ",", "Class", "<", "?",...
Creates a {@link TypeInformation} from the given parameters. If the given {@code instance} implements {@link ResultTypeQueryable}, its information is used to determine the type information. Otherwise, the type information is derived based on the given class information. @param instance instance to determine type in...
[ "Creates", "a", "{", "@link", "TypeInformation", "}", "from", "the", "given", "parameters", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L756-L764
train
Create TypeInformation for a single instance of a type.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 1030, 2270, 6777, 4747, 6455, 2270, 10763, 1026, 2041, 1028, 2828, 2378, 14192, 30524, 8737, 2891, 1007, 1063, 2065, 1006, 6013, 6013, 11253, 2765, 13874, 4226...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.getImageOutputStream
public static ImageOutputStream getImageOutputStream(File outFile) throws IORuntimeException { try { return ImageIO.createImageOutputStream(outFile); } catch (IOException e) { throw new IORuntimeException(e); } }
java
public static ImageOutputStream getImageOutputStream(File outFile) throws IORuntimeException { try { return ImageIO.createImageOutputStream(outFile); } catch (IOException e) { throw new IORuntimeException(e); } }
[ "public", "static", "ImageOutputStream", "getImageOutputStream", "(", "File", "outFile", ")", "throws", "IORuntimeException", "{", "try", "{", "return", "ImageIO", ".", "createImageOutputStream", "(", "outFile", ")", ";", "}", "catch", "(", "IOException", "e", ")"...
获取{@link ImageOutputStream} @param outFile {@link File} @return {@link ImageOutputStream} @throws IORuntimeException IO异常 @since 3.2.2
[ "获取", "{", "@link", "ImageOutputStream", "}" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1622-L1628
train
Gets an ImageOutputStream for the specified file.
[ 30522, 2270, 10763, 3746, 5833, 18780, 21422, 2131, 9581, 3351, 5833, 18780, 21422, 1006, 5371, 2041, 8873, 2571, 1007, 11618, 22834, 15532, 7292, 10288, 24422, 1063, 3046, 1063, 2709, 3746, 3695, 1012, 3443, 9581, 3351, 5833, 18780, 21422, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java
HttpUploadServerHandler.readHttpDataChunkByChunk
private void readHttpDataChunkByChunk() { try { while (decoder.hasNext()) { InterfaceHttpData data = decoder.next(); if (data != null) { // check if current HttpData is a FileUpload and previously set as partial if (partialConte...
java
private void readHttpDataChunkByChunk() { try { while (decoder.hasNext()) { InterfaceHttpData data = decoder.next(); if (data != null) { // check if current HttpData is a FileUpload and previously set as partial if (partialConte...
[ "private", "void", "readHttpDataChunkByChunk", "(", ")", "{", "try", "{", "while", "(", "decoder", ".", "hasNext", "(", ")", ")", "{", "InterfaceHttpData", "data", "=", "decoder", ".", "next", "(", ")", ";", "if", "(", "data", "!=", "null", ")", "{", ...
Example of reading request by chunk and getting values from chunk to chunk
[ "Example", "of", "reading", "request", "by", "chunk", "and", "getting", "values", "from", "chunk", "to", "chunk" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java#L212-L254
train
Read the HttpData chunk by chunk.
[ 30522, 2797, 11675, 3191, 11039, 25856, 2850, 2696, 20760, 8950, 3762, 20760, 8950, 1006, 1007, 1063, 3046, 1063, 2096, 1006, 21933, 4063, 1012, 8440, 10288, 2102, 1006, 1007, 1007, 1063, 8278, 11039, 25856, 2850, 2696, 2951, 1027, 21933, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.bitUnSet
public static void bitUnSet(MemorySegment[] segments, int baseOffset, int index) { if (segments.length == 1) { MemorySegment segment = segments[0]; int offset = baseOffset + ((index & BIT_BYTE_POSITION_MASK) >>> 3); byte current = segment.get(offset); current &= ~(1 << (index & BIT_BYTE_INDEX_MASK)); s...
java
public static void bitUnSet(MemorySegment[] segments, int baseOffset, int index) { if (segments.length == 1) { MemorySegment segment = segments[0]; int offset = baseOffset + ((index & BIT_BYTE_POSITION_MASK) >>> 3); byte current = segment.get(offset); current &= ~(1 << (index & BIT_BYTE_INDEX_MASK)); s...
[ "public", "static", "void", "bitUnSet", "(", "MemorySegment", "[", "]", "segments", ",", "int", "baseOffset", ",", "int", "index", ")", "{", "if", "(", "segments", ".", "length", "==", "1", ")", "{", "MemorySegment", "segment", "=", "segments", "[", "0",...
unset bit from segments. @param segments target segments. @param baseOffset bits base offset. @param index bit index from base offset.
[ "unset", "bit", "from", "segments", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L460-L470
train
clear bit from segments
[ 30522, 2270, 10763, 11675, 2978, 4609, 13462, 1006, 3638, 3366, 21693, 4765, 1031, 1033, 9214, 1010, 20014, 2918, 27475, 3388, 1010, 20014, 5950, 1007, 1063, 2065, 1006, 9214, 1012, 3091, 1027, 1027, 1015, 1007, 1063, 3638, 3366, 21693, 476...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java
AbstractMetricGroup.close
public void close() { synchronized (this) { if (!closed) { closed = true; // close all subgroups for (AbstractMetricGroup group : groups.values()) { group.close(); } groups.clear(); // un-register all directly contained metrics for (Map.Entry<String, Metric> metric : metrics.entr...
java
public void close() { synchronized (this) { if (!closed) { closed = true; // close all subgroups for (AbstractMetricGroup group : groups.values()) { group.close(); } groups.clear(); // un-register all directly contained metrics for (Map.Entry<String, Metric> metric : metrics.entr...
[ "public", "void", "close", "(", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "!", "closed", ")", "{", "closed", "=", "true", ";", "// close all subgroups", "for", "(", "AbstractMetricGroup", "group", ":", "groups", ".", "values", "(", ")",...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroup.java#L284-L302
train
Closes the registry.
[ 30522, 2270, 11675, 2485, 1006, 1007, 1063, 25549, 1006, 2023, 1007, 1063, 2065, 1006, 999, 2701, 1007, 1063, 2701, 1027, 2995, 1025, 1013, 1013, 2485, 2035, 20576, 2015, 2005, 1006, 10061, 12589, 17058, 2177, 1024, 2967, 1012, 5300, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-boot-starter/src/main/java/org/apache/shardingsphere/shardingjdbc/spring/boot/util/DataSourceUtil.java
DataSourceUtil.getDataSource
public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties) throws ReflectiveOperationException { DataSource result = (DataSource) Class.forName(dataSourceClassName).newInstance(); for (Entry<String, Object> entry : dataSourceProperties.entryS...
java
public static DataSource getDataSource(final String dataSourceClassName, final Map<String, Object> dataSourceProperties) throws ReflectiveOperationException { DataSource result = (DataSource) Class.forName(dataSourceClassName).newInstance(); for (Entry<String, Object> entry : dataSourceProperties.entryS...
[ "public", "static", "DataSource", "getDataSource", "(", "final", "String", "dataSourceClassName", ",", "final", "Map", "<", "String", ",", "Object", ">", "dataSourceProperties", ")", "throws", "ReflectiveOperationException", "{", "DataSource", "result", "=", "(", "D...
Get data source. @param dataSourceClassName data source class name @param dataSourceProperties data source properties @return data source instance @throws ReflectiveOperationException reflective operation exception
[ "Get", "data", "source", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-boot-starter/src/main/java/org/apache/shardingsphere/shardingjdbc/spring/boot/util/DataSourceUtil.java#L55-L61
train
Get a DataSource from a Map of properties.
[ 30522, 2270, 10763, 2951, 6499, 3126, 3401, 2131, 2850, 10230, 8162, 3401, 1006, 2345, 5164, 2951, 6499, 3126, 3401, 26266, 18442, 1010, 2345, 4949, 1026, 5164, 1010, 4874, 1028, 2951, 6499, 3126, 3401, 21572, 4842, 7368, 1007, 11618, 21346...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-metrics/flink-metrics-jmx/src/main/java/org/apache/flink/metrics/jmx/JMXReporter.java
JMXReporter.open
@Override public void open(MetricConfig config) { String portsConfig = config.getString(ARG_PORT, null); if (portsConfig != null) { Iterator<Integer> ports = NetUtils.getPortRangeFromString(portsConfig); JMXServer server = new JMXServer(); while (ports.hasNext()) { int port = ports.next(); try {...
java
@Override public void open(MetricConfig config) { String portsConfig = config.getString(ARG_PORT, null); if (portsConfig != null) { Iterator<Integer> ports = NetUtils.getPortRangeFromString(portsConfig); JMXServer server = new JMXServer(); while (ports.hasNext()) { int port = ports.next(); try {...
[ "@", "Override", "public", "void", "open", "(", "MetricConfig", "config", ")", "{", "String", "portsConfig", "=", "config", ".", "getString", "(", "ARG_PORT", ",", "null", ")", ";", "if", "(", "portsConfig", "!=", "null", ")", "{", "Iterator", "<", "Inte...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-metrics/flink-metrics-jmx/src/main/java/org/apache/flink/metrics/jmx/JMXReporter.java#L100-L130
train
Open the JMXReporter.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2330, 1006, 12046, 8663, 8873, 2290, 9530, 8873, 2290, 1007, 1063, 5164, 8831, 8663, 8873, 2290, 1027, 9530, 8873, 2290, 1012, 4152, 18886, 3070, 1006, 12098, 2290, 1035, 3417, 1010, 19701, 1007, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/Setting.java
Setting.get
public String get(String group, String key) { return this.groupedMap.get(group, key); }
java
public String get(String group, String key) { return this.groupedMap.get(group, key); }
[ "public", "String", "get", "(", "String", "group", ",", "String", "key", ")", "{", "return", "this", ".", "groupedMap", ".", "get", "(", "group", ",", "key", ")", ";", "}" ]
获取分组对应的值,如果分组不存在或者值不存在则返回null @param group 分组 @param key 键 @return 值,如果分组不存在或者值不存在则返回null
[ "获取分组对应的值,如果分组不存在或者值不存在则返回null" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/Setting.java#L409-L411
train
Gets the value of the specified key in the specified group.
[ 30522, 2270, 5164, 2131, 1006, 5164, 2177, 1010, 5164, 3145, 1007, 1063, 2709, 2023, 1012, 15131, 2863, 2361, 1012, 2131, 1006, 2177, 1010, 3145, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/multi/SetValueMap.java
SetValueMap.get
@Override public Set<V> get(Object key) { return (Set<V>) super.get(key); }
java
@Override public Set<V> get(Object key) { return (Set<V>) super.get(key); }
[ "@", "Override", "public", "Set", "<", "V", ">", "get", "(", "Object", "key", ")", "{", "return", "(", "Set", "<", "V", ">", ")", "super", ".", "get", "(", "key", ")", ";", "}" ]
------------------------------------------------------------------------- Constructor end
[ "-------------------------------------------------------------------------", "Constructor", "end" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/multi/SetValueMap.java#L69-L72
train
Override to return a Set of the objects that contain the specified key.
[ 30522, 1030, 2058, 15637, 2270, 2275, 1026, 1058, 1028, 2131, 1006, 4874, 3145, 1007, 1063, 2709, 1006, 2275, 1026, 1058, 1028, 1007, 3565, 1012, 2131, 1006, 3145, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/common/WordNet.java
WordNet.get
public Vertex get(int line, int length) { for (Vertex vertex : vertexes[line]) { if (vertex.realWord.length() == length) { return vertex; } } return null; }
java
public Vertex get(int line, int length) { for (Vertex vertex : vertexes[line]) { if (vertex.realWord.length() == length) { return vertex; } } return null; }
[ "public", "Vertex", "get", "(", "int", "line", ",", "int", "length", ")", "{", "for", "(", "Vertex", "vertex", ":", "vertexes", "[", "line", "]", ")", "{", "if", "(", "vertex", ".", "realWord", ".", "length", "(", ")", "==", "length", ")", "{", "...
获取某一行长度为length的节点 @param line @param length @return
[ "获取某一行长度为length的节点" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/WordNet.java#L234-L245
train
Get a CCSCTYPE vertex from the line and length.
[ 30522, 2270, 19449, 2131, 1006, 20014, 2240, 1010, 20014, 3091, 1007, 1063, 2005, 1006, 19449, 19449, 1024, 19449, 2229, 1031, 2240, 1033, 1007, 1063, 2065, 1006, 19449, 1012, 2613, 18351, 1012, 3091, 1006, 1007, 1027, 1027, 3091, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/HanLP.java
HanLP.newSegment
public static Segment newSegment(String algorithm) { if (algorithm == null) { throw new IllegalArgumentException(String.format("非法参数 algorithm == %s", algorithm)); } algorithm = algorithm.toLowerCase(); if ("viterbi".equals(algorithm) || "维特比".equals(algorithm)) ...
java
public static Segment newSegment(String algorithm) { if (algorithm == null) { throw new IllegalArgumentException(String.format("非法参数 algorithm == %s", algorithm)); } algorithm = algorithm.toLowerCase(); if ("viterbi".equals(algorithm) || "维特比".equals(algorithm)) ...
[ "public", "static", "Segment", "newSegment", "(", "String", "algorithm", ")", "{", "if", "(", "algorithm", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"非法参数 algorithm == %s\", algori", "t", "m));", "",...
创建一个分词器, 这是一个工厂方法<br> @param algorithm 分词算法,传入算法的中英文名都可以,可选列表:<br> <ul> <li>维特比 (viterbi):效率和效果的最佳平衡</li> <li>双数组trie树 (dat):极速词典分词,千万字符每秒</li> <li>条件随机场 (crf):分词、词性标注与命名实体识别精度都较高,适合要求较高的NLP任务</li> <li>感知机 (perceptron):分词、词性标注与命名实体识别,支持在线学习</li> <li>N最短路 (nshort):命名实体识别稍微好一些,牺牲了速度</li> </ul> @return 一个分词器
[ "创建一个分词器,", "这是一个工厂方法<br", ">" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/HanLP.java#L663-L699
train
Creates a new segment object.
[ 30522, 2270, 10763, 6903, 2739, 13910, 3672, 1006, 5164, 9896, 1007, 30524, 1901, 100, 100, 9896, 1027, 1027, 1003, 1055, 1000, 1010, 9896, 1007, 1007, 1025, 1065, 9896, 1027, 9896, 1012, 2000, 27663, 18992, 3366, 1006, 1007, 1025, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/maxent/MaxEntModel.java
MaxEntModel.eval
public final double[] eval(String[] context, double[] outsums) { assert context != null; int[] scontexts = new int[context.length]; for (int i = 0; i < context.length; i++) { Integer ci = pmap.get(context[i]); scontexts[i] = ci == null ? -1 : ci; } ...
java
public final double[] eval(String[] context, double[] outsums) { assert context != null; int[] scontexts = new int[context.length]; for (int i = 0; i < context.length; i++) { Integer ci = pmap.get(context[i]); scontexts[i] = ci == null ? -1 : ci; } ...
[ "public", "final", "double", "[", "]", "eval", "(", "String", "[", "]", "context", ",", "double", "[", "]", "outsums", ")", "{", "assert", "context", "!=", "null", ";", "int", "[", "]", "scontexts", "=", "new", "int", "[", "context", ".", "length", ...
预测分布 @param context 环境 @param outsums 先验分布 @return 概率数组
[ "预测分布" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/maxent/MaxEntModel.java#L128-L139
train
Evaluate a single context.
[ 30522, 2270, 2345, 3313, 1031, 1033, 9345, 2140, 1006, 5164, 1031, 1033, 6123, 1010, 3313, 1031, 1033, 21100, 18163, 1007, 1063, 20865, 6123, 999, 1027, 19701, 1025, 20014, 1031, 1033, 8040, 28040, 18413, 2015, 1027, 2047, 20014, 1031, 6123...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
transport/src/main/java/io/netty/channel/embedded/EmbeddedChannel.java
EmbeddedChannel.writeOneOutbound
public ChannelFuture writeOneOutbound(Object msg, ChannelPromise promise) { if (checkOpen(true)) { return write(msg, promise); } return checkException(promise); }
java
public ChannelFuture writeOneOutbound(Object msg, ChannelPromise promise) { if (checkOpen(true)) { return write(msg, promise); } return checkException(promise); }
[ "public", "ChannelFuture", "writeOneOutbound", "(", "Object", "msg", ",", "ChannelPromise", "promise", ")", "{", "if", "(", "checkOpen", "(", "true", ")", ")", "{", "return", "write", "(", "msg", ",", "promise", ")", ";", "}", "return", "checkException", "...
Writes one message to the outbound of this {@link Channel} and does not flush it. This method is conceptually equivalent to {@link #write(Object, ChannelPromise)}. @see #writeOneInbound(Object, ChannelPromise)
[ "Writes", "one", "message", "to", "the", "outbound", "of", "this", "{", "@link", "Channel", "}", "and", "does", "not", "flush", "it", ".", "This", "method", "is", "conceptually", "equivalent", "to", "{", "@link", "#write", "(", "Object", "ChannelPromise", ...
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/embedded/EmbeddedChannel.java#L431-L436
train
Write one outbound message to the underlying stream.
[ 30522, 2270, 3149, 11263, 11244, 4339, 5643, 5833, 15494, 1006, 4874, 5796, 2290, 1010, 3149, 21572, 28732, 4872, 1007, 1063, 2065, 1006, 4638, 26915, 1006, 2995, 1007, 1007, 1063, 2709, 4339, 1006, 5796, 2290, 1010, 4872, 1007, 1025, 1065,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/SortUtil.java
SortUtil.putFloatNormalizedKey
public static void putFloatNormalizedKey(float value, MemorySegment target, int offset, int numBytes) { int iValue = Float.floatToIntBits(value); iValue ^= ((iValue >> (Integer.SIZE - 1)) | Integer.MIN_VALUE); NormalizedKeyUtil.putUnsignedIntegerNormalizedKey(iValue, target, offset, numBytes); }
java
public static void putFloatNormalizedKey(float value, MemorySegment target, int offset, int numBytes) { int iValue = Float.floatToIntBits(value); iValue ^= ((iValue >> (Integer.SIZE - 1)) | Integer.MIN_VALUE); NormalizedKeyUtil.putUnsignedIntegerNormalizedKey(iValue, target, offset, numBytes); }
[ "public", "static", "void", "putFloatNormalizedKey", "(", "float", "value", ",", "MemorySegment", "target", ",", "int", "offset", ",", "int", "numBytes", ")", "{", "int", "iValue", "=", "Float", ".", "floatToIntBits", "(", "value", ")", ";", "iValue", "^=", ...
See http://stereopsis.com/radix.html for more details.
[ "See", "http", ":", "//", "stereopsis", ".", "com", "/", "radix", ".", "html", "for", "more", "details", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/SortUtil.java#L108-L113
train
Put a float into the MemorySegment.
[ 30522, 2270, 10763, 11675, 2404, 10258, 16503, 12131, 9067, 3550, 14839, 1006, 14257, 3643, 1010, 3638, 3366, 21693, 4765, 4539, 1010, 20014, 16396, 1010, 20014, 15903, 17250, 2015, 1007, 1063, 20014, 4921, 2389, 5657, 1027, 14257, 1012, 1425...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.reverse
public Graph<K, VV, EV> reverse() throws UnsupportedOperationException { DataSet<Edge<K, EV>> reversedEdges = edges.map(new ReverseEdgesMap<>()).name("Reverse edges"); return new Graph<>(vertices, reversedEdges, this.context); }
java
public Graph<K, VV, EV> reverse() throws UnsupportedOperationException { DataSet<Edge<K, EV>> reversedEdges = edges.map(new ReverseEdgesMap<>()).name("Reverse edges"); return new Graph<>(vertices, reversedEdges, this.context); }
[ "public", "Graph", "<", "K", ",", "VV", ",", "EV", ">", "reverse", "(", ")", "throws", "UnsupportedOperationException", "{", "DataSet", "<", "Edge", "<", "K", ",", "EV", ">", ">", "reversedEdges", "=", "edges", ".", "map", "(", "new", "ReverseEdgesMap", ...
Reverse the direction of the edges in the graph. @return a new graph with all edges reversed @throws UnsupportedOperationException
[ "Reverse", "the", "direction", "of", "the", "edges", "in", "the", "graph", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/Graph.java#L1308-L1311
train
Returns a new graph that is reversed.
[ 30522, 2270, 10629, 1026, 1047, 1010, 1058, 2615, 1010, 23408, 1028, 7901, 1006, 1007, 11618, 4895, 6342, 9397, 15613, 25918, 3370, 10288, 24422, 1063, 2951, 13462, 1026, 3341, 1026, 1047, 1010, 23408, 1028, 1028, 11674, 24225, 2015, 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/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/FixedLengthRowBasedKeyValueBatch.java
FixedLengthRowBasedKeyValueBatch.getKeyRow
@Override public UnsafeRow getKeyRow(int rowId) { assert(rowId >= 0); assert(rowId < numRows); if (keyRowId != rowId) { // if keyRowId == rowId, desired keyRow is already cached long offset = getKeyOffsetForFixedLengthRecords(rowId); keyRow.pointTo(base, offset, klen); // set keyRowId so...
java
@Override public UnsafeRow getKeyRow(int rowId) { assert(rowId >= 0); assert(rowId < numRows); if (keyRowId != rowId) { // if keyRowId == rowId, desired keyRow is already cached long offset = getKeyOffsetForFixedLengthRecords(rowId); keyRow.pointTo(base, offset, klen); // set keyRowId so...
[ "@", "Override", "public", "UnsafeRow", "getKeyRow", "(", "int", "rowId", ")", "{", "assert", "(", "rowId", ">=", "0", ")", ";", "assert", "(", "rowId", "<", "numRows", ")", ";", "if", "(", "keyRowId", "!=", "rowId", ")", "{", "// if keyRowId == rowId, d...
Returns the key row in this batch at `rowId`. Returned key row is reused across calls.
[ "Returns", "the", "key", "row", "in", "this", "batch", "at", "rowId", ".", "Returned", "key", "row", "is", "reused", "across", "calls", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/FixedLengthRowBasedKeyValueBatch.java#L73-L84
train
Override the method to return a UnsafeRow for the specified row.
[ 30522, 1030, 30524, 3593, 1007, 1063, 1013, 1013, 2065, 3145, 10524, 3593, 1027, 1027, 5216, 3593, 1010, 9059, 3145, 10524, 2003, 2525, 17053, 2094, 2146, 16396, 1027, 2131, 14839, 27475, 3388, 29278, 23901, 7770, 13512, 28362, 27108, 5104, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/maxent/MaxEntModel.java
MaxEntModel.load
public static MaxEntModel load(String txtPath) { ByteArray byteArray = ByteArray.createByteArray(txtPath + Predefine.BIN_EXT); if (byteArray != null) return create(byteArray); return create(txtPath); }
java
public static MaxEntModel load(String txtPath) { ByteArray byteArray = ByteArray.createByteArray(txtPath + Predefine.BIN_EXT); if (byteArray != null) return create(byteArray); return create(txtPath); }
[ "public", "static", "MaxEntModel", "load", "(", "String", "txtPath", ")", "{", "ByteArray", "byteArray", "=", "ByteArray", ".", "createByteArray", "(", "txtPath", "+", "Predefine", ".", "BIN_EXT", ")", ";", "if", "(", "byteArray", "!=", "null", ")", "return"...
加载最大熵模型<br> 如果存在缓存的话,优先读取缓存,否则读取txt,并且建立缓存 @param txtPath txt的路径,即使不存在.txt,只存在.bin,也应传入txt的路径,方法内部会自动加.bin后缀 @return
[ "加载最大熵模型<br", ">", "如果存在缓存的话,优先读取缓存,否则读取txt,并且建立缓存" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/maxent/MaxEntModel.java#L372-L377
train
Load a MaxEntModel from a file in a CRA file.
[ 30522, 2270, 10763, 4098, 4765, 5302, 9247, 7170, 1006, 5164, 19067, 25856, 8988, 1007, 1063, 24880, 2906, 9447, 24880, 2906, 9447, 1027, 24880, 2906, 9447, 1012, 3443, 3762, 27058, 11335, 2100, 1006, 19067, 25856, 8988, 1009, 3653, 3207, 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-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2Engine.java
SM2Engine.processBlock
public byte[] processBlock(byte[] in, int inOff, int inLen) { if (forEncryption) { return encrypt(in, inOff, inLen); } else { return decrypt(in, inOff, inLen); } }
java
public byte[] processBlock(byte[] in, int inOff, int inLen) { if (forEncryption) { return encrypt(in, inOff, inLen); } else { return decrypt(in, inOff, inLen); } }
[ "public", "byte", "[", "]", "processBlock", "(", "byte", "[", "]", "in", ",", "int", "inOff", ",", "int", "inLen", ")", "{", "if", "(", "forEncryption", ")", "{", "return", "encrypt", "(", "in", ",", "inOff", ",", "inLen", ")", ";", "}", "else", ...
处理块,包括加密和解密 @param in 数据 @param inOff 数据开始位置 @param inLen 数据长度 @return 结果
[ "处理块,包括加密和解密" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/SM2Engine.java#L131-L137
train
Process a block of data.
[ 30522, 2270, 24880, 1031, 1033, 2832, 23467, 1006, 24880, 1031, 1033, 1999, 1010, 20014, 1999, 7245, 1010, 20014, 1999, 7770, 1007, 1063, 2065, 1006, 18921, 12273, 2854, 16790, 1007, 1063, 2709, 4372, 26775, 22571, 2102, 1006, 1999, 1010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpConnection.java
HttpConnection.setHttpsInfo
public HttpConnection setHttpsInfo(HostnameVerifier hostnameVerifier, SSLSocketFactory ssf) throws HttpException { final HttpURLConnection conn = this.conn; if (conn instanceof HttpsURLConnection) { // Https请求 final HttpsURLConnection httpsConn = (HttpsURLConnection) conn; // 验证域 httpsConn.setHo...
java
public HttpConnection setHttpsInfo(HostnameVerifier hostnameVerifier, SSLSocketFactory ssf) throws HttpException { final HttpURLConnection conn = this.conn; if (conn instanceof HttpsURLConnection) { // Https请求 final HttpsURLConnection httpsConn = (HttpsURLConnection) conn; // 验证域 httpsConn.setHo...
[ "public", "HttpConnection", "setHttpsInfo", "(", "HostnameVerifier", "hostnameVerifier", ",", "SSLSocketFactory", "ssf", ")", "throws", "HttpException", "{", "final", "HttpURLConnection", "conn", "=", "this", ".", "conn", ";", "if", "(", "conn", "instanceof", "Https...
设置https请求参数<br> 有些时候htts请求会出现com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl的实现,此为sun内部api,按照普通http请求处理 @param hostnameVerifier 域名验证器,非https传入null @param ssf SSLSocketFactory,非https传入null @return this @throws HttpException KeyManagementException和NoSuchAlgorithmException异常包装
[ "设置https请求参数<br", ">", "有些时候htts请求会出现com", ".", "sun", ".", "net", ".", "ssl", ".", "internal", ".", "www", ".", "protocol", ".", "https", ".", "HttpsURLConnectionOldImpl的实现,此为sun内部api,按照普通http请求处理" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpConnection.java#L261-L285
train
Sets the hostname verifier and SSLSocketFactory for the connection.
[ 30522, 2270, 8299, 8663, 2638, 7542, 6662, 4779, 4523, 2378, 14876, 1006, 3677, 18442, 6299, 18095, 3677, 18442, 6299, 18095, 1010, 7020, 4877, 7432, 3388, 21450, 7020, 2546, 1007, 11618, 8299, 10288, 24422, 1063, 2345, 8299, 3126, 22499, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.set
public HttpHeaders set(CharSequence name, Object value) { return set(name.toString(), value); }
java
public HttpHeaders set(CharSequence name, Object value) { return set(name.toString(), value); }
[ "public", "HttpHeaders", "set", "(", "CharSequence", "name", ",", "Object", "value", ")", "{", "return", "set", "(", "name", ".", "toString", "(", ")", ",", "value", ")", ";", "}" ]
Sets a header with the specified name and value. If there is an existing header with the same name, it is removed. If the specified value is not a {@link String}, it is converted into a {@link String} by {@link Object#toString()}, except for {@link Date} and {@link Calendar}, which are formatted to the date format def...
[ "Sets", "a", "header", "with", "the", "specified", "name", "and", "value", "." ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L1458-L1460
train
Sets a header with the specified name and value.
[ 30522, 2270, 8299, 4974, 2545, 2275, 1006, 25869, 3366, 4226, 5897, 2171, 1010, 4874, 3643, 1007, 1063, 2709, 2275, 1006, 2171, 1012, 2000, 3367, 4892, 1006, 1007, 1010, 3643, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java
KvStateSerializer.deserializeMap
public static <UK, UV> Map<UK, UV> deserializeMap(byte[] serializedValue, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) throws IOException { if (serializedValue != null) { DataInputDeserializer in = new DataInputDeserializer(serializedValue, 0, serializedValue.length); Map<UK, UV> resul...
java
public static <UK, UV> Map<UK, UV> deserializeMap(byte[] serializedValue, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) throws IOException { if (serializedValue != null) { DataInputDeserializer in = new DataInputDeserializer(serializedValue, 0, serializedValue.length); Map<UK, UV> resul...
[ "public", "static", "<", "UK", ",", "UV", ">", "Map", "<", "UK", ",", "UV", ">", "deserializeMap", "(", "byte", "[", "]", "serializedValue", ",", "TypeSerializer", "<", "UK", ">", "keySerializer", ",", "TypeSerializer", "<", "UV", ">", "valueSerializer", ...
Deserializes all kv pairs with the given serializer. @param serializedValue Serialized value of type Map&lt;UK, UV&gt; @param keySerializer Serializer for UK @param valueSerializer Serializer for UV @param <UK> Type of the key @param <UV> Type of the value. @return Deserialized map or <code>nul...
[ "Deserializes", "all", "kv", "pairs", "with", "the", "given", "serializer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/state/serialization/KvStateSerializer.java#L250-L268
train
Deserializes a map of bytes.
[ 30522, 2270, 10763, 1026, 2866, 1010, 23068, 1028, 4949, 1026, 2866, 1010, 23068, 1028, 4078, 11610, 3669, 4371, 2863, 2361, 1006, 24880, 1031, 1033, 27289, 10175, 5657, 1010, 4127, 11610, 28863, 1026, 2866, 1028, 6309, 11610, 28863, 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...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Dict.java
Dict.toBeanIgnoreCase
public <T> T toBeanIgnoreCase(Class<T> clazz) { return BeanUtil.mapToBeanIgnoreCase(this, clazz, false); }
java
public <T> T toBeanIgnoreCase(Class<T> clazz) { return BeanUtil.mapToBeanIgnoreCase(this, clazz, false); }
[ "public", "<", "T", ">", "T", "toBeanIgnoreCase", "(", "Class", "<", "T", ">", "clazz", ")", "{", "return", "BeanUtil", ".", "mapToBeanIgnoreCase", "(", "this", ",", "clazz", ",", "false", ")", ";", "}" ]
填充Value Object对象,忽略大小写 @param <T> Bean类型 @param clazz Value Object(或者POJO)的类 @return vo
[ "填充Value", "Object对象,忽略大小写" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Dict.java#L153-L155
train
Converts this object to a bean instance ignoring case.
[ 30522, 2270, 1026, 1056, 1028, 1056, 2000, 4783, 7088, 26745, 2890, 18382, 1006, 2465, 1026, 1056, 1028, 18856, 10936, 2480, 1007, 1063, 2709, 14068, 21823, 2140, 1012, 4949, 3406, 4783, 7088, 26745, 2890, 18382, 1006, 2023, 1010, 18856, 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-core/src/main/java/org/apache/flink/api/common/JobExecutionResult.java
JobExecutionResult.getIntCounterResult
@Deprecated @PublicEvolving public Integer getIntCounterResult(String accumulatorName) { Object result = this.accumulatorResults.get(accumulatorName).getUnchecked(); if (result == null) { return null; } if (!(result instanceof Integer)) { throw new ClassCastException("Requested result of the accumulator...
java
@Deprecated @PublicEvolving public Integer getIntCounterResult(String accumulatorName) { Object result = this.accumulatorResults.get(accumulatorName).getUnchecked(); if (result == null) { return null; } if (!(result instanceof Integer)) { throw new ClassCastException("Requested result of the accumulator...
[ "@", "Deprecated", "@", "PublicEvolving", "public", "Integer", "getIntCounterResult", "(", "String", "accumulatorName", ")", "{", "Object", "result", "=", "this", ".", "accumulatorResults", ".", "get", "(", "accumulatorName", ")", ".", "getUnchecked", "(", ")", ...
Gets the accumulator with the given name as an integer. @param accumulatorName Name of the counter @return Result of the counter, or null if the counter does not exist @throws java.lang.ClassCastException Thrown, if the accumulator was not aggregating a {@link java.lang.Integer} @deprecated Will be removed in future v...
[ "Gets", "the", "accumulator", "with", "the", "given", "name", "as", "an", "integer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/JobExecutionResult.java#L113-L125
train
Gets the integer counter result for the given accumulator.
[ 30522, 1030, 2139, 28139, 12921, 1030, 2270, 6777, 4747, 6455, 2270, 16109, 2131, 18447, 3597, 16671, 28849, 23722, 2102, 1006, 5164, 16222, 2819, 20350, 18442, 1007, 1063, 4874, 2765, 1027, 2023, 1012, 16222, 2819, 20350, 6072, 11314, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/Runner.java
Runner.getAlgorithmUsage
private static String getAlgorithmUsage(String algorithmName) { StrBuilder strBuilder = new StrBuilder(); Driver algorithm = driverFactory.get(algorithmName); strBuilder .appendNewLine() .appendNewLine() .appendln(algorithm.getLongDescription()) .appendNewLine() .append("usage: flink run examples...
java
private static String getAlgorithmUsage(String algorithmName) { StrBuilder strBuilder = new StrBuilder(); Driver algorithm = driverFactory.get(algorithmName); strBuilder .appendNewLine() .appendNewLine() .appendln(algorithm.getLongDescription()) .appendNewLine() .append("usage: flink run examples...
[ "private", "static", "String", "getAlgorithmUsage", "(", "String", "algorithmName", ")", "{", "StrBuilder", "strBuilder", "=", "new", "StrBuilder", "(", ")", ";", "Driver", "algorithm", "=", "driverFactory", ".", "get", "(", "algorithmName", ")", ";", "strBuilde...
Display the usage for the given algorithm. This includes options for all compatible inputs, the selected algorithm, and outputs implemented by the selected algorithm. @param algorithmName unique identifier of the selected algorithm @return usage string for the given algorithm
[ "Display", "the", "usage", "for", "the", "given", "algorithm", ".", "This", "includes", "options", "for", "all", "compatible", "inputs", "the", "selected", "algorithm", "and", "outputs", "implemented", "by", "the", "selected", "algorithm", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/Runner.java#L217-L267
train
Get the usage of the algorithm
[ 30522, 2797, 10763, 5164, 2131, 2389, 20255, 8939, 7606, 4270, 1006, 5164, 9896, 18442, 1007, 1063, 2358, 15185, 19231, 4063, 2358, 15185, 19231, 4063, 1027, 2047, 2358, 15185, 19231, 4063, 1006, 1007, 1025, 4062, 9896, 1027, 4062, 21450, 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-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/WindowedStream.java
WindowedStream.fold
@PublicEvolving @Deprecated public <R, ACC> SingleOutputStreamOperator<R> fold(ACC initialValue, FoldFunction<T, ACC> foldFunction, ProcessWindowFunction<ACC, R, K, W> windowFunction) { if (foldFunction instanceof RichFunction) { throw new UnsupportedOperationException("FoldFunction can not be a RichFunction.");...
java
@PublicEvolving @Deprecated public <R, ACC> SingleOutputStreamOperator<R> fold(ACC initialValue, FoldFunction<T, ACC> foldFunction, ProcessWindowFunction<ACC, R, K, W> windowFunction) { if (foldFunction instanceof RichFunction) { throw new UnsupportedOperationException("FoldFunction can not be a RichFunction.");...
[ "@", "PublicEvolving", "@", "Deprecated", "public", "<", "R", ",", "ACC", ">", "SingleOutputStreamOperator", "<", "R", ">", "fold", "(", "ACC", "initialValue", ",", "FoldFunction", "<", "T", ",", "ACC", ">", "foldFunction", ",", "ProcessWindowFunction", "<", ...
Applies the given window function to each window. The window function is called for each evaluation of the window for each key individually. The output of the window function is interpreted as a regular non-windowed stream. <p>Arriving data is incrementally aggregated using the given fold function. @param initialValu...
[ "Applies", "the", "given", "window", "function", "to", "each", "window", ".", "The", "window", "function", "is", "called", "for", "each", "evaluation", "of", "the", "window", "for", "each", "key", "individually", ".", "The", "output", "of", "the", "window", ...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/WindowedStream.java#L575-L588
train
Folds a single stream into a single stream.
[ 30522, 1030, 2270, 6777, 4747, 6455, 1030, 2139, 28139, 12921, 2270, 1026, 1054, 1010, 16222, 1028, 2309, 5833, 18780, 21422, 25918, 8844, 1026, 1054, 1028, 10671, 1006, 16222, 3988, 10175, 5657, 1010, 10671, 11263, 27989, 1026, 1056, 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...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java
CLIService.getDelegationTokenFromMetaStore
public synchronized String getDelegationTokenFromMetaStore(String owner) throws HiveSQLException, UnsupportedOperationException, LoginException, IOException { if (!hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL) || !hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_ENABLE_DOAS)) { ...
java
public synchronized String getDelegationTokenFromMetaStore(String owner) throws HiveSQLException, UnsupportedOperationException, LoginException, IOException { if (!hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL) || !hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_ENABLE_DOAS)) { ...
[ "public", "synchronized", "String", "getDelegationTokenFromMetaStore", "(", "String", "owner", ")", "throws", "HiveSQLException", ",", "UnsupportedOperationException", ",", "LoginException", ",", "IOException", "{", "if", "(", "!", "hiveConf", ".", "getBoolVar", "(", ...
obtain delegation token for the give user from metastore
[ "obtain", "delegation", "token", "for", "the", "give", "user", "from", "metastore" ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java#L461-L479
train
Get the delegation token from the metastore
[ 30522, 2270, 25549, 5164, 2131, 9247, 29107, 3508, 18715, 2368, 19699, 5358, 11368, 14083, 5686, 1006, 5164, 3954, 1007, 11618, 26736, 2015, 4160, 2571, 2595, 24422, 1010, 4895, 6342, 9397, 15613, 25918, 3370, 10288, 24422, 1010, 8833, 3170, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/SessionManager.java
SessionManager.openSession
public SessionHandle openSession(TProtocolVersion protocol, String username, String password, String ipAddress, Map<String, String> sessionConf, boolean withImpersonation, String delegationToken) throws HiveSQLException { HiveSession session; // If doAs is set to true for HiveServer2, we will cr...
java
public SessionHandle openSession(TProtocolVersion protocol, String username, String password, String ipAddress, Map<String, String> sessionConf, boolean withImpersonation, String delegationToken) throws HiveSQLException { HiveSession session; // If doAs is set to true for HiveServer2, we will cr...
[ "public", "SessionHandle", "openSession", "(", "TProtocolVersion", "protocol", ",", "String", "username", ",", "String", "password", ",", "String", "ipAddress", ",", "Map", "<", "String", ",", "String", ">", "sessionConf", ",", "boolean", "withImpersonation", ",",...
Opens a new session and creates a session handle. The username passed to this method is the effective username. If withImpersonation is true (==doAs true) we wrap all the calls in HiveSession within a UGI.doAs, where UGI corresponds to the effective user. Please see {@code org.apache.hive.service.cli.thrift.ThriftCLIS...
[ "Opens", "a", "new", "session", "and", "creates", "a", "session", "handle", ".", "The", "username", "passed", "to", "this", "method", "is", "the", "effective", "username", ".", "If", "withImpersonation", "is", "true", "(", "==", "doAs", "true", ")", "we", ...
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/SessionManager.java#L241-L273
train
Create a new session.
[ 30522, 2270, 5219, 11774, 2571, 7480, 7971, 3258, 1006, 1056, 21572, 3406, 25778, 27774, 8778, 1010, 5164, 5310, 18442, 1010, 5164, 20786, 1010, 5164, 25249, 16200, 4757, 1010, 4949, 1026, 5164, 1010, 5164, 1028, 5219, 8663, 30524, 26736, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Execution.java
Execution.scheduleForExecution
public CompletableFuture<Void> scheduleForExecution() { final ExecutionGraph executionGraph = getVertex().getExecutionGraph(); final SlotProvider resourceProvider = executionGraph.getSlotProvider(); final boolean allowQueued = executionGraph.isQueuedSchedulingAllowed(); return scheduleForExecution( resourceP...
java
public CompletableFuture<Void> scheduleForExecution() { final ExecutionGraph executionGraph = getVertex().getExecutionGraph(); final SlotProvider resourceProvider = executionGraph.getSlotProvider(); final boolean allowQueued = executionGraph.isQueuedSchedulingAllowed(); return scheduleForExecution( resourceP...
[ "public", "CompletableFuture", "<", "Void", ">", "scheduleForExecution", "(", ")", "{", "final", "ExecutionGraph", "executionGraph", "=", "getVertex", "(", ")", ".", "getExecutionGraph", "(", ")", ";", "final", "SlotProvider", "resourceProvider", "=", "executionGrap...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java#L392-L401
train
Schedules the vertex for execution.
[ 30522, 2270, 4012, 10814, 10880, 11263, 11244, 1026, 11675, 1028, 6134, 29278, 10288, 8586, 13700, 1006, 1007, 1063, 2345, 7781, 14413, 7781, 14413, 1027, 2131, 16874, 10288, 1006, 1007, 1012, 2131, 10288, 8586, 13700, 14413, 1006, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java
AbstractInvokable.abortCheckpointOnBarrier
public void abortCheckpointOnBarrier(long checkpointId, Throwable cause) throws Exception { throw new UnsupportedOperationException(String.format("abortCheckpointOnBarrier not supported by %s", this.getClass().getName())); }
java
public void abortCheckpointOnBarrier(long checkpointId, Throwable cause) throws Exception { throw new UnsupportedOperationException(String.format("abortCheckpointOnBarrier not supported by %s", this.getClass().getName())); }
[ "public", "void", "abortCheckpointOnBarrier", "(", "long", "checkpointId", ",", "Throwable", "cause", ")", "throws", "Exception", "{", "throw", "new", "UnsupportedOperationException", "(", "String", ".", "format", "(", "\"abortCheckpointOnBarrier not supported by %s\"", "...
Aborts a checkpoint as the result of receiving possibly some checkpoint barriers, but at least one {@link org.apache.flink.runtime.io.network.api.CancelCheckpointMarker}. <p>This requires implementing tasks to forward a {@link org.apache.flink.runtime.io.network.api.CancelCheckpointMarker} to their outputs. @param ch...
[ "Aborts", "a", "checkpoint", "as", "the", "result", "of", "receiving", "possibly", "some", "checkpoint", "barriers", "but", "at", "least", "one", "{", "@link", "org", ".", "apache", ".", "flink", ".", "runtime", ".", "io", ".", "network", ".", "api", "."...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java#L239-L241
train
Aborts a checkpoint on barrier.
[ 30522, 2270, 11675, 11113, 11589, 5403, 3600, 8400, 2239, 8237, 16252, 1006, 2146, 26520, 3593, 1010, 5466, 3085, 3426, 1007, 11618, 6453, 1063, 5466, 2047, 4895, 6342, 9397, 15613, 25918, 3370, 10288, 24422, 1006, 5164, 1012, 4289, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/classification/classifiers/AbstractClassifier.java
AbstractClassifier.classify
@Override public String classify(String text) throws IllegalArgumentException, IllegalStateException { Map<String, Double> scoreMap = predict(text); return CollectionUtility.max(scoreMap); }
java
@Override public String classify(String text) throws IllegalArgumentException, IllegalStateException { Map<String, Double> scoreMap = predict(text); return CollectionUtility.max(scoreMap); }
[ "@", "Override", "public", "String", "classify", "(", "String", "text", ")", "throws", "IllegalArgumentException", ",", "IllegalStateException", "{", "Map", "<", "String", ",", "Double", ">", "scoreMap", "=", "predict", "(", "text", ")", ";", "return", "Collec...
使用一个训练出来的分类器来预测分类 @param text @return @throws IllegalArgumentException @throws IllegalStateException
[ "使用一个训练出来的分类器来预测分类" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/classification/classifiers/AbstractClassifier.java#L51-L57
train
Classify a single phrase.
[ 30522, 1030, 2058, 15637, 2270, 5164, 26268, 1006, 5164, 3793, 1007, 11618, 6206, 2906, 22850, 15781, 2595, 24422, 1010, 6206, 9153, 17389, 2595, 24422, 1063, 4949, 1026, 5164, 1010, 3313, 1028, 3556, 2863, 2361, 1027, 16014, 1006, 3793, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileMonitoringFunction.java
ContinuousFileMonitoringFunction.snapshotState
@Override public void snapshotState(FunctionSnapshotContext context) throws Exception { Preconditions.checkState(this.checkpointedState != null, "The " + getClass().getSimpleName() + " state has not been properly initialized."); this.checkpointedState.clear(); this.checkpointedState.add(this.globalModificati...
java
@Override public void snapshotState(FunctionSnapshotContext context) throws Exception { Preconditions.checkState(this.checkpointedState != null, "The " + getClass().getSimpleName() + " state has not been properly initialized."); this.checkpointedState.clear(); this.checkpointedState.add(this.globalModificati...
[ "@", "Override", "public", "void", "snapshotState", "(", "FunctionSnapshotContext", "context", ")", "throws", "Exception", "{", "Preconditions", ".", "checkState", "(", "this", ".", "checkpointedState", "!=", "null", ",", "\"The \"", "+", "getClass", "(", ")", "...
--------------------- Checkpointing --------------------------
[ "---------------------", "Checkpointing", "--------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileMonitoringFunction.java#L372-L383
train
This method is called to snapshot the state of the object.
[ 30522, 1030, 2058, 15637, 2270, 11675, 20057, 12326, 9153, 2618, 1006, 4972, 2532, 4523, 12326, 8663, 18209, 6123, 1007, 11618, 6453, 1063, 3653, 8663, 20562, 2015, 1012, 14148, 12259, 1006, 2023, 1012, 26520, 2098, 9153, 2618, 999, 1027, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebApplicationContext.java
AnnotationConfigServletWebApplicationContext.setEnvironment
@Override public void setEnvironment(ConfigurableEnvironment environment) { super.setEnvironment(environment); this.reader.setEnvironment(environment); this.scanner.setEnvironment(environment); }
java
@Override public void setEnvironment(ConfigurableEnvironment environment) { super.setEnvironment(environment); this.reader.setEnvironment(environment); this.scanner.setEnvironment(environment); }
[ "@", "Override", "public", "void", "setEnvironment", "(", "ConfigurableEnvironment", "environment", ")", "{", "super", ".", "setEnvironment", "(", "environment", ")", ";", "this", ".", "reader", ".", "setEnvironment", "(", "environment", ")", ";", "this", ".", ...
{@inheritDoc} <p> Delegates given environment to underlying {@link AnnotatedBeanDefinitionReader} and {@link ClassPathBeanDefinitionScanner} members.
[ "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebApplicationContext.java#L123-L128
train
Sets the environment.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2275, 2368, 21663, 2239, 3672, 1006, 9530, 8873, 27390, 3085, 2368, 21663, 2239, 3672, 4044, 1007, 1063, 3565, 1012, 2275, 2368, 21663, 2239, 3672, 1006, 4044, 1007, 1025, 2023, 1012, 8068, 1012, 2275,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/ssl/SSLSocketFactoryBuilder.java
SSLSocketFactoryBuilder.build
public SSLSocketFactory build() throws NoSuchAlgorithmException, KeyManagementException{ SSLContext sslContext = SSLContext.getInstance(protocol); sslContext.init(this.keyManagers, this.trustManagers, this.secureRandom); return sslContext.getSocketFactory(); }
java
public SSLSocketFactory build() throws NoSuchAlgorithmException, KeyManagementException{ SSLContext sslContext = SSLContext.getInstance(protocol); sslContext.init(this.keyManagers, this.trustManagers, this.secureRandom); return sslContext.getSocketFactory(); }
[ "public", "SSLSocketFactory", "build", "(", ")", "throws", "NoSuchAlgorithmException", ",", "KeyManagementException", "{", "SSLContext", "sslContext", "=", "SSLContext", ".", "getInstance", "(", "protocol", ")", ";", "sslContext", ".", "init", "(", "this", ".", "k...
构建SSLSocketFactory @return SSLSocketFactory @throws NoSuchAlgorithmException 无此算法 @throws KeyManagementException Key管理异常
[ "构建SSLSocketFactory" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/ssl/SSLSocketFactoryBuilder.java#L108-L112
train
Build the SSLSocketFactory.
[ 30522, 2270, 7020, 4877, 7432, 3388, 21450, 3857, 1006, 1007, 11618, 16839, 10875, 2389, 20255, 8939, 4168, 2595, 24422, 1010, 3145, 24805, 20511, 10288, 24422, 1063, 7020, 22499, 10111, 18413, 7020, 22499, 10111, 18413, 1027, 7020, 22499, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/shipping/OutputCollector.java
OutputCollector.collect
@Override public void collect(T record) { if (record != null) { this.delegate.setInstance(record); try { for (RecordWriter<SerializationDelegate<T>> writer : writers) { writer.emit(this.delegate); } } catch (IOException e) { throw new RuntimeException("Emitting the record caused an I/O ...
java
@Override public void collect(T record) { if (record != null) { this.delegate.setInstance(record); try { for (RecordWriter<SerializationDelegate<T>> writer : writers) { writer.emit(this.delegate); } } catch (IOException e) { throw new RuntimeException("Emitting the record caused an I/O ...
[ "@", "Override", "public", "void", "collect", "(", "T", "record", ")", "{", "if", "(", "record", "!=", "null", ")", "{", "this", ".", "delegate", ".", "setInstance", "(", "record", ")", ";", "try", "{", "for", "(", "RecordWriter", "<", "SerializationDe...
Collects a record and emits it to all writers.
[ "Collects", "a", "record", "and", "emits", "it", "to", "all", "writers", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/shipping/OutputCollector.java#L59-L79
train
This method is called by the serialization framework to collect the given record.
[ 30522, 1030, 2058, 15637, 2270, 11675, 8145, 1006, 1056, 2501, 1007, 1063, 2065, 1006, 2501, 999, 1027, 19701, 1007, 1063, 2023, 1012, 11849, 1012, 2275, 7076, 26897, 1006, 2501, 1007, 1025, 3046, 1063, 2005, 1006, 2501, 15994, 1026, 7642, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-log/src/main/java/cn/hutool/log/GlobalLogFactory.java
GlobalLogFactory.get
public static LogFactory get() { if (null == currentLogFactory) { synchronized (lock) { if (null == currentLogFactory) { currentLogFactory = LogFactory.create(); } } } return currentLogFactory; }
java
public static LogFactory get() { if (null == currentLogFactory) { synchronized (lock) { if (null == currentLogFactory) { currentLogFactory = LogFactory.create(); } } } return currentLogFactory; }
[ "public", "static", "LogFactory", "get", "(", ")", "{", "if", "(", "null", "==", "currentLogFactory", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "null", "==", "currentLogFactory", ")", "{", "currentLogFactory", "=", "LogFactory", ".", "cre...
获取单例日志工厂类,如果不存在创建之 @return 当前使用的日志工厂
[ "获取单例日志工厂类,如果不存在创建之" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-log/src/main/java/cn/hutool/log/GlobalLogFactory.java#L26-L35
train
Returns the current LogFactory.
[ 30522, 2270, 10763, 8833, 21450, 2131, 1006, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 2783, 21197, 21450, 1007, 1063, 25549, 1006, 5843, 1007, 1063, 2065, 1006, 19701, 1027, 1027, 2783, 21197, 21450, 1007, 1063, 2783, 21197, 21450, 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-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java
Types.TUPLE
public static <T extends Tuple> TypeInformation<T> TUPLE(Class<T> tupleSubclass) { final TypeInformation<T> ti = TypeExtractor.createTypeInfo(tupleSubclass); if (ti instanceof TupleTypeInfo) { return ti; } throw new InvalidTypesException("Tuple type expected but was: " + ti); }
java
public static <T extends Tuple> TypeInformation<T> TUPLE(Class<T> tupleSubclass) { final TypeInformation<T> ti = TypeExtractor.createTypeInfo(tupleSubclass); if (ti instanceof TupleTypeInfo) { return ti; } throw new InvalidTypesException("Tuple type expected but was: " + ti); }
[ "public", "static", "<", "T", "extends", "Tuple", ">", "TypeInformation", "<", "T", ">", "TUPLE", "(", "Class", "<", "T", ">", "tupleSubclass", ")", "{", "final", "TypeInformation", "<", "T", ">", "ti", "=", "TypeExtractor", ".", "createTypeInfo", "(", "...
Returns type information for typed subclasses of Flink's {@link org.apache.flink.api.java.tuple.Tuple}. Typed subclassed are classes that extend {@link org.apache.flink.api.java.tuple.Tuple0} till {@link org.apache.flink.api.java.tuple.Tuple25} to provide types for all fields and might add additional getters and setter...
[ "Returns", "type", "information", "for", "typed", "subclasses", "of", "Flink", "s", "{", "@link", "org", ".", "apache", ".", "flink", ".", "api", ".", "java", ".", "tuple", ".", "Tuple", "}", ".", "Typed", "subclassed", "are", "classes", "that", "extend"...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeinfo/Types.java#L254-L260
train
Returns a tuple type that is a subtype of the given class.
[ 30522, 2270, 10763, 1026, 1056, 8908, 10722, 10814, 1028, 2828, 2378, 14192, 3370, 1026, 1056, 1028, 10722, 10814, 1006, 2465, 1026, 1056, 1028, 10722, 21112, 12083, 26266, 1007, 1063, 2345, 2828, 2378, 14192, 3370, 1026, 1056, 1028, 14841, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateNumber
public static String validateNumber(String value, String errorMsg) throws ValidateException { if (false == isNumber(value)) { throw new ValidateException(errorMsg); } return value; }
java
public static String validateNumber(String value, String errorMsg) throws ValidateException { if (false == isNumber(value)) { throw new ValidateException(errorMsg); } return value; }
[ "public", "static", "String", "validateNumber", "(", "String", "value", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "false", "==", "isNumber", "(", "value", ")", ")", "{", "throw", "new", "ValidateException", "(", "errorMsg",...
验证是否为数字 @param value 表单值 @param errorMsg 验证错误的信息 @return 验证后的值 @throws ValidateException 验证异常
[ "验证是否为数字" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L544-L549
train
Validate number.
[ 30522, 2270, 10763, 5164, 9398, 3686, 19172, 5677, 1006, 5164, 3643, 1010, 5164, 7561, 5244, 2290, 1007, 11618, 9398, 3686, 10288, 24422, 1063, 2065, 1006, 6270, 1027, 1027, 3475, 29440, 1006, 3643, 1007, 1007, 1063, 5466, 2047, 9398, 3686,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/codec/Base64Decoder.java
Base64Decoder.decode
public static byte[] decode(byte[] in) { if (ArrayUtil.isEmpty(in)) { return in; } return decode(in, 0, in.length); }
java
public static byte[] decode(byte[] in) { if (ArrayUtil.isEmpty(in)) { return in; } return decode(in, 0, in.length); }
[ "public", "static", "byte", "[", "]", "decode", "(", "byte", "[", "]", "in", ")", "{", "if", "(", "ArrayUtil", ".", "isEmpty", "(", "in", ")", ")", "{", "return", "in", ";", "}", "return", "decode", "(", "in", ",", "0", ",", "in", ".", "length"...
解码Base64 @param in 输入 @return 解码后的bytes
[ "解码Base64" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/codec/Base64Decoder.java#L111-L116
train
Decodes a byte array.
[ 30522, 2270, 10763, 24880, 1031, 1033, 21933, 3207, 1006, 24880, 1031, 1033, 1999, 1007, 1063, 2065, 1006, 9140, 21823, 2140, 1012, 2003, 6633, 13876, 2100, 1006, 1999, 1007, 1007, 1063, 2709, 1999, 1025, 1065, 2709, 21933, 3207, 1006, 1999...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/heartbeat/HeartbeatServices.java
HeartbeatServices.createHeartbeatManager
public <I, O> HeartbeatManager<I, O> createHeartbeatManager( ResourceID resourceId, HeartbeatListener<I, O> heartbeatListener, ScheduledExecutor scheduledExecutor, Logger log) { return new HeartbeatManagerImpl<>( heartbeatTimeout, resourceId, heartbeatListener, scheduledExecutor, scheduledExec...
java
public <I, O> HeartbeatManager<I, O> createHeartbeatManager( ResourceID resourceId, HeartbeatListener<I, O> heartbeatListener, ScheduledExecutor scheduledExecutor, Logger log) { return new HeartbeatManagerImpl<>( heartbeatTimeout, resourceId, heartbeatListener, scheduledExecutor, scheduledExec...
[ "public", "<", "I", ",", "O", ">", "HeartbeatManager", "<", "I", ",", "O", ">", "createHeartbeatManager", "(", "ResourceID", "resourceId", ",", "HeartbeatListener", "<", "I", ",", "O", ">", "heartbeatListener", ",", "ScheduledExecutor", "scheduledExecutor", ",",...
Creates a heartbeat manager which does not actively send heartbeats. @param resourceId Resource Id which identifies the owner of the heartbeat manager @param heartbeatListener Listener which will be notified upon heartbeat timeouts for registered targets @param scheduledExecutor Scheduled executor to be used for sched...
[ "Creates", "a", "heartbeat", "manager", "which", "does", "not", "actively", "send", "heartbeats", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/heartbeat/HeartbeatServices.java#L61-L74
train
Creates a heartbeat manager.
[ 30522, 2270, 1026, 1045, 1010, 1051, 1028, 12251, 24805, 4590, 1026, 1045, 1010, 1051, 1028, 3443, 22375, 19442, 24805, 4590, 1006, 7692, 3593, 7692, 3593, 1010, 12251, 9863, 24454, 1026, 1045, 1010, 1051, 1028, 12251, 9863, 24454, 1010, 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...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/model/crf/crfpp/TaggerImpl.java
TaggerImpl.forwardbackward
public void forwardbackward() { if (!x_.isEmpty()) { for (int i = 0; i < x_.size(); i++) { for (int j = 0; j < ysize_; j++) { node_.get(i).get(j).calcAlpha(); } } for (int i = x_.size(...
java
public void forwardbackward() { if (!x_.isEmpty()) { for (int i = 0; i < x_.size(); i++) { for (int j = 0; j < ysize_; j++) { node_.get(i).get(j).calcAlpha(); } } for (int i = x_.size(...
[ "public", "void", "forwardbackward", "(", ")", "{", "if", "(", "!", "x_", ".", "isEmpty", "(", ")", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x_", ".", "size", "(", ")", ";", "i", "++", ")", "{", "for", "(", "int", "j", ...
前向后向算法
[ "前向后向算法" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/crf/crfpp/TaggerImpl.java#L108-L132
train
forwardbackward method.
[ 30522, 2270, 11675, 2830, 5963, 7652, 1006, 1007, 1063, 2065, 1006, 999, 1060, 1035, 1012, 2003, 6633, 13876, 2100, 1006, 1007, 30524, 20014, 1045, 1027, 1014, 1025, 1045, 1026, 1060, 1035, 1012, 2946, 1006, 1007, 1025, 1045, 1009, 1009, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
networknt/light-4j
http-url/src/main/java/com/networknt/url/URLNormalizer.java
URLNormalizer.removeEmptyParameters
public URLNormalizer removeEmptyParameters() { // Does it have query parameters? if (!url.contains("?")) { return this; } // It does, so proceed List<String> keyValues = new ArrayList<>(); String queryString = StringUtils.substringAfter(url, "?"); Stri...
java
public URLNormalizer removeEmptyParameters() { // Does it have query parameters? if (!url.contains("?")) { return this; } // It does, so proceed List<String> keyValues = new ArrayList<>(); String queryString = StringUtils.substringAfter(url, "?"); Stri...
[ "public", "URLNormalizer", "removeEmptyParameters", "(", ")", "{", "// Does it have query parameters?", "if", "(", "!", "url", ".", "contains", "(", "\"?\"", ")", ")", "{", "return", "this", ";", "}", "// It does, so proceed", "List", "<", "String", ">", "keyVal...
<p>Removes empty parameters.</p> <code>http://www.example.com/display?a=b&amp;a=&amp;c=d&amp;e=&amp;f=g &rarr; http://www.example.com/display?a=b&amp;c=d&amp;f=g</code> @return this instance
[ "<p", ">", "Removes", "empty", "parameters", ".", "<", "/", "p", ">", "<code", ">", "http", ":", "//", "www", ".", "example", ".", "com", "/", "display?a", "=", "b&amp", ";", "a", "=", "&amp", ";", "c", "=", "d&amp", ";", "e", "=", "&amp", ";",...
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/http-url/src/main/java/com/networknt/url/URLNormalizer.java#L696-L720
train
Removes empty parameters from the URL.
[ 30522, 2270, 24471, 19666, 2953, 9067, 17629, 6366, 6633, 13876, 22571, 5400, 22828, 2015, 1006, 1007, 1063, 1013, 1013, 2515, 2009, 2031, 23032, 11709, 1029, 2065, 1006, 999, 24471, 2140, 1012, 3397, 1006, 1000, 1029, 1000, 1007, 1007, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.writeMap
public static File writeMap(Map<?, ?> map, File file, Charset charset, String kvSeparator, boolean isAppend) throws IORuntimeException { return FileWriter.create(file, charset).writeMap(map, kvSeparator, isAppend); }
java
public static File writeMap(Map<?, ?> map, File file, Charset charset, String kvSeparator, boolean isAppend) throws IORuntimeException { return FileWriter.create(file, charset).writeMap(map, kvSeparator, isAppend); }
[ "public", "static", "File", "writeMap", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "File", "file", ",", "Charset", "charset", ",", "String", "kvSeparator", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "FileWriter", ...
将Map写入文件,每个键值对为一行,一行中键与值之间使用kvSeparator分隔 @param map Map @param file 文件 @param charset 字符集编码 @param kvSeparator 键和值之间的分隔符,如果传入null使用默认分隔符" = " @param isAppend 是否追加 @return 目标文件 @throws IORuntimeException IO异常 @since 4.0.5
[ "将Map写入文件,每个键值对为一行,一行中键与值之间使用kvSeparator分隔" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3102-L3104
train
Write map to file.
[ 30522, 2270, 10763, 5371, 4339, 2863, 2361, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 4949, 1010, 5371, 5371, 1010, 25869, 13462, 25869, 13462, 1010, 5164, 24888, 3366, 28689, 4263, 1010, 22017, 20898, 18061, 21512, 4859, 1007, 11618, 22834, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.betweenMonth
public static long betweenMonth(Date beginDate, Date endDate, boolean isReset) { return new DateBetween(beginDate, endDate).betweenMonth(isReset); }
java
public static long betweenMonth(Date beginDate, Date endDate, boolean isReset) { return new DateBetween(beginDate, endDate).betweenMonth(isReset); }
[ "public", "static", "long", "betweenMonth", "(", "Date", "beginDate", ",", "Date", "endDate", ",", "boolean", "isReset", ")", "{", "return", "new", "DateBetween", "(", "beginDate", ",", "endDate", ")", ".", "betweenMonth", "(", "isReset", ")", ";", "}" ]
计算两个日期相差月数<br> 在非重置情况下,如果起始日期的天小于结束日期的天,月数要少算1(不足1个月) @param beginDate 起始日期 @param endDate 结束日期 @param isReset 是否重置时间为起始时间(重置天时分秒) @return 相差月数 @since 3.0.8
[ "计算两个日期相差月数<br", ">", "在非重置情况下,如果起始日期的天小于结束日期的天,月数要少算1(不足1个月)" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1292-L1294
train
Gets the number of days between two dates.
[ 30522, 2270, 10763, 2146, 2090, 9629, 2232, 1006, 3058, 4088, 13701, 1010, 3058, 2203, 13701, 1010, 22017, 20898, 2003, 6072, 3388, 1007, 1063, 2709, 2047, 3058, 20915, 28394, 2078, 1006, 4088, 13701, 1010, 2203, 13701, 1007, 1012, 2090, 96...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java
SharedBufferAccessor.materializeMatch
public Map<String, List<V>> materializeMatch(Map<String, List<EventId>> match) { Map<String, List<V>> materializedMatch = new LinkedHashMap<>(match.size()); for (Map.Entry<String, List<EventId>> pattern : match.entrySet()) { List<V> events = new ArrayList<>(pattern.getValue().size()); for (EventId eventId : ...
java
public Map<String, List<V>> materializeMatch(Map<String, List<EventId>> match) { Map<String, List<V>> materializedMatch = new LinkedHashMap<>(match.size()); for (Map.Entry<String, List<EventId>> pattern : match.entrySet()) { List<V> events = new ArrayList<>(pattern.getValue().size()); for (EventId eventId : ...
[ "public", "Map", "<", "String", ",", "List", "<", "V", ">", ">", "materializeMatch", "(", "Map", "<", "String", ",", "List", "<", "EventId", ">", ">", "match", ")", "{", "Map", "<", "String", ",", "List", "<", "V", ">", ">", "materializedMatch", "=...
Extracts the real event from the sharedBuffer with pre-extracted eventId. @param match the matched event's eventId. @return the event associated with the eventId.
[ "Extracts", "the", "real", "event", "from", "the", "sharedBuffer", "with", "pre", "-", "extracted", "eventId", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBufferAccessor.java#L197-L214
train
Materializes the given match map into a Map of event patterns.
[ 30522, 2270, 4949, 1026, 5164, 1010, 2862, 1026, 1058, 1028, 1028, 3430, 4697, 18900, 2818, 1006, 4949, 1026, 5164, 1010, 2862, 1026, 2724, 3593, 1028, 1028, 2674, 1007, 1063, 4949, 1026, 5164, 1010, 2862, 1026, 1058, 1028, 1028, 27075, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
netty/netty
handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java
ReferenceCountedOpenSslEngine.setEnabledProtocols
@Override public final void setEnabledProtocols(String[] protocols) { if (protocols == null) { // This is correct from the API docs throw new IllegalArgumentException(); } int minProtocolIndex = OPENSSL_OP_NO_PROTOCOLS.length; int maxProtocolIndex = 0; ...
java
@Override public final void setEnabledProtocols(String[] protocols) { if (protocols == null) { // This is correct from the API docs throw new IllegalArgumentException(); } int minProtocolIndex = OPENSSL_OP_NO_PROTOCOLS.length; int maxProtocolIndex = 0; ...
[ "@", "Override", "public", "final", "void", "setEnabledProtocols", "(", "String", "[", "]", "protocols", ")", "{", "if", "(", "protocols", "==", "null", ")", "{", "// This is correct from the API docs", "throw", "new", "IllegalArgumentException", "(", ")", ";", ...
{@inheritDoc} TLS doesn't support a way to advertise non-contiguous versions from the client's perspective, and the client just advertises the max supported version. The TLS protocol also doesn't support all different combinations of discrete protocols, and instead assumes contiguous ranges. OpenSSL has some unexpected...
[ "{" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java#L1552-L1629
train
Sets the enabled protocols.
[ 30522, 1030, 2058, 15637, 2270, 2345, 11675, 2275, 8189, 23242, 21572, 3406, 25778, 2015, 1006, 5164, 1031, 1033, 16744, 1007, 1063, 2065, 1006, 16744, 1027, 1027, 19701, 1007, 1063, 1013, 1013, 2023, 2003, 6149, 2013, 1996, 17928, 9986, 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-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.getShort
public static Short getShort(Map<?, ?> map, Object key) { return get(map, key, Short.class); }
java
public static Short getShort(Map<?, ?> map, Object key) { return get(map, key, Short.class); }
[ "public", "static", "Short", "getShort", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "Object", "key", ")", "{", "return", "get", "(", "map", ",", "key", ",", "Short", ".", "class", ")", ";", "}" ]
获取Map指定key的值,并转换为Short @param map Map @param key 键 @return 值 @since 4.0.6
[ "获取Map指定key的值,并转换为Short" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L804-L806
train
Gets the Short value from the map.
[ 30522, 2270, 10763, 2460, 4152, 27794, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 4949, 1010, 4874, 3145, 1007, 1063, 2709, 2131, 1006, 4949, 1010, 3145, 1010, 2460, 1012, 2465, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateTime.java
DateTime.isIn
public boolean isIn(Date beginDate, Date endDate) { long beginMills = beginDate.getTime(); long endMills = endDate.getTime(); long thisMills = this.getTime(); return thisMills >= Math.min(beginMills, endMills) && thisMills <= Math.max(beginMills, endMills); }
java
public boolean isIn(Date beginDate, Date endDate) { long beginMills = beginDate.getTime(); long endMills = endDate.getTime(); long thisMills = this.getTime(); return thisMills >= Math.min(beginMills, endMills) && thisMills <= Math.max(beginMills, endMills); }
[ "public", "boolean", "isIn", "(", "Date", "beginDate", ",", "Date", "endDate", ")", "{", "long", "beginMills", "=", "beginDate", ".", "getTime", "(", ")", ";", "long", "endMills", "=", "endDate", ".", "getTime", "(", ")", ";", "long", "thisMills", "=", ...
当前日期是否在日期指定范围内<br> 起始日期和结束日期可以互换 @param beginDate 起始日期 @param endDate 结束日期 @return 是否在范围内 @since 3.0.8
[ "当前日期是否在日期指定范围内<br", ">", "起始日期和结束日期可以互换" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateTime.java#L622-L628
train
Checks if the end date is in the begin date.
[ 30522, 2270, 22017, 20898, 2003, 2378, 1006, 3058, 4088, 13701, 1010, 3058, 2203, 13701, 1007, 1063, 2146, 4088, 19912, 2015, 1027, 4088, 13701, 1012, 2131, 7292, 1006, 1007, 1025, 2146, 2203, 19912, 2015, 1027, 2203, 13701, 1012, 2131, 729...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java
CustomDictionary.parseText
public static void parseText(char[] text, AhoCorasickDoubleArrayTrie.IHit<CoreDictionary.Attribute> processor) { if (trie != null) { trie.parseText(text, processor); } DoubleArrayTrie<CoreDictionary.Attribute>.Searcher searcher = dat.getSearcher(text, 0); while (s...
java
public static void parseText(char[] text, AhoCorasickDoubleArrayTrie.IHit<CoreDictionary.Attribute> processor) { if (trie != null) { trie.parseText(text, processor); } DoubleArrayTrie<CoreDictionary.Attribute>.Searcher searcher = dat.getSearcher(text, 0); while (s...
[ "public", "static", "void", "parseText", "(", "char", "[", "]", "text", ",", "AhoCorasickDoubleArrayTrie", ".", "IHit", "<", "CoreDictionary", ".", "Attribute", ">", "processor", ")", "{", "if", "(", "trie", "!=", "null", ")", "{", "trie", ".", "parseText"...
解析一段文本(目前采用了BinTrie+DAT的混合储存形式,此方法可以统一两个数据结构) @param text 文本 @param processor 处理器
[ "解析一段文本(目前采用了BinTrie", "+", "DAT的混合储存形式,此方法可以统一两个数据结构)" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dictionary/CustomDictionary.java#L560-L571
train
Parse text into a Aho Corasick Double Array Trie.
[ 30522, 2270, 10763, 11675, 11968, 13462, 10288, 2102, 1006, 25869, 1031, 1033, 3793, 1010, 6289, 24163, 8180, 6799, 26797, 3468, 2906, 9447, 18886, 2063, 1012, 1045, 16584, 1026, 4563, 29201, 3258, 5649, 1012, 17961, 1028, 13151, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.createLocalEnvironment
public static LocalStreamEnvironment createLocalEnvironment(int parallelism, Configuration configuration) { final LocalStreamEnvironment currentEnvironment; currentEnvironment = new LocalStreamEnvironment(configuration); currentEnvironment.setParallelism(parallelism); return currentEnvironment; }
java
public static LocalStreamEnvironment createLocalEnvironment(int parallelism, Configuration configuration) { final LocalStreamEnvironment currentEnvironment; currentEnvironment = new LocalStreamEnvironment(configuration); currentEnvironment.setParallelism(parallelism); return currentEnvironment; }
[ "public", "static", "LocalStreamEnvironment", "createLocalEnvironment", "(", "int", "parallelism", ",", "Configuration", "configuration", ")", "{", "final", "LocalStreamEnvironment", "currentEnvironment", ";", "currentEnvironment", "=", "new", "LocalStreamEnvironment", "(", ...
Creates a {@link LocalStreamEnvironment}. The local execution environment will run the program in a multi-threaded fashion in the same JVM as the environment was created in. It will use the parallelism specified in the parameter. @param parallelism The parallelism for the local environment. @param configuration Pass a...
[ "Creates", "a", "{", "@link", "LocalStreamEnvironment", "}", ".", "The", "local", "execution", "environment", "will", "run", "the", "program", "in", "a", "multi", "-", "threaded", "fashion", "in", "the", "same", "JVM", "as", "the", "environment", "was", "cre...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1628-L1635
train
Creates a new LocalStreamEnvironment with the given parallelism and configuration.
[ 30522, 2270, 10763, 10575, 25379, 2368, 21663, 2239, 3672, 3443, 4135, 9289, 2368, 21663, 2239, 3672, 1006, 20014, 5903, 2964, 1010, 9563, 9563, 1007, 1063, 2345, 10575, 25379, 2368, 21663, 2239, 3672, 2783, 2368, 21663, 2239, 3672, 1025, 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...
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java
HttpConversionUtil.parseStatus
public static HttpResponseStatus parseStatus(CharSequence status) throws Http2Exception { HttpResponseStatus result; try { result = parseLine(status); if (result == HttpResponseStatus.SWITCHING_PROTOCOLS) { throw connectionError(PROTOCOL_ERROR, "Invalid HTTP/2 sta...
java
public static HttpResponseStatus parseStatus(CharSequence status) throws Http2Exception { HttpResponseStatus result; try { result = parseLine(status); if (result == HttpResponseStatus.SWITCHING_PROTOCOLS) { throw connectionError(PROTOCOL_ERROR, "Invalid HTTP/2 sta...
[ "public", "static", "HttpResponseStatus", "parseStatus", "(", "CharSequence", "status", ")", "throws", "Http2Exception", "{", "HttpResponseStatus", "result", ";", "try", "{", "result", "=", "parseLine", "(", "status", ")", ";", "if", "(", "result", "==", "HttpRe...
Apply HTTP/2 rules while translating status code to {@link HttpResponseStatus} @param status The status from an HTTP/2 frame @return The HTTP/1.x status @throws Http2Exception If there is a problem translating from HTTP/2 to HTTP/1.x
[ "Apply", "HTTP", "/", "2", "rules", "while", "translating", "status", "code", "to", "{", "@link", "HttpResponseStatus", "}" ]
ba06eafa1c1824bd154f1a380019e7ea2edf3c4c
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java#L184-L198
train
Parses the status code from the given status line.
[ 30522, 2270, 10763, 8299, 6072, 26029, 8583, 29336, 2271, 11968, 8583, 29336, 2271, 1006, 25869, 3366, 4226, 5897, 3570, 1007, 11618, 8299, 2475, 10288, 24422, 1063, 8299, 6072, 26029, 8583, 29336, 2271, 2765, 1025, 3046, 1063, 2765, 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/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java
ByteArray.getPrefix
public static long getPrefix(byte[] bytes) { if (bytes == null) { return 0L; } else { final int minLen = Math.min(bytes.length, 8); long p = 0; for (int i = 0; i < minLen; ++i) { p |= ((long) Platform.getByte(bytes, Platform.BYTE_ARRAY_OFFSET + i) & 0xff) << (56 - 8 *...
java
public static long getPrefix(byte[] bytes) { if (bytes == null) { return 0L; } else { final int minLen = Math.min(bytes.length, 8); long p = 0; for (int i = 0; i < minLen; ++i) { p |= ((long) Platform.getByte(bytes, Platform.BYTE_ARRAY_OFFSET + i) & 0xff) << (56 - 8 *...
[ "public", "static", "long", "getPrefix", "(", "byte", "[", "]", "bytes", ")", "{", "if", "(", "bytes", "==", "null", ")", "{", "return", "0L", ";", "}", "else", "{", "final", "int", "minLen", "=", "Math", ".", "min", "(", "bytes", ".", "length", ...
Returns a 64-bit integer that can be used as the prefix used in sorting.
[ "Returns", "a", "64", "-", "bit", "integer", "that", "can", "be", "used", "as", "the", "prefix", "used", "in", "sorting", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java#L42-L54
train
Get the prefix of the bytes.
[ 30522, 2270, 10763, 2146, 2131, 28139, 8873, 2595, 1006, 24880, 1031, 1033, 27507, 1007, 1063, 2065, 1006, 27507, 1027, 1027, 19701, 1007, 1063, 2709, 1014, 2140, 1025, 1065, 2842, 1063, 2345, 20014, 8117, 7770, 1027, 8785, 1012, 8117, 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-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java
KeyUtil.getKeyPair
public static KeyPair getKeyPair(KeyStore keyStore, char[] password, String alias) { PublicKey publicKey; PrivateKey privateKey; try { publicKey = keyStore.getCertificate(alias).getPublicKey(); privateKey = (PrivateKey) keyStore.getKey(alias, password); } catch (Exception e) { throw new CryptoEx...
java
public static KeyPair getKeyPair(KeyStore keyStore, char[] password, String alias) { PublicKey publicKey; PrivateKey privateKey; try { publicKey = keyStore.getCertificate(alias).getPublicKey(); privateKey = (PrivateKey) keyStore.getKey(alias, password); } catch (Exception e) { throw new CryptoEx...
[ "public", "static", "KeyPair", "getKeyPair", "(", "KeyStore", "keyStore", ",", "char", "[", "]", "password", ",", "String", "alias", ")", "{", "PublicKey", "publicKey", ";", "PrivateKey", "privateKey", ";", "try", "{", "publicKey", "=", "keyStore", ".", "get...
从KeyStore中获取私钥公钥 @param keyStore {@link KeyStore} @param password 密码 @param alias 别名 @return {@link KeyPair} @since 4.4.1
[ "从KeyStore中获取私钥公钥" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L606-L616
train
Gets a KeyPair from a given key store.
[ 30522, 2270, 10763, 3145, 4502, 4313, 2131, 14839, 4502, 4313, 1006, 6309, 19277, 6309, 19277, 1010, 25869, 1031, 1033, 20786, 1010, 5164, 14593, 1007, 1063, 2270, 14839, 2270, 14839, 1025, 2797, 14839, 2797, 14839, 1025, 3046, 1063, 2270, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java
Pattern.followedBy
public Pattern<T, T> followedBy(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy); }
java
public Pattern<T, T> followedBy(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy); }
[ "public", "Pattern", "<", "T", ",", "T", ">", "followedBy", "(", "final", "String", "name", ")", "{", "return", "new", "Pattern", "<>", "(", "name", ",", "this", ",", "ConsumingStrategy", ".", "SKIP_TILL_NEXT", ",", "afterMatchSkipStrategy", ")", ";", "}" ...
Appends a new pattern to the existing one. The new pattern enforces non-strict temporal contiguity. This means that a matching event of this pattern and the preceding matching event might be interleaved with other events which are ignored. @param name Name of the new pattern @return A new pattern which is appended to ...
[ "Appends", "a", "new", "pattern", "to", "the", "existing", "one", ".", "The", "new", "pattern", "enforces", "non", "-", "strict", "temporal", "contiguity", ".", "This", "means", "that", "a", "matching", "event", "of", "this", "pattern", "and", "the", "prec...
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java#L290-L292
train
Creates a pattern that matches characters followed by the given string.
[ 30522, 2270, 5418, 1026, 1056, 1010, 1056, 1028, 2628, 3762, 1006, 2345, 5164, 2171, 30524, 1012, 13558, 1035, 6229, 1035, 2279, 1010, 2044, 18900, 18069, 3211, 4523, 6494, 2618, 6292, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java
ZooKeeperCompletedCheckpointStore.addCheckpoint
@Override public void addCheckpoint(final CompletedCheckpoint checkpoint) throws Exception { checkNotNull(checkpoint, "Checkpoint"); final String path = checkpointIdToPath(checkpoint.getCheckpointID()); // Now add the new one. If it fails, we don't want to loose existing data. checkpointsInZooKeeper.addAndLo...
java
@Override public void addCheckpoint(final CompletedCheckpoint checkpoint) throws Exception { checkNotNull(checkpoint, "Checkpoint"); final String path = checkpointIdToPath(checkpoint.getCheckpointID()); // Now add the new one. If it fails, we don't want to loose existing data. checkpointsInZooKeeper.addAndLo...
[ "@", "Override", "public", "void", "addCheckpoint", "(", "final", "CompletedCheckpoint", "checkpoint", ")", "throws", "Exception", "{", "checkNotNull", "(", "checkpoint", ",", "\"Checkpoint\"", ")", ";", "final", "String", "path", "=", "checkpointIdToPath", "(", "...
Synchronously writes the new checkpoints to ZooKeeper and asynchronously removes older ones. @param checkpoint Completed checkpoint to add.
[ "Synchronously", "writes", "the", "new", "checkpoints", "to", "ZooKeeper", "and", "asynchronously", "removes", "older", "ones", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java#L209-L227
train
Add a checkpoint to the cluster.
[ 30522, 1030, 2058, 15637, 2270, 11675, 5587, 5403, 3600, 8400, 1006, 2345, 2949, 5403, 3600, 8400, 26520, 1007, 11618, 6453, 1063, 4638, 17048, 11231, 3363, 1006, 26520, 1010, 1000, 26520, 1000, 1007, 1025, 2345, 5164, 4130, 1027, 26520, 35...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/rest/RestClusterClient.java
RestClusterClient.sendRequest
private <M extends MessageHeaders<EmptyRequestBody, P, U>, U extends MessageParameters, P extends ResponseBody> CompletableFuture<P> sendRequest(M messageHeaders, U messageParameters) { return sendRequest(messageHeaders, messageParameters, EmptyRequestBody.getInstance()); }
java
private <M extends MessageHeaders<EmptyRequestBody, P, U>, U extends MessageParameters, P extends ResponseBody> CompletableFuture<P> sendRequest(M messageHeaders, U messageParameters) { return sendRequest(messageHeaders, messageParameters, EmptyRequestBody.getInstance()); }
[ "private", "<", "M", "extends", "MessageHeaders", "<", "EmptyRequestBody", ",", "P", ",", "U", ">", ",", "U", "extends", "MessageParameters", ",", "P", "extends", "ResponseBody", ">", "CompletableFuture", "<", "P", ">", "sendRequest", "(", "M", "messageHeaders...
-------------------------------------------------------------------------
[ "-------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java#L631-L634
train
Sends an empty request to the server.
[ 30522, 2797, 1026, 1049, 8908, 4471, 4974, 2545, 1026, 4064, 2890, 15500, 23684, 1010, 1052, 1010, 1057, 1028, 1010, 1057, 8908, 4471, 28689, 22828, 2015, 1010, 1052, 8908, 3433, 23684, 1028, 4012, 10814, 10880, 11263, 11244, 1026, 1052, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFAStateSerializer.java
NFAStateSerializer.readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // the nested serializer will be null if this was read from a savepoint taken with versions // lower than Flink 1.7; in this case, we explicitly create instance for the nested serializer. if (vers...
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // the nested serializer will be null if this was read from a savepoint taken with versions // lower than Flink 1.7; in this case, we explicitly create instance for the nested serializer. if (vers...
[ "private", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "// the nested serializer will be null if this was read from a savepoint taken with versions", "// l...
/* Backwards compatible deserializing of NFAStateSerializer.
[ "/", "*", "Backwards", "compatible", "deserializing", "of", "NFAStateSerializer", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFAStateSerializer.java#L255-L265
train
This method is called to read the object from an ObjectInputStream.
[ 30522, 2797, 11675, 3191, 16429, 20614, 1006, 4874, 2378, 18780, 21422, 1999, 1007, 11618, 22834, 10288, 24422, 1010, 2465, 17048, 14876, 8630, 10288, 24422, 1063, 1999, 1012, 12398, 16416, 3527, 2497, 20614, 1006, 1007, 1025, 1013, 1013, 199...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/model/KinesisStreamShard.java
KinesisStreamShard.convertToStreamShardMetadata
public static StreamShardMetadata convertToStreamShardMetadata(KinesisStreamShard kinesisStreamShard) { StreamShardMetadata streamShardMetadata = new StreamShardMetadata(); streamShardMetadata.setStreamName(kinesisStreamShard.getStreamName()); streamShardMetadata.setShardId(kinesisStreamShard.getShard().getShard...
java
public static StreamShardMetadata convertToStreamShardMetadata(KinesisStreamShard kinesisStreamShard) { StreamShardMetadata streamShardMetadata = new StreamShardMetadata(); streamShardMetadata.setStreamName(kinesisStreamShard.getStreamName()); streamShardMetadata.setShardId(kinesisStreamShard.getShard().getShard...
[ "public", "static", "StreamShardMetadata", "convertToStreamShardMetadata", "(", "KinesisStreamShard", "kinesisStreamShard", ")", "{", "StreamShardMetadata", "streamShardMetadata", "=", "new", "StreamShardMetadata", "(", ")", ";", "streamShardMetadata", ".", "setStreamName", "...
Utility function to convert {@link KinesisStreamShard} into the new {@link StreamShardMetadata} model. @param kinesisStreamShard the {@link KinesisStreamShard} to be converted @return the converted {@link StreamShardMetadata}
[ "Utility", "function", "to", "convert", "{", "@link", "KinesisStreamShard", "}", "into", "the", "new", "{", "@link", "StreamShardMetadata", "}", "model", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/model/KinesisStreamShard.java#L111-L130
train
Converts KinesisStreamShard to StreamShardMetadata
[ 30522, 2270, 10763, 9199, 11783, 11368, 30524, 1063, 9199, 11783, 11368, 8447, 2696, 9199, 11783, 11368, 8447, 2696, 1027, 2047, 9199, 11783, 11368, 8447, 2696, 1006, 1007, 1025, 9199, 11783, 11368, 8447, 2696, 1012, 4520, 25379, 18442, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/KvStateService.java
KvStateService.fromConfiguration
public static KvStateService fromConfiguration(TaskManagerServicesConfiguration taskManagerServicesConfiguration) { KvStateRegistry kvStateRegistry = new KvStateRegistry(); QueryableStateConfiguration qsConfig = taskManagerServicesConfiguration.getQueryableStateConfig(); KvStateClientProxy kvClientProxy = null;...
java
public static KvStateService fromConfiguration(TaskManagerServicesConfiguration taskManagerServicesConfiguration) { KvStateRegistry kvStateRegistry = new KvStateRegistry(); QueryableStateConfiguration qsConfig = taskManagerServicesConfiguration.getQueryableStateConfig(); KvStateClientProxy kvClientProxy = null;...
[ "public", "static", "KvStateService", "fromConfiguration", "(", "TaskManagerServicesConfiguration", "taskManagerServicesConfiguration", ")", "{", "KvStateRegistry", "kvStateRegistry", "=", "new", "KvStateRegistry", "(", ")", ";", "QueryableStateConfiguration", "qsConfig", "=", ...
Creates and returns the KvState service. @param taskManagerServicesConfiguration task manager configuration @return service for kvState related components
[ "Creates", "and", "returns", "the", "KvState", "service", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/KvStateService.java#L159-L193
train
Creates a KvStateService from the given configuration.
[ 30522, 2270, 10763, 24888, 9153, 4570, 2121, 7903, 2063, 2013, 8663, 8873, 27390, 3370, 1006, 4708, 24805, 15776, 2121, 7903, 2229, 8663, 8873, 27390, 3370, 4708, 24805, 15776, 30524, 24888, 9153, 3334, 13910, 2923, 2854, 24888, 9153, 3334, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/utils/MurmurHash.java
MurmurHash.hash
public MurmurHash hash(int input) { count++; input *= 0xcc9e2d51; input = Integer.rotateLeft(input, 15); input *= 0x1b873593; hash ^= input; hash = Integer.rotateLeft(hash, 13); hash = hash * 5 + 0xe6546b64; return this; }
java
public MurmurHash hash(int input) { count++; input *= 0xcc9e2d51; input = Integer.rotateLeft(input, 15); input *= 0x1b873593; hash ^= input; hash = Integer.rotateLeft(hash, 13); hash = hash * 5 + 0xe6546b64; return this; }
[ "public", "MurmurHash", "hash", "(", "int", "input", ")", "{", "count", "++", ";", "input", "*=", "0xcc9e2d51", ";", "input", "=", "Integer", ".", "rotateLeft", "(", "input", ",", "15", ")", ";", "input", "*=", "0x1b873593", ";", "hash", "^=", "input",...
Process an {@code integer} value. @param input 32-bit input value @return this
[ "Process", "an", "{", "@code", "integer", "}", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/MurmurHash.java#L88-L100
train
This method is used to compute the hash value of an integer.
[ 30522, 2270, 20227, 14949, 2232, 23325, 1006, 20014, 7953, 1007, 1063, 4175, 1009, 1009, 1025, 7953, 1008, 1027, 1014, 2595, 9468, 2683, 2063, 2475, 2094, 22203, 1025, 7953, 1027, 16109, 1012, 24357, 2571, 6199, 1006, 7953, 1010, 2321, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpBase.java
HttpBase.headerList
public List<String> headerList(String name) { if(StrUtil.isBlank(name)) { return null; } final CaseInsensitiveMap<String,List<String>> headersIgnoreCase = new CaseInsensitiveMap<>(this.headers); return headersIgnoreCase.get(name.trim()); }
java
public List<String> headerList(String name) { if(StrUtil.isBlank(name)) { return null; } final CaseInsensitiveMap<String,List<String>> headersIgnoreCase = new CaseInsensitiveMap<>(this.headers); return headersIgnoreCase.get(name.trim()); }
[ "public", "List", "<", "String", ">", "headerList", "(", "String", "name", ")", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "name", ")", ")", "{", "return", "null", ";", "}", "final", "CaseInsensitiveMap", "<", "String", ",", "List", "<", "String",...
根据name获取头信息列表 @param name Header名 @return Header值 @since 3.1.1
[ "根据name获取头信息列表" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpBase.java#L60-L67
train
Returns a list of header values for the given name.
[ 30522, 2270, 2862, 1026, 5164, 1028, 20346, 9863, 1006, 5164, 2171, 1007, 1063, 2065, 1006, 2358, 22134, 4014, 1012, 2003, 28522, 8950, 1006, 2171, 1007, 1007, 1063, 2709, 19701, 1025, 1065, 2345, 2553, 7076, 6132, 13043, 2863, 2361, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/spi/NewInstanceServiceLoader.java
NewInstanceServiceLoader.newServiceInstances
@SneakyThrows @SuppressWarnings("unchecked") public static <T> Collection<T> newServiceInstances(final Class<T> service) { Collection<T> result = new LinkedList<>(); if (null == SERVICE_MAP.get(service)) { return result; } for (Class<?> each : SERVICE_MAP.get(service)...
java
@SneakyThrows @SuppressWarnings("unchecked") public static <T> Collection<T> newServiceInstances(final Class<T> service) { Collection<T> result = new LinkedList<>(); if (null == SERVICE_MAP.get(service)) { return result; } for (Class<?> each : SERVICE_MAP.get(service)...
[ "@", "SneakyThrows", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "newServiceInstances", "(", "final", "Class", "<", "T", ">", "service", ")", "{", "Collection", "<", "T", ">", "result"...
New service instances. @param service service class @param <T> type of service @return service instances
[ "New", "service", "instances", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/spi/NewInstanceServiceLoader.java#L71-L82
train
Creates a collection of all the Service instances for the given service.
[ 30522, 1030, 13583, 22123, 8093, 15568, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 1026, 1056, 1028, 3074, 1026, 1056, 1028, 2739, 2121, 7903, 12377, 12693, 9623, 1006, 2345, 2465, 1026, 1056, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java
RestServerEndpoint.createUploadDir
@VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log, final boolean initialCreation) throws IOException { if (!Files.exists(uploadDir)) { if (initialCreation) { log.info("Upload directory {} does not exist. " + uploadDir); } else { log.warn("Upload directory {} has been...
java
@VisibleForTesting static void createUploadDir(final Path uploadDir, final Logger log, final boolean initialCreation) throws IOException { if (!Files.exists(uploadDir)) { if (initialCreation) { log.info("Upload directory {} does not exist. " + uploadDir); } else { log.warn("Upload directory {} has been...
[ "@", "VisibleForTesting", "static", "void", "createUploadDir", "(", "final", "Path", "uploadDir", ",", "final", "Logger", "log", ",", "final", "boolean", "initialCreation", ")", "throws", "IOException", "{", "if", "(", "!", "Files", ".", "exists", "(", "upload...
Creates the upload dir if needed.
[ "Creates", "the", "upload", "dir", "if", "needed", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java#L450-L461
train
Creates the upload directory.
[ 30522, 1030, 5710, 13028, 4355, 2075, 10763, 11675, 3443, 6279, 11066, 4305, 2099, 1006, 2345, 4130, 2039, 11066, 4305, 2099, 1010, 2345, 8833, 4590, 8833, 1010, 2345, 22017, 20898, 3988, 16748, 3370, 1007, 11618, 22834, 10288, 24422, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
UnsafeRow.setDecimal
@Override public void setDecimal(int ordinal, Decimal value, int precision) { assertIndexIsValid(ordinal); if (precision <= Decimal.MAX_LONG_DIGITS()) { // compact format if (value == null) { setNullAt(ordinal); } else { setLong(ordinal, value.toUnscaledLong()); } }...
java
@Override public void setDecimal(int ordinal, Decimal value, int precision) { assertIndexIsValid(ordinal); if (precision <= Decimal.MAX_LONG_DIGITS()) { // compact format if (value == null) { setNullAt(ordinal); } else { setLong(ordinal, value.toUnscaledLong()); } }...
[ "@", "Override", "public", "void", "setDecimal", "(", "int", "ordinal", ",", "Decimal", "value", ",", "int", "precision", ")", "{", "assertIndexIsValid", "(", "ordinal", ")", ";", "if", "(", "precision", "<=", "Decimal", ".", "MAX_LONG_DIGITS", "(", ")", "...
Updates the decimal column. Note: In order to support update a decimal with precision > 18, CAN NOT call setNullAt() for this column.
[ "Updates", "the", "decimal", "column", "." ]
25ee0474f47d9c30d6f553a7892d9549f91071cf
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java#L264-L298
train
Override the method to set a decimal value.
[ 30522, 1030, 2058, 15637, 2270, 11675, 2275, 3207, 6895, 9067, 1006, 20014, 2030, 18979, 2140, 1010, 26066, 3643, 1010, 20014, 11718, 1007, 1063, 20865, 22254, 10288, 2483, 10175, 3593, 1006, 2030, 18979, 2140, 1007, 1025, 2065, 1006, 11718, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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.triggerSavepoint
private String triggerSavepoint(ClusterClient<?> clusterClient, JobID jobId, String savepointDirectory) throws FlinkException { logAndSysout("Triggering savepoint for job " + jobId + '.'); CompletableFuture<String> savepointPathFuture = clusterClient.triggerSavepoint(jobId, savepointDirectory); logAndSysout("Wai...
java
private String triggerSavepoint(ClusterClient<?> clusterClient, JobID jobId, String savepointDirectory) throws FlinkException { logAndSysout("Triggering savepoint for job " + jobId + '.'); CompletableFuture<String> savepointPathFuture = clusterClient.triggerSavepoint(jobId, savepointDirectory); logAndSysout("Wai...
[ "private", "String", "triggerSavepoint", "(", "ClusterClient", "<", "?", ">", "clusterClient", ",", "JobID", "jobId", ",", "String", "savepointDirectory", ")", "throws", "FlinkException", "{", "logAndSysout", "(", "\"Triggering savepoint for job \"", "+", "jobId", "+"...
Sends a SavepointTriggerMessage to the job manager.
[ "Sends", "a", "SavepointTriggerMessage", "to", "the", "job", "manager", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L691-L711
train
Triggers a savepoint for the given job.
[ 30522, 2797, 5164, 27099, 10696, 8400, 1006, 9324, 20464, 11638, 1026, 1029, 1028, 9324, 20464, 11638, 1010, 3105, 3593, 3105, 3593, 1010, 5164, 3828, 8400, 4305, 2890, 16761, 2100, 1007, 11618, 13109, 19839, 10288, 24422, 1063, 6307, 5104, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.getBool
public static Boolean getBool(Map<?, ?> map, Object key) { return get(map, key, Boolean.class); }
java
public static Boolean getBool(Map<?, ?> map, Object key) { return get(map, key, Boolean.class); }
[ "public", "static", "Boolean", "getBool", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "Object", "key", ")", "{", "return", "get", "(", "map", ",", "key", ",", "Boolean", ".", "class", ")", ";", "}" ]
获取Map指定key的值,并转换为Bool @param map Map @param key 键 @return 值 @since 4.0.6
[ "获取Map指定key的值,并转换为Bool" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L816-L818
train
Gets the Boolean value from the map.
[ 30522, 2270, 10763, 22017, 20898, 2131, 5092, 4747, 1006, 4949, 1026, 1029, 1010, 1029, 1028, 4949, 1010, 4874, 3145, 1007, 1063, 2709, 2131, 1006, 4949, 1010, 3145, 1010, 22017, 20898, 1012, 2465, 1007, 1025, 1065, 102, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java
HashUtil.zobrist
public static int zobrist(char[] key, int mask, int[][] tab) { int hash, i; for (hash = key.length, i = 0; i < key.length; ++i) { hash ^= tab[i][key[i]]; } return (hash & mask); }
java
public static int zobrist(char[] key, int mask, int[][] tab) { int hash, i; for (hash = key.length, i = 0; i < key.length; ++i) { hash ^= tab[i][key[i]]; } return (hash & mask); }
[ "public", "static", "int", "zobrist", "(", "char", "[", "]", "key", ",", "int", "mask", ",", "int", "[", "]", "[", "]", "tab", ")", "{", "int", "hash", ",", "i", ";", "for", "(", "hash", "=", "key", ".", "length", ",", "i", "=", "0", ";", "...
Zobrist Hashing @param key 字节数组 @param mask 掩码 @param tab tab @return hash值
[ "Zobrist", "Hashing" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/HashUtil.java#L130-L136
train
Zobrist method.
[ 30522, 2270, 10763, 20014, 1062, 16429, 15061, 1006, 25869, 1031, 1033, 3145, 1010, 20014, 7308, 1010, 20014, 1031, 1033, 1031, 1033, 21628, 1007, 1063, 20014, 23325, 1010, 1045, 1025, 2005, 1006, 23325, 1027, 3145, 1012, 3091, 1010, 1045, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/exceptions/ExceptionUtil.java
ExceptionUtil.isCausedBy
@SuppressWarnings("unchecked") public static boolean isCausedBy(Throwable throwable, Class<? extends Exception>... causeClasses) { return null != getCausedBy(throwable, causeClasses); }
java
@SuppressWarnings("unchecked") public static boolean isCausedBy(Throwable throwable, Class<? extends Exception>... causeClasses) { return null != getCausedBy(throwable, causeClasses); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "boolean", "isCausedBy", "(", "Throwable", "throwable", ",", "Class", "<", "?", "extends", "Exception", ">", "...", "causeClasses", ")", "{", "return", "null", "!=", "getCausedBy", "(", "t...
判断是否由指定异常类引起 @param throwable 异常 @param causeClasses 定义的引起异常的类 @return 是否由指定异常类引起 @since 4.1.13
[ "判断是否由指定异常类引起" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/exceptions/ExceptionUtil.java#L221-L224
train
Checks if the throwable is caused by one of the given exceptions.
[ 30522, 1030, 16081, 9028, 5582, 2015, 1006, 1000, 4895, 5403, 18141, 1000, 1007, 2270, 10763, 22017, 20898, 2003, 3540, 13901, 3762, 1006, 5466, 3085, 5466, 3085, 1010, 2465, 1026, 1029, 8908, 6453, 1028, 1012, 1012, 1012, 3426, 26266, 2229...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.consume
public final LogBuffer consume(final int len) { if (limit > len) { limit -= len; origin += len; position = origin; return this; } else if (limit == len) { limit = 0; origin = 0; position = 0; return...
java
public final LogBuffer consume(final int len) { if (limit > len) { limit -= len; origin += len; position = origin; return this; } else if (limit == len) { limit = 0; origin = 0; position = 0; return...
[ "public", "final", "LogBuffer", "consume", "(", "final", "int", "len", ")", "{", "if", "(", "limit", ">", "len", ")", "{", "limit", "-=", "len", ";", "origin", "+=", "len", ";", "position", "=", "origin", ";", "return", "this", ";", "}", "else", "i...
Consume this buffer, moving origin and position. @param len The consume distance @return This buffer
[ "Consume", "this", "buffer", "moving", "origin", "and", "position", "." ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L128-L143
train
Consume len bytes from this buffer.
[ 30522, 2270, 2345, 8833, 8569, 12494, 16678, 1006, 2345, 20014, 18798, 1007, 1063, 2065, 1006, 5787, 1028, 18798, 1007, 1063, 5787, 1011, 1027, 18798, 1025, 4761, 1009, 1027, 18798, 1025, 2597, 1027, 4761, 1025, 2709, 2023, 1025, 1065, 2842...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/EventTimeSessionWindows.java
EventTimeSessionWindows.withDynamicGap
@PublicEvolving public static <T> DynamicEventTimeSessionWindows<T> withDynamicGap(SessionWindowTimeGapExtractor<T> sessionWindowTimeGapExtractor) { return new DynamicEventTimeSessionWindows<>(sessionWindowTimeGapExtractor); }
java
@PublicEvolving public static <T> DynamicEventTimeSessionWindows<T> withDynamicGap(SessionWindowTimeGapExtractor<T> sessionWindowTimeGapExtractor) { return new DynamicEventTimeSessionWindows<>(sessionWindowTimeGapExtractor); }
[ "@", "PublicEvolving", "public", "static", "<", "T", ">", "DynamicEventTimeSessionWindows", "<", "T", ">", "withDynamicGap", "(", "SessionWindowTimeGapExtractor", "<", "T", ">", "sessionWindowTimeGapExtractor", ")", "{", "return", "new", "DynamicEventTimeSessionWindows", ...
Creates a new {@code SessionWindows} {@link WindowAssigner} that assigns elements to sessions based on the element timestamp. @param sessionWindowTimeGapExtractor The extractor to use to extract the time gap from the input elements @return The policy.
[ "Creates", "a", "new", "{", "@code", "SessionWindows", "}", "{", "@link", "WindowAssigner", "}", "that", "assigns", "elements", "to", "sessions", "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/EventTimeSessionWindows.java#L91-L94
train
Creates a new instance of DynamicEventTimeSessionWindows with the given session window time gap extractor.
[ 30522, 1030, 2270, 6777, 4747, 6455, 2270, 10763, 1026, 1056, 1028, 8790, 18697, 3372, 7292, 8583, 10992, 11101, 15568, 1026, 1056, 1028, 2007, 5149, 28987, 2278, 3654, 2361, 1006, 5219, 11101, 5004, 7292, 3654, 5051, 18413, 22648, 4263, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java
ThreadUtil.waitForDie
public static void waitForDie(Thread thread) { boolean dead = false; do { try { thread.join(); dead = true; } catch (InterruptedException e) { // ignore } } while (!dead); }
java
public static void waitForDie(Thread thread) { boolean dead = false; do { try { thread.join(); dead = true; } catch (InterruptedException e) { // ignore } } while (!dead); }
[ "public", "static", "void", "waitForDie", "(", "Thread", "thread", ")", "{", "boolean", "dead", "=", "false", ";", "do", "{", "try", "{", "thread", ".", "join", "(", ")", ";", "dead", "=", "true", ";", "}", "catch", "(", "InterruptedException", "e", ...
等待线程结束. 调用 {@link Thread#join()} 并忽略 {@link InterruptedException} @param thread 线程
[ "等待线程结束", ".", "调用", "{", "@link", "Thread#join", "()", "}", "并忽略", "{", "@link", "InterruptedException", "}" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L325-L335
train
Waits for a thread to die.
[ 30522, 2270, 10763, 11675, 3524, 3877, 2666, 1006, 11689, 11689, 1007, 1063, 22017, 20898, 2757, 1027, 6270, 1025, 2079, 1063, 3046, 1063, 11689, 1012, 3693, 1006, 1007, 1025, 2757, 1027, 2995, 1025, 1065, 4608, 1006, 7153, 10288, 24422, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-db/src/main/java/cn/hutool/db/AbstractDb.java
AbstractDb.insert
public int[] insert(Collection<Entity> records) throws SQLException { Connection conn = null; try { conn = this.getConnection(); return runner.insert(conn, records); } catch (SQLException e) { throw e; } finally { this.closeConnection(conn); } }
java
public int[] insert(Collection<Entity> records) throws SQLException { Connection conn = null; try { conn = this.getConnection(); return runner.insert(conn, records); } catch (SQLException e) { throw e; } finally { this.closeConnection(conn); } }
[ "public", "int", "[", "]", "insert", "(", "Collection", "<", "Entity", ">", "records", ")", "throws", "SQLException", "{", "Connection", "conn", "=", "null", ";", "try", "{", "conn", "=", "this", ".", "getConnection", "(", ")", ";", "return", "runner", ...
批量插入数据<br> 需要注意的是,批量插入每一条数据结构必须一致。批量插入数据时会获取第一条数据的字段结构,之后的数据会按照这个格式插入。<br> 也就是说假如第一条数据只有2个字段,后边数据多于这两个字段的部分将被抛弃。 @param records 记录列表 @return 插入行数 @throws SQLException SQL执行异常
[ "批量插入数据<br", ">", "需要注意的是,批量插入每一条数据结构必须一致。批量插入数据时会获取第一条数据的字段结构,之后的数据会按照这个格式插入。<br", ">", "也就是说假如第一条数据只有2个字段,后边数据多于这两个字段的部分将被抛弃。" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java#L289-L299
train
Inserts the given collection of entities into the database.
[ 30522, 2270, 20014, 1031, 1033, 19274, 1006, 3074, 1026, 9178, 1028, 2636, 1007, 11618, 29296, 10288, 24422, 1063, 4434, 9530, 2078, 1027, 19701, 1025, 3046, 1063, 9530, 2078, 1027, 2023, 1012, 2131, 8663, 2638, 7542, 1006, 1007, 1025, 2709...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/utility/SentencesUtil.java
SentencesUtil.toSentenceList
public static List<String> toSentenceList(String content, boolean shortest) { return toSentenceList(content.toCharArray(), shortest); }
java
public static List<String> toSentenceList(String content, boolean shortest) { return toSentenceList(content.toCharArray(), shortest); }
[ "public", "static", "List", "<", "String", ">", "toSentenceList", "(", "String", "content", ",", "boolean", "shortest", ")", "{", "return", "toSentenceList", "(", "content", ".", "toCharArray", "(", ")", ",", "shortest", ")", ";", "}" ]
文本分句 @param content 文本 @param shortest 是否切割为最细的单位(将逗号也视作分隔符) @return
[ "文本分句" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/utility/SentencesUtil.java#L32-L35
train
Converts a String to a List of Strings.
[ 30522, 2270, 10763, 2862, 1026, 5164, 1028, 2000, 5054, 6528, 29109, 2923, 1006, 5164, 4180, 1010, 22017, 20898, 20047, 1007, 1063, 2709, 2000, 5054, 6528, 29109, 2923, 1006, 4180, 1012, 2000, 7507, 19848, 9447, 1006, 1007, 1010, 20047, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpRequest.java
HttpRequest.basicAuth
public HttpRequest basicAuth(String username, String password) { final String data = username.concat(":").concat(password); final String base64 = Base64.encode(data, charset); header("Authorization", "Basic " + base64, true); return this; }
java
public HttpRequest basicAuth(String username, String password) { final String data = username.concat(":").concat(password); final String base64 = Base64.encode(data, charset); header("Authorization", "Basic " + base64, true); return this; }
[ "public", "HttpRequest", "basicAuth", "(", "String", "username", ",", "String", "password", ")", "{", "final", "String", "data", "=", "username", ".", "concat", "(", "\":\"", ")", ".", "concat", "(", "password", ")", ";", "final", "String", "base64", "=", ...
简单验证 @param username 用户名 @param password 密码 @return HttpRequest
[ "简单验证" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpRequest.java#L894-L901
train
Sets the Authorization header to be used for Basic authentication.
[ 30522, 2270, 8299, 2890, 15500, 3937, 4887, 2705, 1006, 5164, 5310, 18442, 1010, 5164, 20786, 1007, 1063, 30524, 1000, 20104, 1000, 1010, 1000, 3937, 1000, 1009, 2918, 21084, 1010, 2995, 1007, 1025, 2709, 2023, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
redisson/redisson
redisson/src/main/java/org/redisson/cache/AbstractCacheMap.java
AbstractCacheMap.get
@Override public V get(Object key) { if (key == null) { throw new NullPointerException(); } CachedValue<K, V> entry = map.get(key); if (entry == null) { return null; } if (isValueExpired(entry)) { if (map.remove(key, entry)...
java
@Override public V get(Object key) { if (key == null) { throw new NullPointerException(); } CachedValue<K, V> entry = map.get(key); if (entry == null) { return null; } if (isValueExpired(entry)) { if (map.remove(key, entry)...
[ "@", "Override", "public", "V", "get", "(", "Object", "key", ")", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "CachedValue", "<", "K", ",", "V", ">", "entry", "=", "map", ".", "get", ...
/* (non-Javadoc) @see java.util.Map#get(java.lang.Object)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
d3acc0249b2d5d658d36d99e2c808ce49332ea44
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/cache/AbstractCacheMap.java#L147-L165
train
Gets the value associated with the specified key.
[ 30522, 1030, 2058, 15637, 2270, 1058, 2131, 1006, 4874, 3145, 1007, 1063, 2065, 1006, 3145, 1027, 1027, 19701, 1007, 1063, 5466, 2047, 19701, 8400, 7869, 2595, 24422, 1006, 1007, 1025, 1065, 17053, 2094, 10175, 5657, 1026, 1047, 1010, 1058,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/rule/jaxb/loader/RuleDefinitionFileConstant.java
RuleDefinitionFileConstant.getSQLStatementRuleDefinitionFileName
public static String getSQLStatementRuleDefinitionFileName(final String rootDir, final DatabaseType databaseType) { return Joiner.on('/').join(rootDir, databaseType.name().toLowerCase(), SQL_STATEMENT_RULE_DEFINITION_FILE_NAME); }
java
public static String getSQLStatementRuleDefinitionFileName(final String rootDir, final DatabaseType databaseType) { return Joiner.on('/').join(rootDir, databaseType.name().toLowerCase(), SQL_STATEMENT_RULE_DEFINITION_FILE_NAME); }
[ "public", "static", "String", "getSQLStatementRuleDefinitionFileName", "(", "final", "String", "rootDir", ",", "final", "DatabaseType", "databaseType", ")", "{", "return", "Joiner", ".", "on", "(", "'", "'", ")", ".", "join", "(", "rootDir", ",", "databaseType",...
Get SQL statement rule definition file name. @param rootDir root dir @param databaseType database type @return SQL statement rule definition file name
[ "Get", "SQL", "statement", "rule", "definition", "file", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/rule/jaxb/loader/RuleDefinitionFileConstant.java#L54-L56
train
Gets the SQL statement rule definition file name.
[ 30522, 2270, 10763, 5164, 4152, 4160, 4877, 12259, 3672, 6820, 3709, 12879, 5498, 3508, 8873, 20844, 4168, 1006, 2345, 5164, 7117, 4305, 2099, 1010, 2345, 7809, 13874, 7809, 13874, 1007, 1063, 2709, 3693, 2121, 1012, 2006, 1006, 1005, 1013,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/WeightRandom.java
WeightRandom.add
public WeightRandom<T> add(WeightObj<T> weightObj) { if(null != weightObj) { final double weight = weightObj.getWeight(); if(weightObj.getWeight() > 0) { double lastWeight = (this.weightMap.size() == 0) ? 0 : this.weightMap.lastKey(); this.weightMap.put(weight + lastWeight, weightObj.getObj());// 权...
java
public WeightRandom<T> add(WeightObj<T> weightObj) { if(null != weightObj) { final double weight = weightObj.getWeight(); if(weightObj.getWeight() > 0) { double lastWeight = (this.weightMap.size() == 0) ? 0 : this.weightMap.lastKey(); this.weightMap.put(weight + lastWeight, weightObj.getObj());// 权...
[ "public", "WeightRandom", "<", "T", ">", "add", "(", "WeightObj", "<", "T", ">", "weightObj", ")", "{", "if", "(", "null", "!=", "weightObj", ")", "{", "final", "double", "weight", "=", "weightObj", ".", "getWeight", "(", ")", ";", "if", "(", "weight...
增加对象权重 @param weightObj 权重对象 @return this
[ "增加对象权重" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/WeightRandom.java#L111-L120
train
Add a weight object to the weight random.
[ 30522, 2270, 3635, 13033, 5358, 1026, 1056, 1028, 5587, 1006, 3635, 16429, 3501, 1026, 1056, 1028, 3635, 16429, 3501, 1007, 1063, 2065, 1006, 19701, 999, 1027, 3635, 16429, 3501, 1007, 1063, 2345, 3313, 3635, 1027, 3635, 16429, 3501, 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...
networknt/light-4j
handler/src/main/java/com/networknt/handler/Handler.java
Handler.getHandlersFromExecList
private static List<HttpHandler> getHandlersFromExecList(List<String> execs) { List<HttpHandler> handlersFromExecList = new ArrayList<>(); if (execs != null) { for (String exec : execs) { List<HttpHandler> handlerList = handlerListById.get(exec); if (handlerList == null) throw new RuntimeException("...
java
private static List<HttpHandler> getHandlersFromExecList(List<String> execs) { List<HttpHandler> handlersFromExecList = new ArrayList<>(); if (execs != null) { for (String exec : execs) { List<HttpHandler> handlerList = handlerListById.get(exec); if (handlerList == null) throw new RuntimeException("...
[ "private", "static", "List", "<", "HttpHandler", ">", "getHandlersFromExecList", "(", "List", "<", "String", ">", "execs", ")", "{", "List", "<", "HttpHandler", ">", "handlersFromExecList", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "execs", ...
Converts the list of chains and handlers to a flat list of handlers. If a chain is named the same as a handler, the chain is resolved first. @param execs The list of names of chains and handlers. @return A list containing references to the instantiated handlers
[ "Converts", "the", "list", "of", "chains", "and", "handlers", "to", "a", "flat", "list", "of", "handlers", ".", "If", "a", "chain", "is", "named", "the", "same", "as", "a", "handler", "the", "chain", "is", "resolved", "first", "." ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/handler/src/main/java/com/networknt/handler/Handler.java#L367-L388
train
Get the handlers from the list of execs
[ 30522, 2797, 10763, 2862, 1026, 8299, 11774, 3917, 1028, 2131, 11774, 12910, 19699, 8462, 2595, 8586, 9863, 1006, 2862, 1026, 5164, 1028, 4654, 8586, 2015, 1007, 1063, 2862, 1026, 8299, 11774, 3917, 1028, 28213, 22747, 21716, 10288, 8586, 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...
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/TaskStateSnapshot.java
TaskStateSnapshot.putSubtaskStateByOperatorID
public OperatorSubtaskState putSubtaskStateByOperatorID( @Nonnull OperatorID operatorID, @Nonnull OperatorSubtaskState state) { return subtaskStatesByOperatorID.put(operatorID, Preconditions.checkNotNull(state)); }
java
public OperatorSubtaskState putSubtaskStateByOperatorID( @Nonnull OperatorID operatorID, @Nonnull OperatorSubtaskState state) { return subtaskStatesByOperatorID.put(operatorID, Preconditions.checkNotNull(state)); }
[ "public", "OperatorSubtaskState", "putSubtaskStateByOperatorID", "(", "@", "Nonnull", "OperatorID", "operatorID", ",", "@", "Nonnull", "OperatorSubtaskState", "state", ")", "{", "return", "subtaskStatesByOperatorID", ".", "put", "(", "operatorID", ",", "Preconditions", ...
Maps the given operator id to the given subtask state. Returns the subtask state of a previous mapping, if such a mapping existed or null otherwise.
[ "Maps", "the", "given", "operator", "id", "to", "the", "given", "subtask", "state", ".", "Returns", "the", "subtask", "state", "of", "a", "previous", "mapping", "if", "such", "a", "mapping", "existed", "or", "null", "otherwise", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/TaskStateSnapshot.java#L82-L87
train
Put a subtask state by operator ID.
[ 30522, 2270, 9224, 12083, 10230, 5705, 12259, 8509, 12083, 10230, 5705, 12259, 3762, 25918, 8844, 3593, 1006, 1030, 2512, 11231, 3363, 6872, 3593, 6872, 3593, 1010, 1030, 2512, 11231, 3363, 9224, 12083, 10230, 5705, 12259, 2110, 1007, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java
HadoopInputs.readHadoopFile
public static <K, V> org.apache.flink.api.java.hadoop.mapreduce.HadoopInputFormat<K, V> readHadoopFile( org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K, V> mapreduceInputFormat, Class<K> key, Class<V> value, String inputPath, Job job) throws IOException { // set input path in Job org.apache.hadoop.mapred...
java
public static <K, V> org.apache.flink.api.java.hadoop.mapreduce.HadoopInputFormat<K, V> readHadoopFile( org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K, V> mapreduceInputFormat, Class<K> key, Class<V> value, String inputPath, Job job) throws IOException { // set input path in Job org.apache.hadoop.mapred...
[ "public", "static", "<", "K", ",", "V", ">", "org", ".", "apache", ".", "flink", ".", "api", ".", "java", ".", "hadoop", ".", "mapreduce", ".", "HadoopInputFormat", "<", "K", ",", "V", ">", "readHadoopFile", "(", "org", ".", "apache", ".", "hadoop", ...
Creates a Flink {@link InputFormat} that wraps the given Hadoop {@link org.apache.hadoop.mapreduce.lib.input.FileInputFormat}. @return A Flink InputFormat that wraps the Hadoop FileInputFormat.
[ "Creates", "a", "Flink", "{", "@link", "InputFormat", "}", "that", "wraps", "the", "given", "Hadoop", "{", "@link", "org", ".", "apache", ".", "hadoop", ".", "mapreduce", ".", "lib", ".", "input", ".", "FileInputFormat", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java#L89-L95
train
Read hadoop file.
[ 30522, 2270, 10763, 1026, 1047, 1010, 1058, 1028, 8917, 1012, 15895, 1012, 13109, 19839, 1012, 17928, 1012, 9262, 1012, 2018, 18589, 1012, 4949, 5596, 18796, 1012, 2018, 18589, 2378, 30524, 2497, 1012, 7953, 1012, 5371, 2378, 18780, 14192, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java
Pattern.subtype
public <S extends F> Pattern<T, S> subtype(final Class<S> subtypeClass) { Preconditions.checkNotNull(subtypeClass, "The class cannot be null."); if (condition == null) { this.condition = new SubtypeCondition<F>(subtypeClass); } else { this.condition = new RichAndCondition<>(condition, new SubtypeCondition<...
java
public <S extends F> Pattern<T, S> subtype(final Class<S> subtypeClass) { Preconditions.checkNotNull(subtypeClass, "The class cannot be null."); if (condition == null) { this.condition = new SubtypeCondition<F>(subtypeClass); } else { this.condition = new RichAndCondition<>(condition, new SubtypeCondition<...
[ "public", "<", "S", "extends", "F", ">", "Pattern", "<", "T", ",", "S", ">", "subtype", "(", "final", "Class", "<", "S", ">", "subtypeClass", ")", "{", "Preconditions", ".", "checkNotNull", "(", "subtypeClass", ",", "\"The class cannot be null.\"", ")", ";...
Applies a subtype constraint on the current pattern. This means that an event has to be of the given subtype in order to be matched. @param subtypeClass Class of the subtype @param <S> Type of the subtype @return The same pattern with the new subtype constraint
[ "Applies", "a", "subtype", "constraint", "on", "the", "current", "pattern", ".", "This", "means", "that", "an", "event", "has", "to", "be", "of", "the", "given", "subtype", "in", "order", "to", "be", "matched", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java#L198-L211
train
Creates a pattern that matches patterns of the specified type that match the pattern with the specified subtype class.
[ 30522, 2270, 1026, 1055, 8908, 1042, 1028, 5418, 1026, 1056, 1010, 1055, 1028, 4942, 13874, 1006, 2345, 2465, 1026, 1055, 1028, 4942, 13874, 26266, 1007, 1063, 3653, 8663, 20562, 2015, 1012, 4638, 17048, 11231, 3363, 1006, 4942, 13874, 2626...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/Checkpoints.java
Checkpoints.storeCheckpointMetadata
public static <T extends Savepoint> void storeCheckpointMetadata( T checkpointMetadata, OutputStream out) throws IOException { DataOutputStream dos = new DataOutputStream(out); storeCheckpointMetadata(checkpointMetadata, dos); }
java
public static <T extends Savepoint> void storeCheckpointMetadata( T checkpointMetadata, OutputStream out) throws IOException { DataOutputStream dos = new DataOutputStream(out); storeCheckpointMetadata(checkpointMetadata, dos); }
[ "public", "static", "<", "T", "extends", "Savepoint", ">", "void", "storeCheckpointMetadata", "(", "T", "checkpointMetadata", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "DataOutputStream", "dos", "=", "new", "DataOutputStream", "(", "out", ")",...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/Checkpoints.java#L73-L79
train
Store the checkpoint metadata in the given output stream.
[ 30522, 2270, 10763, 1026, 1056, 8908, 3828, 8400, 1028, 11675, 3573, 5403, 3600, 8400, 11368, 8447, 2696, 1006, 1056, 26520, 11368, 8447, 2696, 1010, 27852, 25379, 2041, 1007, 11618, 22834, 10288, 24422, 1063, 2951, 5833, 18780, 21422, 9998, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java
ReactiveMongoClientFactory.createMongoClient
public MongoClient createMongoClient(MongoClientSettings settings) { Integer embeddedPort = getEmbeddedPort(); if (embeddedPort != null) { return createEmbeddedMongoClient(settings, embeddedPort); } return createNetworkMongoClient(settings); }
java
public MongoClient createMongoClient(MongoClientSettings settings) { Integer embeddedPort = getEmbeddedPort(); if (embeddedPort != null) { return createEmbeddedMongoClient(settings, embeddedPort); } return createNetworkMongoClient(settings); }
[ "public", "MongoClient", "createMongoClient", "(", "MongoClientSettings", "settings", ")", "{", "Integer", "embeddedPort", "=", "getEmbeddedPort", "(", ")", ";", "if", "(", "embeddedPort", "!=", "null", ")", "{", "return", "createEmbeddedMongoClient", "(", "settings...
Creates a {@link MongoClient} using the given {@code settings}. If the environment contains a {@code local.mongo.port} property, it is used to configure a client to an embedded MongoDB instance. @param settings the settings @return the Mongo client
[ "Creates", "a", "{" ]
0b27f7c70e164b2b1a96477f1d9c1acba56790c1
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java#L63-L69
train
Creates a MongoClient based on the settings.
[ 30522, 2270, 12256, 3995, 20464, 11638, 3443, 8202, 3995, 20464, 11638, 1006, 12256, 3995, 20464, 11638, 21678, 8613, 10906, 1007, 1063, 16109, 11157, 6442, 1027, 2131, 6633, 8270, 5732, 6442, 1006, 1007, 1025, 2065, 1006, 11157, 6442, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java
ParameterTool.get
public String get(String key) { addToDefaults(key, null); unrequestedParameters.remove(key); return data.get(key); }
java
public String get(String key) { addToDefaults(key, null); unrequestedParameters.remove(key); return data.get(key); }
[ "public", "String", "get", "(", "String", "key", ")", "{", "addToDefaults", "(", "key", ",", "null", ")", ";", "unrequestedParameters", ".", "remove", "(", "key", ")", ";", "return", "data", ".", "get", "(", "key", ")", ";", "}" ]
Returns the String value for the given key. If the key does not exist it will return null.
[ "Returns", "the", "String", "value", "for", "the", "given", "key", ".", "If", "the", "key", "does", "not", "exist", "it", "will", "return", "null", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L237-L241
train
Get the value for the specified key.
[ 30522, 2270, 5164, 2131, 1006, 5164, 3145, 1007, 1063, 5587, 3406, 3207, 7011, 11314, 2015, 1006, 3145, 1010, 19701, 1007, 1025, 4895, 2890, 15500, 2098, 28689, 22828, 2015, 1012, 6366, 1006, 3145, 1007, 1025, 2709, 2951, 1012, 2131, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...