id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
600 | all-601 | [
"resourceVSphereComputeClusterVMAffinityRuleFindEntry",
"attempts",
"to",
"locate",
"an",
"existing",
"VM",
"affinity",
"rule",
"in",
"a",
"cluster",
"s",
"configuration",
"by",
"key",
".",
"It",
"s",
"used",
"by",
"the",
"resource",
"s",
"read",
"functionality",
... | [
"func",
"resourceVSphereComputeClusterVMAffinityRuleFindEntry",
"(",
"cluster",
"*",
"object",
".",
"ClusterComputeResource",
",",
"key",
"int32",
",",
")",
"(",
"*",
"types",
".",
"ClusterAffinityRuleSpec",
",",
"error",
")",
"{",
"props",
",",
"err",
":=",
"clus... |
601 | all-602 | [
"NewControllerUbuntuCluster",
"creates",
"a",
"simple",
"Ubuntu",
"Amazon",
"cluster"
] | [
"func",
"NewControllerUbuntuCluster",
"(",
"<mask>",
"string",
")",
"*",
"cluster",
".",
"Cluster",
"{",
"controlPlaneProviderConfig",
":=",
"&",
"cluster",
".",
"ControlPlaneProviderConfig",
"{",
"Cloud",
":",
"cluster",
".",
"CloudAmazon",
",",
"Location",
":",
... |
602 | all-603 | [
"DescribeSecretWithContext",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"DescribeSecretWithContext",
"(",
"arg0",
"aws",
".",
"Context",
",",
"arg1",
"*",
"secretsmanager",
".",
"DescribeSecretInput",
",",
"arg2",
"...",
"request",
".",
"Option",
")",
"(",
"*",
"secretsmanager",
... |
603 | all-604 | [
"GetMessageOk",
"returns",
"a",
"tuple",
"with",
"the",
"Message",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"Alert",
")",
"GetMessageOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Message",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"a",
... |
604 | all-605 | [
"Query",
"returns",
"the",
"composite",
"query",
"of",
"Selector",
"and",
"Filter",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"Query",
"(",
")",
"bson",
".",
"M",
"{",
"return",
"bson",
".",
"M",
"{",
"\"",
"\"",
":",
"append",
"(",
"[",
"]",
"bson",
".",
"M",
"{",
"c",
".",
"Selector",
"}",
",",
"c",
".",
"Filters",
"...",
")... |
605 | all-606 | [
"LedgerKey",
"implements",
"the",
"Keyer",
"interface"
] | [
"func",
"(",
"entry",
"*",
"LedgerEntry",
")",
"LedgerKey",
"(",
")",
"LedgerKey",
"{",
"var",
"body",
"interface",
"{",
"}",
"\n\n",
"switch",
"entry",
".",
"Data",
".",
"Type",
"{",
"case",
"LedgerEntryTypeAccount",
":",
"account",
":=",
"entry",
".",
... |
606 | all-607 | [
"FileChooserWidgetNew",
"is",
"a",
"wrapper",
"around",
"gtk_file_chooser_widget_new",
"()",
"."
] | [
"func",
"FileChooserWidgetNew",
"(",
"<mask>",
"FileChooserAction",
")",
"(",
"*",
"FileChooserWidget",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_file_chooser_widget_new",
"(",
"(",
"C",
".",
"GtkFileChooserAction",
")",
"(",
"action",
")",
")",
"\n",
... |
607 | all-608 | [
"Returns",
"the",
"Top",
"-",
"Left",
"Point",
"of",
"the",
"rectangle"
] | [
"func",
"(",
"r",
"*",
"Rect",
")",
"TL",
"(",
")",
"Point",
"{",
"return",
"<mask>",
"{",
"int",
"(",
"r",
".",
"x",
")",
",",
"int",
"(",
"r",
".",
"y",
")",
"}",
"\n",
"}"
] |
608 | all-609 | [
"Handlers",
"sets",
"the",
"entire",
"middleware",
"stack",
"with",
"the",
"given",
"Handlers",
".",
"This",
"will",
"clear",
"any",
"current",
"middleware",
"handlers",
"and",
"panics",
"if",
"any",
"of",
"the",
"handlers",
"is",
"not",
"a",
"callable",
"fu... | [
"func",
"(",
"m",
"*",
"Macaron",
")",
"Handlers",
"(",
"handlers",
"...",
"Handler",
")",
"{",
"m",
".",
"handlers",
"=",
"make",
"(",
"[",
"]",
"Handler",
",",
"0",
")",
"\n",
"for",
"_",
",",
"handler",
":=",
"<mask>",
"handlers",
"{",
"m",
".... |
609 | all-610 | [
"New",
"creates",
"a",
"new",
"child",
"process",
"for",
"management",
"with",
"high",
"-",
"level",
"APIs",
"for",
"sending",
"signals",
"to",
"the",
"child",
"process",
"restarting",
"the",
"child",
"process",
"and",
"gracefully",
"terminating",
"the",
"chil... | [
"func",
"New",
"(",
"i",
"*",
"NewInput",
")",
"(",
"*",
"Child",
",",
"error",
")",
"{",
"if",
"i",
"==",
"nil",
"{",
"i",
"=",
"new",
"(",
"NewInput",
")",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"i",
".",
"Command",
")",
"==",
"0",
"{",
"re... |
610 | all-611 | [
"compareAndAdd",
"will",
"check",
"whether",
"we",
"can",
"run",
"this",
"compactDef",
".",
"That",
"it",
"doesn",
"t",
"overlap",
"with",
"any",
"other",
"running",
"compaction",
".",
"If",
"it",
"can",
"be",
"run",
"it",
"would",
"store",
"this",
"run",
... | [
"func",
"(",
"cs",
"*",
"compactStatus",
")",
"compareAndAdd",
"(",
"_",
"thisAndNextLevelRLocked",
",",
"cd",
"compactDef",
")",
"bool",
"{",
"cs",
".",
"Lock",
"(",
")",
"\n",
"defer",
"cs",
".",
"Unlock",
"(",
")",
"\n\n",
"level",
":=",
"cd",
".",
... |
611 | all-612 | [
"SetSize",
"changes",
"the",
"total",
"number",
"of",
"workers",
"in",
"the",
"Pool",
".",
"This",
"can",
"be",
"called",
"by",
"any",
"goroutine",
"at",
"any",
"time",
"unless",
"the",
"Pool",
"has",
"been",
"stopped",
"in",
"which",
"case",
"a",
"panic... | [
"func",
"(",
"p",
"*",
"Pool",
")",
"SetSize",
"(",
"n",
"int",
")",
"{",
"p",
".",
"workerMut",
".",
"Lock",
"(",
")",
"\n",
"defer",
"p",
".",
"workerMut",
".",
"Unlock",
"(",
")",
"\n\n",
"lWorkers",
":=",
"len",
"(",
"p",
".",
"workers",
")... |
612 | all-613 | [
"expandSliceOfDistributedVirtualSwitchHostMemberConfigSpec",
"expands",
"all",
"host",
"entires",
"for",
"a",
"VMware",
"DVS",
"detecting",
"if",
"a",
"host",
"spec",
"needs",
"to",
"be",
"added",
"removed",
"or",
"updated",
"as",
"well",
".",
"The",
"whole",
"sli... | [
"func",
"expandSliceOfDistributedVirtualSwitchHostMemberConfigSpec",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"[",
"]",
"types",
".",
"DistributedVirtualSwitchHostMemberConfigSpec",
"{",
"var",
"specs",
"[",
"]",
"types",
".",
"DistributedVirtualSwitchHostMemberCo... |
613 | all-614 | [
"GetMessagesInRange",
"gets",
"an",
"Iterator",
"containing",
"calls",
"in",
"the",
"range",
"[",
"start",
"end",
")",
"optionally",
"further",
"filtered",
"by",
"data",
".",
"GetMessagesInRange",
"panics",
"if",
"start",
"is",
"not",
"before",
"end",
".",
"An... | [
"func",
"(",
"c",
"*",
"MessageService",
")",
"GetMessagesInRange",
"(",
"start",
"time",
".",
"Time",
",",
"end",
"time",
".",
"Time",
",",
"data",
"url",
".",
"Values",
")",
"MessagePageIterator",
"{",
"if",
"<mask>",
".",
"After",
"(",
"end",
")",
"... |
614 | all-615 | [
"Close",
"closes",
"the",
"logger"
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Close",
"(",
")",
"{",
"l",
".",
"hLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"hLock",
".",
"Unlock",
"(",
")",
"\n",
"l",
".",
"<mask>",
".",
"Close",
"(",
")",
"\n",
"}"
] |
615 | all-616 | [
"shouldSnapshot",
"checks",
"if",
"we",
"meet",
"the",
"conditions",
"to",
"take",
"a",
"new",
"snapshot",
"."
] | [
"func",
"(",
"r",
"*",
"Raft",
")",
"shouldSnapshot",
"(",
")",
"bool",
"{",
"// Check the last snapshot index",
"lastSnap",
",",
"_",
":=",
"r",
".",
"getLastSnapshot",
"(",
")",
"\n\n",
"// Check the last log index",
"lastIdx",
",",
"err",
":=",
"r",
".",
... |
616 | all-617 | [
"emitCurrentStatus",
"emits",
"a",
"container",
"event",
"for",
"every",
"container",
"and",
"a",
"task",
"event",
"for",
"the",
"task"
] | [
"func",
"(",
"mtask",
"*",
"managedTask",
")",
"emitCurrentStatus",
"(",
")",
"{",
"for",
"_",
",",
"<mask>",
":=",
"range",
"mtask",
".",
"Containers",
"{",
"mtask",
".",
"emitContainerEvent",
"(",
"mtask",
".",
"Task",
",",
"container",
",",
"\"",
"\""... |
617 | all-618 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetTargetInfoReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget8",
"(",
"&",
"w",
",",
"v",
... |
618 | all-619 | [
"Recursively",
"update",
"data",
"on",
"child",
"routers",
"."
] | [
"func",
"(",
"mx",
"*",
"Mux",
")",
"updateSubRoutes",
"(",
"fn",
"func",
"(",
"subMux",
"*",
"Mux",
")",
")",
"{",
"for",
"_",
",",
"r",
":=",
"range",
"mx",
".",
"tree",
".",
"routes",
"(",
")",
"{",
"subMux",
",",
"ok",
":=",
"r",
".",
"Su... |
619 | all-620 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"PostData",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHar3",
"(",
"&",
"r",
",",
... |
620 | all-621 | [
"All",
"returns",
"a",
"list",
"of",
"all",
"registered",
"models",
"."
] | [
"func",
"(",
"c",
"*",
"Catalog",
")",
"All",
"(",
")",
"[",
"]",
"<mask>",
"{",
"// prepare models",
"models",
":=",
"make",
"(",
"[",
"]",
"Model",
",",
"0",
",",
"len",
"(",
"c",
".",
"models",
")",
")",
"\n\n",
"// add models",
"for",
"_",
",... |
621 | all-622 | [
"Cat",
"emits",
"each",
"line",
"from",
"each",
"named",
"file",
"in",
"order",
".",
"If",
"no",
"arguments",
"are",
"specified",
"Cat",
"copies",
"its",
"input",
"to",
"its",
"output",
"."
] | [
"func",
"Cat",
"(",
"filenames",
"...",
"string",
")",
"Filter",
"{",
"return",
"FilterFunc",
"(",
"func",
"(",
"arg",
"Arg",
")",
"error",
"{",
"if",
"len",
"(",
"filenames",
")",
"==",
"0",
"{",
"for",
"s",
":=",
"range",
"arg",
".",
"In",
"{",
... |
622 | all-623 | [
"Group",
"creates",
"a",
"Group",
"type",
"from",
"a",
"domain",
"with",
"the",
"given",
"name",
"and",
"members"
] | [
"func",
"(",
"dom",
"*",
"Domain",
")",
"Group",
"(",
"name",
"string",
",",
"members",
"[",
"]",
"*",
"Account",
")",
"*",
"Group",
"{",
"return",
"&",
"Group",
"{",
"Domain",
":",
"dom",
",",
"Name",
":",
"name",
",",
"Members",
":",
"<mask>",
... |
623 | all-624 | [
"ApplyChanges",
"takes",
"a",
"list",
"of",
"changes",
"(",
"endpoints",
")",
"and",
"updates",
"the",
"PDNS",
"server",
"by",
"sending",
"the",
"correct",
"HTTP",
"PATCH",
"requests",
"to",
"a",
"matching",
"zone"
] | [
"func",
"(",
"p",
"*",
"PDNSProvider",
")",
"ApplyChanges",
"(",
"changes",
"*",
"plan",
".",
"Changes",
")",
"error",
"{",
"startTime",
":=",
"time",
".",
"Now",
"(",
")",
"\n\n",
"// Create",
"for",
"_",
",",
"change",
":=",
"range",
"changes",
".",
... |
624 | all-625 | [
"This",
"will",
"block",
"till",
"upload",
"is",
"done"
] | [
"func",
"(",
"w",
"*",
"minioWriter",
")",
"Close",
"(",
")",
"error",
"{",
"<mask>",
",",
"_",
":=",
"tracing",
".",
"AddSpanToAnyExisting",
"(",
"w",
".",
"ctx",
",",
"\"",
"\"",
")",
"\n",
"defer",
"tracing",
".",
"FinishAnySpan",
"(",
"span",
")"... |
625 | all-626 | [
"NewUniqueURLsWithExceptions",
"implements",
"url",
".",
"URL",
"slice",
"as",
"flag",
".",
"Value",
"interface",
".",
"Given",
"value",
"is",
"to",
"be",
"separated",
"by",
"comma",
"."
] | [
"func",
"NewUniqueURLsWithExceptions",
"(",
"s",
"string",
",",
"exceptions",
"...",
"string",
")",
"*",
"UniqueURLs",
"{",
"us",
":=",
"&",
"UniqueURLs",
"{",
"Values",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"struct",
"{",
"}",
")",
",",
"Allowed"... |
626 | all-627 | [
"Reads",
"the",
"file",
"given",
"by",
"path",
"and",
"returns",
"a",
"Pbo",
"pointer",
"and",
"err",
"!",
"=",
"nil",
"if",
"no",
"errors",
"occurred"
] | [
"func",
"NewPbo",
"(",
"path",
"string",
")",
"(",
"*",
"Pbo",
",",
"error",
")",
"{",
"file",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"pbo",
... |
627 | all-628 | [
"AddServersToServerGroup",
"adds",
"servers",
"to",
"an",
"existing",
"server",
"group",
".",
"The",
"identifier",
"parameter",
"specifies",
"the",
"destination",
"group",
".",
"The",
"serverIds",
"paramater",
"specifies",
"the",
"identifiers",
"of",
"the",
"servers... | [
"func",
"(",
"c",
"*",
"Client",
")",
"AddServersToServerGroup",
"(",
"identifier",
"string",
",",
"serverIds",
"[",
"]",
"string",
")",
"(",
"*",
"ServerGroup",
",",
"error",
")",
"{",
"group",
":=",
"new",
"(",
"ServerGroup",
")",
"\n",
"opts",
":=",
... |
628 | all-629 | [
"run",
"as",
"goroutine",
".",
"Will",
"keep",
"the",
"desktop",
"scale",
"up",
"to",
"date",
".",
"This",
"can",
"be",
"removed",
"once",
"the",
"scale",
"change",
"event",
"is",
"implemented",
"in",
"GLFW",
"3",
".",
"3"
] | [
"func",
"scaleUpdater",
"(",
")",
"{",
"for",
"{",
"s",
":=",
"getscale",
"(",
"0",
",",
"0",
")",
"\n",
"atomic",
".",
"StoreUint64",
"(",
"&",
"cachedScale",
",",
"math",
".",
"Float64bits",
"(",
"s",
")",
")",
"\n",
"<mask>",
".",
"Sleep",
"(",
... |
629 | all-630 | [
"NewLoggingServeMux",
"allocates",
"and",
"returns",
"a",
"new",
"LoggingServeMux"
] | [
"func",
"NewLoggingServeMux",
"(",
"conf",
"Config",
")",
"*",
"LoggingServeMux",
"{",
"serveMux",
":=",
"<mask>",
".",
"NewServeMux",
"(",
")",
"\n",
"return",
"&",
"LoggingServeMux",
"{",
"serveMux",
",",
"conf",
"}",
"\n",
"}"
] |
630 | all-631 | [
"Iter",
"creates",
"a",
"Lua",
"iterator",
"."
] | [
"func",
"(",
"lo",
"*",
"LuaObject",
")",
"Iter",
"(",
")",
"(",
"*",
"LuaTableIter",
",",
"error",
")",
"{",
"L",
":=",
"lo",
".",
"l",
"\n",
"lo",
".",
"Push",
"(",
")",
"\n",
"defer",
"L",
".",
"Pop",
"(",
"1",
")",
"\n",
"if",
"L",
".",... |
631 | all-632 | [
"A",
"completely",
"separate",
"router",
"for",
"administrator",
"routes"
] | [
"func",
"adminRouter",
"(",
")",
"chi",
".",
"Router",
"{",
"r",
":=",
"chi",
".",
"NewRouter",
"(",
")",
"\n",
"r",
".",
"Use",
"(",
"AdminOnly",
")",
"\n",
"r",
".",
"Get",
"(",
"\"",
"\"",
",",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
... |
632 | all-633 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"Key",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb10",
"(",
"&",
"r",
",",... |
633 | all-634 | [
"DistinctOn",
"returns",
"a",
"derivative",
"query",
"that",
"yields",
"de",
"-",
"duplicated",
"entities",
"with",
"respect",
"to",
"the",
"set",
"of",
"the",
"specified",
"fields",
".",
"It",
"is",
"only",
"used",
"for",
"projection",
"queries",
".",
"The"... | [
"func",
"(",
"q",
"*",
"<mask>",
")",
"DistinctOn",
"(",
"fieldNames",
"...",
"string",
")",
"*",
"Query",
"{",
"q",
"=",
"q",
".",
"clone",
"(",
")",
"\n",
"q",
".",
"distinctOn",
"=",
"fieldNames",
"\n",
"return",
"q",
"\n",
"}"
] |
634 | all-635 | [
"max",
"tests",
"whether",
"a",
"variable",
"value",
"is",
"lesser",
"than",
"a",
"given",
"value",
".",
"For",
"numbers",
"it",
"s",
"a",
"simple",
"lesser",
"-",
"than",
"test",
";",
"for",
"strings",
"it",
"tests",
"the",
"number",
"of",
"characters",... | [
"func",
"hasMaxOf",
"(",
"top",
"interface",
"{",
"}",
",",
"current",
"interface",
"{",
"}",
",",
"field",
"interface",
"{",
"}",
",",
"param",
"string",
")",
"bool",
"{",
"return",
"isLte",
"(",
"top",
",",
"<mask>",
",",
"field",
",",
"param",
")"... |
635 | all-636 | [
"parseKV",
"would",
"allocate",
"a",
"new",
"byte",
"slice",
"for",
"key",
"and",
"for",
"value",
"."
] | [
"func",
"(",
"itr",
"*",
"blockIterator",
")",
"parseKV",
"(",
"h",
"header",
")",
"{",
"if",
"cap",
"(",
"itr",
".",
"key",
")",
"<",
"int",
"(",
"h",
".",
"plen",
"+",
"h",
".",
"klen",
")",
"{",
"sz",
":=",
"int",
"(",
"h",
".",
"plen",
... |
636 | all-637 | [
"New",
"-",
"create",
"a",
"new",
"api",
"client"
] | [
"func",
"New",
"(",
"uri",
"string",
",",
"user",
"string",
",",
"password",
"string",
")",
"InnkeeperClient",
"{",
"return",
"&",
"IkClient",
"{",
"URI",
":",
"uri",
",",
"User",
":",
"<mask>",
",",
"Password",
":",
"password",
",",
"}",
"\n",
"}"
] |
637 | all-638 | [
"Helper",
"function",
"that",
"appends",
"a",
"string",
"to",
"output",
"file"
] | [
"func",
"write",
"(",
"b",
"[",
"]",
"byte",
")",
"{",
"f",
",",
"err",
":=",
"os",
".",
"OpenFile",
"(",
"<mask>",
",",
"os",
".",
"O_APPEND",
"|",
"os",
".",
"O_WRONLY",
"|",
"os",
".",
"O_CREATE",
",",
"0644",
")",
"\n",
"if",
"err",
"!=",
... |
638 | all-639 | [
"NewDriver",
"creates",
"a",
"Driver",
"with",
"the",
"specified",
"machineName",
"and",
"storePath",
"."
] | [
"func",
"NewDriver",
"(",
"machineName",
",",
"storePath",
"string",
")",
"drivers",
".",
"Driver",
"{",
"return",
"&",
"Driver",
"{",
"InstanceProfile",
":",
"defaultInstanceProfile",
",",
"DiskSize",
":",
"defaultDiskSize",
",",
"<mask>",
":",
"defaultImage",
... |
639 | all-640 | [
"getMessageBaseQueryString",
"gets",
"a",
"Querystring",
"representing",
"this",
"message",
"."
] | [
"func",
"(",
"op",
"*",
"outgoingMessageBase",
")",
"getBaseQueryString",
"(",
")",
"querystring",
"{",
"toReturn",
":=",
"<mask>",
"[",
"string",
"]",
"string",
"{",
"}",
"\n",
"if",
"op",
".",
"Recipient",
".",
"isChannel",
"(",
")",
"{",
"//Channel.",
... |
640 | all-641 | [
"title",
":",
"remove",
"node",
"path",
":",
"/",
"{",
"provisioner",
"}",
"/",
"node",
"/",
"{",
"address",
"}",
"method",
":",
"DELETE",
"responses",
":",
"200",
":",
"Ok",
"401",
":",
"Unauthorized",
"404",
":",
"Not",
"found"
] | [
"func",
"removeNodeHandler",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"address",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
... |
641 | all-642 | [
"printResponseKey",
"only",
"supports",
"to",
"print",
"key",
"correctly",
"."
] | [
"func",
"printResponseKey",
"(",
"resp",
"*",
"client",
".",
"Response",
",",
"format",
"string",
")",
"{",
"// Format the result.",
"switch",
"format",
"{",
"case",
"\"",
"\"",
":",
"if",
"resp",
".",
"Action",
"!=",
"\"",
"\"",
"{",
"fmt",
".",
"Printl... |
642 | all-643 | [
"Wait",
"for",
"all",
"stats",
"to",
"be",
"sent",
"or",
"until",
"timeout",
".",
"Useful",
"for",
"simple",
"command",
"-",
"line",
"apps",
"to",
"defer",
"a",
"call",
"to",
"this",
"in",
"main",
"()"
] | [
"func",
"(",
"r",
"*",
"BasicReporter",
")",
"WaitUntilFinished",
"(",
"timeout",
"time",
".",
"Duration",
")",
"bool",
"{",
"go",
"r",
".",
"finish",
"(",
")",
"\n",
"select",
"{",
"<mask>",
"<-",
"r",
".",
"done",
":",
"return",
"true",
"\n",
"case... |
643 | all-644 | [
"EtcdVolumeClaim",
"creates",
"a",
"persistent",
"volume",
"claim",
"of",
"size",
"GB",
".",
"Note",
"that",
"if",
"you",
"re",
"controlling",
"Etcd",
"with",
"a",
"Stateful",
"Set",
"this",
"is",
"unnecessary",
"(",
"the",
"stateful",
"set",
"controller",
"... | [
"func",
"EtcdVolumeClaim",
"(",
"size",
"int",
",",
"opts",
"*",
"AssetOpts",
")",
"*",
"v1",
".",
"PersistentVolumeClaim",
"{",
"return",
"&",
"v1",
".",
"PersistentVolumeClaim",
"{",
"TypeMeta",
":",
"metav1",
".",
"TypeMeta",
"{",
"Kind",
":",
"\"",
"\"... |
644 | all-645 | [
"retrieve",
"information",
"about",
"implementation",
"-",
"dependent",
"support",
"for",
"internal",
"formats"
] | [
"func",
"GetInternalformativ",
"(",
"target",
"uint32",
",",
"internalformat",
"uint32",
",",
"pname",
"uint32",
",",
"bufSize",
"int32",
",",
"params",
"*",
"int32",
")",
"{",
"C",
".",
"glowGetInternalformativ",
"(",
"gpGetInternalformativ",
",",
"(",
"C",
"... |
645 | all-646 | [
"flattenHostNetworkPolicy",
"reads",
"various",
"fields",
"from",
"a",
"HostNetworkPolicy",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenHostNetworkPolicy",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"<mask>",
".",
"HostNetworkPolicy",
")",
"error",
"{",
"if",
"err",
":=",
"flattenHostNetworkSecurityPolicy",
"(",
"d",
",",
"obj",
".",
"Security",
")",
";",
... |
646 | all-647 | [
"release",
"the",
"mapping",
"of",
"a",
"buffer",
"object",
"s",
"data",
"store",
"into",
"the",
"client",
"s",
"address",
"space"
] | [
"func",
"UnmapBuffer",
"(",
"<mask>",
"uint32",
")",
"bool",
"{",
"ret",
":=",
"C",
".",
"glowUnmapBuffer",
"(",
"gpUnmapBuffer",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"target",
")",
")",
"\n",
"return",
"ret",
"==",
"TRUE",
"\n",
"}"
] |
647 | all-648 | [
"NewCRDClientForAPIVersionKind",
"return",
"rest",
"client",
"for",
"the",
"given",
"apiVersion",
"and",
"kind",
"of",
"the",
"CRD"
] | [
"func",
"NewCRDClientForAPIVersionKind",
"(",
"client",
"kubernetes",
".",
"Interface",
",",
"kubeConfig",
",",
"kubeMaster",
",",
"apiVersion",
",",
"kind",
"string",
")",
"(",
"*",
"rest",
".",
"RESTClient",
",",
"*",
"runtime",
".",
"Scheme",
",",
"error",
... |
648 | all-649 | [
"IterIsValid",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_list_store_iter_is_valid",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ListStore",
")",
"IterIsValid",
"(",
"iter",
"*",
"TreeIter",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_list_store_iter_is_valid",
"(",
"v",
".",
"native",
"(",
")",
",",
"iter",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",... |
649 | all-650 | [
"==",
"Editing",
"AddUser",
"adds",
"an",
"user",
"to",
"both",
"user",
"and",
"shadow",
"files",
"."
] | [
"func",
"AddUser",
"(",
"name",
"string",
",",
"gid",
"int",
")",
"(",
"uid",
"int",
",",
"err",
"error",
")",
"{",
"s",
":=",
"NewShadow",
"(",
"<mask>",
")",
"\n",
"if",
"err",
"=",
"s",
".",
"Add",
"(",
"nil",
")",
";",
"err",
"!=",
"nil",
... |
650 | all-651 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkLabel",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkLabel",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
"v",
".... |
651 | all-652 | [
"GetIsAdmin",
"returns",
"the",
"IsAdmin",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"u",
"*",
"User",
")",
"GetIsAdmin",
"(",
")",
"bool",
"{",
"if",
"u",
"==",
"nil",
"||",
"u",
".",
"IsAdmin",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"u",
".",
"IsAdmin",
"\n",
"}"
] |
652 | all-653 | [
"specify",
"a",
"one",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"TexSubImage1D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"width",
"int32",
",",
"format",
"uint32",
",",
"xtype",
"uint32",
",",
"pixels",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
".",
"glowTexSubImage1D",
"(",... |
653 | all-654 | [
"Serve",
"serves",
"incoming",
"connections",
"from",
"the",
"given",
"listener",
"using",
"the",
"given",
"handler",
".",
"Serve",
"blocks",
"until",
"the",
"given",
"listener",
"returns",
"permanent",
"error",
"."
] | [
"func",
"Serve",
"(",
"ln",
"net",
".",
"Listener",
",",
"handler",
"RequestHandler",
")",
"error",
"{",
"s",
":=",
"&",
"<mask>",
"{",
"Handler",
":",
"handler",
",",
"}",
"\n",
"return",
"s",
".",
"Serve",
"(",
"ln",
")",
"\n",
"}"
] |
654 | all-655 | [
"ListZpools",
"list",
"all",
"ZFS",
"zpools",
"accessible",
"on",
"the",
"current",
"system",
"."
] | [
"func",
"ListZpools",
"(",
")",
"(",
"[",
"]",
"*",
"Zpool",
",",
"error",
")",
"{",
"args",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
"}",
"\n",
"out",
",",
"err",
":=",
"zpool",
"(",
"args",
"...",
")",
... |
655 | all-656 | [
"Time",
"returns",
"the",
"time",
"of",
"the",
"event",
"in",
"milliseconds",
"."
] | [
"func",
"(",
"v",
"*",
"EventMotion",
")",
"Time",
"(",
")",
"uint32",
"{",
"c",
":=",
"v",
".",
"native",
"(",
")",
".",
"<mask>",
"\n",
"return",
"uint32",
"(",
"c",
")",
"\n",
"}"
] |
656 | all-657 | [
"CancelRotateSecretWithContext",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"CancelRotateSecretWithContext",
"(",
"arg0",
"aws",
".",
"Context",
",",
"arg1",
"*",
"secretsmanager",
".",
"CancelRotateSecretInput",
",",
"arg2",
"...",
"request",
".",
"Option",
")",
"(",
"*",
"secretsman... |
657 | all-658 | [
"String",
"returns",
"a",
"human",
"readable",
"string",
"representation",
"of",
"this",
"object"
] | [
"func",
"(",
"ts",
"TaskStatus",
")",
"String",
"(",
")",
"string",
"{",
"for",
"k",
",",
"v",
":=",
"<mask>",
"taskStatusMap",
"{",
"if",
"v",
"==",
"ts",
"{",
"return",
"k",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"\"",
"\"",
"\n",
"}"
] |
658 | all-659 | [
"Clone",
"returns",
"a",
"clone",
"of",
"the",
"current",
"Part",
"."
] | [
"func",
"(",
"p",
"*",
"Part",
")",
"Clone",
"(",
"parent",
"*",
"Part",
")",
"*",
"Part",
"{",
"if",
"p",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"newPart",
":=",
"&",
"<mask>",
"{",
"PartID",
":",
"p",
".",
"PartID",
",",
"Heade... |
659 | all-660 | [
"DepthMatchFirst",
"performs",
"a",
"depth",
"first",
"search",
"of",
"the",
"Part",
"tree",
"and",
"returns",
"the",
"first",
"part",
"that",
"causes",
"the",
"given",
"matcher",
"to",
"return",
"true"
] | [
"func",
"(",
"p",
"*",
"Part",
")",
"DepthMatchFirst",
"(",
"matcher",
"PartMatcher",
")",
"*",
"Part",
"{",
"root",
":=",
"p",
"\n",
"for",
"{",
"if",
"matcher",
"(",
"p",
")",
"{",
"return",
"p",
"\n",
"}",
"\n",
"c",
":=",
"p",
".",
"FirstChil... |
660 | all-661 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetHistogramParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser14",
"(",
"&",
... |
661 | all-662 | [
"keyToReferenceValue",
"is",
"the",
"same",
"as",
"keyToProto",
"except",
"the",
"output",
"is",
"a",
"PropertyValue_ReferenceValue",
"instead",
"of",
"a",
"Reference",
"."
] | [
"func",
"keyToReferenceValue",
"(",
"defaultAppID",
"string",
",",
"k",
"*",
"Key",
")",
"*",
"pb",
".",
"PropertyValue_ReferenceValue",
"{",
"ref",
":=",
"keyToProto",
"(",
"defaultAppID",
",",
"k",
")",
"\n",
"pe",
":=",
"<mask>",
"(",
"[",
"]",
"*",
"... |
662 | all-663 | [
"Build",
"triggers",
"a",
"new",
"build",
"for",
"the",
"given",
"project",
"for",
"the",
"given",
"project",
"on",
"the",
"given",
"branch",
".",
"Returns",
"the",
"new",
"build",
"information"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Build",
"(",
"<mask>",
",",
"repo",
",",
"branch",
"string",
")",
"(",
"*",
"Build",
",",
"error",
")",
"{",
"return",
"c",
".",
"BuildOpts",
"(",
"account",
",",
"repo",
",",
"branch",
",",
"nil",
")",
"\n"... |
663 | all-664 | [
"Exec",
"the",
"template",
"using",
"the",
"content",
"and",
"return",
"the",
"results"
] | [
"func",
"(",
"t",
"*",
"<mask>",
")",
"Exec",
"(",
"ctx",
"hctx",
".",
"Context",
")",
"(",
"string",
",",
"error",
")",
"{",
"err",
":=",
"t",
".",
"Parse",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err",
"\n... |
664 | all-665 | [
"Stop",
"signals",
"the",
"internal",
"goroutine",
"to",
"exit",
"and",
"waits",
"until",
"it",
"have",
"."
] | [
"func",
"(",
"b",
"*",
"ChannelMemoryBackend",
")",
"Stop",
"(",
")",
"{",
"b",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"if",
"b",
".",
"running",
"==",
"<mask>",
"{",
"b",
".",
"running",
"=",
"false",
"\n",
"b",
".",
"events",
"<-",
"eventStop"... |
665 | all-666 | [
"Show",
"the",
"current",
"user",
"if",
"logged",
"in",
"otherwise",
"display",
"a",
"login",
"form",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"viewHandler",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"data",
":=",
"templateData",
"{",
"User",
":",
"c",
".",
"user",
",",
"Error",
":",
"c",
".",
"err",
"... |
666 | all-667 | [
"merge",
"for",
"a",
"role",
"works",
"the",
"same",
"as",
"User",
"above",
"--",
"atomic",
"Role",
"application",
"to",
"each",
"of",
"the",
"substructures",
"."
] | [
"func",
"(",
"r",
"Role",
")",
"merge",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"n",
"Role",
")",
"(",
"Role",
",",
"error",
")",
"{",
"var",
"<mask>",
"Role",
"\n",
"var",
"err",
"error",
"\n",
"if",
"r",
".",
"Role",
"!=",
"n",
".",
"Rol... |
667 | all-668 | [
"applyV2Request",
"interprets",
"r",
"as",
"a",
"call",
"to",
"v2store",
".",
"X",
"and",
"returns",
"a",
"Response",
"interpreted",
"from",
"v2store",
".",
"Event"
] | [
"func",
"(",
"s",
"*",
"EtcdServer",
")",
"applyV2Request",
"(",
"r",
"*",
"RequestV2",
")",
"Response",
"{",
"defer",
"warnOfExpensiveRequest",
"(",
"s",
".",
"getLogger",
"(",
")",
",",
"time",
".",
"Now",
"(",
")",
",",
"r",
",",
"nil",
",",
"nil"... |
668 | all-669 | [
"/",
"*",
"Record",
"a",
"custom",
"metric",
"."
] | [
"func",
"RecordMetric",
"(",
"name",
"string",
",",
"value",
"float64",
")",
"(",
"int",
",",
"error",
")",
"{",
"cname",
":=",
"C",
".",
"CString",
"(",
"name",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cname",
"... |
669 | all-670 | [
"GetDefinitionOk",
"returns",
"a",
"tuple",
"with",
"the",
"Definition",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"Graph",
")",
"GetDefinitionOk",
"(",
")",
"(",
"GraphDefinition",
",",
"bool",
")",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"Definition",
"==",
"nil",
"{",
"return",
"GraphDefinition",
"{",
"}",
",",
"false",
"\n",
"}",
... |
670 | all-671 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"RequestEntriesParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage1",
"(",
"... |
671 | all-672 | [
"AddPerfDatum",
"adds",
"a",
"metric",
"to",
"the",
"set",
"output",
"by",
"the",
"check",
".",
"unit",
"must",
"be",
"a",
"valid",
"Nagios",
"unit",
"of",
"measurement",
"(",
"UOM",
")",
":",
"us",
"ms",
"s",
"%",
"b",
"kb",
"mb",
"gb",
"tb",
"c",... | [
"func",
"(",
"c",
"*",
"Check",
")",
"AddPerfDatum",
"(",
"label",
",",
"unit",
"string",
",",
"value",
"float64",
",",
"thresholds",
"...",
"float64",
")",
"error",
"{",
"datum",
",",
"err",
":=",
"NewPerfDatum",
"(",
"<mask>",
",",
"unit",
",",
"valu... |
672 | all-673 | [
"StoreSeries",
"keeps",
"track",
"of",
"which",
"series",
"we",
"know",
"about",
"for",
"lookups",
"when",
"sending",
"samples",
"to",
"remote",
"."
] | [
"func",
"(",
"t",
"*",
"QueueManager",
")",
"StoreSeries",
"(",
"series",
"[",
"]",
"tsdb",
".",
"RefSeries",
",",
"index",
"int",
")",
"{",
"// Lock before any calls to labelsToLabels proto, as that's where string interning is done.",
"t",
".",
"seriesMtx",
".",
"Loc... |
673 | all-674 | [
"refMatchesPrefix",
"returns",
"true",
"iff",
"ref",
"which",
"is",
"a",
"registry",
"repository",
"namespace",
"repository",
"or",
"image",
"reference",
"(",
"as",
"formatted",
"by",
"reference",
".",
"Domain",
"()",
"reference",
".",
"Named",
".",
"Name",
"(... | [
"func",
"refMatchesPrefix",
"(",
"ref",
",",
"prefix",
"string",
")",
"bool",
"{",
"switch",
"{",
"case",
"len",
"(",
"ref",
")",
"<",
"len",
"(",
"prefix",
")",
":",
"return",
"false",
"\n",
"case",
"len",
"(",
"ref",
")",
"==",
"len",
"(",
"prefi... |
674 | all-675 | [
"Do",
"executes",
"Overlay",
".",
"highlightRect",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"HighlightRectParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandHighlightRect",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
675 | all-676 | [
"GetUfloat",
"returns",
"ufloat",
"value",
"for",
"the",
"given",
"key",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"GetUfloat",
"(",
"key",
"string",
")",
"(",
"float64",
",",
"error",
")",
"{",
"<mask>",
":=",
"a",
".",
"Peek",
"(",
"key",
")",
"\n",
"if",
"len",
"(",
"value",
")",
"==",
"0",
"{",
"return",
"-",
"1",
"... |
676 | all-677 | [
"SchemeDriverAndAliases",
"returns",
"the",
"registered",
"driver",
"and",
"aliases",
"for",
"a",
"database",
"scheme",
"."
] | [
"func",
"SchemeDriverAndAliases",
"(",
"<mask>",
"string",
")",
"(",
"string",
",",
"[",
"]",
"string",
")",
"{",
"if",
"scheme",
",",
"ok",
":=",
"schemeMap",
"[",
"name",
"]",
";",
"ok",
"{",
"driver",
":=",
"scheme",
".",
"Driver",
"\n",
"if",
"sc... |
677 | all-678 | [
"MustLiveEntry",
"retrieves",
"the",
"LiveEntry",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"BucketEntry",
")",
"MustLiveEntry",
"(",
")",
"LedgerEntry",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetLiveEntry",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"val",
"\... |
678 | all-679 | [
"analyze",
"checks",
"the",
"app",
"for",
"building",
"with",
"the",
"given",
"build",
"tags",
"and",
"returns",
"hasMain",
"app",
"files",
"and",
"a",
"map",
"of",
"full",
"directory",
"import",
"names",
"to",
"original",
"import",
"names",
"."
] | [
"func",
"analyze",
"(",
"tags",
"[",
"]",
"string",
")",
"(",
"*",
"app",
",",
"error",
")",
"{",
"ctxt",
":=",
"buildContext",
"(",
"<mask>",
")",
"\n",
"hasMain",
",",
"appFiles",
",",
"err",
":=",
"checkMain",
"(",
"ctxt",
")",
"\n",
"if",
"err"... |
679 | all-680 | [
"buildFuncDecl",
"builds",
"SSA",
"code",
"for",
"the",
"function",
"or",
"method",
"declared",
"by",
"decl",
"in",
"package",
"pkg",
"."
] | [
"func",
"(",
"b",
"*",
"builder",
")",
"buildFuncDecl",
"(",
"pkg",
"*",
"Package",
",",
"decl",
"*",
"ast",
".",
"FuncDecl",
")",
"{",
"id",
":=",
"decl",
".",
"Name",
"\n",
"if",
"isBlankIdent",
"(",
"<mask>",
")",
"{",
"return",
"// discard",
"\n"... |
680 | all-681 | [
"NewWithNamespace",
"returns",
"a",
"new",
"UUIDv5",
"(",
"or",
"v4",
"if",
"name",
"is",
"empty",
")",
"encoded",
"with",
"base57",
"."
] | [
"func",
"NewWithNamespace",
"(",
"name",
"string",
")",
"string",
"{",
"var",
"u",
"uuid",
".",
"UUID",
"\n\n",
"switch",
"{",
"case",
"name",
"==",
"\"",
"\"",
":",
"u",
"=",
"uuid",
".",
"New",
"(",
")",
"\n",
"<mask>",
"strings",
".",
"HasPrefix",... |
681 | all-682 | [
"handleErr",
"checks",
"if",
"an",
"error",
"happened",
"and",
"makes",
"sure",
"we",
"will",
"retry",
"later",
"."
] | [
"func",
"(",
"c",
"*",
"Controller",
")",
"handleErr",
"(",
"err",
"error",
",",
"<mask>",
"item",
")",
"{",
"if",
"c",
".",
"queue",
".",
"NumRequeues",
"(",
"key",
")",
"<",
"5",
"{",
"glog",
".",
"Infof",
"(",
"\"",
"\"",
",",
"key",
".",
"c... |
682 | all-683 | [
"GetSize",
"is",
"a",
"wrapper",
"around",
"gtk_window_get_size",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"GetSize",
"(",
")",
"(",
"width",
",",
"<mask>",
"int",
")",
"{",
"var",
"w",
",",
"h",
"C",
".",
"gint",
"\n",
"C",
".",
"gtk_window_get_size",
"(",
"v",
".",
"native",
"(",
")",
",",
"&",
"w",
",",
"&"... |
683 | all-684 | [
"GetContextError",
"converts",
"the",
"context",
"error",
"to",
"a",
"tchannel",
"error",
"."
] | [
"func",
"GetContextError",
"(",
"err",
"error",
")",
"error",
"{",
"if",
"err",
"==",
"context",
".",
"DeadlineExceeded",
"{",
"return",
"ErrTimeout",
"\n",
"}",
"\n",
"if",
"err",
"==",
"<mask>",
".",
"Canceled",
"{",
"return",
"ErrRequestCancelled",
"\n",
... |
684 | all-685 | [
"ForRepo",
"indicates",
"if",
"the",
"tide",
"query",
"applies",
"to",
"the",
"specified",
"repo",
"."
] | [
"func",
"(",
"tq",
"TideQuery",
")",
"ForRepo",
"(",
"org",
",",
"repo",
"string",
")",
"bool",
"{",
"fullName",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
")",
"\n",
"for",
"_",
",",
"queryOrg",
":=",
"range",
"tq",
"... |
685 | all-686 | [
"keyFromChannelData",
"returns",
"the",
"unique",
"channel",
"identifier",
"used",
"in",
"a",
"Privatix",
"Service",
"Contract",
"."
] | [
"func",
"(",
"w",
"*",
"Worker",
")",
"keyFromChannelData",
"(",
"logger",
"log",
".",
"Logger",
",",
"channel",
"string",
")",
"(",
"data",
".",
"Base64String",
",",
"error",
")",
"{",
"ch",
",",
"err",
":=",
"w",
".",
"channel",
"(",
"logger",
",",... |
686 | all-687 | [
"open",
"is",
"a",
"clone",
"of",
"os",
".",
"OpenFile",
"without",
"the",
"O_CLOEXEC",
"used",
"to",
"open",
"the",
"pty",
"slave",
"."
] | [
"func",
"(",
"c",
"*",
"linuxConsole",
")",
"open",
"(",
"flag",
"int",
")",
"(",
"*",
"<mask>",
".",
"File",
",",
"error",
")",
"{",
"r",
",",
"e",
":=",
"syscall",
".",
"Open",
"(",
"c",
".",
"slavePath",
",",
"flag",
",",
"0",
")",
"\n",
"... |
687 | all-688 | [
"NewDiscovery",
"returns",
"a",
"new",
"Discovery",
"which",
"periodically",
"refreshes",
"its",
"targets",
"."
] | [
"func",
"NewDiscovery",
"(",
"conf",
"SDConfig",
",",
"logger",
"log",
".",
"Logger",
")",
"*",
"Discovery",
"{",
"if",
"logger",
"==",
"nil",
"{",
"logger",
"=",
"log",
".",
"NewNopLogger",
"(",
")",
"\n",
"}",
"\n\n",
"qtype",
":=",
"dns",
".",
"Ty... |
688 | all-689 | [
"Dief",
"executes",
"the",
"same",
"function",
"on",
"the",
"default",
"Base",
"instance"
] | [
"func",
"Dief",
"(",
"exitCode",
"int",
",",
"msg",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
"{",
"curDefault",
".",
"Dief",
"(",
"exitCode",
",",
"msg",
",",
"a",
"...",
")",
"\n",
"}"
] |
689 | all-690 | [
"checkApiErrors",
"checks",
"for",
"errors",
"returned",
"by",
"coinbase",
"API",
"JSON",
"response",
"i",
".",
"e",
"{",
"success",
":",
"false",
"errors",
":",
"[",
"Button",
"with",
"code",
"code123456",
"does",
"not",
"exist",
"]",
"...",
"}"
] | [
"func",
"checkApiErrors",
"(",
"resp",
"response",
",",
"method",
"string",
")",
"error",
"{",
"if",
"resp",
".",
"Success",
"==",
"false",
"{",
"// Return errors received from API here",
"err",
":=",
"\"",
"\"",
"+",
"<mask>",
"+",
"\"",
"\"",
"\n",
"if",
... |
690 | all-691 | [
"canonicalizeGitHubUsername",
"corrects",
"user",
"for",
"case",
"errors",
"by",
"looking",
"up",
"the",
"corresponding",
"user",
"s",
"GitHub",
"profile",
"and",
"extracting",
"their",
"login",
"ID",
"from",
"that",
".",
"user",
"should",
"not",
"have",
"any",
... | [
"func",
"canonicalizeGitHubUsername",
"(",
"ctx",
"context",
".",
"Context",
",",
"user",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"strings",
".",
"Index",
"(",
"user",
",",
"\"",
"\"",
")",
">=",
"0",
"{",
"return",
"\"",
"\"",
",... |
691 | all-692 | [
"Fetch",
"information",
"about",
"the",
"containers",
"on",
"the",
"given",
"remote",
"node",
"using",
"the",
"rest",
"API",
"and",
"with",
"a",
"timeout",
"of",
"30",
"seconds",
"."
] | [
"func",
"doContainersGetFromNode",
"(",
"project",
",",
"node",
"string",
",",
"cert",
"*",
"shared",
".",
"CertInfo",
")",
"(",
"[",
"]",
"api",
".",
"Container",
",",
"error",
")",
"{",
"f",
":=",
"func",
"(",
")",
"(",
"[",
"]",
"api",
".",
"Con... |
692 | all-693 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CreateTargetParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23",
"(",
"&",
"w",
",",
"v",
")"... |
693 | all-694 | [
"Do",
"executes",
"Debugger",
".",
"setScriptSource",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"callFrames",
"-",
"New",
"stack",
"trace",
"in",
"case",
"editing",
"has",
"happened",
"while",
"VM",
"was",
"stopped",
".",
"stackChanged",
"-... | [
"func",
"(",
"p",
"*",
"SetScriptSourceParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"callFrames",
"[",
"]",
"*",
"CallFrame",
",",
"stackChanged",
"bool",
",",
"asyncStackTrace",
"*",
"runtime",
".",
"StackTrace",
",",
"asyncStackTrac... |
694 | all-695 | [
"canonicalHostedZone",
"returns",
"the",
"matching",
"canonical",
"zone",
"for",
"a",
"given",
"hostname",
"."
] | [
"func",
"canonicalHostedZone",
"(",
"hostname",
"string",
")",
"string",
"{",
"for",
"suffix",
",",
"zone",
":=",
"<mask>",
"canonicalHostedZones",
"{",
"if",
"strings",
".",
"HasSuffix",
"(",
"hostname",
",",
"suffix",
")",
"{",
"return",
"zone",
"\n",
"}",... |
695 | all-696 | [
"/",
"*",
"Errorm",
"uses",
"msg",
"as",
"a",
"format",
"string",
"with",
"subsequent",
"parameters",
"as",
"values",
"and",
"logs",
"the",
"resulting",
"message",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelError",
".",
"It",
"will",
"al... | [
"func",
"(",
"la",
"*",
"LogAdapter",
")",
"Errorm",
"(",
"m",
"*",
"Attrs",
",",
"<mask>",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"la",
".",
"Log",
"(",
"LevelError",
",",
"m",
",",
"msg",
",",
"a",
"...",... |
696 | all-697 | [
"NewRemoteCache",
"creates",
"a",
"new",
"RemoteCache",
"with",
"a",
"set",
"of",
"known",
"repositories",
".",
"The",
"Root",
"and",
"Remote",
"methods",
"will",
"return",
"information",
"about",
"repositories",
"listed",
"here",
"without",
"accessing",
"the",
... | [
"func",
"NewRemoteCache",
"(",
"knownRepos",
"[",
"]",
"Repo",
")",
"(",
"r",
"*",
"RemoteCache",
",",
"cleanup",
"func",
"(",
")",
"error",
")",
"{",
"r",
"=",
"&",
"RemoteCache",
"{",
"RepoRootForImportPath",
":",
"vcs",
".",
"RepoRootForImportPath",
","... |
697 | all-698 | [
"Restart",
"reboots",
"the",
"existing",
"VM",
"instance",
"."
] | [
"func",
"(",
"d",
"*",
"Driver",
")",
"Restart",
"(",
")",
"error",
"{",
"cs",
":=",
"d",
".",
"client",
"(",
")",
"\n",
"_",
",",
"err",
":=",
"cs",
".",
"RequestWithContext",
"(",
"<mask>",
".",
"TODO",
"(",
")",
",",
"&",
"egoscale",
".",
"R... |
698 | all-699 | [
"SetDefault",
"设置默认值,支持类型string和数字"
] | [
"func",
"(",
"m",
"*",
"Model",
")",
"SetDefault",
"(",
")",
"error",
"{",
"cType",
":=",
"reflect",
".",
"TypeOf",
"(",
"m",
")",
".",
"Elem",
"(",
")",
"\n",
"cValue",
":=",
"reflect",
".",
"ValueOf",
"(",
"m",
")",
".",
"Elem",
"(",
")",
"\n... |
699 | all-700 | [
"ParseStrictDDL",
"is",
"the",
"same",
"as",
"Parse",
"except",
"it",
"errors",
"on",
"partially",
"parsed",
"DDL",
"statements",
"."
] | [
"func",
"ParseStrictDDL",
"(",
"sql",
"string",
")",
"(",
"Statement",
",",
"<mask>",
")",
"{",
"tokenizer",
":=",
"NewStringTokenizer",
"(",
"sql",
")",
"\n",
"if",
"yyParse",
"(",
"tokenizer",
")",
"!=",
"0",
"{",
"return",
"nil",
",",
"tokenizer",
"."... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.