id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
5,000 | all-5001 | [
"StartTime",
"implements",
"the",
"Storage",
"interface",
"."
] | [
"func",
"(",
"a",
"adapter",
")",
"StartTime",
"(",
")",
"(",
"int64",
",",
"error",
")",
"{",
"var",
"startTime",
"int64",
"\n\n",
"if",
"len",
"(",
"a",
".",
"db",
".",
"Blocks",
"(",
")",
")",
">",
"0",
"{",
"startTime",
"=",
"a",
".",
"<mas... |
5,001 | all-5002 | [
"succContext",
"returns",
"a",
"context",
"given",
"a",
"state",
".",
"succ",
"index"
] | [
"func",
"(",
"a",
"*",
"subAllocator",
")",
"succContext",
"(",
"i",
"int32",
")",
"*",
"<mask>",
"{",
"if",
"i",
"<=",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"&",
"context",
"{",
"i",
":",
"i",
",",
"s",
":",
"a",
".",
"states",... |
5,002 | all-5003 | [
"GetEthTransactions",
"returns",
"transactions",
"by",
"related",
"object",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"GetEthTransactions",
"(",
"tkn",
",",
"relType",
",",
"relID",
"string",
",",
"offset",
",",
"limit",
"uint",
")",
"(",
"*",
"GetEthTransactionsResult",
",",
"error",
")",
"{",
"logger",
":=",
"h",
".",
"logger",
... |
5,003 | all-5004 | [
"NewGitHubDeferredChangedFilesProvider",
"uses",
"a",
"closure",
"to",
"lazily",
"retrieve",
"the",
"file",
"changes",
"only",
"if",
"they",
"are",
"needed",
".",
"We",
"only",
"have",
"to",
"fetch",
"the",
"changes",
"if",
"there",
"is",
"at",
"least",
"one",... | [
"func",
"NewGitHubDeferredChangedFilesProvider",
"(",
"client",
"githubClient",
",",
"org",
",",
"repo",
"string",
",",
"num",
"int",
")",
"ChangedFilesProvider",
"{",
"<mask>",
"changedFiles",
"[",
"]",
"string",
"\n",
"return",
"func",
"(",
")",
"(",
"[",
"]... |
5,004 | all-5005 | [
"PathIsSelected",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_path_is_selected",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"PathIsSelected",
"(",
"<mask>",
"*",
"TreePath",
")",
"bool",
"{",
"return",
"gobool",
"(",
"C",
".",
"gtk_icon_view_path_is_selected",
"(",
"v",
".",
"native",
"(",
")",
",",
"path",
".",
"native",
"(",
")",
")... |
5,005 | all-5006 | [
"GetTokenGenerator",
"returns",
"a",
"function",
"that",
"gets",
"the",
"value",
"of",
"a",
"given",
"secret",
"."
] | [
"func",
"(",
"a",
"*",
"<mask>",
")",
"GetTokenGenerator",
"(",
"secretPath",
"string",
")",
"func",
"(",
")",
"[",
"]",
"byte",
"{",
"return",
"func",
"(",
")",
"[",
"]",
"byte",
"{",
"return",
"a",
".",
"GetSecret",
"(",
"secretPath",
")",
"\n",
... |
5,006 | all-5007 | [
"RegisterPath",
"register",
"view",
"paths"
] | [
"func",
"(",
"fs",
"*",
"AssetFileSystem",
")",
"RegisterPath",
"(",
"pth",
"string",
")",
"error",
"{",
"if",
"_",
",",
"err",
":=",
"os",
".",
"Stat",
"(",
"pth",
")",
";",
"!",
"os",
".",
"IsNotExist",
"(",
"err",
")",
"{",
"<mask>",
"existing",... |
5,007 | all-5008 | [
"AppendUnique",
"creates",
"and",
"adds",
"another",
"range",
"of",
"values",
"to",
"the",
"total",
"range",
"list",
".",
"Only",
"unique",
"values",
"from",
"the",
"given",
"range",
"are",
"appended",
"to",
"the",
"total",
"range",
"."
] | [
"func",
"(",
"l",
"*",
"InclusiveRanges",
")",
"AppendUnique",
"(",
"start",
",",
"end",
",",
"step",
"int",
")",
"{",
"if",
"step",
"==",
"0",
"{",
"return",
"\n",
"}",
"\n\n",
"subStart",
":=",
"start",
"\n",
"subEnd",
":=",
"start",
"\n",
"subStep... |
5,008 | all-5009 | [
"makeUnicastRouteStatusSlice",
"takes",
"a",
"snapshot",
"of",
"the",
"unicast",
"routes",
"in",
"routes",
"."
] | [
"func",
"makeUnicastRouteStatusSlice",
"(",
"r",
"*",
"routes",
")",
"[",
"]",
"unicastRouteStatus",
"{",
"r",
".",
"RLock",
"(",
")",
"\n",
"defer",
"r",
".",
"RUnlock",
"(",
")",
"\n\n",
"var",
"<mask>",
"[",
"]",
"unicastRouteStatus",
"\n",
"for",
"de... |
5,009 | all-5010 | [
"UpdateMetricCluster",
"updates",
"passed",
"metric",
"cluster",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"UpdateMetricCluster",
"(",
"cfg",
"*",
"MetricCluster",
")",
"(",
"*",
"MetricCluster",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n... |
5,010 | all-5011 | [
"MarshalText",
"turns",
"this",
"instance",
"into",
"text"
] | [
"func",
"(",
"id",
"*",
"ObjectId",
")",
"MarshalText",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"return",
"[",
"]",
"byte",
"(",
"bson",
".",
"ObjectId",
"(",
"*",
"<mask>",
")",
".",
"Hex",
"(",
")",
")",
",",
"nil",
"\n",
"... |
5,011 | all-5012 | [
"MustPeers",
"retrieves",
"the",
"Peers",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"MustPeers",
"(",
")",
"[",
"]",
"PeerAddress",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetPeers",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"v... |
5,012 | all-5013 | [
"ChangeActionState",
"is",
"a",
"wrapper",
"around",
"g_action_group_change_action_state"
] | [
"func",
"(",
"v",
"*",
"ActionGroup",
")",
"ChangeActionState",
"(",
"actionName",
"string",
",",
"value",
"*",
"Variant",
")",
"{",
"C",
".",
"g_action_group_change_action_state",
"(",
"v",
".",
"native",
"(",
")",
",",
"(",
"*",
"C",
".",
"gchar",
")",... |
5,013 | all-5014 | [
"WithStrictSignatureVerification",
"is",
"an",
"option",
"to",
"enable",
"or",
"disable",
"strict",
"message",
"signing",
".",
"When",
"enabled",
"(",
"which",
"is",
"the",
"default",
")",
"unsigned",
"messages",
"will",
"be",
"discarded",
"."
] | [
"func",
"WithStrictSignatureVerification",
"(",
"<mask>",
"bool",
")",
"Option",
"{",
"return",
"func",
"(",
"p",
"*",
"PubSub",
")",
"error",
"{",
"p",
".",
"signStrict",
"=",
"required",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
5,014 | all-5015 | [
"Start",
"creates",
"a",
"goroutine",
"to",
"handle",
"the",
"logging",
"IO",
"."
] | [
"func",
"(",
"al",
"*",
"LoggingHandler",
")",
"Start",
"(",
")",
"{",
"<mask>",
"func",
"(",
")",
"{",
"for",
"s",
":=",
"range",
"al",
".",
"buffer",
"{",
"fmt",
".",
"Fprint",
"(",
"al",
".",
"w",
",",
"s",
")",
"\n",
"}",
"\n",
"close",
"... |
5,015 | all-5016 | [
"HasLabel",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetAxis",
")",
"HasLabel",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
5,016 | all-5017 | [
"NewAuth",
"returns",
"an",
"auth"
] | [
"func",
"NewAuth",
"(",
"opts",
"...",
"Options",
")",
"*",
"Auth",
"{",
"o",
":=",
"<mask>",
"{",
"}",
"\n",
"if",
"len",
"(",
"opts",
")",
"!=",
"0",
"{",
"o",
"=",
"opts",
"[",
"0",
"]",
"\n",
"}",
"\n\n",
"h",
":=",
"defaultAuthErrorHandler",... |
5,017 | all-5018 | [
"ReorderChild",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_menu_reorder_child",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"ReorderChild",
"(",
"child",
"IWidget",
",",
"position",
"int",
")",
"{",
"C",
".",
"gtk_menu_reorder_child",
"(",
"v",
".",
"native",
"(",
")",
",",
"child",
".",
"toWidget",
"(",
")",
",",
"C",
".",
"gint",
... |
5,018 | all-5019 | [
"GetApmQueryOk",
"returns",
"a",
"tuple",
"with",
"the",
"ApmQuery",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"ScatterplotRequest",
")",
"GetApmQueryOk",
"(",
")",
"(",
"WidgetApmOrLogQuery",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"ApmQuery",
"==",
"nil",
"{",
"return",
"WidgetApmOrLogQuery",
"{",
"}",
",",
"false",... |
5,019 | all-5020 | [
"parseDockerContainerMetadata",
"parses",
"the",
"metadata",
"in",
"a",
"docker",
"container",
"and",
"packages",
"this",
"data",
"for",
"JSON",
"marshaling",
"Since",
"we",
"accept",
"incomplete",
"metadata",
"fields",
"we",
"should",
"not",
"return",
"errors",
"... | [
"func",
"parseDockerContainerMetadata",
"(",
"taskARN",
"string",
",",
"containerName",
"string",
",",
"dockerContainer",
"*",
"types",
".",
"ContainerJSON",
")",
"DockerContainerMetadata",
"{",
"if",
"dockerContainer",
"==",
"nil",
"{",
"seelog",
".",
"Warnf",
"(",... |
5,020 | all-5021 | [
"GetQuery",
"returns",
"the",
"Query",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"l",
"*",
"LogStreamDefinition",
")",
"GetQuery",
"(",
")",
"string",
"{",
"if",
"l",
"==",
"nil",
"||",
"l",
".",
"Query",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"l",
".",
"<mask>",
"\n",
"}"
] |
5,021 | all-5022 | [
"ContainsSameLabelset",
"checks",
"if",
"a",
"matrix",
"has",
"samples",
"with",
"the",
"same",
"labelset",
"Such",
"a",
"behavior",
"is",
"semantically",
"undefined",
"https",
":",
"//",
"github",
".",
"com",
"/",
"prometheus",
"/",
"prometheus",
"/",
"issues... | [
"func",
"(",
"m",
"Matrix",
")",
"ContainsSameLabelset",
"(",
")",
"bool",
"{",
"l",
":=",
"make",
"(",
"map",
"[",
"uint64",
"]",
"struct",
"{",
"}",
",",
"len",
"(",
"m",
")",
")",
"\n",
"for",
"_",
",",
"ss",
":=",
"<mask>",
"m",
"{",
"hash"... |
5,022 | all-5023 | [
"This",
"only",
"uses",
"the",
"OS",
"s",
"randomness"
] | [
"func",
"randBytes",
"(",
"numBytes",
"int",
")",
"[",
"]",
"<mask>",
"{",
"b",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"numBytes",
")",
"\n",
"_",
",",
"err",
":=",
"crand",
".",
"Read",
"(",
"b",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
5,023 | all-5024 | [
"GetNewLedgerVersion",
"retrieves",
"the",
"NewLedgerVersion",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"LedgerUpgrade",
")",
"GetNewLedgerVersion",
"(",
")",
"(",
"result",
"Uint32",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName"... |
5,024 | all-5025 | [
"RegisterLint",
"must",
"be",
"called",
"once",
"for",
"each",
"lint",
"to",
"be",
"excuted",
".",
"Duplicate",
"lint",
"names",
"are",
"squashed",
".",
"Normally",
"RegisterLint",
"is",
"called",
"during",
"init",
"()",
"."
] | [
"func",
"RegisterLint",
"(",
"l",
"*",
"Lint",
")",
"{",
"if",
"err",
":=",
"l",
".",
"Lint",
".",
"Initialize",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
"+",
"l",
".",
"Name",
"+",
"\"",
"\"",
"+",
"err",
".",
"<mask... |
5,025 | all-5026 | [
"NewTmpBackend",
"creates",
"a",
"backend",
"implementation",
"for",
"testing",
"."
] | [
"func",
"NewTmpBackend",
"(",
"batchInterval",
"time",
".",
"Duration",
",",
"batchLimit",
"int",
")",
"(",
"*",
"backend",
",",
"string",
")",
"{",
"dir",
",",
"err",
":=",
"ioutil",
".",
"TempDir",
"(",
"os",
".",
"TempDir",
"(",
")",
",",
"\"",
"\... |
5,026 | all-5027 | [
"SetHeadersVisible",
"is",
"a",
"wrapper",
"around",
"gtk_tree_view_set_headers_visible",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeView",
")",
"SetHeadersVisible",
"(",
"<mask>",
"bool",
")",
"{",
"C",
".",
"gtk_tree_view_set_headers_visible",
"(",
"v",
".",
"native",
"(",
")",
",",
"gbool",
"(",
"show",
")",
")",
"\n",
"}"
] |
5,027 | all-5028 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"Datacenter",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"DatacenterLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"return",
"ap... |
5,028 | all-5029 | [
"Contains",
"returns",
"true",
"if",
"any",
"string",
"in",
"substrs",
"is",
"within",
"s"
] | [
"func",
"Contains",
"(",
"s",
"string",
",",
"substrs",
"[",
"]",
"string",
")",
"bool",
"{",
"for",
"_",
",",
"substr",
":=",
"<mask>",
"substrs",
"{",
"if",
"strings",
".",
"Contains",
"(",
"s",
",",
"substr",
")",
"{",
"return",
"true",
"\n",
"}... |
5,029 | all-5030 | [
"cephRBDVolumeRename",
"renames",
"a",
"given",
"RBD",
"storage",
"volume",
"Note",
"that",
"if",
"the",
"snapshot",
"is",
"mapped",
"-",
"which",
"it",
"usually",
"shouldn",
"t",
"be",
"-",
"this",
"usually",
"requires",
"that",
"the",
"snapshot",
"be",
"un... | [
"func",
"cephRBDVolumeSnapshotRename",
"(",
"clusterName",
"string",
",",
"poolName",
"string",
",",
"volumeName",
"string",
",",
"volumeType",
"string",
",",
"oldSnapshotName",
"string",
",",
"newSnapshotName",
"string",
",",
"userName",
"string",
")",
"error",
"{"... |
5,030 | all-5031 | [
"BaseFromReference",
"returns",
"a",
"BaseComputeResource",
"for",
"a",
"given",
"managed",
"object",
"reference",
"."
] | [
"func",
"BaseFromReference",
"(",
"client",
"*",
"govmomi",
".",
"Client",
",",
"ref",
"types",
".",
"ManagedObjectReference",
")",
"(",
"BaseComputeResource",
",",
"error",
")",
"{",
"switch",
"ref",
".",
"Type",
"{",
"case",
"\"",
"\"",
":",
"return",
"S... |
5,031 | all-5032 | [
"AllCursor",
"provides",
"a",
"mock",
"function",
"with",
"given",
"fields",
":",
"store"
] | [
"func",
"(",
"_m",
"*",
"ObjectStore",
")",
"AllCursor",
"(",
"store",
"string",
")",
"(",
"gostore",
".",
"ObjectRows",
",",
"error",
")",
"{",
"ret",
":=",
"_m",
".",
"Called",
"(",
"store",
")",
"\n\n",
"var",
"r0",
"gostore",
".",
"ObjectRows",
"... |
5,032 | all-5033 | [
"CheckFlags",
"looks",
"for",
"comments",
"matching",
"regexes"
] | [
"func",
"(",
"c",
"*",
"CommentCounterPlugin",
")",
"CheckFlags",
"(",
")",
"error",
"{",
"for",
"_",
",",
"<mask>",
":=",
"range",
"c",
".",
"pattern",
"{",
"matcher",
",",
"err",
":=",
"regexp",
".",
"Compile",
"(",
"pattern",
")",
"\n",
"if",
"err... |
5,033 | all-5034 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetMetricsReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance2",
"(",
"&",
"w",
",",
"v",
... |
5,034 | all-5035 | [
"GetHostname",
"returns",
"the",
"hostname",
"from",
"request",
"Host",
"field",
".",
"It",
"returns",
"empty",
"string",
"if",
"Host",
"field",
"contains",
"invalid",
"value",
"(",
"e",
".",
"g",
".",
"localhost",
":::",
"with",
"too",
"many",
"colons",
"... | [
"func",
"GetHostname",
"(",
"req",
"*",
"http",
".",
"Request",
")",
"string",
"{",
"if",
"req",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"h",
",",
"_",
",",
"err",
":=",
"<mask>",
".",
"SplitHostPort",
"(",
"req",
".",
"Host",
")... |
5,035 | all-5036 | [
"ItemActivated",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_item_activated",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"ItemActivated",
"(",
"path",
"*",
"TreePath",
")",
"{",
"C",
".",
"gtk_icon_view_item_activated",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
5,036 | all-5037 | [
"ListTeamInvitations",
"gets",
"a",
"list",
"of",
"team",
"members",
"with",
"pending",
"invitations",
"for",
"the",
"given",
"team",
"id",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"teams",
"/",
"members",
"/",
"#list",
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListTeamInvitations",
"(",
"id",
"int",
")",
"(",
"[",
"]",
"OrgInvitation",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"id",
")",
"\n",
"if",
"c",
".",
"fake",
"{",
"return",
"nil",
",... |
5,037 | all-5038 | [
"handleAcquireByState",
":",
"Handler",
"for",
"/",
"acquirebystate",
"Method",
":",
"POST",
"URLParams",
":",
"Required",
":",
"state",
"=",
"[",
"string",
"]",
":",
"current",
"state",
"of",
"the",
"requested",
"resource",
"Required",
":",
"dest",
"=",
"["... | [
"func",
"handleAcquireByState",
"(",
"r",
"*",
"ranch",
".",
"Ranch",
")",
"http",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"res",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"logrus",
".",
"WithField",
"(",
... |
5,038 | all-5039 | [
"listDHCPServers",
"lists",
"all",
"DHCP",
"server",
"settings",
"in",
"a",
"map",
"keyed",
"by",
"DHCP",
".",
"NetworkName",
"."
] | [
"func",
"listDHCPServers",
"(",
"vbox",
"VBoxManager",
")",
"(",
"map",
"[",
"string",
"]",
"*",
"dhcpServer",
",",
"error",
")",
"{",
"out",
",",
"err",
":=",
"vbox",
".",
"vbmOut",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
... |
5,039 | all-5040 | [
"DefaultPolicy",
"returns",
"a",
"simple",
"policy",
"that",
"uses",
"all",
"built",
"-",
"in",
"models",
"and",
"strategies",
".",
"Note",
":",
"The",
"secret",
"should",
"be",
"at",
"least",
"16",
"characters",
"long",
"."
] | [
"func",
"DefaultPolicy",
"(",
"<mask>",
"string",
")",
"*",
"Policy",
"{",
"return",
"&",
"Policy",
"{",
"Secret",
":",
"[",
"]",
"byte",
"(",
"secret",
")",
",",
"Token",
":",
"&",
"Token",
"{",
"}",
",",
"Clients",
":",
"[",
"]",
"Client",
"{",
... |
5,040 | all-5041 | [
"NewMemCache",
"creates",
"a",
"GitHub",
"cache",
"RoundTripper",
"that",
"is",
"backed",
"by",
"a",
"memory",
"cache",
"."
] | [
"func",
"NewMemCache",
"(",
"delegate",
"<mask>",
".",
"RoundTripper",
",",
"maxConcurrency",
"int",
")",
"http",
".",
"RoundTripper",
"{",
"return",
"NewFromCache",
"(",
"delegate",
",",
"httpcache",
".",
"NewMemoryCache",
"(",
")",
",",
"maxConcurrency",
")",
... |
5,041 | all-5042 | [
"Stats",
"returns",
"allocator",
"statistics",
"Returns",
"jemalloc",
"stats"
] | [
"func",
"Stats",
"(",
")",
"string",
"{",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"buf",
":=",
"C",
".",
"mm_stats",
"(",
")",
"\n",
"s",
":=",
"\"",
"\\n",
"\"",
"\n",
"if",
"Debug",
"{",
"s",
"+=",... |
5,042 | all-5043 | [
"FailFunc",
"outputs",
"Fail",
"level",
"log",
"returned",
"from",
"the",
"function"
] | [
"func",
"FailFunc",
"(",
"f",
"func",
"(",
")",
"string",
")",
"error",
"{",
"if",
"isModeEnable",
"(",
"FAIL",
")",
"{",
"return",
"glg",
".",
"<mask>",
"(",
"FAIL",
",",
"\"",
"\"",
",",
"f",
"(",
")",
")",
"\n",
"}",
"\n",
"return",
"nil",
"... |
5,043 | all-5044 | [
"newEmpty",
"creates",
"and",
"returns",
"an",
"empty",
"element",
"."
] | [
"func",
"newEmptyElement",
"(",
"ln",
"*",
"line",
",",
"rslt",
"*",
"result",
",",
"src",
"*",
"source",
",",
"parent",
"element",
",",
"opts",
"*",
"Options",
")",
"*",
"emptyElement",
"{",
"return",
"&",
"emptyElement",
"{",
"elementBase",
":",
"newEl... |
5,044 | all-5045 | [
"GenVoltDB",
"generates",
"a",
"VoltDB",
"DSN",
"from",
"the",
"passed",
"URL",
"."
] | [
"func",
"GenVoltDB",
"(",
"u",
"*",
"URL",
")",
"(",
"string",
",",
"error",
")",
"{",
"host",
",",
"port",
":=",
"\"",
"\"",
",",
"\"",
"\"",
"\n",
"if",
"h",
":=",
"hostname",
"(",
"u",
".",
"Host",
")",
";",
"h",
"!=",
"\"",
"\"",
"{",
"... |
5,045 | all-5046 | [
"ServeHTTP"
] | [
"func",
"(",
"mux",
"*",
"LoggingServeMux",
")",
"ServeHTTP",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"<mask>",
".",
"Request",
")",
"{",
"mux",
".",
"serveMux",
".",
"ServeHTTP",
"(",
"w",
",",
"r",
")",
"\n",
"}"
] |
5,046 | all-5047 | [
"CreateVolume",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockDockerClient",
")",
"CreateVolume",
"(",
"arg0",
"context",
".",
"Context",
",",
"arg1",
",",
"arg2",
"string",
",",
"arg3",
",",
"arg4",
"map",
"[",
"string",
"]",
"string",
",",
"arg5",
"time",
".",
"Duration",
")",
"docke... |
5,047 | all-5048 | [
"ExpiresIn",
"is",
"an",
"option",
"that",
"will",
"set",
"the",
"expiration",
"duration",
"generated",
"for",
"tokens",
"to",
"the",
"specified",
"duration",
"."
] | [
"func",
"ExpiresIn",
"(",
"d",
"time",
".",
"Duration",
")",
"Option",
"{",
"return",
"func",
"(",
"tok",
"*",
"Bearer",
")",
"error",
"{",
"if",
"d",
"!=",
"0",
"{",
"tok",
".",
"addExpiration",
"=",
"<mask>",
"\n",
"tok",
".",
"expiresIn",
"=",
"... |
5,048 | all-5049 | [
"simultaneously",
"specify",
"storage",
"for",
"all",
"levels",
"of",
"a",
"three",
"-",
"dimensional",
"two",
"-",
"dimensional",
"array",
"or",
"cube",
"-",
"map",
"array",
"texture"
] | [
"func",
"TextureStorage3D",
"(",
"texture",
"uint32",
",",
"levels",
"int32",
",",
"internalformat",
"uint32",
",",
"width",
"int32",
",",
"<mask>",
"int32",
",",
"depth",
"int32",
")",
"{",
"C",
".",
"glowTextureStorage3D",
"(",
"gpTextureStorage3D",
",",
"("... |
5,049 | all-5050 | [
"SetLicense",
"is",
"a",
"wrapper",
"around",
"gtk_about_dialog_set_license",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AboutDialog",
")",
"SetLicense",
"(",
"license",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"license",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",... |
5,050 | all-5051 | [
"HasUrl",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"e",
"*",
"Event",
")",
"HasUrl",
"(",
")",
"bool",
"{",
"if",
"e",
"!=",
"nil",
"&&",
"e",
".",
"Url",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
5,051 | all-5052 | [
"ToBytes",
"returns",
"the",
"bytes",
"represented",
"by",
"the",
"base64",
"string",
"s",
"."
] | [
"func",
"ToBytes",
"(",
"s",
"Base64String",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"return",
"base64",
".",
"URLEncoding",
".",
"DecodeString",
"(",
"strings",
".",
"TrimSpace",
"(",
"string",
"(",
"s",
")",
")",
")",
"\n",
"}"
] |
5,052 | all-5053 | [
"Records",
"returns",
"the",
"list",
"of",
"records",
"in",
"all",
"relevant",
"zones",
"."
] | [
"func",
"(",
"p",
"*",
"GoogleProvider",
")",
"Records",
"(",
")",
"(",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"_",
"error",
")",
"{",
"zones",
",",
"err",
":=",
"p",
".",
"Zones",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
... |
5,053 | all-5054 | [
"GetCreatedBy",
"returns",
"the",
"CreatedBy",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardLite",
")",
"GetCreatedBy",
"(",
")",
"CreatedBy",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"CreatedBy",
"==",
"nil",
"{",
"<mask>",
"CreatedBy",
"{",
"}",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"CreatedBy",
... |
5,054 | all-5055 | [
"Returns",
"the",
"name",
"of",
"the",
"field",
"at",
"offset",
"off",
"in",
"x",
"."
] | [
"func",
"objField",
"(",
"c",
"*",
"gocore",
".",
"Process",
",",
"x",
"gocore",
".",
"Object",
",",
"off",
"int64",
")",
"string",
"{",
"t",
",",
"r",
":=",
"c",
".",
"<mask>",
"(",
"x",
")",
"\n",
"if",
"t",
"==",
"nil",
"{",
"return",
"fmt",... |
5,055 | all-5056 | [
"Next",
"advances",
"to",
"the",
"next",
"file",
"in",
"the",
"archive",
"."
] | [
"func",
"(",
"r",
"*",
"Reader",
")",
"Next",
"(",
")",
"(",
"*",
"FileHeader",
",",
"error",
")",
"{",
"if",
"r",
".",
"solidr",
"!=",
"nil",
"{",
"// solid files must be read fully to update decoder information",
"if",
"_",
",",
"err",
":=",
"io",
".",
... |
5,056 | all-5057 | [
"GetResource",
"returns",
"the",
"Resource",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardLite",
")",
"GetResource",
"(",
")",
"string",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"Resource",
"\n",
"}"
] |
5,057 | all-5058 | [
"UnmarshalText",
"converts",
"text",
"from",
"config",
"file",
"to",
"a",
"enum",
"."
] | [
"func",
"(",
"p",
"*",
"Protocol",
")",
"UnmarshalText",
"(",
"text",
"[",
"]",
"byte",
")",
"error",
"{",
"protocolName",
":=",
"string",
"(",
"<mask>",
")",
"\n\n",
"switch",
"strings",
".",
"ToLower",
"(",
"protocolName",
")",
"{",
"case",
"\"",
"\"... |
5,058 | all-5059 | [
"GetLogQuery",
"returns",
"the",
"LogQuery",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"ToplistRequest",
")",
"GetLogQuery",
"(",
")",
"WidgetApmOrLogQuery",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"LogQuery",
"==",
"nil",
"{",
"<mask>",
"WidgetApmOrLogQuery",
"{",
"}",
"\n",
"}",
"\n",
"return",
"*",
"t",
"."... |
5,059 | all-5060 | [
"Register",
"maps",
"a",
"request",
"Content",
"-",
"Type",
"(",
"application",
"/",
"json",
")",
"to",
"a",
"Binder",
"."
] | [
"func",
"Register",
"(",
"contentType",
"string",
",",
"fn",
"Binder",
")",
"{",
"<mask>",
".",
"Lock",
"(",
")",
"\n",
"defer",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"binders",
"[",
"strings",
".",
"ToLower",
"(",
"contentType",
")",
"]",
"=",
"f... |
5,060 | all-5061 | [
"TaskLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"TaskLocator",
"(",
"href",
"string",
")",
"*",
"TaskLocator",
"{",
"<mask>",
"&",
"TaskLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
5,061 | all-5062 | [
"Step",
"advances",
"the",
"state",
"machine",
"using",
"msgs",
".",
"The",
"ctx",
".",
"Err",
"()",
"will",
"be",
"returned",
"if",
"any",
"."
] | [
"func",
"(",
"n",
"*",
"node",
")",
"stepWithWaitOption",
"(",
"ctx",
"context",
".",
"Context",
",",
"m",
"pb",
".",
"Message",
",",
"wait",
"bool",
")",
"error",
"{",
"if",
"m",
".",
"Type",
"!=",
"<mask>",
".",
"MsgProp",
"{",
"select",
"{",
"ca... |
5,062 | all-5063 | [
"Do",
"executes",
"Profiler",
".",
"startTypeProfile",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"StartTypeProfileParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStartTypeProfile",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
5,063 | all-5064 | [
"submitChange",
"takes",
"a",
"zone",
"and",
"a",
"Change",
"and",
"sends",
"it",
"to",
"Google",
"."
] | [
"func",
"(",
"p",
"*",
"GoogleProvider",
")",
"submitChange",
"(",
"change",
"*",
"dns",
".",
"Change",
")",
"error",
"{",
"if",
"len",
"(",
"change",
".",
"Additions",
")",
"==",
"0",
"&&",
"len",
"(",
"change",
".",
"Deletions",
")",
"==",
"0",
"... |
5,064 | all-5065 | [
"NewInfiniteLoopWithIntro",
"creates",
"a",
"new",
"infinite",
"loop",
"stream",
"with",
"an",
"intro",
"part",
".",
"NewInfiniteLoopWithIntro",
"accepts",
"a",
"source",
"stream",
"src",
"introLength",
"in",
"bytes",
"and",
"loopLength",
"in",
"bytes",
"."
] | [
"func",
"NewInfiniteLoopWithIntro",
"(",
"src",
"ReadSeekCloser",
",",
"introLength",
"int64",
",",
"loopLength",
"int64",
")",
"*",
"InfiniteLoop",
"{",
"return",
"&",
"InfiniteLoop",
"{",
"src",
":",
"src",
",",
"lstart",
":",
"introLength",
",",
"llength",
... |
5,065 | all-5066 | [
"GenClickhouse",
"generates",
"a",
"clickhouse",
"DSN",
"from",
"the",
"passed",
"URL",
"."
] | [
"func",
"GenClickhouse",
"(",
"u",
"*",
"URL",
")",
"(",
"string",
",",
"error",
")",
"{",
"z",
":=",
"&",
"url",
".",
"URL",
"{",
"Scheme",
":",
"\"",
"\"",
",",
"Opaque",
":",
"u",
".",
"Opaque",
",",
"Host",
":",
"u",
".",
"Host",
",",
"Pa... |
5,066 | all-5067 | [
"Parser",
"returns",
"a",
"parser",
"based",
"on",
"the",
"mime",
"if",
"none",
"can",
"be",
"matched",
"the",
"default",
"is",
"returned"
] | [
"func",
"(",
"e",
"*",
"Encoder",
")",
"Parser",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"<mask>",
"{",
"contentType",
":=",
"r",
".",
"Header",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"info",
":=",
"parseMimeInfo",
"(",
"contentType",
")",
"\n... |
5,067 | all-5068 | [
"NodesCount",
"returns",
"the",
"number",
"of",
"nodes",
"in",
"the",
"LXD",
"cluster",
".",
"Since",
"there",
"s",
"always",
"at",
"least",
"one",
"node",
"row",
"even",
"when",
"not",
"-",
"clustered",
"the",
"return",
"value",
"is",
"greater",
"than",
... | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"NodesCount",
"(",
")",
"(",
"int",
",",
"error",
")",
"{",
"<mask>",
",",
"err",
":=",
"query",
".",
"Count",
"(",
"c",
".",
"tx",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil"... |
5,068 | all-5069 | [
"Parameter",
"context",
"has",
"type",
"*",
"C",
".",
"struct__cl_context",
".",
"Parameter",
"event",
"has",
"type",
"*",
"C",
".",
"struct__cl_event",
"."
] | [
"func",
"CreateSyncFromCLeventARB",
"(",
"context",
"unsafe",
".",
"Pointer",
",",
"event",
"unsafe",
".",
"Pointer",
",",
"<mask>",
"uint32",
")",
"uintptr",
"{",
"ret",
":=",
"C",
".",
"glowCreateSyncFromCLeventARB",
"(",
"gpCreateSyncFromCLeventARB",
",",
"(",
... |
5,069 | all-5070 | [
"Attempt",
"to",
"hijack",
"session",
"previously",
"running",
"bot"
] | [
"func",
"(",
"irc",
"*",
"Bot",
")",
"hijackSession",
"(",
")",
"bool",
"{",
"unaddr",
",",
"err",
":=",
"net",
".",
"ResolveUnixAddr",
"(",
"\"",
"\"",
",",
"irc",
".",
"unixastr",
")",
"// The only way to get an error here is if the first parameter is not one of... |
5,070 | all-5071 | [
"AllByID",
"finds",
"zero",
"or",
"more",
"elements",
"with",
"a",
"given",
"ID",
"."
] | [
"func",
"(",
"s",
"*",
"selectable",
")",
"AllByID",
"(",
"text",
"string",
")",
"*",
"MultiSelection",
"{",
"return",
"newMultiSelection",
"(",
"s",
".",
"<mask>",
",",
"s",
".",
"selectors",
".",
"Append",
"(",
"target",
".",
"ID",
",",
"text",
")",
... |
5,071 | all-5072 | [
"NewMockEC2MetadataClient",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockEC2MetadataClient",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockEC2MetadataClient",
"{",
"mock",
":=",
"&",
"MockEC2MetadataClient",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockEC2MetadataClientMockR... |
5,072 | all-5073 | [
"MustText",
"retrieves",
"the",
"Text",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"Memo",
")",
"MustText",
"(",
")",
"string",
"{",
"val",
",",
"ok",
":=",
"u",
".",
"GetText",
"(",
")",
"\n\n",
"if",
"!",
"<mask>",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"val",
"\n",
"}"
] |
5,073 | all-5074 | [
"DeleteRecord",
"wraps",
"the",
"Delete",
"method",
"of",
"the",
"API",
"s",
"Record",
"service"
] | [
"func",
"(",
"n",
"NS1DomainService",
")",
"DeleteRecord",
"(",
"zone",
"string",
",",
"domain",
"string",
",",
"t",
"string",
")",
"(",
"*",
"<mask>",
".",
"Response",
",",
"error",
")",
"{",
"return",
"n",
".",
"service",
".",
"Records",
".",
"Delete... |
5,074 | all-5075 | [
"NewJobAgent",
"is",
"a",
"JobAgent",
"constructor",
"."
] | [
"func",
"NewJobAgent",
"(",
"kc",
"serviceClusterClient",
",",
"plClients",
"<mask>",
"[",
"string",
"]",
"PodLogClient",
",",
"cfg",
"config",
".",
"Getter",
")",
"*",
"JobAgent",
"{",
"return",
"&",
"JobAgent",
"{",
"kc",
":",
"kc",
",",
"pkcs",
":",
"... |
5,075 | all-5076 | [
"Close",
"is",
"the",
"snapshot",
"descructor",
"Once",
"a",
"thread",
"has",
"finished",
"using",
"a",
"snapshot",
"it",
"can",
"be",
"destroyed",
"by",
"calling",
"Close",
"()",
".",
"Internal",
"garbage",
"collector",
"takes",
"care",
"of",
"freeing",
"th... | [
"func",
"(",
"s",
"*",
"Snapshot",
")",
"Close",
"(",
")",
"{",
"newRefcount",
":=",
"atomic",
".",
"AddInt32",
"(",
"&",
"s",
".",
"refCount",
",",
"-",
"1",
")",
"\n",
"if",
"newRefcount",
"==",
"0",
"{",
"buf",
":=",
"s",
".",
"db",
".",
"sn... |
5,076 | all-5077 | [
"creates",
"and",
"initializes",
"a",
"buffer",
"object",
"s",
"data",
"store"
] | [
"func",
"NamedBufferData",
"(",
"buffer",
"uint32",
",",
"size",
"int",
",",
"data",
"unsafe",
".",
"Pointer",
",",
"usage",
"uint32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpNamedBufferData",
",",
"4",
",",
"uintptr",
"(",
"buffer",
")",
",",
"uin... |
5,077 | all-5078 | [
"ConnectLXD",
"lets",
"you",
"connect",
"to",
"a",
"remote",
"LXD",
"daemon",
"over",
"HTTPs",
".",
"A",
"client",
"certificate",
"(",
"TLSClientCert",
")",
"and",
"key",
"(",
"TLSClientKey",
")",
"must",
"be",
"provided",
".",
"If",
"connecting",
"to",
"a... | [
"func",
"ConnectLXD",
"(",
"url",
"string",
",",
"args",
"*",
"ConnectionArgs",
")",
"(",
"ContainerServer",
",",
"error",
")",
"{",
"logger",
".",
"Debugf",
"(",
"\"",
"\"",
")",
"\n\n",
"// Cleanup URL",
"<mask>",
"=",
"strings",
".",
"TrimSuffix",
"(",
... |
5,078 | all-5079 | [
"Reader",
"returns",
"the",
"data",
"contained",
"in",
"the",
"stream",
"v",
".",
"If",
"v",
".",
"Kind",
"()",
"!",
"=",
"Stream",
"Reader",
"returns",
"a",
"ReadCloser",
"that",
"responds",
"to",
"all",
"reads",
"with",
"a",
"stream",
"not",
"present",... | [
"func",
"(",
"v",
"Value",
")",
"Reader",
"(",
")",
"io",
".",
"ReadCloser",
"{",
"x",
",",
"ok",
":=",
"v",
".",
"data",
".",
"(",
"stream",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"&",
"errorReadCloser",
"{",
"fmt",
".",
"Errorf",
"(",
"\"... |
5,079 | all-5080 | [
"EventScrollNewFromEvent",
"returns",
"an",
"EventScroll",
"from",
"an",
"Event",
".",
"Using",
"widget",
".",
"Connect",
"()",
"for",
"a",
"key",
"related",
"signal",
"such",
"as",
"button",
"-",
"press",
"-",
"event",
"results",
"in",
"a",
"*",
"Event",
... | [
"func",
"EventScrollNewFromEvent",
"(",
"event",
"*",
"Event",
")",
"*",
"EventScroll",
"{",
"ee",
":=",
"(",
"*",
"C",
".",
"GdkEvent",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"<mask>",
".",
"native",
"(",
")",
")",
")",
"\n",
"ev",
":=",
"Event",
... |
5,080 | all-5081 | [
"SetClockSeq",
"sets",
"the",
"clock",
"sequence",
"to",
"the",
"lower",
"14",
"bits",
"of",
"seq",
".",
"Setting",
"to",
"-",
"1",
"causes",
"a",
"new",
"sequence",
"to",
"be",
"generated",
"."
] | [
"func",
"SetClockSequence",
"(",
"seq",
"int",
")",
"{",
"if",
"seq",
"==",
"-",
"1",
"{",
"<mask>",
"b",
"[",
"2",
"]",
"byte",
"\n",
"randomBits",
"(",
"b",
"[",
":",
"]",
")",
"// clock sequence",
"\n",
"seq",
"=",
"int",
"(",
"b",
"[",
"0",
... |
5,081 | all-5082 | [
"NAME",
"gh",
"-",
"user",
"-",
"Get",
"URL",
"for",
"a",
"given",
"GitHub",
"user",
"login",
"DESCRIPTION",
"Given",
"a",
"GitHub",
"user",
"login",
"call",
"the",
"GitHub",
"API",
"to",
"get",
"this",
"user",
"and",
"print",
"out",
"the",
"user",
"pa... | [
"func",
"TaskGitHubUser",
"(",
"t",
"*",
"tasking",
".",
"T",
")",
"{",
"if",
"len",
"(",
"t",
".",
"Args",
")",
"==",
"0",
"{",
"t",
".",
"<mask>",
"(",
"\"",
"\"",
")",
"\n",
"return",
"\n",
"}",
"\n\n",
"login",
":=",
"t",
".",
"Args",
"["... |
5,082 | all-5083 | [
"elementsFromLine",
"returns",
"a",
"list",
"of",
"elements",
"each",
"representing",
"a",
"single",
"item",
"which",
"will",
"belong",
"to",
"a",
"column",
"of",
"output",
"."
] | [
"func",
"elementsFromLine",
"(",
"config",
"*",
"Config",
",",
"line",
"string",
")",
"[",
"]",
"interface",
"{",
"}",
"{",
"separated",
":=",
"strings",
".",
"Split",
"(",
"line",
",",
"config",
".",
"Delim",
")",
"\n",
"elements",
":=",
"make",
"(",
... |
5,083 | all-5084 | [
"Operations",
"returns",
"all",
"operations",
"in",
"the",
"cluster",
"filtered",
"by",
"the",
"given",
"clause",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"operations",
"(",
"where",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"(",
"[",
"]",
"Operation",
",",
"error",
")",
"{",
"operations",
":=",
"[",
"]",
"Operation",
"{",
"}",
"\n",
"dest",
":... |
5,084 | all-5085 | [
"removeLegacyProto",
"removes",
"uses",
"of",
"the",
"old",
"proto",
"rules",
".",
"It",
"deletes",
"loads",
"from",
"go_proto_library",
".",
"bzl",
".",
"It",
"deletes",
"proto",
"filegroups",
".",
"It",
"removes",
"go_proto_library",
"attributes",
"which",
"ar... | [
"func",
"removeLegacyProto",
"(",
"c",
"*",
"config",
".",
"Config",
",",
"f",
"*",
"rule",
".",
"File",
")",
"{",
"// Don't fix if the proto mode was set to something other than the default.",
"if",
"pcMode",
":=",
"getProtoMode",
"(",
"c",
")",
";",
"pcMode",
"!... |
5,085 | all-5086 | [
"timestamp",
"returns",
"the",
"current",
"UNIX",
"timestamp",
"in",
"UTC",
".",
"If",
"an",
"argument",
"is",
"specified",
"it",
"will",
"be",
"used",
"to",
"format",
"the",
"timestamp",
"."
] | [
"func",
"timestamp",
"(",
"s",
"...",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"switch",
"len",
"(",
"s",
")",
"{",
"case",
"0",
":",
"return",
"now",
"(",
")",
".",
"Format",
"(",
"time",
".",
"RFC3339",
")",
",",
"nil",
"\n",
"ca... |
5,086 | all-5087 | [
"UnmarshalEasyJSON",
"sets",
"the",
"Date",
"from",
"a",
"easyjson",
".",
"Lexer"
] | [
"func",
"(",
"d",
"*",
"Date",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"if",
"data",
":=",
"in",
".",
"<mask>",
"(",
")",
";",
"in",
".",
"Ok",
"(",
")",
"{",
"tt",
",",
"err",
":=",
"time",
".",
"Parse",
"... |
5,087 | all-5088 | [
"MustNewMaxTxSetSize",
"retrieves",
"the",
"NewMaxTxSetSize",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"LedgerUpgrade",
")",
"MustNewMaxTxSetSize",
"(",
")",
"Uint32",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetNewMaxTxSetSize",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"v... |
5,088 | all-5089 | [
"allJobNames",
"returns",
"a",
"union",
"of",
"unique",
"job",
"names",
"across",
"both",
"BOSH",
"releases"
] | [
"func",
"(",
"d",
"boshReleaseDiffer",
")",
"allJobNames",
"(",
")",
"[",
"]",
"string",
"{",
"jobNamesMap",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
")",
"\n",
"var",
"addJobNames",
"=",
"func",
"(",
"br",
"*",
"release",
".",
"BoshRele... |
5,089 | all-5090 | [
"fills",
"all",
"or",
"part",
"of",
"a",
"texture",
"image",
"with",
"a",
"constant",
"value"
] | [
"func",
"ClearTexSubImage",
"(",
"texture",
"uint32",
",",
"<mask>",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"zoffset",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"depth",
"int32",
",",
"format",
"uint32",
",",
"xt... |
5,090 | all-5091 | [
"MoveTiles",
"moves",
"tiles",
"in",
"the",
"given",
"tiles",
"map",
"if",
"possible",
".",
"MoveTiles",
"returns",
"true",
"if",
"there",
"are",
"tiles",
"that",
"are",
"to",
"move",
"otherwise",
"false",
".",
"When",
"MoveTiles",
"is",
"called",
"all",
"... | [
"func",
"MoveTiles",
"(",
"tiles",
"map",
"[",
"*",
"Tile",
"]",
"struct",
"{",
"}",
",",
"size",
"int",
",",
"dir",
"Dir",
")",
"bool",
"{",
"vx",
",",
"vy",
":=",
"dir",
".",
"Vector",
"(",
")",
"\n",
"tx",
":=",
"[",
"]",
"int",
"{",
"}",
... |
5,091 | all-5092 | [
"AttachReader",
"attaches",
"a",
"file",
"using",
"an",
"io",
".",
"Reader"
] | [
"func",
"(",
"m",
"*",
"Message",
")",
"AttachReader",
"(",
"name",
"string",
",",
"r",
"io",
".",
"Reader",
",",
"settings",
"...",
"FileSetting",
")",
"{",
"m",
".",
"attachments",
"=",
"m",
".",
"appendFile",
"(",
"m",
".",
"attachments",
",",
"fi... |
5,092 | all-5093 | [
"IsRootDiskDevice",
"returns",
"true",
"if",
"the",
"given",
"device",
"representation",
"is",
"configured",
"as",
"root",
"disk",
"for",
"a",
"container",
".",
"It",
"typically",
"get",
"passed",
"a",
"specific",
"entry",
"of",
"api",
".",
"Container",
".",
... | [
"func",
"IsRootDiskDevice",
"(",
"<mask>",
"map",
"[",
"string",
"]",
"string",
")",
"bool",
"{",
"if",
"device",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"&&",
"device",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"&&",
"device",
"[",
"\"",
"\"",
"]"... |
5,093 | all-5094 | [
"/",
"*",
"Set",
"the",
"transaction",
"type",
"to",
"OtherTransaction",
".",
"This",
"will",
"automatically",
"change",
"the",
"category",
"to",
"Custom",
".",
"You",
"can",
"change",
"the",
"transaction",
"category",
"using",
"newrelic_transaction_set_category",
... | [
"func",
"TransactionSetTypeOther",
"(",
"<mask>",
"int64",
")",
"(",
"int",
",",
"error",
")",
"{",
"return",
"errNo",
"(",
"C",
".",
"newrelic_transaction_set_type_other",
"(",
"C",
".",
"long",
"(",
"id",
")",
")",
")",
"\n",
"}"
] |
5,094 | all-5095 | [
"SetWebsite",
"is",
"a",
"wrapper",
"around",
"gtk_about_dialog_set_website",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AboutDialog",
")",
"SetWebsite",
"(",
"website",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"website",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",... |
5,095 | all-5096 | [
"handleCommand",
"is",
"used",
"to",
"decode",
"and",
"dispatch",
"a",
"single",
"command",
"."
] | [
"func",
"(",
"n",
"*",
"NetworkTransport",
")",
"handleCommand",
"(",
"r",
"*",
"bufio",
".",
"Reader",
",",
"dec",
"*",
"codec",
".",
"Decoder",
",",
"enc",
"*",
"codec",
".",
"Encoder",
")",
"error",
"{",
"// Get the rpc type",
"rpcType",
",",
"err",
... |
5,096 | all-5097 | [
"Claim",
"pending",
"task",
"(",
"s",
")",
"for",
"the",
"given",
"provisionerId",
"/",
"workerType",
"queue",
".",
"If",
"any",
"work",
"is",
"available",
"(",
"even",
"if",
"fewer",
"than",
"the",
"requested",
"number",
"of",
"tasks",
"this",
"will",
"... | [
"func",
"(",
"queue",
"*",
"Queue",
")",
"ClaimWork",
"(",
"provisionerId",
",",
"workerType",
"string",
",",
"payload",
"*",
"ClaimWorkRequest",
")",
"(",
"*",
"ClaimWorkResponse",
",",
"error",
")",
"{",
"cd",
":=",
"tcclient",
".",
"<mask>",
"(",
"*",
... |
5,097 | all-5098 | [
"Apply",
"satisfies",
"the",
"StartSpanOption",
"interface",
"."
] | [
"func",
"(",
"r",
"SpanReference",
")",
"Apply",
"(",
"o",
"*",
"StartSpanOptions",
")",
"{",
"if",
"r",
".",
"ReferencedContext",
"!=",
"nil",
"{",
"o",
".",
"References",
"=",
"<mask>",
"(",
"o",
".",
"References",
",",
"r",
")",
"\n",
"}",
"\n",
... |
5,098 | all-5099 | [
"GetName",
"returns",
"the",
"Name",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsTest",
")",
"GetName",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Name",
"\n",
"}"
] |
5,099 | all-5100 | [
"specify",
"the",
"organization",
"of",
"vertex",
"arrays"
] | [
"func",
"VertexAttribFormat",
"(",
"attribindex",
"uint32",
",",
"<mask>",
"int32",
",",
"xtype",
"uint32",
",",
"normalized",
"bool",
",",
"relativeoffset",
"uint32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpVertexAttribFormat",
",",
"5",
",",
"uintptr",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.