id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
24,400 | all-24401 | [
"root",
"returns",
"the",
"furthest",
"ancestor",
"of",
"a",
"key",
"which",
"may",
"be",
"itself",
"."
] | [
"func",
"(",
"k",
"*",
"Key",
")",
"root",
"(",
")",
"*",
"Key",
"{",
"for",
"k",
".",
"<mask>",
"!=",
"nil",
"{",
"k",
"=",
"k",
".",
"parent",
"\n",
"}",
"\n",
"return",
"k",
"\n",
"}"
] |
24,401 | all-24402 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ScreencastFrameAckParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage18",
"(",
"&... |
24,402 | all-24403 | [
"Verify",
"verifies",
"the",
"signature",
"sig",
"against",
"using",
"pub",
"hash",
"and",
"the",
"hashed",
"data",
"."
] | [
"func",
"(",
"r",
"RSAMethod",
")",
"Verify",
"(",
"pub",
"*",
"rsa",
".",
"PublicKey",
",",
"hash",
"crypto",
".",
"Hash",
",",
"hashed",
"[",
"]",
"byte",
",",
"sig",
"[",
"]",
"byte",
")",
"error",
"{",
"return",
"r",
".",
"VerifyFunc",
"(",
"... |
24,403 | all-24404 | [
"Run",
"is",
"used",
"to",
"scan",
"hosts",
".",
"The",
"Scan",
"object",
"should",
"be",
"configured",
"using",
"specified",
"Add",
"*",
"Set",
"*",
"functions",
".",
"BUG",
"(",
"t94j0",
")",
":",
"The",
"scan",
"will",
"sometimes",
"segfault",
"and",
... | [
"func",
"(",
"s",
"Scan",
")",
"Run",
"(",
")",
"(",
"output",
"Scan",
",",
"err",
"error",
")",
"{",
"if",
"s",
".",
"configErr",
"!=",
"nil",
"{",
"return",
"s",
",",
"s",
".",
"configErr",
"\n",
"}",
"\n\n",
"args",
",",
"err",
":=",
"s",
... |
24,404 | all-24405 | [
"GetProgramName",
"is",
"a",
"wrapper",
"around",
"gtk_about_dialog_get_program_name",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AboutDialog",
")",
"GetProgramName",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_about_dialog_get_program_name",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<m... |
24,405 | all-24406 | [
"MoveLeader",
"transfers",
"the",
"leader",
"to",
"the",
"given",
"transferee",
"."
] | [
"func",
"(",
"s",
"*",
"EtcdServer",
")",
"MoveLeader",
"(",
"ctx",
"context",
".",
"Context",
",",
"lead",
",",
"transferee",
"uint64",
")",
"error",
"{",
"now",
":=",
"time",
".",
"Now",
"(",
")",
"\n",
"interval",
":=",
"time",
".",
"Duration",
"(... |
24,406 | all-24407 | [
"New",
"http",
".",
"StatusInternalServerError"
] | [
"func",
"(",
"e",
"*",
"coreError",
")",
"New",
"(",
"errno",
"int",
",",
"message",
"string",
")",
"*",
"coreError",
"{",
"e",
".",
"HTTPCode",
"=",
"<mask>",
".",
"StatusInternalServerError",
"\n",
"e",
".",
"Errno",
"=",
"errno",
"\n",
"e",
".",
"... |
24,407 | all-24408 | [
"Route",
"creates",
"a",
"new",
"Mux",
"with",
"a",
"fresh",
"middleware",
"stack",
"and",
"mounts",
"it",
"along",
"the",
"pattern",
"as",
"a",
"subrouter",
".",
"Effectively",
"this",
"is",
"a",
"short",
"-",
"hand",
"call",
"to",
"Mount",
".",
"See",
... | [
"func",
"(",
"mx",
"*",
"Mux",
")",
"<mask>",
"(",
"pattern",
"string",
",",
"fn",
"func",
"(",
"r",
"Router",
")",
")",
"Router",
"{",
"subRouter",
":=",
"NewRouter",
"(",
")",
"\n",
"if",
"fn",
"!=",
"nil",
"{",
"fn",
"(",
"subRouter",
")",
"\n... |
24,408 | all-24409 | [
"WithDeployment",
"adds",
"the",
"deployment",
"to",
"the",
"find",
"vms",
"by",
"deployment",
"params"
] | [
"func",
"(",
"o",
"*",
"FindVmsByDeploymentParams",
")",
"WithDeployment",
"(",
"deployment",
"[",
"]",
"<mask>",
")",
"*",
"FindVmsByDeploymentParams",
"{",
"o",
".",
"SetDeployment",
"(",
"deployment",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
24,409 | all-24410 | [
"NewJobSpec",
"converts",
"a",
"prowapi",
".",
"ProwJobSpec",
"invocation",
"into",
"a",
"JobSpec"
] | [
"func",
"NewJobSpec",
"(",
"spec",
"prowapi",
".",
"ProwJobSpec",
",",
"buildID",
",",
"prowJobID",
"string",
")",
"JobSpec",
"{",
"return",
"JobSpec",
"{",
"Type",
":",
"spec",
".",
"Type",
",",
"Job",
":",
"spec",
".",
"Job",
",",
"BuildID",
":",
"bu... |
24,410 | all-24411 | [
"And",
"adds",
"AND",
"operator",
"to",
"the",
"Condition",
"and",
"returns",
"it",
"for",
"method",
"chain",
"."
] | [
"func",
"(",
"c",
"*",
"Condition",
")",
"And",
"(",
"cond",
"<mask>",
"{",
"}",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"*",
"Condition",
"{",
"return",
"c",
".",
"appendQueryByCondOrExpr",
"(",
"\"",
"\"",
",",
"100",
",",
"And",
",",
"co... |
24,411 | all-24412 | [
"Reset",
"is",
"a",
"wrapper",
"around",
"g_settings_reset",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Settings",
")",
"Reset",
"(",
"name",
"string",
")",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"name",
")",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer"... |
24,412 | all-24413 | [
"GetResource",
"returns",
"the",
"Resource",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"GetResource",
"(",
")",
"string",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"Resource",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"Resource",
"\n",
"}"
] |
24,413 | all-24414 | [
"logs",
"a",
"sequence",
"of",
"symbols",
"(",
"one",
"for",
"each",
"tick",
")",
"indicating",
"task",
"activity",
"until",
"a",
"quit",
"is",
"received"
] | [
"func",
"logActivity",
"(",
"symbol",
"string",
",",
"logger",
"logger",
".",
"Logger",
",",
"ticker",
"*",
"time",
".",
"Ticker",
",",
"quitCh",
"<-",
"chan",
"bool",
")",
"{",
"go",
"func",
"(",
")",
"{",
"for",
"{",
"<mask>",
"{",
"case",
"<-",
... |
24,414 | all-24415 | [
"AuthClient",
"verifies",
"password",
"for",
"a",
"given",
"client",
"key",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"AuthClient",
"(",
"product",
",",
"productPassword",
",",
"clientKey",
",",
"clientPassword",
"string",
")",
"error",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
... |
24,415 | all-24416 | [
"OnGossipUnicast",
"implements",
"Gossiper",
"but",
"always",
"returns",
"an",
"error",
"as",
"a",
"router",
"should",
"only",
"receive",
"gossip",
"broadcasts",
"of",
"TopologyGossipData",
"."
] | [
"func",
"(",
"router",
"*",
"Router",
")",
"OnGossipUnicast",
"(",
"sender",
"PeerName",
",",
"msg",
"[",
"]",
"<mask>",
")",
"error",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"msg",
")",
"\n",
"}"
] |
24,416 | all-24417 | [
"NewCloudConfigManifest",
"-",
"initialize",
"a",
"cloudconfigmanifest",
"object",
"with",
"a",
"[]",
"byte"
] | [
"func",
"NewCloudConfigManifest",
"(",
"b",
"[",
"]",
"<mask>",
")",
"*",
"CloudConfigManifest",
"{",
"cm",
":=",
"new",
"(",
"CloudConfigManifest",
")",
"\n",
"yaml",
".",
"Unmarshal",
"(",
"b",
",",
"cm",
")",
"\n",
"return",
"cm",
"\n",
"}"
] |
24,417 | all-24418 | [
"sync",
"extracts",
"a",
"deduplicated",
"set",
"of",
"Alertmanager",
"endpoints",
"from",
"a",
"list",
"of",
"target",
"groups",
"definitions",
"."
] | [
"func",
"(",
"s",
"*",
"alertmanagerSet",
")",
"sync",
"(",
"tgs",
"[",
"]",
"*",
"targetgroup",
".",
"Group",
")",
"{",
"allAms",
":=",
"[",
"]",
"alertmanager",
"{",
"}",
"\n",
"allDroppedAms",
":=",
"[",
"]",
"alertmanager",
"{",
"}",
"\n\n",
"for... |
24,418 | all-24419 | [
"Retrieve",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockProvider",
")",
"Retrieve",
"(",
")",
"(",
"credentials",
".",
"<mask>",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"ret0",
",",
"_",
":=",
"ret",
"[",
... |
24,419 | all-24420 | [
"Execute",
"-",
"deletes",
"orgs"
] | [
"func",
"(",
"c",
"*",
"DeleteOrgsCommand",
")",
"Execute",
"(",
"[",
"]",
"string",
")",
"error",
"{",
"var",
"cfMgmt",
"*",
"CFMgmt",
"\n",
"<mask>",
"err",
"error",
"\n",
"if",
"cfMgmt",
",",
"err",
"=",
"InitializePeekManagers",
"(",
"c",
".",
"Bas... |
24,420 | all-24421 | [
"NewFmtMachineLogger",
"creates",
"a",
"MachineLogger",
"implementation",
"used",
"by",
"the",
"drivers"
] | [
"func",
"NewFmtMachineLogger",
"(",
")",
"MachineLogger",
"{",
"return",
"&",
"FmtMachineLogger",
"{",
"outWriter",
":",
"os",
".",
"Stdout",
",",
"errWriter",
":",
"<mask>",
".",
"Stderr",
",",
"debug",
":",
"false",
",",
"history",
":",
"NewHistoryRecorder",... |
24,421 | all-24422 | [
"Return",
"a",
"generic",
"vertex",
"attribute",
"parameter"
] | [
"func",
"GetVertexAttribdv",
"(",
"index",
"uint32",
",",
"pname",
"uint32",
",",
"params",
"*",
"float64",
")",
"{",
"C",
".",
"glowGetVertexAttribdv",
"(",
"gpGetVertexAttribdv",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"<mask>",
")",
",",
"(",
"C",
"."... |
24,422 | all-24423 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetWebLifecycleStateParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage6",
"(",
"&",
"w",
",",
"v",
... |
24,423 | all-24424 | [
"void",
"pango_layout_set_text",
"(",
"PangoLayout",
"*",
"layout",
"const",
"char",
"*",
"text",
"int",
"length",
")",
";"
] | [
"func",
"(",
"v",
"*",
"Layout",
")",
"SetText",
"(",
"<mask>",
"string",
",",
"length",
"int",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"text",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
... |
24,424 | all-24425 | [
"EnableVirtualTerminalProcessing",
"configures",
"the",
"terminal",
"to",
"accept",
"ANSI",
"sequences",
".",
"This",
"is",
"a",
"no",
"-",
"op",
"for",
"all",
"operating",
"systems",
"other",
"than",
"Windows",
"."
] | [
"func",
"EnableVirtualTerminalProcessing",
"(",
"fd",
"int",
")",
"error",
"{",
"<mask>",
"st",
"uint32",
"\n",
"err",
":=",
"windows",
".",
"GetConsoleMode",
"(",
"windows",
".",
"Handle",
"(",
"fd",
")",
",",
"&",
"st",
")",
"\n",
"if",
"err",
"!=",
... |
24,425 | all-24426 | [
"GetOperationUUIDs",
"returns",
"a",
"list",
"of",
"operation",
"uuids"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetOperationUUIDs",
"(",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"urls",
":=",
"[",
"]",
"string",
"{",
"}",
"\n\n",
"// Fetch the raw value",
"_",
",",
"err",
":=",
"r",
".",
"queryStruct",
"... |
24,426 | all-24427 | [
"MustDecode",
"is",
"like",
"Decode",
"but",
"panics",
"on",
"error"
] | [
"func",
"MustDecode",
"(",
"expected",
"VersionByte",
",",
"src",
"string",
")",
"[",
"]",
"<mask>",
"{",
"d",
",",
"err",
":=",
"Decode",
"(",
"expected",
",",
"src",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"err",
")",
"\n",
"}",
... |
24,427 | all-24428 | [
"AfterFunc",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockTime",
")",
"AfterFunc",
"(",
"arg0",
"<mask>",
".",
"Duration",
",",
"arg1",
"func",
"(",
")",
")",
"ttime",
".",
"Timer",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
","... |
24,428 | all-24429 | [
"ValidateCertificate",
"validate",
"the",
"certificate",
"installed",
"on",
"the",
"vm",
"."
] | [
"func",
"(",
"xcg",
"*",
"X509CertGenerator",
")",
"ValidateCertificate",
"(",
"addr",
"string",
",",
"authOptions",
"*",
"auth",
".",
"Options",
")",
"(",
"bool",
",",
"error",
")",
"{",
"tlsConfig",
",",
"err",
":=",
"xcg",
".",
"ReadTLSConfig",
"(",
"... |
24,429 | all-24430 | [
"GetConnectionInfo",
"returns",
"the",
"basic",
"connection",
"information",
"used",
"to",
"interact",
"with",
"the",
"server"
] | [
"func",
"(",
"r",
"*",
"ProtocolSimpleStreams",
")",
"GetConnectionInfo",
"(",
")",
"(",
"*",
"ConnectionInfo",
",",
"error",
")",
"{",
"info",
":=",
"ConnectionInfo",
"{",
"}",
"\n",
"<mask>",
".",
"Addresses",
"=",
"[",
"]",
"string",
"{",
"r",
".",
... |
24,430 | all-24431 | [
"Parses",
"incoming",
"target",
"groups",
"updates",
".",
"If",
"the",
"update",
"contains",
"changes",
"to",
"the",
"target",
"groups",
"Adapter",
"already",
"knows",
"about",
"or",
"new",
"target",
"groups",
"we",
"Marshal",
"to",
"JSON",
"and",
"write",
"... | [
"func",
"(",
"a",
"*",
"Adapter",
")",
"refreshTargetGroups",
"(",
"allTargetGroups",
"map",
"[",
"string",
"]",
"[",
"]",
"*",
"targetgroup",
".",
"Group",
")",
"{",
"tempGroups",
":=",
"generateTargetGroups",
"(",
"allTargetGroups",
")",
"\n\n",
"if",
"!",... |
24,431 | all-24432 | [
"SetNative",
"overwrites",
"a",
"with",
"the",
"native",
"asset",
"type"
] | [
"func",
"(",
"a",
"*",
"<mask>",
")",
"SetNative",
"(",
")",
"error",
"{",
"newa",
",",
"err",
":=",
"NewAsset",
"(",
"AssetTypeAssetTypeNative",
",",
"nil",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"*",
"a",
"=",... |
24,432 | all-24433 | [
"specify",
"mapping",
"of",
"depth",
"values",
"from",
"normalized",
"device",
"coordinates",
"to",
"window",
"coordinates",
"for",
"a",
"specified",
"viewport"
] | [
"func",
"DepthRangeIndexed",
"(",
"<mask>",
"uint32",
",",
"n",
"float64",
",",
"f",
"float64",
")",
"{",
"C",
".",
"glowDepthRangeIndexed",
"(",
"gpDepthRangeIndexed",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"index",
")",
",",
"(",
"C",
".",
"GLdouble",... |
24,433 | all-24434 | [
"Run",
"executes",
"external",
"commands",
"just",
"like",
"RunWithMatch",
"but",
"does",
"not",
"return",
"the",
"boolean",
"match",
"."
] | [
"func",
"Run",
"(",
"command",
"string",
")",
"(",
"<mask>",
"[",
"]",
"byte",
",",
"err",
"error",
")",
"{",
"output",
",",
"_",
",",
"err",
"=",
"RunWithMatch",
"(",
"command",
")",
"\n",
"return",
"\n",
"}"
] |
24,434 | all-24435 | [
"queryVmfsDatastoreExtendOptions",
"is",
"a",
"stop",
"-",
"gap",
"method",
"that",
"implements",
"QueryVmfsDatastoreExtendOptions",
".",
"It",
"will",
"be",
"removed",
"once",
"the",
"higher",
"level",
"HostDatastoreSystem",
"object",
"supports",
"this",
"method",
".... | [
"func",
"queryVmfsDatastoreExtendOptions",
"(",
"ctx",
"context",
".",
"Context",
",",
"s",
"*",
"object",
".",
"HostDatastoreSystem",
",",
"ds",
"*",
"object",
".",
"Datastore",
",",
"devicePath",
"string",
",",
"suppressExpandCandidates",
"bool",
")",
"(",
"["... |
24,435 | all-24436 | [
"ListAttachedVolumes",
"lists",
"attached",
"volumes"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListAttachedVolumes",
"(",
"dcid",
",",
"srvid",
"string",
")",
"(",
"*",
"Volumes",
",",
"error",
")",
"{",
"url",
":=",
"serverVolumeColPath",
"(",
"dcid",
",",
"srvid",
")",
"+",
"`?depth=`",
"+",
"c",
".",
"... |
24,436 | all-24437 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueDefinition",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"q",
"==",
"nil",
"||",
"q",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"q",
".",
"Type",
"\n",
"}"
] |
24,437 | all-24438 | [
"ViewMetricMetadata",
"allows",
"you",
"to",
"get",
"metadata",
"about",
"a",
"specific",
"metric",
"."
] | [
"func",
"(",
"<mask>",
"*",
"Client",
")",
"ViewMetricMetadata",
"(",
"mn",
"string",
")",
"(",
"*",
"MetricMetadata",
",",
"error",
")",
"{",
"var",
"out",
"MetricMetadata",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
... |
24,438 | all-24439 | [
"GetRepositoryTags",
"list",
"all",
"tags",
"available",
"in",
"the",
"repository",
".",
"The",
"tag",
"provided",
"inside",
"the",
"ImageReference",
"will",
"be",
"ignored",
".",
"(",
"This",
"is",
"a",
"backward",
"-",
"compatible",
"shim",
"method",
"which"... | [
"func",
"(",
"i",
"*",
"Image",
")",
"GetRepositoryTags",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"return",
"GetRepositoryTags",
"(",
"ctx",
",",
"i",
".",
"src",
".",
"c",
".",
"sys",
",",
"i",
... |
24,439 | all-24440 | [
"NewRangeQuery",
"returns",
"an",
"evaluation",
"query",
"for",
"the",
"given",
"time",
"range",
"and",
"with",
"the",
"resolution",
"set",
"by",
"the",
"interval",
"."
] | [
"func",
"(",
"ng",
"*",
"Engine",
")",
"NewRangeQuery",
"(",
"q",
"storage",
".",
"Queryable",
",",
"qs",
"string",
",",
"start",
",",
"end",
"time",
".",
"Time",
",",
"interval",
"<mask>",
".",
"Duration",
")",
"(",
"Query",
",",
"error",
")",
"{",
... |
24,440 | all-24441 | [
"/",
"*",
"Creates",
"IPL",
"image",
"(",
"header",
"and",
"data",
")"
] | [
"func",
"CreateImage",
"(",
"w",
",",
"h",
",",
"depth",
",",
"channels",
"int",
")",
"*",
"IplImage",
"{",
"size",
":=",
"C",
".",
"cvSize",
"(",
"C",
".",
"int",
"(",
"w",
")",
",",
"C",
".",
"int",
"(",
"h",
")",
")",
"\n",
"img",
":=",
... |
24,441 | all-24442 | [
"LinkByName",
"finds",
"a",
"link",
"by",
"name",
"and",
"returns",
"a",
"pointer",
"to",
"the",
"object"
] | [
"func",
"(",
"NetLinkClient",
")",
"LinkByName",
"(",
"<mask>",
"string",
")",
"(",
"netlink",
".",
"Link",
",",
"error",
")",
"{",
"return",
"netlink",
".",
"LinkByName",
"(",
"name",
")",
"\n",
"}"
] |
24,442 | all-24443 | [
"NewEncoder",
"creates",
"encoder"
] | [
"func",
"NewEncoder",
"(",
"defaultEncoding",
"Encoding",
",",
"encodings",
"...",
"Encoding",
")",
"*",
"Encoder",
"{",
"m",
":=",
"make",
"(",
"map",
"[",
"Encoding",
"]",
"*",
"mimeInfo",
")",
"\n\n",
"for",
"_",
",",
"e",
":=",
"<mask>",
"append",
... |
24,443 | all-24444 | [
"String",
"returns",
"the",
"name",
"of",
"e"
] | [
"func",
"(",
"e",
"ChangeTrustResultCode",
")",
"String",
"(",
")",
"string",
"{",
"name",
",",
"_",
":=",
"changeTrustResultCodeMap",
"[",
"int32",
"(",
"e",
")",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
24,444 | all-24445 | [
"GetSuccess",
"retrieves",
"the",
"Success",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"ManageOfferResult",
")",
"GetSuccess",
"(",
")",
"(",
"result",
"ManageOfferSuccessResult",
",",
"<mask>",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Code",
")",
")",
"\n\n",
... |
24,445 | all-24446 | [
"PublicCertToPEM",
"serializes",
"the",
"public",
"x509",
"cert",
"in",
"cert",
"to",
"a",
"PEM",
"-",
"formatted",
"block"
] | [
"func",
"PublicCertToPEM",
"(",
"cert",
"*",
"tls",
".",
"Certificate",
")",
"[",
"]",
"<mask>",
"{",
"return",
"pem",
".",
"EncodeToMemory",
"(",
"&",
"pem",
".",
"Block",
"{",
"Type",
":",
"\"",
"\"",
",",
"Bytes",
":",
"cert",
".",
"Certificate",
... |
24,446 | all-24447 | [
"GenerateECDSAKeyPair",
"generates",
"a",
"new",
"ecdsa",
"private",
"and",
"public",
"key"
] | [
"func",
"GenerateECDSAKeyPair",
"(",
"src",
"<mask>",
".",
"Reader",
")",
"(",
"PrivKey",
",",
"PubKey",
",",
"error",
")",
"{",
"return",
"GenerateECDSAKeyPairWithCurve",
"(",
"ECDSACurve",
",",
"src",
")",
"\n",
"}"
] |
24,447 | all-24448 | [
"GetBodyJSON",
"return",
"a",
"json",
"from",
"body"
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"GetBodyJSON",
"(",
")",
"{",
"<mask>",
"reqJSON",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"\n",
"body",
",",
"_",
":=",
"ioutil",
".",
"ReadAll",
"(",
"ctx",
".",
"Request",
".",
"Body",
")",
"\n"... |
24,448 | all-24449 | [
"NewClient",
"creates",
"a",
"new",
"Client",
"connection",
"from",
"the",
"user",
"name",
"password",
"and",
"resource",
"passed",
"to",
"it",
".",
"It",
"uses",
"default",
"host",
"URL",
"and",
"conf",
"URL",
"."
] | [
"func",
"NewClient",
"(",
"user",
",",
"pass",
",",
"<mask>",
",",
"authType",
"string",
")",
"(",
"*",
"Client",
",",
"error",
")",
"{",
"return",
"NewClientWithServerInfo",
"(",
"user",
",",
"pass",
",",
"resource",
",",
"authType",
",",
"defaultHost",
... |
24,449 | all-24450 | [
"FindByButton",
"finds",
"exactly",
"one",
"button",
"element",
"with",
"the",
"provided",
"text",
".",
"Supports",
"<button",
">",
"<input",
"type",
"=",
"button",
">",
"and",
"<input",
"type",
"=",
"submit",
">",
"."
] | [
"func",
"(",
"s",
"*",
"selectable",
")",
"FindByButton",
"(",
"<mask>",
"string",
")",
"*",
"Selection",
"{",
"return",
"newSelection",
"(",
"s",
".",
"session",
",",
"s",
".",
"selectors",
".",
"Append",
"(",
"target",
".",
"Button",
",",
"text",
")"... |
24,450 | all-24451 | [
"ImportantFlag",
"marks",
"a",
"top",
"-",
"level",
"flag",
"as",
"important",
"which",
"means",
"it",
"will",
"be",
"printed",
"out",
"as",
"part",
"of",
"the",
"output",
"of",
"an",
"ordinary",
"help",
"subcommand",
".",
"(",
"All",
"flags",
"important",... | [
"func",
"(",
"cdr",
"*",
"Commander",
")",
"ImportantFlag",
"(",
"name",
"string",
")",
"{",
"cdr",
".",
"important",
"=",
"append",
"(",
"cdr",
".",
"important",
",",
"<mask>",
")",
"\n",
"}"
] |
24,451 | all-24452 | [
"RequireBasicAuth",
"wraps",
"a",
"given",
"handler",
"function",
"inside",
"a",
"handler",
"with",
"basic",
"access",
"authentication",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"RequireBasicAuth",
"(",
"logger",
"log",
".",
"Logger",
",",
"handler",
"HandlerFunc",
",",
"auth",
"AuthFunc",
")",
"HandlerFunc",
"{",
"l",
":=",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\... |
24,452 | all-24453 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"ChangeTrustResultCode"
] | [
"func",
"(",
"e",
"ChangeTrustResultCode",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"changeTrustResultCodeMap",
"[",
"v",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
24,453 | all-24454 | [
"State",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockDockerStateResolver",
")",
"State",
"(",
")",
"dockerstate",
".",
"TaskEngineState",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"ret0",
",",
"_",
":=",
"<mask>",
"[",
"0",
"]",... |
24,454 | all-24455 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequestStyle",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"g",
".",
"Type",
"\n",
"}"
] |
24,455 | all-24456 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CaptureSnapshotReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage77",
"(",
"&",
"w",
",",
"v",
"... |
24,456 | all-24457 | [
"bind",
"a",
"buffer",
"object",
"to",
"a",
"transform",
"feedback",
"buffer",
"object"
] | [
"func",
"TransformFeedbackBufferBase",
"(",
"xfb",
"uint32",
",",
"index",
"uint32",
",",
"buffer",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpTransformFeedbackBufferBase",
",",
"3",
",",
"uintptr",
"(",
"xfb",
")",
",",
"uintptr",
"(",
"<mask>",
... |
24,457 | all-24458 | [
"Like",
"fetch",
"but",
"increments",
"local",
"refcount",
"."
] | [
"func",
"(",
"peers",
"*",
"Peers",
")",
"fetchAndAddRef",
"(",
"<mask>",
"PeerName",
")",
"*",
"Peer",
"{",
"peers",
".",
"Lock",
"(",
")",
"\n",
"defer",
"peers",
".",
"Unlock",
"(",
")",
"\n",
"peer",
":=",
"peers",
".",
"byName",
"[",
"name",
"... |
24,458 | all-24459 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"VisualViewport",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage1",
"(",
"&",
"r",
... |
24,459 | all-24460 | [
"removeContainer",
"deletes",
"the",
"container",
"from",
"the",
"map",
"of",
"containers",
"being",
"watched",
".",
"It",
"also",
"stops",
"the",
"periodic",
"usage",
"data",
"collection",
"for",
"the",
"container",
"."
] | [
"func",
"(",
"engine",
"*",
"DockerStatsEngine",
")",
"removeContainer",
"(",
"dockerID",
"string",
")",
"{",
"engine",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"engine",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"// Make sure that this contain... |
24,460 | all-24461 | [
"Unfortunately",
"Go",
"s",
"pre",
"-",
"defined",
"format",
"strings",
"for",
"parsing",
"RFC",
"-",
"3339",
"-",
"compliant",
"timestamps",
"aren",
"t",
"exhaustive",
".",
"This",
"method",
"attempts",
"to",
"parse",
"a",
"larger",
"set",
"of",
"of",
"IS... | [
"func",
"parseISO8601",
"(",
"s",
"string",
")",
"(",
"<mask>",
".",
"Time",
",",
"error",
")",
"{",
"t",
",",
"err",
":=",
"time",
".",
"Parse",
"(",
"time",
".",
"RFC3339",
",",
"s",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"return",
"t",
",... |
24,461 | all-24462 | [
"IsInhibited",
"is",
"a",
"wrapper",
"around",
"gtk_application_is_inhibited",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Application",
")",
"IsInhibited",
"(",
"<mask>",
"ApplicationInhibitFlags",
")",
"bool",
"{",
"return",
"gobool",
"(",
"C",
".",
"gtk_application_is_inhibited",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkApplicationInhibitFla... |
24,462 | all-24463 | [
"GetJustify",
"is",
"a",
"wrapper",
"around",
"gtk_label_get_justify",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetJustify",
"(",
")",
"Justification",
"{",
"c",
":=",
"C",
".",
"gtk_label_get_justify",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"Justification",
"(",
"c",
")",
"\n",
"}"
] |
24,463 | all-24464 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"Backup",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"BackupLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"return",
"api",
".... |
24,464 | all-24465 | [
"WithQuality",
"compression",
"quality",
"from",
"range",
"[",
"0",
"..",
"100",
"]",
"."
] | [
"func",
"(",
"p",
"StartScreencastParams",
")",
"WithQuality",
"(",
"<mask>",
"int64",
")",
"*",
"StartScreencastParams",
"{",
"p",
".",
"Quality",
"=",
"quality",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
24,465 | all-24466 | [
"mergeValues",
"returns",
"the",
"result",
"of",
"merging",
"two",
"url",
".",
"Values",
"."
] | [
"func",
"mergeValues",
"(",
"u1",
",",
"u2",
"<mask>",
".",
"Values",
")",
"url",
".",
"Values",
"{",
"if",
"u1",
"==",
"nil",
"{",
"return",
"u2",
"\n",
"}",
"\n",
"if",
"u2",
"==",
"nil",
"{",
"return",
"u1",
"\n",
"}",
"\n",
"for",
"k",
",",... |
24,466 | all-24467 | [
"DeepCopy",
"copies",
"the",
"receiver",
"into",
"a",
"new",
"UUID3",
"."
] | [
"func",
"(",
"u",
"*",
"UUID3",
")",
"DeepCopy",
"(",
")",
"*",
"UUID3",
"{",
"if",
"u",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"<mask>",
":=",
"new",
"(",
"UUID3",
")",
"\n",
"u",
".",
"DeepCopyInto",
"(",
"out",
")",
"\n",
"retur... |
24,467 | all-24468 | [
"export",
"FrameSet_Len"
] | [
"func",
"FrameSet_Len",
"(",
"id",
"FrameSetId",
")",
"C",
".",
"size_t",
"{",
"<mask>",
",",
"ok",
":=",
"sFrameSets",
".",
"Get",
"(",
"id",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"C",
".",
"size_t",
"(",
"0",
")",
"\n",
"}",
"\n",
"return"... |
24,468 | all-24469 | [
"validateGTLDs",
"checks",
"that",
"all",
"entries",
"have",
"a",
"valid",
"parseable",
"DelegationDate",
"string",
"and",
"if",
"not",
"-",
"empty",
"a",
"valid",
"parseable",
"RemovalDate",
"string",
".",
"This",
"function",
"assumes",
"an",
"entry",
"with",
... | [
"func",
"validateGTLDs",
"(",
"entries",
"[",
"]",
"util",
".",
"GTLDPeriod",
")",
"error",
"{",
"for",
"_",
",",
"gTLD",
":=",
"<mask>",
"entries",
"{",
"// All entries should have a valid delegation date",
"if",
"_",
",",
"err",
":=",
"time",
".",
"Parse",
... |
24,469 | all-24470 | [
"This",
"endpoint",
"will",
"return",
"the",
"hook",
"definition",
"for",
"the",
"given",
"hookGroupId",
"and",
"hookId",
".",
"See",
"#hook"
] | [
"func",
"(",
"hooks",
"*",
"Hooks",
")",
"Hook",
"(",
"hookGroupId",
",",
"hookId",
"string",
")",
"(",
"*",
"HookDefinition",
",",
"error",
")",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"hooks",
")",
"\n",
"responseObject",
",",
"_",
",... |
24,470 | all-24471 | [
"BuildDvorak",
"builds",
"the",
"Dvorak",
"Graph"
] | [
"func",
"BuildDvorak",
"(",
")",
"<mask>",
"{",
"data",
",",
"err",
":=",
"data",
".",
"Asset",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"return",
"getAdjancencyGraphFromFile",
"(",
... |
24,471 | all-24472 | [
"validateStorageRelocateDiff",
"validates",
"certain",
"storage",
"vMotion",
"diffs",
"to",
"make",
"sure",
"they",
"are",
"functional",
".",
"These",
"mainly",
"have",
"to",
"do",
"with",
"limitations",
"associated",
"with",
"our",
"tracking",
"of",
"virtual",
"d... | [
"func",
"(",
"r",
"*",
"DiskSubresource",
")",
"validateStorageRelocateDiff",
"(",
")",
"error",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"r",
")",
"\n",
"if",
"err",
":=",
"r",
".",
"blockRelocateAttachedDisks",
"(",
")",
";",
"err",
"!=",
"ni... |
24,472 | all-24473 | [
"Set",
"a",
"file",
"input",
"."
] | [
"func",
"yaml_parser_set_input_reader",
"(",
"parser",
"*",
"yaml_parser_t",
",",
"r",
"io",
".",
"Reader",
")",
"{",
"if",
"<mask>",
".",
"read_handler",
"!=",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"parser",
".",
"read_handler",
"=... |
24,473 | all-24474 | [
"Lock",
"locks",
"the",
"mutex",
"with",
"a",
"cancelable",
"context",
".",
"If",
"the",
"context",
"is",
"canceled",
"while",
"trying",
"to",
"acquire",
"the",
"lock",
"the",
"mutex",
"tries",
"to",
"clean",
"its",
"stale",
"lock",
"entry",
"."
] | [
"func",
"(",
"m",
"*",
"Mutex",
")",
"Lock",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"s",
":=",
"m",
".",
"s",
"\n",
"client",
":=",
"m",
".",
"s",
".",
"<mask>",
"(",
")",
"\n\n",
"m",
".",
"myKey",
"=",
"fmt",
".",
"Sprint... |
24,474 | all-24475 | [
"ReadTail",
"reads",
"the",
"last",
"n",
"bytes",
"of",
"the",
"pod",
"log"
] | [
"func",
"(",
"a",
"*",
"PodLogArtifact",
")",
"ReadTail",
"(",
"n",
"int64",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"logs",
",",
"err",
":=",
"a",
".",
"jobAgent",
".",
"GetJobLog",
"(",
"a",
".",
"<mask>",
",",
"a",
".",
"buildID",
... |
24,475 | all-24476 | [
"Association",
"response",
"is",
"a",
"string",
"that",
"s",
"assumed",
"to",
"be",
"in",
"valid",
"JSON",
"format",
"which",
"will",
"be",
"exactly",
"the",
"same",
"as",
"the",
"value",
"of",
"Association",
".",
"Content",
".",
"Value",
"(",
"cp",
"is"... | [
"func",
"newAssociationResponse",
"(",
"taskARN",
",",
"associationType",
",",
"associationName",
"string",
",",
"state",
"dockerstate",
".",
"TaskEngineState",
")",
"(",
"string",
",",
"error",
")",
"{",
"task",
",",
"ok",
":=",
"state",
".",
"TaskByArn",
"("... |
24,476 | all-24477 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CopyToParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom75",
"(",
"&",
"w",
",",
"v",
")",
"\n",... |
24,477 | all-24478 | [
"invalidate",
"a",
"region",
"of",
"a",
"buffer",
"object",
"s",
"data",
"store"
] | [
"func",
"InvalidateBufferSubData",
"(",
"buffer",
"uint32",
",",
"offset",
"int",
",",
"length",
"int",
")",
"{",
"C",
".",
"glowInvalidateBufferSubData",
"(",
"gpInvalidateBufferSubData",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"buffer",
")",
",",
"(",
"C",... |
24,478 | all-24479 | [
"ConstructSearchQuery",
"returns",
"the",
"GitHub",
"search",
"query",
"string",
"for",
"PRs",
"that",
"are",
"open",
"and",
"authored",
"by",
"the",
"user",
"passed",
".",
"The",
"search",
"is",
"scoped",
"to",
"repositories",
"that",
"are",
"configured",
"wi... | [
"func",
"(",
"da",
"*",
"DashboardAgent",
")",
"ConstructSearchQuery",
"(",
"login",
"string",
")",
"string",
"{",
"tokens",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
"+",
"login",
"}",
"\n",
"for",
"i",
":=",
"<m... |
24,479 | all-24480 | [
"DeleteContainer",
"removes",
"the",
"MAAS",
"device",
"for",
"the",
"container"
] | [
"func",
"(",
"c",
"*",
"Controller",
")",
"DeleteContainer",
"(",
"name",
"string",
")",
"error",
"{",
"<mask>",
",",
"err",
":=",
"c",
".",
"getDevice",
"(",
"name",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"er... |
24,480 | all-24481 | [
"GetIntegrationPD",
"gets",
"all",
"the",
"PagerDuty",
"Integrations",
"from",
"the",
"system",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetIntegrationPD",
"(",
")",
"(",
"*",
"integrationPD",
",",
"error",
")",
"{",
"var",
"out",
"integrationPD",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
... |
24,481 | all-24482 | [
"LoadCACertFile",
"reads",
"in",
"a",
"CA",
"cert",
"file",
"that",
"may",
"contain",
"multiple",
"certs",
"and",
"gives",
"you",
"back",
"a",
"proper",
"x509",
".",
"CertPool",
"for",
"your",
"fun",
"and",
"proffit"
] | [
"func",
"LoadCACertFile",
"(",
"cert",
"string",
")",
"(",
"*",
"x509",
".",
"CertPool",
",",
"error",
")",
"{",
"// validate caCert, and setup certpool",
"ca",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"cert",
")",
"\n",
"if",
"err",
"!=",
"nil",
... |
24,482 | all-24483 | [
"ResetOffset",
"marks",
"the",
"provided",
"message",
"as",
"processed",
"alongside",
"a",
"metadata",
"string",
"that",
"represents",
"the",
"state",
"of",
"the",
"partition",
"consumer",
"at",
"that",
"point",
"in",
"time",
".",
"The",
"metadata",
"string",
... | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"ResetOffset",
"(",
"msg",
"*",
"sarama",
".",
"ConsumerMessage",
",",
"metadata",
"string",
")",
"{",
"if",
"sub",
":=",
"c",
".",
"subs",
".",
"Fetch",
"(",
"msg",
".",
"Topic",
",",
"msg",
".",
"Partition",
... |
24,483 | all-24484 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventRequestPaused",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8",
"(",
"&",
"r"... |
24,484 | all-24485 | [
"/",
"*",
"Inpaints",
"the",
"selected",
"region",
"in",
"the",
"image"
] | [
"func",
"Inpaint",
"(",
"src",
",",
"inpaint_mask",
",",
"dst",
"*",
"IplImage",
",",
"inpaintRange",
"float64",
",",
"<mask>",
"int",
")",
"{",
"C",
".",
"cvInpaint",
"(",
"unsafe",
".",
"Pointer",
"(",
"src",
")",
",",
"unsafe",
".",
"Pointer",
"(",
... |
24,485 | all-24486 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1",
"(",
"&",
"r",
... |
24,486 | all-24487 | [
"ListRecentBuildsForProject",
"fetches",
"the",
"list",
"of",
"recent",
"builds",
"for",
"the",
"given",
"repository",
"The",
"status",
"and",
"branch",
"parameters",
"are",
"used",
"to",
"further",
"filter",
"results",
"if",
"non",
"-",
"empty",
"If",
"limit",
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListRecentBuildsForProject",
"(",
"account",
",",
"repo",
",",
"branch",
",",
"status",
"string",
",",
"limit",
",",
"offset",
"int",
")",
"(",
"[",
"]",
"*",
"Build",
",",
"error",
")",
"{",
"path",
":=",
"fmt"... |
24,487 | all-24488 | [
"JSONDoc",
"loads",
"a",
"json",
"document",
"from",
"either",
"a",
"file",
"or",
"a",
"remote",
"url"
] | [
"func",
"JSONDoc",
"(",
"<mask>",
"string",
")",
"(",
"json",
".",
"RawMessage",
",",
"error",
")",
"{",
"data",
",",
"err",
":=",
"swag",
".",
"LoadFromFileOrHTTP",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
... |
24,488 | all-24489 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"CoverageRange",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler26",
"(",
"&",
"r",... |
24,489 | all-24490 | [
"/",
"*",
"decode",
"image",
"stored",
"in",
"the",
"buffer"
] | [
"func",
"DecodeImage",
"(",
"buf",
"unsafe",
".",
"Pointer",
",",
"iscolor",
"int",
")",
"*",
"IplImage",
"{",
"rv",
":=",
"C",
".",
"cvDecodeImage",
"(",
"(",
"*",
"C",
".",
"CvMat",
")",
"(",
"buf",
")",
",",
"C",
".",
"int",
"(",
"iscolor",
")... |
24,490 | all-24491 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Timings",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHar",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"ret... |
24,491 | all-24492 | [
"Remove",
"implements",
"Remove",
"method",
"of",
"PlanService",
"interface"
] | [
"func",
"(",
"s",
"*",
"planService",
")",
"Remove",
"(",
"planName",
"string",
")",
"error",
"{",
"return",
"s",
".",
"storage",
".",
"Delete",
"(",
"appTypes",
".",
"Plan",
"{",
"<mask>",
":",
"planName",
"}",
")",
"\n",
"}"
] |
24,492 | all-24493 | [
"title",
":",
"volume",
"plan",
"list",
"path",
":",
"/",
"volumeplans",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"List",
"volume",
"plans",
"401",
":",
"Unauthorized"
] | [
"func",
"volumePlansList",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"<mask>",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"contexts",
":=",
"permission",
".",
"ContextsForPermission",
"(",
"t",
",",
"permission",
".",
"... |
24,493 | all-24494 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"Dashboard",
")",
"GetId",
"(",
")",
"int",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"Id",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"<mask>",
"\n",
"}"
] |
24,494 | all-24495 | [
"Claim",
"returns",
"true",
"if",
"incoming",
"request",
"can",
"claim",
"for",
"a",
"cached",
"handler",
"the",
"original",
"handler",
"should",
"run",
"as",
"it",
"is",
"and",
"exit"
] | [
"func",
"(",
"v",
"*",
"validatorRule",
")",
"Claim",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"bool",
"{",
"// check for pre-cache validators, if at least one of them return false",
"// for this specific request, then skip the whole cache",
"for",
"_",
",",
"shouldProce... |
24,495 | all-24496 | [
"UnmarshalEasyJSON",
"sets",
"the",
"Base64",
"from",
"a",
"easyjson",
".",
"Lexer"
] | [
"func",
"(",
"b",
"*",
"Base64",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"if",
"data",
":=",
"in",
".",
"String",
"(",
")",
";",
"in",
".",
"Ok",
"(",
")",
"{",
"enc",
":=",
"base64",
".",
"StdEncoding",
"\n",
... |
24,496 | all-24497 | [
"Dequeue",
"returns",
"Enqueue",
"()",
"d",
"elements",
"in",
"FIFO",
"order",
".",
"If",
"the",
"queue",
"is",
"empty",
"Dequeue",
"blocks",
"until",
"elements",
"are",
"available",
"."
] | [
"func",
"(",
"q",
"*",
"Queue",
")",
"Dequeue",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"// TODO: fewer round trips by fetching more than one key",
"resp",
",",
"err",
":=",
"q",
".",
"client",
".",
"Get",
"(",
"q",
".",
"ctx",
",",
"q",
".",
... |
24,497 | all-24498 | [
"Keys",
"returns",
"all",
"keys",
"defined",
"in",
"the",
"schema"
] | [
"func",
"(",
"s",
"Schema",
")",
"Keys",
"(",
")",
"[",
"]",
"string",
"{",
"keys",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"len",
"(",
"s",
")",
")",
"\n",
"i",
":=",
"0",
"\n",
"for",
"<mask>",
":=",
"range",
"s",
"{",
"keys",
"[",
"i... |
24,498 | all-24499 | [
"GetUrlOk",
"returns",
"a",
"tuple",
"with",
"the",
"Url",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"b",
"*",
"Board",
")",
"GetUrlOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"b",
"==",
"nil",
"||",
"b",
".",
"Url",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"b",
".",
... |
24,499 | all-24500 | [
"NewImage",
"returns",
"a",
"types",
".",
"ImageCloser",
"for",
"this",
"reference",
"possibly",
"specialized",
"for",
"this",
"ImageTransport",
".",
"The",
"caller",
"must",
"call",
".",
"Close",
"()",
"on",
"the",
"returned",
"ImageCloser",
".",
"NOTE",
":",... | [
"func",
"(",
"ref",
"openshiftReference",
")",
"NewImage",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"sys",
"*",
"types",
".",
"SystemContext",
")",
"(",
"types",
".",
"ImageCloser",
",",
"error",
")",
"{",
"src",
",",
"err",
":=",
"newImageSource",
"("... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.