id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
3,800 | all-3801 | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"post",
"apps",
"app",
"routes",
"params"
] | [
"func",
"(",
"o",
"*",
"PostAppsAppRoutesParams",
")",
"WithTimeout",
"(",
"timeout",
"<mask>",
".",
"Duration",
")",
"*",
"PostAppsAppRoutesParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
3,801 | all-3802 | [
"SecurityGroupRuleLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"SecurityGroupRuleLocator",
"(",
"href",
"<mask>",
")",
"*",
"SecurityGroupRuleLocator",
"{",
"return",
"&",
"SecurityGroupRuleLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
3,802 | all-3803 | [
"Reverse",
"returns",
"items",
"in",
"the",
"opposite",
"order",
"it",
"encountered",
"them",
"in",
"."
] | [
"func",
"(",
"iter",
"Enumerator",
")",
"Reverse",
"(",
")",
"Enumerator",
"{",
"cache",
":=",
"NewStack",
"(",
")",
"\n",
"for",
"entry",
":=",
"range",
"iter",
"{",
"cache",
".",
"Push",
"(",
"entry",
")",
"\n",
"}",
"\n\n",
"retval",
":=",
"<mask>... |
3,803 | all-3804 | [
"Handler",
"is",
"the",
"main",
"HTTP",
"handler",
"for",
"the",
"Messenger",
"service",
".",
"It",
"MUST",
"be",
"attached",
"to",
"some",
"web",
"server",
"in",
"order",
"to",
"receive",
"messages"
] | [
"func",
"(",
"m",
"*",
"Messenger",
")",
"Handler",
"(",
"rw",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"if",
"req",
".",
"Method",
"==",
"\"",
"\"",
"{",
"query",
":=",
"req",
".",
"URL",
".",
"<mask>",
"... |
3,804 | all-3805 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetResponseBodyForInterceptionReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork30",
"(",
"&",
"w",... |
3,805 | all-3806 | [
"Must",
"returns",
"a",
"config",
"object",
"that",
"must",
"compile",
".",
"If",
"there",
"are",
"any",
"errors",
"this",
"function",
"will",
"panic",
".",
"This",
"is",
"most",
"useful",
"in",
"testing",
"or",
"constants",
"."
] | [
"func",
"Must",
"(",
"s",
"string",
")",
"*",
"Config",
"{",
"c",
",",
"err",
":=",
"Parse",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"<mask>",
".",
"Fatal",
"(",
"err",
")",
"\n",
"}",
"\n",
"return",
"c",
"\n",
"}"
] |
3,806 | all-3807 | [
"Do",
"executes",
"Animation",
".",
"seekAnimations",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SeekAnimationsParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSeekAnimations",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
3,807 | all-3808 | [
"loadTheme",
"loads",
"the",
"theme",
"if",
"it",
"is",
"not",
"in",
"the",
"cache",
"already",
".",
"If",
"theme",
"is",
"in",
"the",
"cache",
"loadTheme",
"does",
"nothing"
] | [
"func",
"(",
"s",
"*",
"ThemeManager",
")",
"loadTheme",
"(",
"name",
"string",
")",
"{",
"thememtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"thememtx",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"_",
",",
"ok",
":=",
"s",
".",
"themes",
"[",
"name",
... |
3,808 | all-3809 | [
"ListenAndServeUNIX",
"serves",
"HTTP",
"requests",
"from",
"the",
"given",
"UNIX",
"addr",
".",
"The",
"function",
"deletes",
"existing",
"file",
"at",
"addr",
"before",
"starting",
"serving",
".",
"The",
"server",
"sets",
"the",
"given",
"file",
"mode",
"for... | [
"func",
"(",
"s",
"*",
"Server",
")",
"ListenAndServeUNIX",
"(",
"addr",
"string",
",",
"mode",
"os",
".",
"FileMode",
")",
"error",
"{",
"if",
"err",
":=",
"os",
".",
"Remove",
"(",
"addr",
")",
";",
"err",
"!=",
"nil",
"&&",
"!",
"<mask>",
".",
... |
3,809 | all-3810 | [
"NewStreamDecoder",
"returns",
"a",
"new",
"JSON",
"stream",
"decoder",
"that",
"parses",
"values",
"from",
"r",
"."
] | [
"func",
"NewStreamDecoder",
"(",
"r",
"<mask>",
".",
"Reader",
")",
"*",
"objconv",
".",
"StreamDecoder",
"{",
"return",
"objconv",
".",
"NewStreamDecoder",
"(",
"NewParser",
"(",
"r",
")",
")",
"\n",
"}"
] |
3,810 | all-3811 | [
"NumRanges",
"returns",
"the",
"number",
"of",
"discreet",
"sets",
"of",
"ranges",
"that",
"were",
"appended",
"."
] | [
"func",
"(",
"l",
"*",
"InclusiveRanges",
")",
"numRanges",
"(",
")",
"int",
"{",
"if",
"l",
".",
"blocks",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"len",
"(",
"l",
".",
"<mask>",
")",
"\n",
"}"
] |
3,811 | all-3812 | [
"newPkgDot",
"returns",
"an",
"ast",
".",
"Expr",
"referring",
"to",
"pkg",
".",
"name",
"at",
"position",
"pos",
"."
] | [
"func",
"newPkgDot",
"(",
"pos",
"token",
".",
"Pos",
",",
"pkg",
",",
"name",
"string",
")",
"ast",
".",
"Expr",
"{",
"return",
"&",
"ast",
".",
"SelectorExpr",
"{",
"X",
":",
"&",
"ast",
".",
"Ident",
"{",
"NamePos",
":",
"pos",
",",
"Name",
":... |
3,812 | all-3813 | [
"resourceVSphereDatastoreClusterApplyCreate",
"processes",
"the",
"creation",
"part",
"of",
"resourceVSphereDatastoreClusterCreate",
"."
] | [
"func",
"resourceVSphereDatastoreClusterApplyCreate",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
")",
"(",
"*",
"object",
".",
"StoragePod",
",",
"error",
")",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"resourc... |
3,813 | all-3814 | [
"FullConsoleUrl",
"returns",
"the",
"console",
"url",
"for",
"the",
"server",
"with",
"the",
"token",
"in",
"the",
"query",
"string",
".",
"Server",
"needs",
"a",
"ConsoleUrl",
"and",
"ConsoleToken",
"retrieved",
"using",
"ActivateConsoleForServer"
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"FullConsoleUrl",
"(",
")",
"string",
"{",
"if",
"s",
".",
"ConsoleUrl",
"==",
"\"",
"\"",
"||",
"s",
".",
"ConsoleToken",
"==",
"\"",
"\"",
"{",
"return",
"s",
".",
"ConsoleUrl",
"\n",
"}",
"\n",
"u",
",",
"... |
3,814 | all-3815 | [
"Validate",
"checks",
"that",
"the",
"minimum",
"fields",
"are",
"provided",
".",
"Deprecated",
":",
"This",
"map",
"be",
"deleted",
"after",
"the",
"native",
"library",
"replaces",
"Ruby",
"deps",
"and",
"should",
"not",
"be",
"used",
"outside",
"of",
"this... | [
"func",
"(",
"p",
"*",
"PublishRequest",
")",
"Validate",
"(",
")",
"error",
"{",
"p",
".",
"Args",
"=",
"[",
"]",
"string",
"{",
"}",
"\n\n",
"if",
"len",
"(",
"p",
".",
"PactURLs",
")",
"!=",
"0",
"{",
"p",
".",
"Args",
"=",
"append",
"(",
... |
3,815 | all-3816 | [
"getOpenBlockNumber",
"extracts",
"the",
"Open_block_number",
"field",
"of",
"a",
"given",
"channel",
"-",
"related",
"EthLog",
".",
"Returns",
"false",
"in",
"case",
"it",
"failed",
"i",
".",
"e",
".",
"the",
"event",
"has",
"no",
"such",
"field",
"."
] | [
"func",
"(",
"m",
"*",
"Monitor",
")",
"getOpenBlockNumber",
"(",
"el",
"*",
"data",
".",
"JobEthLog",
")",
"(",
"block",
"uint32",
",",
"ok",
"bool",
",",
"err",
"error",
")",
"{",
"var",
"event",
"string",
"\n",
"switch",
"el",
".",
"Topics",
"[",
... |
3,816 | all-3817 | [
"------------------------------------------------------------",
"Mutator",
"implementations",
"------------------------------------------------------------",
"MutateTransaction",
"for",
"AccountMergeBuilder",
"causes",
"the",
"underylying",
"Destination",
"to",
"be",
"added",
"to",
"th... | [
"func",
"(",
"m",
"AccountMergeBuilder",
")",
"MutateTransaction",
"(",
"o",
"*",
"TransactionBuilder",
")",
"error",
"{",
"if",
"m",
".",
"Err",
"!=",
"nil",
"{",
"return",
"m",
".",
"Err",
"\n",
"}",
"\n\n",
"m",
".",
"O",
".",
"Body",
",",
"m",
... |
3,817 | all-3818 | [
"GetTxSet",
"retrieves",
"the",
"TxSet",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"GetTxSet",
"(",
")",
"(",
"result",
"TransactionSet",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"<mask>",
")",
")",
"\n\n",
"if",
"armName"... |
3,818 | all-3819 | [
"Set",
"adds",
"a",
"string",
"to",
"r"
] | [
"func",
"(",
"r",
"*",
"RepeatedStringArg",
")",
"Set",
"(",
"s",
"string",
")",
"error",
"{",
"*",
"r",
"=",
"<mask>",
"(",
"*",
"r",
",",
"s",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
3,819 | all-3820 | [
"Infof",
"logs",
"at",
"the",
"INFO",
"log",
"level",
"using",
"a",
"standard",
"printf",
"format",
"string"
] | [
"func",
"Infof",
"(",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"if",
"Log",
"!=",
"nil",
"{",
"<mask>",
".",
"Info",
"(",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"args",
"...",
")",
")",
"\n",
"}",
"\n",
"}"
] |
3,820 | all-3821 | [
"SetFilter",
"is",
"a",
"wrapper",
"around",
"gtk_file_chooser_set_filter",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"FileChooser",
")",
"SetFilter",
"(",
"filter",
"*",
"FileFilter",
")",
"{",
"C",
".",
"gtk_file_chooser_set_filter",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
3,821 | all-3822 | [
"RouteHelpers",
"returns",
"a",
"map",
"of",
"BuildPathHelper",
"()",
"for",
"each",
"route",
"available",
"in",
"the",
"app",
"."
] | [
"func",
"(",
"a",
"*",
"App",
")",
"RouteHelpers",
"(",
")",
"map",
"[",
"string",
"]",
"RouteHelperFunc",
"{",
"rh",
":=",
"map",
"[",
"string",
"]",
"RouteHelperFunc",
"{",
"}",
"\n",
"for",
"_",
",",
"<mask>",
":=",
"range",
"a",
".",
"Routes",
... |
3,822 | all-3823 | [
"NewTemplate",
"creates",
"and",
"parses",
"a",
"new",
"Consul",
"Template",
"template",
"at",
"the",
"given",
"path",
".",
"If",
"the",
"template",
"does",
"not",
"exist",
"an",
"error",
"is",
"returned",
".",
"During",
"initialization",
"the",
"template",
... | [
"func",
"NewTemplate",
"(",
"i",
"*",
"NewTemplateInput",
")",
"(",
"*",
"Template",
",",
"error",
")",
"{",
"if",
"i",
"==",
"nil",
"{",
"i",
"=",
"&",
"NewTemplateInput",
"{",
"}",
"\n",
"}",
"\n\n",
"// Validate that we are either given the path or the expl... |
3,823 | all-3824 | [
"place",
"a",
"marker",
"in",
"the",
"feedback",
"buffer"
] | [
"func",
"PassThrough",
"(",
"token",
"float32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpPassThrough",
",",
"1",
",",
"uintptr",
"(",
"math",
".",
"Float32bits",
"(",
"<mask>",
")",
")",
",",
"0",
",",
"0",
")",
"\n",
"}"
] |
3,824 | all-3825 | [
"WithNamespace",
"adds",
"a",
"namespace",
"to",
"the",
"logging",
"context"
] | [
"func",
"WithNamespace",
"(",
"namespace",
"string",
",",
"ctx",
"<mask>",
".",
"Interface",
")",
"log",
".",
"Interface",
"{",
"return",
"ctx",
".",
"WithField",
"(",
"NamespaceKey",
",",
"namespace",
")",
"\n",
"}"
] |
3,825 | all-3826 | [
"GetProject",
"retrieves",
"and",
"returns",
"the",
"named",
"project",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"GetProject",
"(",
"name",
"string",
")",
"(",
"*",
"Project",
",",
"error",
")",
"{",
"p",
":=",
"&",
"Project",
"{",
"}",
"\n",
"err",
":=",
"c",
".",
"get",
"(",
"[",
"]",
"string",
"{",
"\"",
"\"",
",... |
3,826 | all-3827 | [
"Push",
"pushes",
"a",
"new",
"item",
"on",
"top",
"of",
"the",
"stack",
"."
] | [
"func",
"(",
"s",
"*",
"VecStack",
")",
"Push",
"(",
"value",
"*",
"Vec",
")",
"{",
"s",
".",
"top",
"=",
"&",
"item",
"{",
"<mask>",
",",
"s",
".",
"top",
"}",
"\n",
"s",
".",
"size",
"++",
"\n",
"}"
] |
3,827 | all-3828 | [
"Command",
"calls",
"exec",
".",
"Command",
"."
] | [
"func",
"(",
"g",
"GitOS",
")",
"Command",
"(",
"name",
"string",
",",
"args",
"...",
"string",
")",
"Cmd",
"{",
"return",
"&",
"gitCmd",
"{",
"<mask>",
".",
"Command",
"(",
"name",
",",
"args",
"...",
")",
"}",
"\n",
"}"
] |
3,828 | all-3829 | [
"fileHistory",
"calls",
"f",
"with",
"FileInfos",
"for",
"the",
"file",
"starting",
"with",
"how",
"it",
"looked",
"at",
"the",
"referenced",
"commit",
"and",
"then",
"all",
"past",
"versions",
"that",
"are",
"different",
"."
] | [
"func",
"(",
"d",
"*",
"<mask>",
")",
"fileHistory",
"(",
"pachClient",
"*",
"client",
".",
"APIClient",
",",
"file",
"*",
"pfs",
".",
"File",
",",
"history",
"int64",
",",
"f",
"func",
"(",
"*",
"pfs",
".",
"FileInfo",
")",
"error",
")",
"error",
... |
3,829 | all-3830 | [
"newGPGMEContext",
"returns",
"a",
"new",
"*",
"gpgme",
".",
"Context",
"using",
"optionalDir",
"if",
"not",
"empty",
"."
] | [
"func",
"newGPGMEContext",
"(",
"optionalDir",
"string",
")",
"(",
"*",
"gpgme",
".",
"Context",
",",
"error",
")",
"{",
"ctx",
",",
"err",
":=",
"gpgme",
".",
"New",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",... |
3,830 | all-3831 | [
"getResponse",
"executes",
"the",
"specified",
"controller",
"s",
"method",
"using",
"reflection",
"and",
"returns",
"the",
"response",
"object"
] | [
"func",
"(",
"handler",
"ControllerHandler",
")",
"getResponse",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"Response",
"{",
"controller",
":=",
"handler",
".",
"factory",
"(",
")",
"\n",
"controller",
".",
"SetRequest",
"(",
"r",
")",
"\n",
"controller",... |
3,831 | all-3832 | [
"resourceVSphereComputeClusterGetClusterFromPath",
"gets",
"the",
"ComputeClusterResource",
"from",
"a",
"supplied",
"path",
".",
"If",
"no",
"datacenter",
"is",
"supplied",
"the",
"path",
"must",
"be",
"a",
"full",
"path",
"."
] | [
"func",
"resourceVSphereComputeClusterGetClusterFromPath",
"(",
"meta",
"interface",
"{",
"}",
",",
"path",
"string",
",",
"dcID",
"string",
",",
")",
"(",
"*",
"object",
".",
"ClusterComputeResource",
",",
"error",
")",
"{",
"client",
",",
"err",
":=",
"resou... |
3,832 | all-3833 | [
"HasMetricQuery",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueRequest",
")",
"HasMetricQuery",
"(",
")",
"bool",
"{",
"if",
"q",
"!=",
"nil",
"&&",
"q",
".",
"MetricQuery",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
3,833 | all-3834 | [
"GetShowResourceList",
"returns",
"the",
"ShowResourceList",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TraceServiceDefinition",
")",
"GetShowResourceList",
"(",
")",
"bool",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"ShowResourceList",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"ShowResourceL... |
3,834 | all-3835 | [
"OptImportBatchSize",
"is",
"the",
"number",
"of",
"records",
"read",
"before",
"importing",
"them",
"."
] | [
"func",
"OptImportBatchSize",
"(",
"batchSize",
"int",
")",
"ImportOption",
"{",
"return",
"func",
"(",
"<mask>",
"*",
"ImportOptions",
")",
"error",
"{",
"options",
".",
"batchSize",
"=",
"batchSize",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
3,835 | all-3836 | [
"CancelPopup",
"cancels",
"an",
"alert",
"confirm",
"or",
"prompt",
"popup",
"."
] | [
"func",
"(",
"p",
"*",
"Page",
")",
"CancelPopup",
"(",
")",
"error",
"{",
"if",
"err",
":=",
"p",
".",
"<mask>",
".",
"DismissAlert",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n... |
3,836 | all-3837 | [
"MustParse",
"is",
"like",
"Parse",
"but",
"panics",
"if",
"the",
"string",
"cannot",
"be",
"parsed",
".",
"It",
"simplifies",
"safe",
"initialization",
"of",
"global",
"variables",
"holding",
"compiled",
"UUIDs",
"."
] | [
"func",
"MustParse",
"(",
"s",
"string",
")",
"UUID",
"{",
"uuid",
",",
"err",
":=",
"Parse",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"`uuid: Parse(`",
"+",
"s",
"+",
"`): `",
"+",
"err",
".",
"<mask>",
"(",
")",
")",
... |
3,837 | all-3838 | [
"GetPalette",
"returns",
"the",
"Palette",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"h",
"*",
"HostmapStyle",
")",
"GetPalette",
"(",
")",
"<mask>",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"Palette",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"h",
".",
"Palette",
"\n",
"}"
] |
3,838 | all-3839 | [
"Backup",
"creates",
"a",
"backup",
"of",
"the",
"named",
"file",
".",
"The",
"schema",
"used",
"for",
"the",
"new",
"name",
"is",
":",
"{",
"name",
"}",
"\\",
"+",
"[",
"1",
"-",
"9",
"]",
"~",
"name",
":",
"The",
"original",
"file",
"name",
"."... | [
"func",
"Backup",
"(",
"filename",
"string",
")",
"error",
"{",
"// Check if it is empty",
"info",
",",
"err",
":=",
"os",
".",
"Stat",
"(",
"filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"if",
"<mask>",
".",
"IsNotExist",
"(",
"err",
")",
"{",
... |
3,839 | all-3840 | [
"Push",
"adds",
"an",
"entry",
"to",
"the",
"top",
"of",
"the",
"Stack",
"."
] | [
"func",
"(",
"stack",
"*",
"Stack",
")",
"Push",
"(",
"entry",
"interface",
"{",
"}",
")",
"{",
"stack",
".",
"key",
".",
"Lock",
"(",
")",
"\n",
"defer",
"stack",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"nil",
"==",
"stack",
".",
... |
3,840 | all-3841 | [
"BitCrush",
"reduces",
"the",
"resolution",
"of",
"the",
"sample",
"to",
"the",
"target",
"bit",
"depth",
"Note",
"that",
"bit",
"crusher",
"effects",
"are",
"usually",
"made",
"of",
"this",
"feature",
"+",
"a",
"decimator"
] | [
"func",
"BitCrush",
"(",
"buf",
"*",
"audio",
".",
"FloatBuffer",
",",
"factor",
"float64",
")",
"{",
"stepSize",
":=",
"crusherStepSize",
"*",
"<mask>",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"buf",
".",
"Data",
")",
";",
"i",
"++... |
3,841 | all-3842 | [
"ComputePrivateKey",
"returns",
"the",
"private",
"key",
"using",
"the",
"master",
"mprivHex",
"and",
"chainCodeHex",
"for",
"the",
"given",
"path",
"and",
"index",
"."
] | [
"func",
"ComputePrivateKey",
"(",
"mprivHex",
"string",
",",
"chainHex",
"string",
",",
"path",
"string",
",",
"index",
"int32",
")",
"string",
"{",
"privKeyBytes",
":=",
"DerivePrivateKeyForPath",
"(",
"HexDecode",
"(",
"mprivHex",
")",
",",
"HexDecode",
"(",
... |
3,842 | all-3843 | [
"FetchAlerts",
"retrieves",
"all",
"alerts",
"available",
"to",
"the",
"API",
"Token",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"FetchAlerts",
"(",
")",
"(",
"*",
"[",
"]",
"Alert",
",",
"error",
")",
"{",
"<mask>",
",",
"err",
":=",
"a",
".",
"Get",
"(",
"config",
".",
"AlertPrefix",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",... |
3,843 | all-3844 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ClearDataForOriginParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage11",
"(",
... |
3,844 | all-3845 | [
"RemoveUnknownVisibilites",
"-",
"will",
"remove",
"any",
"service",
"plan",
"visiblities",
"that",
"are",
"not",
"known",
"by",
"cf",
"-",
"mgmt"
] | [
"func",
"(",
"m",
"*",
"Manager",
")",
"RemoveUnknownVisibilites",
"(",
"serviceInfo",
"*",
"ServiceInfo",
")",
"error",
"{",
"for",
"servicePlanName",
",",
"servicePlan",
":=",
"range",
"serviceInfo",
".",
"AllPlans",
"(",
")",
"{",
"for",
"_",
",",
"plan",... |
3,845 | all-3846 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventBreakpointResolved",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger41",
"(",
"&",
"w",
",",
"v"... |
3,846 | all-3847 | [
"Do",
"executes",
"DOM",
".",
"getFlattenedDocument",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"nodes",
"-",
"Resulting",
"node",
"."
] | [
"func",
"(",
"p",
"*",
"GetFlattenedDocumentParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"nodes",
"[",
"]",
"*",
"cdp",
".",
"Node",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetFlattenedDocumentReturns",
"\n",
"... |
3,847 | all-3848 | [
"Find",
"returns",
"a",
"filter",
"that",
"produces",
"matching",
"nodes",
"under",
"a",
"filesystem",
"directory",
".",
"The",
"items",
"yielded",
"by",
"the",
"filter",
"will",
"be",
"prefixed",
"by",
"dir",
".",
"E",
".",
"g",
".",
"if",
"dir",
"conta... | [
"func",
"Find",
"(",
"dir",
"string",
")",
"*",
"FindFilter",
"{",
"return",
"&",
"FindFilter",
"{",
"dir",
":",
"dir",
",",
"ifmode",
":",
"func",
"(",
"<mask>",
".",
"FileMode",
")",
"bool",
"{",
"return",
"true",
"}",
",",
"skipdirif",
":",
"func"... |
3,848 | all-3849 | [
"StoragePoolNodeJoinCeph",
"updates",
"internal",
"state",
"to",
"reflect",
"that",
"nodeID",
"is",
"joining",
"a",
"cluster",
"where",
"poolID",
"is",
"a",
"ceph",
"pool",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"StoragePoolNodeJoinCeph",
"(",
"poolID",
",",
"nodeID",
"int64",
")",
"error",
"{",
"// Get the IDs of the other nodes (they should be all linked to",
"// the pool).",
"stmt",
":=",
"\"",
"\"",
"\n",
"nodeIDs",
",",
"err",
"... |
3,849 | all-3850 | [
"ProfileURIs",
"returns",
"all",
"available",
"profile",
"URIs",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"ProfileURIs",
"(",
"filter",
"ProfileFilter",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"// Check which filter criteria are active.",
"criteria",
":=",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{... |
3,850 | all-3851 | [
"availableFilename",
"returns",
"a",
"filename",
"that",
"is",
"valid",
"as",
"a",
"new",
"file",
"or",
"directory",
"."
] | [
"func",
"availableFilename",
"(",
"prefix",
",",
"postfix",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"const",
"datetimeFormat",
"=",
"\"",
"\"",
"\n\n",
"now",
":=",
"time",
".",
"Now",
"(",
")",
"\n",
"name",
":=",
"fmt",
".",
"Sprintf",
... |
3,851 | all-3852 | [
"Initialize",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockGPUManager",
")",
"Initialize",
"(",
")",
"error",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"ret0",
",",
"_",
":=",
"<mask>",
"[",
"0",
"]",
".",
"(",
"error",
")",
"\n... |
3,852 | all-3853 | [
"OrderBy",
"adds",
"ORDER",
"BY",
"clause",
"to",
"the",
"Condition",
"and",
"returns",
"it",
"for",
"method",
"chain",
"."
] | [
"func",
"(",
"c",
"*",
"Condition",
")",
"OrderBy",
"(",
"table",
",",
"col",
"interface",
"{",
"}",
",",
"order",
"...",
"interface",
"{",
"}",
")",
"*",
"Condition",
"{",
"order",
"=",
"append",
"(",
"[",
"]",
"interface",
"{",
"}",
"{",
"table",... |
3,853 | all-3854 | [
"Stop",
"stops",
"a",
"running",
"PushCenter",
"."
] | [
"func",
"(",
"p",
"*",
"PushCenter",
")",
"Stop",
"(",
")",
"error",
"{",
"if",
"!",
"p",
".",
"isRunning",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"p",
".",
"stop",
"<-",
"<mask>",
"\n",
"p",
".",
"isRunni... |
3,854 | all-3855 | [
"newTokenBucket",
"returns",
"a",
"bucket",
"containing",
"capacity",
"tokens",
"refilled",
"at",
"a",
"rate",
"of",
"one",
"token",
"per",
"tokenInterval",
"."
] | [
"func",
"newTokenBucket",
"(",
"capacity",
"int64",
",",
"tokenInterval",
"time",
".",
"Duration",
")",
"*",
"tokenBucket",
"{",
"tb",
":=",
"tokenBucket",
"{",
"capacity",
":",
"capacity",
",",
"tokenInterval",
":",
"tokenInterval",
",",
"refillDuration",
":",
... |
3,855 | all-3856 | [
"Repaints",
"everything",
"on",
"the",
"screen"
] | [
"func",
"RefreshScreen",
"(",
")",
"{",
"comp",
".",
"BeginUpdate",
"(",
")",
"\n",
"term",
".",
"Clear",
"(",
"ColorWhite",
",",
"ColorBlack",
")",
"\n",
"comp",
".",
"EndUpdate",
"(",
")",
"\n\n",
"windows",
":=",
"comp",
".",
"getWindowList",
"(",
"... |
3,856 | all-3857 | [
"send",
"sends",
"an",
"event",
"on",
"the",
"event",
"channel",
"aborting",
"if",
"either",
"the",
"passed",
"or",
"the",
"internal",
"context",
"expire",
"."
] | [
"func",
"(",
"e",
"*",
"eventChannel",
")",
"send",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"ev",
"*",
"QueryEvent",
")",
"{",
"e",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"// Closed.",
"if",
"e",
".",
"ch",
"==",
"nil",
"{",
"e",
".",
"mu",... |
3,857 | all-3858 | [
"IsExported",
"returns",
"true",
"if",
"the",
"function",
"is",
"exported",
"."
] | [
"func",
"(",
"f",
"*",
"Func",
")",
"IsExported",
"(",
")",
"bool",
"{",
"name",
":=",
"f",
".",
"Name",
"(",
")",
"\n",
"parts",
":=",
"strings",
".",
"Split",
"(",
"name",
",",
"\"",
"\"",
")",
"\n",
"r",
",",
"_",
":=",
"utf8",
".",
"Decod... |
3,858 | all-3859 | [
"RegisterPlugin",
"registers",
"a",
"plugin",
"by",
"name",
".",
"This",
"is",
"expected",
"to",
"happen",
"during",
"app",
"startup",
"."
] | [
"func",
"RegisterProvider",
"(",
"name",
"string",
",",
"factory",
"ProvidersFactory",
")",
"{",
"providersMutex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"providersMutex",
".",
"Unlock",
"(",
")",
"\n",
"if",
"_",
",",
"found",
":=",
"providers",
"[",
"name... |
3,859 | all-3860 | [
"Alloc",
"opens",
"a",
"DB",
"if",
"not",
"openned",
"yet",
".",
"It",
"adds",
"a",
"reference",
"if",
"already",
"openned",
"."
] | [
"func",
"(",
"b",
"*",
"RefCountBox",
")",
"Alloc",
"(",
")",
"(",
"DB",
",",
"error",
")",
"{",
"b",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"b",
".",
"db",
".",
"DB",
"==",
"nil",
"{",
"if",
"b",
... |
3,860 | all-3861 | [
"WithRequireLeader",
"requires",
"client",
"requests",
"to",
"only",
"succeed",
"when",
"the",
"cluster",
"has",
"a",
"leader",
"."
] | [
"func",
"WithRequireLeader",
"(",
"ctx",
"context",
".",
"Context",
")",
"context",
".",
"Context",
"{",
"<mask>",
":=",
"metadata",
".",
"Pairs",
"(",
"rpctypes",
".",
"MetadataRequireLeaderKey",
",",
"rpctypes",
".",
"MetadataHasLeader",
")",
"\n",
"return",
... |
3,861 | all-3862 | [
"Errf",
"is",
"a",
"short",
"-",
"hand",
"version",
"of",
"Errorf"
] | [
"func",
"(",
"b",
"*",
"Base",
")",
"Errf",
"(",
"msg",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"b",
".",
"Errorf",
"(",
"<mask>",
",",
"a",
"...",
")",
"\n",
"}"
] |
3,862 | all-3863 | [
"GetCopyright",
"is",
"a",
"wrapper",
"around",
"gtk_about_dialog_get_copyright",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AboutDialog",
")",
"GetCopyright",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_about_dialog_get_copyright",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>"... |
3,863 | all-3864 | [
"SetAttributesAsText",
"sets",
"attributes",
"on",
"element",
"with",
"given",
"id",
".",
"This",
"method",
"is",
"useful",
"when",
"user",
"edits",
"some",
"existing",
"attribute",
"value",
"and",
"types",
"in",
"several",
"attribute",
"name",
"/",
"value",
"... | [
"func",
"SetAttributesAsText",
"(",
"nodeID",
"cdp",
".",
"NodeID",
",",
"text",
"string",
")",
"*",
"SetAttributesAsTextParams",
"{",
"return",
"&",
"SetAttributesAsTextParams",
"{",
"NodeID",
":",
"nodeID",
",",
"<mask>",
":",
"text",
",",
"}",
"\n",
"}"
] |
3,864 | all-3865 | [
"StoragePoolNodeVolumesGetType",
"returns",
"all",
"storage",
"volumes",
"attached",
"to",
"a",
"given",
"storage",
"pool",
"of",
"a",
"given",
"volume",
"type",
"on",
"the",
"current",
"node",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"StoragePoolNodeVolumesGetType",
"(",
"volumeType",
"int",
",",
"poolID",
"int64",
")",
"(",
"[",
"]",
"string",
",",
"<mask>",
")",
"{",
"return",
"c",
".",
"StoragePoolVolumesGetType",
"(",
"\"",
"\"",
",",
"volumeT... |
3,865 | all-3866 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"Info",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget5",
"(",
"&",
"r",
",",
... |
3,866 | all-3867 | [
"query",
"the",
"fragment",
"color",
"index",
"of",
"a",
"named",
"variable",
"within",
"a",
"program"
] | [
"func",
"GetProgramResourceLocationIndex",
"(",
"<mask>",
"uint32",
",",
"programInterface",
"uint32",
",",
"name",
"*",
"uint8",
")",
"int32",
"{",
"ret",
":=",
"C",
".",
"glowGetProgramResourceLocationIndex",
"(",
"gpGetProgramResourceLocationIndex",
",",
"(",
"C",
... |
3,867 | all-3868 | [
"newRevision",
"creates",
"a",
"new",
"instance",
"of",
"Revisonal",
"compactor",
"that",
"purges",
"the",
"log",
"older",
"than",
"retention",
"revisions",
"from",
"the",
"current",
"revision",
"."
] | [
"func",
"newRevision",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"clock",
"clockwork",
".",
"Clock",
",",
"retention",
"int64",
",",
"rg",
"RevGetter",
",",
"c",
"Compactable",
")",
"*",
"Revision",
"{",
"rc",
":=",
"&",
"Revision",
"{",
"lg",
":",
... |
3,868 | all-3869 | [
"HasAcceptEncodingBytes",
"returns",
"true",
"if",
"the",
"header",
"contains",
"the",
"given",
"Accept",
"-",
"Encoding",
"value",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"HasAcceptEncodingBytes",
"(",
"acceptEncoding",
"[",
"]",
"byte",
")",
"bool",
"{",
"ae",
":=",
"h",
".",
"peek",
"(",
"strAcceptEncoding",
")",
"\n",
"n",
":=",
"bytes",
".",
"<mask>",
"(",
"ae",
",",
"acc... |
3,869 | all-3870 | [
"fixBackupStoragePool",
"changes",
"the",
"pool",
"information",
"in",
"the",
"backup",
".",
"yaml",
".",
"This",
"is",
"done",
"only",
"if",
"the",
"provided",
"pool",
"doesn",
"t",
"exist",
".",
"In",
"this",
"case",
"the",
"pool",
"of",
"the",
"default"... | [
"func",
"backupFixStoragePool",
"(",
"c",
"*",
"db",
".",
"Cluster",
",",
"b",
"backupInfo",
",",
"useDefaultPool",
"bool",
")",
"error",
"{",
"var",
"poolName",
"string",
"\n\n",
"if",
"useDefaultPool",
"{",
"// Get the default profile",
"_",
",",
"profile",
... |
3,870 | all-3871 | [
"UpdateTeamMembership",
"adds",
"the",
"user",
"to",
"the",
"team",
"and",
"/",
"or",
"updates",
"their",
"role",
"in",
"that",
"team",
".",
"If",
"the",
"user",
"is",
"not",
"a",
"member",
"of",
"the",
"org",
"GitHub",
"will",
"invite",
"them",
"to",
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"UpdateTeamMembership",
"(",
"id",
"int",
",",
"user",
"string",
",",
"maintainer",
"bool",
")",
"(",
"*",
"TeamMembership",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"id",
",",
"user",
","... |
3,871 | all-3872 | [
"retrieveSSMSecretValuesByRegion",
"reads",
"secret",
"values",
"from",
"cache",
"first",
"if",
"not",
"exists",
"batches",
"secrets",
"based",
"on",
"field",
"valueFrom",
"and",
"call",
"retrieveSSMSecretValues",
"to",
"retrieve",
"values",
"from",
"SSM"
] | [
"func",
"(",
"secret",
"*",
"SSMSecretResource",
")",
"retrieveSSMSecretValuesByRegion",
"(",
"region",
"string",
",",
"secrets",
"[",
"]",
"apicontainer",
".",
"Secret",
",",
"iamCredentials",
"credentials",
".",
"IAMRoleCredentials",
",",
"wg",
"*",
"sync",
".",... |
3,872 | all-3873 | [
"DeleteText",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_buffer_delete_text",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"EntryBuffer",
")",
"DeleteText",
"(",
"<mask>",
"uint",
",",
"nChars",
"int",
")",
"uint",
"{",
"c",
":=",
"C",
".",
"gtk_entry_buffer_delete_text",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"guint",
"(",
"position",
"... |
3,873 | all-3874 | [
"Create",
"wraps",
"the",
"creation",
"of",
"a",
"virtual",
"machine",
"and",
"the",
"subsequent",
"waiting",
"of",
"the",
"task",
".",
"A",
"higher",
"-",
"level",
"virtual",
"machine",
"object",
"is",
"returned",
"."
] | [
"func",
"Create",
"(",
"c",
"*",
"govmomi",
".",
"Client",
",",
"f",
"*",
"object",
".",
"Folder",
",",
"s",
"types",
".",
"VirtualMachineConfigSpec",
",",
"p",
"*",
"object",
".",
"ResourcePool",
",",
"h",
"*",
"object",
".",
"HostSystem",
")",
"(",
... |
3,874 | all-3875 | [
"Handler",
"returns",
"a",
"handler",
"that",
"is",
"registered",
"under",
"the",
"provided",
"code",
"."
] | [
"func",
"(",
"r",
"MapErrorRegistry",
")",
"Handler",
"(",
"<mask>",
"int",
")",
"func",
"(",
"body",
"[",
"]",
"byte",
")",
"error",
"{",
"return",
"r",
".",
"handlers",
"[",
"code",
"]",
"\n",
"}"
] |
3,875 | all-3876 | [
"CharAtF",
"is",
"the",
"filter",
"form",
"of",
"CharAt",
"."
] | [
"func",
"CharAtF",
"(",
"index",
"int",
")",
"func",
"(",
"string",
")",
"string",
"{",
"return",
"func",
"(",
"s",
"string",
")",
"string",
"{",
"return",
"CharAt",
"(",
"s",
",",
"<mask>",
")",
"\n",
"}",
"\n",
"}"
] |
3,876 | all-3877 | [
"SplitRelativeFolder",
"is",
"a",
"convenience",
"method",
"that",
"returns",
"the",
"parent",
"folder",
"for",
"the",
"result",
"of",
"SplitRelative",
"on",
"the",
"supplied",
"path",
".",
"This",
"is",
"generally",
"useful",
"to",
"get",
"the",
"folder",
"fo... | [
"func",
"(",
"p",
"RootPathParticle",
")",
"SplitRelativeFolder",
"(",
"inventoryPath",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"relative",
",",
"err",
":=",
"p",
".",
"SplitRelative",
"(",
"inventoryPath",
")",
"\n",
"if",
"err",
"!=",
"nil"... |
3,877 | all-3878 | [
"MenuItemNewSubmenu",
"is",
"a",
"wrapper",
"around",
"g_menu_item_new_submenu",
"()",
"."
] | [
"func",
"MenuItemNewSubmenu",
"(",
"label",
"string",
",",
"submenu",
"*",
"MenuModel",
")",
"*",
"MenuItem",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"<mask>",
")",
")",
"\n",
"defer",
"C",
".",
"free",
... |
3,878 | all-3879 | [
"GetNthPage",
"is",
"a",
"wrapper",
"around",
"gtk_assistant_get_nth_page",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Assistant",
")",
"GetNthPage",
"(",
"pageNum",
"int",
")",
"(",
"*",
"Widget",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_assistant_get_nth_page",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"pageNu... |
3,879 | all-3880 | [
"GetValue",
"returns",
"the",
"Value",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefMarker",
")",
"GetValue",
"(",
")",
"string",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Value",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"<mask>",
"\n",
"}"
] |
3,880 | all-3881 | [
"SetCookieBytesK",
"sets",
"key",
":",
"value",
"cookies",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"SetCookieBytesK",
"(",
"key",
"[",
"]",
"byte",
",",
"value",
"string",
")",
"{",
"h",
".",
"SetCookie",
"(",
"b2s",
"(",
"key",
")",
",",
"<mask>",
")",
"\n",
"}"
] |
3,881 | all-3882 | [
"dwarfSize",
"is",
"used",
"to",
"compute",
"the",
"size",
"of",
"a",
"DWARF",
"type",
".",
"dt",
".",
"Size",
"()",
"is",
"wrong",
"when",
"it",
"returns",
"a",
"negative",
"number",
".",
"This",
"function",
"implements",
"just",
"enough",
"to",
"correc... | [
"func",
"dwarfSize",
"(",
"dt",
"dwarf",
".",
"Type",
",",
"ptrSize",
"int64",
")",
"int64",
"{",
"s",
":=",
"dt",
".",
"Size",
"(",
")",
"\n",
"if",
"s",
">=",
"0",
"{",
"return",
"s",
"\n",
"}",
"\n",
"<mask>",
"x",
":=",
"dt",
".",
"(",
"t... |
3,882 | all-3883 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetShowViewportSizeOnResizeParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay",
"(",
"&",
"w",
"... |
3,883 | all-3884 | [
"Close",
"shuts",
"down",
"port",
"forwarding",
"."
] | [
"func",
"(",
"f",
"*",
"PortForwarder",
")",
"Close",
"(",
")",
"{",
"defer",
"f",
".",
"logger",
".",
"Close",
"(",
")",
"\n\n",
"f",
".",
"stopChansLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"f",
".",
"stopChansLock",
".",
"Unlock",
"(",
")",
... |
3,884 | all-3885 | [
"Return",
"a",
"slice",
"of",
"w",
".",
"RS",
"allowing",
"the",
"start",
"and",
"stop",
"to",
"be",
"out",
"of",
"bounds",
"."
] | [
"func",
"(",
"w",
"*",
"SnowballWord",
")",
"slice",
"(",
"start",
",",
"stop",
"int",
")",
"[",
"]",
"rune",
"{",
"startMin",
":=",
"0",
"\n",
"if",
"start",
"<",
"startMin",
"{",
"start",
"=",
"startMin",
"\n",
"}",
"\n",
"max",
":=",
"len",
"(... |
3,885 | all-3886 | [
"HashPassword",
"computes",
"encoded",
"hash",
"of",
"the",
"password",
"."
] | [
"func",
"HashPassword",
"(",
"<mask>",
",",
"salt",
"string",
")",
"(",
"Base64String",
",",
"error",
")",
"{",
"salted",
":=",
"[",
"]",
"byte",
"(",
"password",
"+",
"salt",
")",
"\n",
"passwordHash",
",",
"err",
":=",
"bcrypt",
".",
"GenerateFromPassw... |
3,886 | all-3887 | [
"ChangeContactSvcNotificationTimeperiod",
"creates",
"a",
"new",
"CHANGE_CONTACT_SVC_NOTIFICATION_TIMEPERIOD",
"Nagios",
"command",
".",
"Changes",
"the",
"service",
"notification",
"timeperiod",
"for",
"a",
"particular",
"contact",
"to",
"what",
"is",
"specified",
"by",
... | [
"func",
"ChangeContactSvcNotificationTimeperiod",
"(",
"contact_name",
"string",
",",
"notification_timeperiod",
"string",
",",
")",
"*",
"livestatus",
".",
"Command",
"{",
"<mask>",
"livestatus",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"stringifyArg",
"(",
"\"",
... |
3,887 | all-3888 | [
"Float64",
"defines",
"a",
"float64",
"flag",
"with",
"specified",
"name",
"default",
"value",
"and",
"usage",
"string",
".",
"The",
"return",
"value",
"is",
"the",
"address",
"of",
"a",
"float64",
"variable",
"that",
"stores",
"the",
"value",
"of",
"the",
... | [
"func",
"Float64",
"(",
"name",
"string",
",",
"value",
"float64",
",",
"usage",
"string",
")",
"*",
"float64",
"{",
"return",
"EnvironmentFlags",
".",
"Float64",
"(",
"<mask>",
",",
"value",
",",
"usage",
")",
"\n",
"}"
] |
3,888 | all-3889 | [
"Delete",
"removes",
"a",
"relayItem",
"completely",
"(",
"without",
"leaving",
"a",
"tombstone",
")",
".",
"It",
"returns",
"the",
"deleted",
"item",
"along",
"with",
"a",
"bool",
"indicating",
"whether",
"we",
"completed",
"a",
"relayed",
"call",
"."
] | [
"func",
"(",
"r",
"*",
"relayItems",
")",
"Delete",
"(",
"id",
"uint32",
")",
"(",
"relayItem",
",",
"bool",
")",
"{",
"r",
".",
"Lock",
"(",
")",
"\n",
"item",
",",
"ok",
":=",
"r",
".",
"items",
"[",
"id",
"]",
"\n",
"if",
"!",
"ok",
"{",
... |
3,889 | all-3890 | [
"Value",
"that",
"has",
"previously",
"stored",
"on",
"the",
"context",
"."
] | [
"func",
"(",
"d",
"*",
"DefaultContext",
")",
"<mask>",
"(",
"key",
"interface",
"{",
"}",
")",
"interface",
"{",
"}",
"{",
"if",
"k",
",",
"ok",
":=",
"key",
".",
"(",
"string",
")",
";",
"ok",
"{",
"d",
".",
"moot",
".",
"RLock",
"(",
")",
... |
3,890 | all-3891 | [
"ReadTail",
"reads",
"the",
"last",
"n",
"bytes",
"from",
"a",
"file",
"in",
"GCS"
] | [
"func",
"(",
"a",
"*",
"GCSArtifact",
")",
"ReadTail",
"(",
"n",
"int64",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"gzipped",
",",
"err",
":=",
"a",
".",
"gzipped",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",... |
3,891 | all-3892 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform3f",
"(",
"<mask>",
"int32",
",",
"v0",
"float32",
",",
"v1",
"float32",
",",
"v2",
"float32",
")",
"{",
"C",
".",
"glowUniform3f",
"(",
"gpUniform3f",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",
")",
",",
"(",
"C",
".",
"GLf... |
3,892 | all-3893 | [
"HasTitleSize",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"m",
"*",
"ManageStatusDefinition",
")",
"HasTitleSize",
"(",
")",
"bool",
"{",
"if",
"m",
"!=",
"nil",
"&&",
"m",
".",
"TitleSize",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
3,893 | all-3894 | [
"ensure",
"will",
"ensure",
"binary",
"is",
"on",
"path",
"or",
"return",
"an",
"error",
"with",
"install",
"message",
"."
] | [
"func",
"ensure",
"(",
"binary",
",",
"install",
"string",
")",
"error",
"{",
"if",
"_",
",",
"err",
":=",
"exec",
".",
"LookPath",
"(",
"binary",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"binary",
... |
3,894 | all-3895 | [
"Pad",
"pads",
"string",
"s",
"on",
"both",
"sides",
"with",
"c",
"until",
"it",
"has",
"length",
"of",
"n",
"."
] | [
"func",
"Pad",
"(",
"s",
",",
"c",
"string",
",",
"n",
"int",
")",
"string",
"{",
"L",
":=",
"len",
"(",
"s",
")",
"\n",
"if",
"L",
">=",
"n",
"{",
"return",
"s",
"\n",
"}",
"\n",
"n",
"-=",
"L",
"\n\n",
"left",
":=",
"strings",
".",
"Repea... |
3,895 | all-3896 | [
"Between",
"extracts",
"a",
"string",
"between",
"left",
"and",
"right",
"strings",
"."
] | [
"func",
"Between",
"(",
"s",
",",
"left",
",",
"right",
"string",
")",
"string",
"{",
"l",
":=",
"len",
"(",
"left",
")",
"\n",
"startPos",
":=",
"strings",
".",
"<mask>",
"(",
"s",
",",
"left",
")",
"\n",
"if",
"startPos",
"<",
"0",
"{",
"return... |
3,896 | all-3897 | [
"Produce",
"makes",
"ProducerFunc",
"fit",
"the",
"Producer",
"interface",
"."
] | [
"func",
"(",
"fn",
"ProducerFunc",
")",
"Produce",
"(",
"ctx",
"telnet",
".",
"<mask>",
",",
"name",
"string",
",",
"args",
"...",
"string",
")",
"Handler",
"{",
"return",
"fn",
"(",
"ctx",
",",
"name",
",",
"args",
"...",
")",
"\n",
"}"
] |
3,897 | all-3898 | [
"ListCmd",
"represents",
"the",
"list",
"command"
] | [
"func",
"ListCmd",
"(",
")",
"*",
"cobra",
".",
"Command",
"{",
"var",
"lo",
"=",
"&",
"cli",
".",
"ListOptions",
"{",
"}",
"\n",
"var",
"cmd",
"=",
"&",
"cobra",
".",
"Command",
"{",
"Use",
":",
"\"",
"\"",
",",
"Short",
":",
"\"",
"\"",
",",
... |
3,898 | all-3899 | [
"Close",
"closes",
"pipe",
"connections",
"."
] | [
"func",
"(",
"pc",
"*",
"PipeConns",
")",
"Close",
"(",
")",
"error",
"{",
"pc",
".",
"stopChLock",
".",
"Lock",
"(",
")",
"\n",
"select",
"{",
"case",
"<-",
"pc",
".",
"stopCh",
":",
"<mask>",
":",
"close",
"(",
"pc",
".",
"stopCh",
")",
"\n",
... |
3,899 | all-3900 | [
"StoragePoolVolumesGet",
"returns",
"all",
"storage",
"volumes",
"attached",
"to",
"a",
"given",
"storage",
"pool",
"on",
"any",
"node",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"StoragePoolVolumesGet",
"(",
"project",
"string",
",",
"poolID",
"int64",
",",
"volumeTypes",
"[",
"]",
"int",
")",
"(",
"[",
"]",
"*",
"api",
".",
"StorageVolume",
",",
"error",
")",
"{",
"var",
"nodeIDs",
"[",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.