text
large_stringlengths
384
2.05k
rank_avg
float64
1
4.19k
rank_max
float64
1
8.21k
rank_min
float64
1
5.03k
rank_median
float64
1
4.21k
rank_by_avgsim
float64
1
4.19k
avgsim_to_github
float32
0.77
0.85
dataset
large_stringclasses
1 value
: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_text: Give your terrain texture a name! m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontSharedMa...
null
null
null
null
null
null
github_plus_top10pct_by_avg
paceCount: 5 wordCount: 6 linkCount: 0 lineCount: 1 pageCount: 1 materialCount: 1 m_isUsingLegacyAnimationComponent: 0 m_isVolumetricText: 0 m_spriteAnimator: {fileID: 0} m_hasFontAssetChanged: 0 m_subTextObjects: - {fileID: 0} - {fileID: 0} - {fileID: 0} - {fileID: 0} - {fileID:...
null
null
null
null
null
null
github_plus_top10pct_by_avg
e: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - target: {fileID: 3321157068342330910, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - target: {fileID: 332115706834...
null
null
null
null
null
null
github_plus_top10pct_by_avg
guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} - target: {fileID: 3321157068342330910, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_AnchorMin.x value: 0 objectReference: {fileI...
null
null
null
null
null
null
github_plus_top10pct_by_avg
uid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_textInfo.characterCount value: 2 objectReference: {fileID: 0} - target: {fileID: 8042467681023276156, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_textInfo.spaceCount value: 0 obje...
null
null
null
null
null
null
github_plus_top10pct_by_avg
- target: {fileID: 2925752997128898584, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_Color.g value: 0.31764707 objectReference: {fileID: 0} - target: {fileID: 2925752997128898584, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_Color....
null
null
null
null
null
null
github_plus_top10pct_by_avg
olor.g value: 0.31764707 objectReference: {fileID: 0} - target: {fileID: 1479800314232047194, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_Color.b value: 0.30980393 objectReference: {fileID: 0} - target: {fileID: 3321157068342330910, guid: 598805c720ef32...
null
null
null
null
null
null
github_plus_top10pct_by_avg
type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - target: {fileID: 3321157068342330910, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - target: {...
null
null
null
null
null
null
github_plus_top10pct_by_avg
5e313276529cd3, type: 3} propertyPath: m_Pivot.y value: 1 objectReference: {fileID: 0} - target: {fileID: 1208266180855391641, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_PreferredHeight value: 40 objectReference: {fileID: 0} - target: {fi...
null
null
null
null
null
null
github_plus_top10pct_by_avg
eID: 8042467681023276156, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_enableAutoSizing value: 1 objectReference: {fileID: 0} - target: {fileID: 8042467681023276156, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} propertyPath: m_firstOverflowCharacterInd...
null
null
null
null
null
null
github_plus_top10pct_by_avg
04802973023471 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 83952138638415813, guid: 598805c720ef32d4fa5e313276529cd3, type: 3} m_PrefabInstance: {fileID: 2545334527945517866} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 139...
null
null
null
null
null
null
github_plus_top10pct_by_avg
value: -0 objectReference: {fileID: 0} - target: {fileID: 6660609766976541539, guid: b367a7dbfda1ae249843776e21232d4b, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - target: {fileID: 6660609766976541539, guid: b367a7dbfda1ae249843776e21232d...
null
null
null
null
null
null
github_plus_top10pct_by_avg
type: 3} propertyPath: m_SizeDelta.y value: 30 objectReference: {fileID: 0} - target: {fileID: 6660609766976541539, guid: b367a7dbfda1ae249843776e21232d4b, type: 3} propertyPath: m_AnchorMin.x value: 0 objectReference: {fileID: 0} - target: {fileID: 666060976697...
null
null
null
null
null
null
github_plus_top10pct_by_avg
ype: 3} propertyPath: m_FlexibleHeight value: -1 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: b367a7dbfda1ae249843776e21232d4b, type: 3} --- !u!224 &7335350715391774470 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 6660609766976...
null
null
null
null
null
null
github_plus_top10pct_by_avg
: 000f1a7818c5dd848a195cf888e421d2, type: 3} propertyPath: m_sharedMaterial value: objectReference: {fileID: 0} - target: {fileID: 5321015225614398905, guid: 000f1a7818c5dd848a195cf888e421d2, type: 3} propertyPath: m_padding value: 0 objectReference: {fileID: 0} ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
000f1a7818c5dd848a195cf888e421d2, type: 3} propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} - target: {fileID: 1771892582066047809, guid: 000f1a7818c5dd848a195cf888e421d2, type: 3} propertyPath: m_AnchoredPosition.x value: 0 objectReference: {fil...
null
null
null
null
null
null
github_plus_top10pct_by_avg
439675, guid: 000f1a7818c5dd848a195cf888e421d2, type: 3} propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} - target: {fileID: 1771892581888439674, guid: 000f1a7818c5dd848a195cf888e421d2, type: 3} propertyPath: m_text value: Name objectReference: {f...
null
null
null
null
null
null
github_plus_top10pct_by_avg
rom Locutus for porting TODO: implement adding automatically (if it's possible) Array ( [code] => var $string = "\t\t\t\nThis is\tan example\nstring\n" var $tok = strtok($string, " \n\t") var $b = '' while ($tok !== false) {$b += "Word="+$tok+"\n"; $tok = strtok(" \n\t");} var $result = $b [returns] => "Word=T...
null
null
null
null
null
null
github_plus_top10pct_by_avg
tations() .size()); } @Ignore public static class IgnoredClass { @Test public void a() { } } @Test public void annotationsExistOnDescriptionsOfIgnoredClass() { assertTrue((describe(IgnoredClass.class).getAnnotation(Ignore.class) != null)); } @Retention(RetentionPolicy.RUNTIME) public @interface ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
ort jakarta.decorator.Delegate; import jakarta.inject.Inject; import org.jboss.weld.test.util.ActionSequence; /** * * @author Martin Kouba */ @Decorator public class BravoServiceDecorator implements BravoService { @Inject @Delegate private BravoService delegate; @Override public void run(Set...
null
null
null
null
null
null
github_plus_top10pct_by_avg
/ <summary> /// An add-in. /// </summary> public class Addin { AddinInfo addin; string sourceFile; WeakReference desc; AddinDatabase database; bool? isLatestVersion; bool? isUserAddin; string id; string domain; internal Addin (AddinDatabase database, string domain, string id) { this.databa...
null
null
null
null
null
null
github_plus_top10pct_by_avg
represents the current <see cref="Mono.Addins.Addin"/>. /// </summary> /// <returns> /// A <see cref="System.String"/> that represents the current <see cref="Mono.Addins.Addin"/>. /// </returns> public override string ToString () { return Id; } internal AddinInfo AddinInfo { get { if (addi...
null
null
null
null
null
null
github_plus_top10pct_by_avg
alled in the user's personal folder /// </summary> public bool IsUserAddin { get { if (isUserAddin == null) SetIsUserAddin (Description); return isUserAddin.Value; } } void SetIsUserAddin (AddinDescription adesc) { string installPath = database.Registry.DefaultAddinsFolder; if (ins...
null
null
null
null
null
null
github_plus_top10pct_by_avg
desc = new WeakReference (m); return m; } } internal void ResetCachedData () { // The domain may have changed (?!) // This check has been commented out because GetFolderDomain will fail if sourceFile changed // or if there is no folder info for the add-in (it may happen when using pre-generated...
null
null
null
null
null
null
github_plus_top10pct_by_avg
(2); else if (ns != null && ns.Length > 0) res = ns + "." + id; else res = id; if (version != null && version.Length > 0) return res + "," + version; else return res; } /// <summary> /// Given a full add-in identifier, returns the namespace and name of the add-in (it removes the v...
null
null
null
null
null
null
github_plus_top10pct_by_avg
XPMatchers+beLessThan.h" #import "EXPMatchers+beLessThanOrEqualTo.h" #import "EXPMatchers+beInTheRangeOf.h" #import "EXPMatchers+beCloseTo.h" #import "EXPMatchers+raise.h" #import "EXPMatchers+raiseWithReason.h" #import "EXPMatchers+respondTo.h" #import "EXPMatchers+notify.h" #import "EXPMatchers+beginWith.h" #import "...
null
null
null
null
null
null
github_plus_top10pct_by_avg
onfirm_url[128]; lwsgw_hash admin_password_sha1; sqlite3 *pdb; int timeout_idle_secs; int timeout_absolute_secs; int timeout_anon_absolute_secs; int timeout_email_secs; time_t last_session_expire; char email_inited; }; struct per_session_data__gs { struct lws_spa *spa; lwsgw_hash login_session; lwsgw_hash d...
null
null
null
null
null
null
github_plus_top10pct_by_avg
a__gs *pss); int lwsgs_handler_check(struct per_vhost_data__gs *vhd, struct lws *wsi, struct per_session_data__gs *pss); int lwsgs_handler_change_password(struct per_vhost_data__gs *vhd, struct lws *wsi, struct per_session_data__gs *pss); int lwsgs_handler_forgot_pw_form(struct per_vhost_data__gs *vhd,...
null
null
null
null
null
null
github_plus_top10pct_by_avg
mp_back"}, "context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }] }, { "keys": ["ctrl+.", "ctrl+i"], "command": "gs_palette", "args": {"palette": "jump_to_imports"}, "context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }] }, { "keys": ["ctrl+.", "ctrl+b"]...
null
null
null
null
null
null
github_plus_top10pct_by_avg
ys": ["ctrl+9"], "command": "gs9o_win_open" }, { "keys": ["ctrl+.","ctrl+9"], "command": "gs9o_win_open" }, { "keys": ["ctrl+.","ctrl+0"], "command": "margo_show_hud" }, { "keys": ["ctrl+space"], "command": "auto_complete", "args": {"disable_auto_insert": true, "api_completions_only": true, "next_...
null
null
null
null
null
null
github_plus_top10pct_by_avg
(err) } data, err := json.Marshal(src) if err != nil { t.Fatalf("marshaling to JSON failed: %v", err) } got := string(data) expected := `{"name":{"text":"n","term":{"field":"suggest"}}}` if got != expected { t.Errorf("expected\n%s\n,got:\n%s", expected, got) } } func TestTermSuggesterWithPrefixLengthSource...
null
null
null
null
null
null
github_plus_top10pct_by_avg
��、提供了 v-on 等一系列新的指令或者 API 特性,并且修复了老版本中存在的错误;更多详细内容可参考原文,或者阅读 [ Vue.js 2.4.0 中的 4 个重大变化](https://parg.co/b17)一文。 - [npm 5.2.0 内置 npx 包执行器](https://parg.co/bIw):近日发布的 npm 5.2.0 版本中内置了伴生命令:npx,类似于 npm 简化了项目开发中的依赖安装与管理,该工具致力于提升开发者使用包提供的命令行的体验。npx 允许我们使用本地安装的命令行工具而不需要再定义 npm run-script,并且允许我们仅执行一次脚本而不需要再将其实际安装到本地;同时 npx 还...
null
null
null
null
null
null
github_plus_top10pct_by_avg
��而是希望以简明扼要的语义引导读者构建 PWA 应用。本文依次介绍了如何测试自身应用的 PWA 评分、构建图标与说明、添加 Service Worker、发布到 Github Pages 等;更多 PWA 相关资料参考 [ https://parg.co/bVh  ](https://parg.co/bVh)。 - [GraphQL 全栈教程](https://github.com/howtographql/howtographql):HowToGraphQL 是介绍 GraphQL 的全栈教程,由 Graphcool 以及很多其他优秀的贡献者协作而成。该教程首先是对于 GraphQL 设计理念、基础概念以及先进特性的介绍,然后...
null
null
null
null
null
null
github_plus_top10pct_by_avg
�文即介绍如何利用 Babylon.js 创建跨平台地 WebVR 应用。本文首先介绍了可供开发者使用的 VR 设备与扩展,然后介绍如何搭建基础的开发环境、如何开发 WebVR 的基本帧动画、如何响应用户交互并且添加第三方控制器等内容。 ## 工程实践 `立足实践,提示实际水平` - [用强类型语言 GraphQL 增强 React](https://parg.co/b1X):GraphQL、React 这两项技术都来自 Facebook,它们共同成长。在本文中,Shane Stillwell 展示了 GraphQL 作为一种强类型的基于 JavaScript 的语言,如何帮助开发者与他们的数据建立联系并改善跨服务边界的封送处...
null
null
null
null
null
null
github_plus_top10pct_by_avg
��样式类名分割与作用域隔离来大幅度减少 CSS 打包文件体积的实践技巧。作者主要使用 CSS Modules,然后自定义了其样式类名生成规则来保证生成较短的样式类名并且使用作用域隔离来保证样式隔离。 - [扩展 Node.js 应用](https://parg.co/b1y):Node.js 设计的初衷之一即是保证其可扩展性,本文则详细介绍了开发者应该了解的可用于扩展 Node.js 应用的内建工具。本文首先介绍了复制、分解、分割等常用的设计思想,然后讨论了如何利用 Node.js 内置的 Cluster 模块来保证应用的可扩展性与如何提供零停机重启的特性。 ## 深度阅读 `深度思考,升华开发智慧` - [常见 Web ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
��户端渲染的入口函数 `render` 开始,然后介绍在状态变化之后一系列地响应步骤;更多相关资料参考 [ https://parg.co/bM1  ](https://parg.co/bM1)。 - [代码风格约定与标准](https://github.com/Kristories/awesome-guidelines):本仓库提供了一系列的各个语言的常用代码风格约定与标准,与 JavaScript 相关的包含了来自 Google、Airbnb 等多个公司或者社区的样式规范,还有包括 HTML、CSS、SCSS 等一系列 Web 相关的规范。 - [ES2015 中集合迭代器的优化](https://parg.co/b1w)...
null
null
null
null
null
null
github_plus_top10pct_by_avg
�面加载性能。 - [gpu.js](https://github.com/gpujs/gpu.js):在[上周的前端每周清单](https://zhuanlan.zhihu.com/p/27815800)中我们介绍过 GPGPU(General Purpose Computing on GPUs)的概念与基于 WebGL 的实现方式,而 gpu.js 就是提供了浏览器中快速实现 GPGPU 的单文件 JavaScript 库。gpu.js 能够自动地将某些特定的 JavaScript 函数编译为中间语言,然后利用 WebGLS API 使其运行在 GPU 中;而在某些无法使用 GPU 的环境下,仍然会将这些函数以正常的 Java...
null
null
null
null
null
null
github_plus_top10pct_by_avg
0", "Categorization", CellLabel->"URI"] }, Open ]], Cell[CellGroupData[{ Cell["Keywords", "KeywordsSection", CellID->477174294], Cell["XXXX", "Keywords", CellID->1164421360] }, Closed]], Cell[CellGroupData[{ Cell["Syntax Templates", "TemplatesSection", CellID->1872225408], Cell[BoxData[""], "Template", Cell...
null
null
null
null
null
null
github_plus_top10pct_by_avg
->356334892], Cell[BoxData[ FormBox[ RowBox[{"{", RowBox[{"BReduce", "\[Rule]", "True"}], "}"}], TraditionalForm]], "Output", CellTags->"B00", CellLabel->"Out[1]=", CellID->729895507] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Tutorials", "TutorialsSection", CellID->250839057], Cell["XXXX", "T...
null
null
null
null
null
null
github_plus_top10pct_by_avg
["m", "2"], "-", RowBox[{"2", " ", "m", " ", "M"}], "+", SuperscriptBox["M", "2"], "-", FormBox[ SuperscriptBox[ FormBox[ FormBox["p", TraditionalForm], TraditionalForm], "2"], TraditionalForm]}], ")"}], " ", RowBox[{"(", RowBo...
null
null
null
null
null
null
github_plus_top10pct_by_avg
ox[ FormBox[ FormBox["p", TraditionalForm], TraditionalForm], "2"], TraditionalForm]}]], "-", FractionBox[ RowBox[{ FormBox[ TagBox[ FormBox[ RowBox[{ SubscriptBox["\<\"A\"\>", "\<\"0\"\>"], "(", SuperscriptBox["m", "2"], ")"}], ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
SuperscriptBox["m", "2"]}], ")"}], TraditionalForm], HoldForm], TraditionalForm]}], RowBox[{"4", " ", RowBox[{"(", RowBox[{"1", "-", "D"}], ")"}]}]]}], "-", FractionBox[ FormBox[ TagBox[ FormBox[ RowBox[{ SubscriptBox["\<\"A\"\>", "...
null
null
null
null
null
null
github_plus_top10pct_by_avg
], TraditionalForm]}], RowBox[{"1", "-", "D"}]]}], "-", FractionBox[ FormBox[ TagBox[ FormBox[ RowBox[{ SubscriptBox["\<\"A\"\>", "\<\"0\"\>"], "(", SuperscriptBox["m", "2"], ")"}], TraditionalForm], HoldForm], TraditionalForm], RowBox[{"2",...
null
null
null
null
null
null
github_plus_top10pct_by_avg
l]], "ExampleSection", CellID->1020263627], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["Options", "ExampleSection"], $Line = 0; Null]], "ExampleSection", CellID->2061341341], Cell[BoxData[ InterpretationBox[Cell["XXXX", "ExampleSubsection"], $Line = 0; Null]], "ExampleSubsection", CellID->175...
null
null
null
null
null
null
github_plus_top10pct_by_avg
.h> #include <linux/string.h> #include <linux/namei.h> #include <linux/module.h> #include <linux/uaccess.h> #include <linux/coda.h> #include "coda_psdev.h" #include "coda_linux.h" /* pioctl ops */ static int coda_ioctl_permission(struct inode *inode, int mask); static long coda_pioctl(struct file *filp, unsigned int ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
PHPUnit\Framework\TestCase { /** * @dataProvider propertiesDataProvider * * @param string $property * @param mixed $value */ public function testSettersAndGetters($property, $value) { $restriction = new WorkflowRestriction(); $accessor = PropertyAccess::createProper...
null
null
null
null
null
null
github_plus_top10pct_by_avg
*************************************************************************** * Copyright (c) 2012 VMware, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
se version 2 only, as published by the Free Software Foundation. * However, the following notice accompanied the original version of this * file: * * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at * http://creativecommons.org/publi...
null
null
null
null
null
null
github_plus_top10pct_by_avg
private Executors() { } /*▼ 【工作池】 ████████████████████████████████████████████████████████████████████████████████┓ */ /** * Creates a work-stealing thread pool using the number of * {@linkplain Runtime#availableProcessors available processors} * as its target parallel...
null
null
null
null
null
null
github_plus_top10pct_by_avg
��█████████████████████┛ */ /*▼ 【任务执行框架代理】 ████████████████████████████████████████████████████████████████████████████████┓ */ /** * Returns an object that delegates all defined {@link * ExecutorService} methods to the given executor, but not any * other methods that might ot...
null
null
null
null
null
null
github_plus_top10pct_by_avg
execute} will reuse previously constructed * threads if available. If no existing thread is available, a new * thread will be created and added to the pool. Threads that have * not been used for sixty seconds are terminated and removed from * the cache. Thus, a pool that remains idle for long enoug...
null
null
null
null
null
null
github_plus_top10pct_by_avg
��大阙值】: 无限 */ public static ExecutorService newCachedThreadPool(ThreadFactory threadFactory) { return new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), threadFactory); } /** * Creates a thread pool that reuses a fixed number of ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
new one will take its place if * needed to execute subsequent tasks. The threads in the pool will * exist until it is explicitly {@link ExecutorService#shutdown * shutdown}. * * @param nThreads the number of threads in the pool * @param threadFactory the factory to use when creating...
null
null
null
null
null
null
github_plus_top10pct_by_avg
of threads to keep in the pool, * even if they are idle * @param threadFactory the factory to use when the executor * creates a new thread * * @return the newly created scheduled thread pool * * @throws IllegalArgumentException if {@code core...
null
null
null
null
null
null
github_plus_top10pct_by_avg
olExecutor(1)); } /** * Creates a single-threaded executor that can schedule commands * to run after a given delay, or to execute periodically. (Note * however that if this single thread terminates due to a failure * during execution prior to shutdown, a new one will take its * pl...
null
null
null
null
null
null
github_plus_top10pct_by_avg
�,只是对指定的【定时任务执行框架】的简单代理 */ public static ScheduledExecutorService unconfigurableScheduledExecutorService(ScheduledExecutorService executor) { if(executor == null) { throw new NullPointerException(); } return new DelegatedScheduledExecutorService(executor); } ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
rows NullPointerException if threadFactory is null */ /* *【Finalizable线程池】,允许自行指定线程工厂 * * 顺序执行普通任务,线程池中最多只有一个线程。 * * 配置: * - 阻塞队列 : LinkedBlockingQueue * -【核心阙值】: 1 * -【最大阙值】: 1 */ public static ExecutorService newSingleThreadExecutor(ThreadFactory threadFacto...
null
null
null
null
null
null
github_plus_top10pct_by_avg
the type of the result * * @return a callable object * * @throws NullPointerException if task null */ // 包装Runnable任务,有返回值 public static <T> Callable<T> callable(Runnable task, T result) { if(task == null) { throw new NullPointerException(); } ret...
null
null
null
null
null
null
github_plus_top10pct_by_avg
lying task * @param <T> the type of the callable's result * * @return a callable object * * @throws NullPointerException if callable null * @throws AccessControlException if the current access control * context does not have permission to both set...
null
null
null
null
null
null
github_plus_top10pct_by_avg
Exception { return action.run(); } }; } /*▲ 任务对象 ████████████████████████████████████████████████████████████████████████████████┛ */ /*▼ 线程工厂 ████████████████████████████████████████████████████████████████████████████████┓ */ /** * Ret...
null
null
null
null
null
null
github_plus_top10pct_by_avg
e the same as the thread invoking this * {@code privilegedThreadFactory} method. A new * {@code privilegedThreadFactory} can be created within an * {@link AccessController#doPrivileged AccessController.doPrivileged} * action setting the current thread's access control context to * create threa...
null
null
null
null
null
null
github_plus_top10pct_by_avg
*/ /** * A wrapper class that exposes only the ExecutorService methods of an ExecutorService implementation. */ // 【任务执行框架代理】,限制只能执行ExecutorService接口内的方法 private static class DelegatedExecutorService implements ExecutorService { private final ExecutorService e; De...
null
null
null
null
null
null
github_plus_top10pct_by_avg
submit(Runnable task, T result) { try { return e.submit(task, result); } finally { reachabilityFence(this); } } public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException { ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
blic ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { return e.schedule(command, delay, unit); } public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { return e.schedule(callable, delay, unit); } ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
final AccessControlContext acc; PrivilegedCallable(Callable<T> task) { this.task = task; this.acc = AccessController.getContext(); } public T call() throws Exception { try { return AccessController.doPrivileged(new Pri...
null
null
null
null
null
null
github_plus_top10pct_by_avg
public T call() throws Exception { try { return AccessController.doPrivileged(new PrivilegedExceptionAction<T>() { public T run() throws Exception { Thread t = Thread.currentThread(); ClassLoader cl = t.getContex...
null
null
null
null
null
null
github_plus_top10pct_by_avg
Priority() != Thread.NORM_PRIORITY) { t.setPriority(Thread.NORM_PRIORITY); } return t; } } /** * Thread factory capturing access control context and class loader. */ // 特权线程工厂 private static class PrivilegedThreadFactory extends...
null
null
null
null
null
null
github_plus_top10pct_by_avg
HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICE...
null
null
null
null
null
null
github_plus_top10pct_by_avg
(26), * -- renewable-ok(27), * -- enc-tkt-in-skey(28), * -- renew(30), * -- validate(31) * * KerberosFlags ::= BIT STRING (SIZE (32..MAX)) * -- minimum number of bits shall be sent, * -- but no fewer than 32 * * </xmp> * * <p> * This definitio...
null
null
null
null
null
null
github_plus_top10pct_by_avg
e address(es) of * the host from which the resulting ticket is to be valid should be included * in the addresses field of the request. * <li>FORWARDED, PROXY, ENC_TKT_IN_SKEY, RENEW, VALIDATE are used only in * subsequent requests. * </ol><p> */ public class KDCOptions extends KerberosFlags { private static...
null
null
null
null
null
null
github_plus_top10pct_by_avg
IN_SKEY", //28; null, "RENEW", //30; "VALIDATE", //31; }; private boolean DEBUG = Krb5.DEBUG; public static KDCOptions with(int... flags) { KDCOptions options = new KDCOptions(); for (int flag: flags) { options.set(flag, true); ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
sn1Exception if an error occurs while decoding an ASN1 encoded data. * @exception IOException if an I/O error occurs while reading encoded data. * */ public static KDCOptions parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException { if ((optional) && ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
return sb.toString(); } private void setDefault() { try { Config config = Config.getInstance(); // If key not present, returns Integer.MIN_VALUE, which is // almost all zero. int options = config.getIntValue("libdefaults", ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
missions and * limitations under the License. */ #include "src/binary-reader-opcnt.h" #include <cassert> #include <cinttypes> #include <cstdarg> #include <cstdint> #include <cstdio> #include "src/binary-reader-nop.h" #include "src/common.h" #include "src/literal.h" #include "src/stream.h" namespace wabt { Opcode...
null
null
null
null
null
null
github_plus_top10pct_by_avg
tream.Writef(" %" PRIu64 " (0x%" PRIx64 ")", *GetData<uint64_t>(), *GetData<uint64_t>()); break; case Kind::Index: stream.Writef(" %" PRIindex, *GetData<Index>()); break; case Kind::Float32: { stream.Writef(" %g", *GetData<float>()); char buffer[WABT_MAX_FLOAT...
null
null
null
null
null
null
github_plus_top10pct_by_avg
operator>(const OpcodeInfo& lhs, const OpcodeInfo& rhs) { return !(lhs <= rhs); } bool operator>=(const OpcodeInfo& lhs, const OpcodeInfo& rhs) { return !(lhs < rhs); } namespace { class BinaryReaderOpcnt : public BinaryReaderNop { public: explicit BinaryReaderOpcnt(OpcodeInfoCounts* counts); Result OnOpco...
null
null
null
null
null
null
github_plus_top10pct_by_avg
uint32_t value1) { uint32_t array[2] = {value0, value1}; return Emplace(current_opcode_, OpcodeInfo::Kind::Uint32Uint32, array, 2); } Result BinaryReaderOpcnt::OnOpcodeUint64(uint64_t value) { return Emplace(current_opcode_, OpcodeInfo::Kind::Uint64, &value); } Result BinaryReaderOpcnt::OnOpc...
null
null
null
null
null
null
github_plus_top10pct_by_avg
s. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * As a special exception, the copyright holders give permission to link the * code of portions of this program with the OpenSSL library under certai...
null
null
null
null
null
null
github_plus_top10pct_by_avg
EQUALS(false, hbResponse.isStateDisagreement()); ASSERT_EQUALS("", hbResponse.getReplicaSetName()); ASSERT_EQUALS("", hbResponse.getHbMsg()); ASSERT_EQUALS(HostAndPort(), hbResponse.getSyncingTo()); ASSERT_EQUALS(-1, hbResponse.getConfigVersion()); BSONObj hbResponseObj = hbResponse.toBSON(false); ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
ASSERT_EQUALS(false, hbResponse.hasTime()); ASSERT_EQUALS(false, hbResponse.hasDurableOpTime()); ASSERT_EQUALS(false, hbResponse.hasAppliedOpTime()); ASSERT_EQUALS(false, hbResponse.hasConfig()); ASSERT_EQUALS(false, hbResponse.isMismatched()); ASSERT_EQUALS(false, hbResponse.isReplSet()); A...
null
null
null
null
null
null
github_plus_top10pct_by_avg
T_EQUALS(fieldsSet, hbResponseObj.nFields()); ASSERT_EQUALS("rs0", hbResponseObj["set"].String()); ASSERT_EQUALS("", hbResponseObj["hbmsg"].String()); ASSERT_EQUALS(1, hbResponseObj["v"].Number()); ASSERT_EQUALS(Timestamp(10, 0), hbResponseObj["electionTime"].timestamp()); initializeResult = hbResp...
null
null
null
null
null
null
github_plus_top10pct_by_avg
atus::OK(), initializeResult); ASSERT_EQUALS(hbResponseObj.toString(), hbResponseObjRoundTripChecker.toBSON(false).toString()); // set appliedOpTime hbResponse.setAppliedOpTime(OpTime(Timestamp(50), 0)); ++fieldsSet; ASSERT_EQUALS(false, hbResponse.hasState()); ASSERT_EQUALS(true, hbResponse.ha...
null
null
null
null
null
null
github_plus_top10pct_by_avg
hbResponse.hasState()); ASSERT_EQUALS(true, hbResponse.hasElectionTime()); ASSERT_EQUALS(false, hbResponse.hasIsElectable()); ASSERT_EQUALS(true, hbResponse.hasTime()); ASSERT_EQUALS(true, hbResponse.hasDurableOpTime()); ASSERT_EQUALS(true, hbResponse.hasAppliedOpTime()); ASSERT_EQUALS(false, hb...
null
null
null
null
null
null
github_plus_top10pct_by_avg
EQUALS(true, hbResponse.hasTime()); ASSERT_EQUALS(true, hbResponse.hasDurableOpTime()); ASSERT_EQUALS(true, hbResponse.hasAppliedOpTime()); ASSERT_EQUALS(false, hbResponse.hasConfig()); ASSERT_EQUALS(false, hbResponse.isMismatched()); ASSERT_EQUALS(false, hbResponse.isReplSet()); ASSERT_EQUALS(f...
null
null
null
null
null
null
github_plus_top10pct_by_avg
Response.hasTime()); ASSERT_EQUALS(true, hbResponse.hasDurableOpTime()); ASSERT_EQUALS(true, hbResponse.hasAppliedOpTime()); ASSERT_EQUALS(true, hbResponse.hasConfig()); ASSERT_EQUALS(false, hbResponse.isMismatched()); ASSERT_EQUALS(false, hbResponse.isReplSet()); ASSERT_EQUALS(false, hbResponse...
null
null
null
null
null
null
github_plus_top10pct_by_avg
S(true, hbResponse.hasState()); ASSERT_EQUALS(true, hbResponse.hasElectionTime()); ASSERT_EQUALS(true, hbResponse.hasIsElectable()); ASSERT_EQUALS(true, hbResponse.hasTime()); ASSERT_EQUALS(true, hbResponse.hasDurableOpTime()); ASSERT_EQUALS(true, hbResponse.hasAppliedOpTime()); ASSERT_EQUALS(tr...
null
null
null
null
null
null
github_plus_top10pct_by_avg
initializeResult = hbResponseObjRoundTripChecker.initialize(hbResponseObj, 0); ASSERT_EQUALS(Status::OK(), initializeResult); ASSERT_EQUALS(hbResponseObj.toString(), hbResponseObjRoundTripChecker.toBSON(false).toString()); // set stateDisagreement hbResponse.noteStateDisagreement(); ++fieldsSet; ...
null
null
null
null
null
null
github_plus_top10pct_by_avg
estamp(0, 10), hbResponseObj["durableOpTime"]["ts"].timestamp()); ASSERT_EQUALS(10, hbResponseObj["time"].numberLong()); ASSERT_EQUALS(true, hbResponseObj["e"].trueValue()); ASSERT_EQUALS(config.toBSON().toString(), hbResponseObj["config"].Obj().toString()); ASSERT_EQUALS(2, hbResponseObj["state"].numbe...
null
null
null
null
null
null
github_plus_top10pct_by_avg
tring()); hbResponseObj = hbResponse.toBSON(false); ASSERT_EQUALS(fieldsSet, hbResponseObj.nFields()); ASSERT_EQUALS("rs0", hbResponseObj["set"].String()); ASSERT_EQUALS("", hbResponseObj["hbmsg"].String()); ASSERT_EQUALS(1, hbResponseObj["v"].Number()); ASSERT_EQUALS(Timestamp(10, 0), hbRespon...
null
null
null
null
null
null
github_plus_top10pct_by_avg
etHbMsg()); ASSERT_EQUALS(HostAndPort("syncTarget"), hbResponse.getSyncingTo()); ASSERT_EQUALS(1, hbResponse.getConfigVersion()); ASSERT_EQUALS(Timestamp(10, 0), hbResponse.getElectionTime()); ASSERT_EQUALS(OpTime(Timestamp(0, 10), 0), hbResponse.getDurableOpTime()); ASSERT_EQUALS(OpTime(Timestamp(0...
null
null
null
null
null
null
github_plus_top10pct_by_avg
ASSERT_EQUALS(true, hbResponse.hasTime()); ASSERT_EQUALS(true, hbResponse.hasDurableOpTime()); ASSERT_EQUALS(true, hbResponse.hasAppliedOpTime()); ASSERT_EQUALS(true, hbResponse.hasConfig()); ASSERT_EQUALS(false, hbResponse.isMismatched()); ASSERT_EQUALS(true, hbResponse.isReplSet()); ASSER...
null
null
null
null
null
null
github_plus_top10pct_by_avg
t"].trueValue()); ASSERT_EQUALS(true, hbResponseObj["rs"].trueValue()); ASSERT_EQUALS("syncTarget:27017", hbResponseObj["syncingTo"].String()); initializeResult = hbResponseObjRoundTripChecker.initialize(hbResponseObj, 0); ASSERT_EQUALS(Status::OK(), initializeResult); ASSERT_EQUALS(hbResponseObj.t...
null
null
null
null
null
null
github_plus_top10pct_by_avg
itializeResult = hbResponseObjRoundTripChecker.initialize(hbResponseObj, 0); ASSERT_NOT_EQUALS(Status::OK(), initializeResult); ASSERT_EQUALS(ErrorCodes::InconsistentReplicaSetNames, initializeResult.code()); } TEST(ReplSetHeartbeatResponse, InitializeWrongElectionTimeType) { ReplSetHeartbeatResponse hbRes...
null
null
null
null
null
null
github_plus_top10pct_by_avg
ult2.reason()); } TEST(ReplSetHeartbeatResponse, InitializeWrongAppliedOpTimeType) { ReplSetHeartbeatResponse hbResponse; BSONObj initializerObj = BSON("ok" << 1.0 << "opTime" << "hello"); Status result = hbResponse.initialize(initializerObj, 0); ASSERT_EQUALS(Err...
null
null
null
null
null
null
github_plus_top10pct_by_avg
sionWrongType) { ReplSetHeartbeatResponse hbResponse; BSONObj initializerObj = BSON("ok" << 1.0 << "v" << "hello"); Status result = hbResponse.initialize(initializerObj, 0); ASSERT_EQUALS(ErrorCodes::TypeMismatch, result); ASSERT_EQUALS( "Expected \"v\"...
null
null
null
null
null
null
github_plus_top10pct_by_avg
nt", result.reason()); } TEST(ReplSetHeartbeatResponse, InitializeConfigWrongType) { ReplSetHeartbeatResponse hbResponse; BSONObj initializerObj = BSON("ok" << 1.0 << "v" << 2 << // needs a version to get this far in initialize() "config" << 4); Status result...
null
null
null
null
null
null
github_plus_top10pct_by_avg
TEST(ReplSetHeartbeatResponse, InitializeBothOpTimeTypesSameResult) { ReplSetHeartbeatResponse hbResponseDate; ReplSetHeartbeatResponse hbResponseTimestamp; BSONObjBuilder initializerDate; BSONObjBuilder initializerTimestamp; Date_t opTime = Date_t::fromMillisSinceEpoch(974132); initializerDate...
null
null
null
null
null
null
github_plus_top10pct_by_avg
tbeatResponse, AuthFailure) { ReplSetHeartbeatResponse hbResp; std::string errMsg = "Unauthorized"; Status result = hbResp.initialize( BSON("ok" << 0.0 << "errmsg" << errMsg << "code" << ErrorCodes::Unauthorized), 0); ASSERT_EQUALS(ErrorCodes::Unauthorized, result.code()); ASSERT_EQUALS(errM...
null
null
null
null
null
null
github_plus_top10pct_by_avg
case "quot": entityValue = '\"'; break; case "apos": entityValue = '\''; break; default: if( entityName[0] is 'x' ){ if( semi < 2 ) error(); if( semi > 9 ) error(); foreach( hex; entityName[1.....
null
null
null
null
null
null
github_plus_top10pct_by_avg
ase '<': case '>': case '&': case '\"': case '\'': case '\r': case '\n': case '\u0009': return true; default: return c > 0x7F; } } // Check if processing is needed foreach...
null
null
null
null
null
null
github_plus_top10pct_by_avg