id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
5,200 | all-5201 | [
"Calculates",
"the",
"per",
"-",
"element",
"difference",
"between",
"a",
"scalar",
"and",
"an",
"array",
".",
"dst",
"=",
"value",
"-",
"src"
] | [
"func",
"SubScalarRev",
"(",
"<mask>",
"Scalar",
",",
"src",
",",
"dst",
"*",
"IplImage",
")",
"{",
"SubScalarWithMaskRev",
"(",
"value",
",",
"src",
",",
"dst",
",",
"nil",
")",
"\n",
"}"
] |
5,201 | all-5202 | [
"Letters",
"returns",
"an",
"array",
"of",
"runes",
"as",
"strings",
"so",
"it",
"can",
"be",
"indexed",
"into",
"."
] | [
"func",
"Letters",
"(",
"s",
"string",
")",
"[",
"]",
"string",
"{",
"result",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"r",
":=",
"range",
"s",
"{",
"<mask>",
"=",
"append",
"(",
"result",
",",
"string",
"(",
"r",
")",
")",
... |
5,202 | all-5203 | [
"Combination",
"generator",
"for",
"int",
"slice"
] | [
"func",
"combinations",
"(",
"list",
"[",
"]",
"int",
",",
"select_num",
",",
"buf",
"int",
")",
"(",
"c",
"chan",
"[",
"]",
"int",
")",
"{",
"c",
"=",
"make",
"(",
"chan",
"[",
"]",
"int",
",",
"buf",
")",
"\n",
"go",
"func",
"(",
")",
"{",
... |
5,203 | all-5204 | [
"Build",
"action",
"param",
"struct",
"from",
"json",
"data"
] | [
"func",
"(",
"p",
"*",
"ParamAnalyzer",
")",
"parseParam",
"(",
"path",
"string",
",",
"param",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"child",
"*",
"<mask>",
".",
"ActionParam",
")",
"*",
"gen",
".",
"ActionParam",
"{",
"dType",
":=",
... |
5,204 | all-5205 | [
"PrintDetailedCommitInfo",
"pretty",
"-",
"prints",
"detailed",
"commit",
"info",
"."
] | [
"func",
"PrintDetailedCommitInfo",
"(",
"commitInfo",
"*",
"PrintableCommitInfo",
")",
"error",
"{",
"template",
",",
"err",
":=",
"template",
".",
"New",
"(",
"\"",
"\"",
")",
".",
"Funcs",
"(",
"funcMap",
")",
".",
"Parse",
"(",
"`Commit: {{.Commit.Repo.Name... |
5,205 | all-5206 | [
"readByte",
"creates",
"a",
"single",
"random",
"byte",
"."
] | [
"func",
"(",
"s",
"*",
"Random",
")",
"readByte",
"(",
")",
"byte",
"{",
"before",
":=",
"<mask>",
".",
"Now",
"(",
")",
"\n",
"rndDuration",
":=",
"time",
".",
"Duration",
"(",
"getUInt16FromBytes",
"(",
"s",
".",
"val",
")",
")",
"\n\n",
"time",
... |
5,206 | all-5207 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"DNSEndpointStatus",
"."
] | [
"func",
"(",
"in",
"*",
"DNSEndpointStatus",
")",
"DeepCopy",
"(",
")",
"*",
"DNSEndpointStatus",
"{",
"if",
"<mask>",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"DNSEndpointStatus",
")",
"\n",
"in",
".",
"DeepCopyInto",... |
5,207 | all-5208 | [
"makePipeline",
"creates",
"a",
"PipelineRun",
"from",
"a",
"prow",
"job",
"using",
"the",
"PipelineRunSpec",
"defined",
"in",
"the",
"prow",
"job"
] | [
"func",
"makePipelineRun",
"(",
"pj",
"prowjobv1",
".",
"ProwJob",
",",
"pr",
"*",
"pipelinev1alpha1",
".",
"PipelineResource",
")",
"(",
"*",
"pipelinev1alpha1",
".",
"PipelineRun",
",",
"error",
")",
"{",
"if",
"pj",
".",
"Spec",
".",
"PipelineRunSpec",
"=... |
5,208 | all-5209 | [
"RegisterFuncMap",
"register",
"FuncMap",
"for",
"render",
"."
] | [
"func",
"(",
"render",
"*",
"Render",
")",
"RegisterFuncMap",
"(",
"name",
"string",
",",
"fc",
"interface",
"{",
"}",
")",
"{",
"if",
"render",
".",
"funcMaps",
"==",
"nil",
"{",
"<mask>",
".",
"funcMaps",
"=",
"template",
".",
"FuncMap",
"{",
"}",
... |
5,209 | all-5210 | [
"RequestDatabase",
"requests",
"database",
"with",
"given",
"name",
"in",
"given",
"frame",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"IndexedDB#method",
"-",
"requestD... | [
"func",
"RequestDatabase",
"(",
"securityOrigin",
"<mask>",
",",
"databaseName",
"string",
")",
"*",
"RequestDatabaseParams",
"{",
"return",
"&",
"RequestDatabaseParams",
"{",
"SecurityOrigin",
":",
"securityOrigin",
",",
"DatabaseName",
":",
"databaseName",
",",
"}",... |
5,210 | all-5211 | [
"bind",
"a",
"transform",
"feedback",
"object"
] | [
"func",
"BindTransformFeedback",
"(",
"target",
"uint32",
",",
"<mask>",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpBindTransformFeedback",
",",
"2",
",",
"uintptr",
"(",
"target",
")",
",",
"uintptr",
"(",
"id",
")",
",",
"0",
")",
"\n",
"}"... |
5,211 | all-5212 | [
"resourceVSphereDatastoreApplyFolderOrStorageClusterPath",
"returns",
"a",
"path",
"to",
"a",
"folder",
"or",
"a",
"datastore",
"cluster",
"depending",
"on",
"what",
"has",
"been",
"selected",
"in",
"the",
"resource",
"."
] | [
"func",
"resourceVSphereDatastoreApplyFolderOrStorageClusterPath",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
")",
"(",
"string",
",",
"error",
")",
"{",
"var",
"path",
"string",
"\n",
"fvalue",
",",
"fok",
":=",
"d",
"... |
5,212 | all-5213 | [
"flushableLine",
"returns",
"a",
"boolean",
"value",
"indicating",
"whether",
"the",
"line",
"j",
"is",
"flushabled",
"or",
"not",
"."
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"flushableLine",
"(",
"j",
"int",
")",
"bool",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"fieldBlockNumX",
";",
"i",
"++",
"{",
"if",
"f",
".",
"<mask>",
"[",
"i",
"]",
"[",
"j",
"]",
"==",
"BlockTypeNone",... |
5,213 | all-5214 | [
"/",
"*",
"Alternatively",
"you",
"can",
"instantiate",
"a",
"client",
"from",
"an",
"environment",
"variable",
".",
"This",
"is",
"particularly",
"relevant",
"if",
"you",
"are",
"using",
"Pusher",
"as",
"a",
"Heroku",
"add",
"-",
"on",
"which",
"stores",
... | [
"func",
"ClientFromEnv",
"(",
"<mask>",
"string",
")",
"(",
"*",
"Client",
",",
"error",
")",
"{",
"url",
":=",
"os",
".",
"Getenv",
"(",
"key",
")",
"\n",
"return",
"ClientFromURL",
"(",
"url",
")",
"\n",
"}"
] |
5,214 | all-5215 | [
"Do",
"executes",
"Page",
".",
"getInstallabilityErrors",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"errors"
] | [
"func",
"(",
"p",
"*",
"GetInstallabilityErrorsParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"errors",
"[",
"]",
"string",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetInstallabilityErrorsReturns",
"\n",
"err",
"=",
... |
5,215 | all-5216 | [
"PrivateKey",
"is",
"a",
"convenience",
"to",
"encode",
"the",
"underlying",
"private",
"key",
"."
] | [
"func",
"(",
"c",
"*",
"CertInfo",
")",
"PrivateKey",
"(",
")",
"[",
"]",
"byte",
"{",
"ecKey",
",",
"ok",
":=",
"c",
".",
"KeyPair",
"(",
")",
".",
"PrivateKey",
".",
"(",
"*",
"ecdsa",
".",
"PrivateKey",
")",
"\n",
"if",
"ok",
"{",
"data",
",... |
5,216 | all-5217 | [
"EscapePathFstab",
"escapes",
"a",
"path",
"fstab",
"-",
"style",
".",
"This",
"ensures",
"that",
"getmntent_r",
"()",
"and",
"friends",
"can",
"correctly",
"parse",
"stuff",
"like",
"/",
"some",
"/",
"wacky",
"path",
"with",
"spaces",
"/",
"some",
"/",
"w... | [
"func",
"EscapePathFstab",
"(",
"<mask>",
"string",
")",
"string",
"{",
"r",
":=",
"strings",
".",
"NewReplacer",
"(",
"\"",
"\"",
",",
"\"",
"\\\\",
"\"",
",",
"\"",
"\\t",
"\"",
",",
"\"",
"\\\\",
"\"",
",",
"\"",
"\\n",
"\"",
",",
"\"",
"\\\\",
... |
5,217 | all-5218 | [
"Vec3Dist2DSqr",
"derives",
"the",
"square",
"of",
"the",
"distance",
"between",
"v1",
"and",
"v2",
"on",
"the",
"xz",
"-",
"plane",
".",
"The",
"vectors",
"are",
"projected",
"onto",
"the",
"xz",
"-",
"plane",
"so",
"the",
"y",
"-",
"values",
"are",
"... | [
"func",
"Vec3Dist2DSqr",
"(",
"v1",
",",
"v2",
"Vec3",
")",
"float32",
"{",
"dx",
":=",
"v1",
"[",
"0",
"]",
"-",
"v2",
"[",
"0",
"]",
"\n",
"dz",
":=",
"v1",
"[",
"2",
"]",
"-",
"v2",
"[",
"2",
"]",
"\n",
"<mask>",
"dx",
"*",
"dx",
"+",
... |
5,218 | all-5219 | [
"WithTimeout",
"sets",
"the",
"timeout",
"to",
"use",
"for",
"each",
"call",
"."
] | [
"func",
"WithTimeout",
"(",
"timeout",
"<mask>",
".",
"Duration",
")",
"Option",
"{",
"return",
"func",
"(",
"opts",
"*",
"options",
")",
"{",
"opts",
".",
"timeout",
"=",
"timeout",
"\n",
"}",
"\n",
"}"
] |
5,219 | all-5220 | [
"GetBlob",
"returns",
"a",
"stream",
"for",
"the",
"specified",
"blob",
"and",
"the",
"blob’s",
"size",
"(",
"or",
"-",
"1",
"if",
"unknown",
")",
".",
"The",
"Digest",
"field",
"in",
"BlobInfo",
"is",
"guaranteed",
"to",
"be",
"provided",
"Size",
"may",... | [
"func",
"(",
"s",
"*",
"ociArchiveImageSource",
")",
"GetBlob",
"(",
"ctx",
"<mask>",
".",
"Context",
",",
"info",
"types",
".",
"BlobInfo",
",",
"cache",
"types",
".",
"BlobInfoCache",
")",
"(",
"io",
".",
"ReadCloser",
",",
"int64",
",",
"error",
")",
... |
5,220 | all-5221 | [
"Addr",
"returns",
"the",
"starting",
"address",
"of",
"x",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"Addr",
"(",
"x",
"Object",
")",
"core",
".",
"Address",
"{",
"return",
"core",
".",
"<mask>",
"(",
"x",
")",
"\n",
"}"
] |
5,221 | all-5222 | [
"GetScope",
"returns",
"the",
"Scope",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"Series",
")",
"GetScope",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Scope",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Scope",
"\n",
"}"
] |
5,222 | all-5223 | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"get",
"apps",
"app",
"routes",
"route",
"params"
] | [
"func",
"(",
"o",
"*",
"GetAppsAppRoutesRouteParams",
")",
"WithHTTPClient",
"(",
"<mask>",
"*",
"http",
".",
"Client",
")",
"*",
"GetAppsAppRoutesRouteParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
5,223 | all-5224 | [
"UpdateSpaces",
"-"
] | [
"func",
"(",
"m",
"*",
"DefaultManager",
")",
"UpdateSpaces",
"(",
")",
"error",
"{",
"m",
".",
"spaces",
"=",
"nil",
"\n",
"spaceConfigs",
",",
"err",
":=",
"m",
".",
"Cfg",
".",
"GetSpaceConfigs",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"r... |
5,224 | all-5225 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"PrivatePropertyDescriptor",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime16",
"(",
"&",
"w",
",",
"v... |
5,225 | all-5226 | [
"findTeam",
"returns",
"teams",
"[",
"n",
"]",
"for",
"the",
"first",
"n",
"in",
"[",
"name",
"previousNames",
"...",
"]",
"that",
"is",
"in",
"teams",
"."
] | [
"func",
"findTeam",
"(",
"teams",
"map",
"[",
"string",
"]",
"github",
".",
"Team",
",",
"name",
"string",
",",
"previousNames",
"...",
"string",
")",
"*",
"github",
".",
"Team",
"{",
"if",
"t",
",",
"ok",
":=",
"teams",
"[",
"<mask>",
"]",
";",
"o... |
5,226 | all-5227 | [
"ChangeHSV",
"changes",
"HSV",
"(",
"Hue",
"-",
"Saturation",
"-",
"Value",
")",
"elements",
".",
"hueTheta",
"is",
"a",
"radian",
"value",
"to",
"ratate",
"hue",
".",
"saturationScale",
"is",
"a",
"value",
"to",
"scale",
"saturation",
".",
"valueScale",
"... | [
"func",
"(",
"c",
"*",
"ColorM",
")",
"ChangeHSV",
"(",
"hueTheta",
"float64",
",",
"saturationScale",
"float32",
",",
"valueScale",
"float32",
")",
"*",
"ColorM",
"{",
"sin",
",",
"cos",
":=",
"math",
".",
"Sincos",
"(",
"hueTheta",
")",
"\n",
"s32",
... |
5,227 | all-5228 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"OrientationType",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"OrientationType",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"OrientationTypePortraitPrimary",
":",
"*",
"t",
"=",
... |
5,228 | all-5229 | [
"Delete",
"deletes",
"a",
"vsphere_virtual_machine",
"cdrom",
"sub",
"-",
"resource",
"."
] | [
"func",
"(",
"r",
"*",
"CdromSubresource",
")",
"Delete",
"(",
"l",
"object",
".",
"VirtualDeviceList",
")",
"(",
"[",
"]",
"types",
".",
"BaseVirtualDeviceConfigSpec",
",",
"error",
")",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"r",
")",
"\n",... |
5,229 | all-5230 | [
"Orchestrate",
"runs",
"Stream",
".",
"It",
"picks",
"up",
"ranges",
"from",
"the",
"SSTables",
"then",
"runs",
"NumGo",
"number",
"of",
"goroutines",
"to",
"iterate",
"over",
"these",
"ranges",
"and",
"batch",
"up",
"KVs",
"in",
"lists",
".",
"It",
"concu... | [
"func",
"(",
"st",
"*",
"Stream",
")",
"Orchestrate",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"st",
".",
"rangeCh",
"=",
"make",
"(",
"chan",
"keyRange",
",",
"3",
")",
"// Contains keys for posting lists.",
"\n\n",
"// kvChan should only hav... |
5,230 | all-5231 | [
"Service",
"returns",
"the",
"goa",
".",
"v2",
"service"
] | [
"func",
"(",
"ep",
"*",
"Endpoint",
")",
"<mask>",
"(",
")",
"string",
"{",
"if",
"len",
"(",
"ep",
".",
"Tags",
")",
">",
"0",
"{",
"return",
"ep",
".",
"Tags",
"[",
"0",
"]",
"\n",
"}",
"\n",
"if",
"len",
"(",
"ep",
".",
"OperationID",
")",... |
5,231 | all-5232 | [
"RevParse",
"does",
"git",
"rev",
"-",
"parse",
"."
] | [
"func",
"(",
"lg",
"*",
"LocalGit",
")",
"RevParse",
"(",
"org",
",",
"repo",
",",
"commitlike",
"<mask>",
")",
"(",
"string",
",",
"error",
")",
"{",
"rdir",
":=",
"filepath",
".",
"Join",
"(",
"lg",
".",
"Dir",
",",
"org",
",",
"repo",
")",
"\n... |
5,232 | all-5233 | [
"IsHidden",
"function",
"checks",
"if",
"the",
"node",
"is",
"a",
"hidden",
"node",
".",
"A",
"hidden",
"node",
"will",
"begin",
"with",
"_",
"A",
"hidden",
"node",
"will",
"not",
"be",
"shown",
"via",
"get",
"command",
"under",
"a",
"directory",
"For",
... | [
"func",
"(",
"n",
"*",
"node",
")",
"IsHidden",
"(",
")",
"bool",
"{",
"_",
",",
"name",
":=",
"path",
".",
"Split",
"(",
"n",
".",
"<mask>",
")",
"\n\n",
"return",
"name",
"[",
"0",
"]",
"==",
"'_'",
"\n",
"}"
] |
5,233 | all-5234 | [
"HasMessage",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"Check",
")",
"HasMessage",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
5,234 | all-5235 | [
"GetApprovers",
"returns",
"a",
"map",
"from",
"ownersFiles",
"-",
">",
"people",
"that",
"are",
"approvers",
"in",
"them"
] | [
"func",
"(",
"o",
"Owners",
")",
"GetApprovers",
"(",
")",
"map",
"[",
"string",
"]",
"sets",
".",
"<mask>",
"{",
"ownersToApprovers",
":=",
"map",
"[",
"string",
"]",
"sets",
".",
"String",
"{",
"}",
"\n\n",
"for",
"fn",
":=",
"range",
"o",
".",
"... |
5,235 | all-5236 | [
"EtcdDeployment",
"returns",
"an",
"etcd",
"k8s",
"Deployment",
"."
] | [
"func",
"EtcdDeployment",
"(",
"opts",
"*",
"AssetOpts",
",",
"hostPath",
"string",
")",
"*",
"apps",
".",
"Deployment",
"{",
"cpu",
":=",
"resource",
".",
"MustParse",
"(",
"opts",
".",
"EtcdCPURequest",
")",
"\n",
"mem",
":=",
"<mask>",
".",
"MustParse",... |
5,236 | all-5237 | [
"Reticence",
"trucate",
"the",
"string",
"in",
"the",
"space",
"or",
"on",
"pontuation",
"mark",
"and",
"put",
"reticences",
"in",
"the",
"resulting",
"string",
"."
] | [
"func",
"Reticence",
"(",
"str",
"string",
",",
"length",
"int",
")",
"string",
"{",
"if",
"length",
">",
"len",
"(",
"str",
")",
"{",
"return",
"str",
"\n",
"}",
"\n",
"var",
"i",
"int",
"\n",
"F",
":",
"for",
"i",
"=",
"len",
"(",
"str",
")",... |
5,237 | all-5238 | [
"GetData",
"retrieves",
"the",
"Data",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"LedgerKey",
")",
"GetData",
"(",
")",
"(",
"result",
"LedgerKeyData",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName",
"==",... |
5,238 | all-5239 | [
"GetEnv",
"returns",
"the",
"Env",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TraceServiceDefinition",
")",
"GetEnv",
"(",
")",
"<mask>",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Env",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"Env",
"\n",
"}"
] |
5,239 | all-5240 | [
"GetPeers",
"retrieves",
"the",
"Peers",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"GetPeers",
"(",
")",
"(",
"result",
"[",
"]",
"PeerAddress",
",",
"<mask>",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if"... |
5,240 | all-5241 | [
"Run",
"will",
"authorize",
"immediately",
"and",
"return",
"the",
"provided",
"list",
"of",
"enforcers",
"."
] | [
"func",
"Run",
"(",
"enforcers",
"...",
"*",
"Enforcer",
")",
"*",
"Authorizer",
"{",
"return",
"A",
"(",
"\"",
"\"",
",",
"fire",
".",
"All",
"(",
")",
",",
"func",
"(",
"ctx",
"*",
"fire",
".",
"<mask>",
")",
"(",
"[",
"]",
"*",
"Enforcer",
"... |
5,241 | all-5242 | [
"handleSAMLResponse",
"is",
"the",
"HTTP",
"handler",
"for",
"Pachyderm",
"s",
"ACS",
"which",
"receives",
"signed",
"SAML",
"assertions",
"from",
"this",
"cluster",
"s",
"SAML",
"ID",
"provider",
"(",
"if",
"one",
"is",
"configured",
")"
] | [
"func",
"(",
"a",
"*",
"apiServer",
")",
"handleSAMLResponse",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"var",
"subject",
",",
"authCode",
"string",
"\n",
"var",
"err",
"*",
"errutil",
".",
"HTTPError",
... |
5,242 | all-5243 | [
"NewPlayer",
"creates",
"a",
"new",
"player",
"with",
"the",
"given",
"stream",
".",
"src",
"s",
"format",
"must",
"be",
"linear",
"PCM",
"(",
"16bits",
"little",
"endian",
"2",
"channel",
"stereo",
")",
"without",
"a",
"header",
"(",
"e",
".",
"g",
".... | [
"func",
"NewPlayer",
"(",
"context",
"*",
"Context",
",",
"src",
"io",
".",
"ReadCloser",
")",
"(",
"*",
"Player",
",",
"error",
")",
"{",
"p",
":=",
"&",
"Player",
"{",
"&",
"playerImpl",
"{",
"context",
":",
"context",
",",
"src",
":",
"src",
","... |
5,243 | all-5244 | [
"HasStyle",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TileDef",
")",
"HasStyle",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"Style",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
5,244 | all-5245 | [
"EqualOneOf",
"checks",
"if",
"a",
"value",
"is",
"equal",
"to",
"one",
"of",
"the",
"elements",
"of",
"a",
"slice",
".",
"Note",
"that",
"if",
"expecteds",
"and",
"actual",
"are",
"a",
"slice",
"of",
"pointers",
"and",
"a",
"pointer",
"respectively",
"t... | [
"func",
"EqualOneOf",
"(",
"tb",
"testing",
".",
"TB",
",",
"expecteds",
"interface",
"{",
"}",
",",
"<mask>",
"interface",
"{",
"}",
",",
"msgAndArgs",
"...",
"interface",
"{",
"}",
")",
"{",
"tb",
".",
"Helper",
"(",
")",
"\n",
"equal",
",",
"err",... |
5,245 | all-5246 | [
"URL",
"returns",
"the",
"Docker",
"host",
"URL"
] | [
"func",
"(",
"rd",
"*",
"RemoteDocker",
")",
"<mask>",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"rd",
".",
"HostURL",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",... |
5,246 | all-5247 | [
"Relay",
"all",
"pending",
"gossip",
"data",
"for",
"each",
"channel",
"via",
"conn",
"."
] | [
"func",
"(",
"router",
"*",
"Router",
")",
"sendAllGossipDown",
"(",
"conn",
"<mask>",
")",
"{",
"for",
"channel",
":=",
"range",
"router",
".",
"gossipChannelSet",
"(",
")",
"{",
"if",
"gossip",
":=",
"channel",
".",
"gossiper",
".",
"Gossip",
"(",
")",... |
5,247 | all-5248 | [
"dispatchInbound",
"ispatches",
"an",
"inbound",
"call",
"to",
"the",
"appropriate",
"handler"
] | [
"func",
"(",
"c",
"*",
"Connection",
")",
"dispatchInbound",
"(",
"_",
"uint32",
",",
"_",
"uint32",
",",
"call",
"*",
"InboundCall",
",",
"frame",
"*",
"Frame",
")",
"{",
"if",
"call",
".",
"log",
".",
"Enabled",
"(",
"LogLevelDebug",
")",
"{",
"cal... |
5,248 | all-5249 | [
"GetComparator",
"returns",
"the",
"Comparator",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetConditionalFormat",
")",
"GetComparator",
"(",
")",
"<mask>",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Comparator",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"Comparator",
"\n... |
5,249 | all-5250 | [
"Name",
"returns",
"user",
"defined",
"name",
"for",
"the",
"snapshot",
"."
] | [
"func",
"(",
"s",
"*",
"Snapshot",
")",
"Name",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"var",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"\n",
"var",
"name",
"*",
"C",
".",
"char",
"\n\n",
"err",
"=",
"C",
".",
"get_propert... |
5,250 | all-5251 | [
"plugin",
"executes",
"a",
"subprocess",
"as",
"the",
"given",
"command",
"string",
".",
"It",
"is",
"assumed",
"the",
"resulting",
"command",
"returns",
"JSON",
"which",
"is",
"then",
"parsed",
"and",
"returned",
"as",
"the",
"value",
"for",
"use",
"in",
... | [
"func",
"plugin",
"(",
"<mask>",
"string",
",",
"args",
"...",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"name",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
",",
"nil",
"\n",
"}",
"\n\n",
"stdout",
",",
"stderr",
":=",
"new",
"... |
5,251 | all-5252 | [
"IsTokenValid",
"checks",
"the",
"token",
"is",
"still",
"within",
"it",
"s",
"expiration",
"window",
".",
"We",
"early",
"expire",
"to",
"allow",
"for",
"timing",
"in",
"calls",
"and",
"add",
"jitter",
"to",
"avoid",
"refreshing",
"all",
"of",
"the",
"tok... | [
"func",
"(",
"authProvider",
"*",
"ecrAuthProvider",
")",
"IsTokenValid",
"(",
"authData",
"*",
"ecrapi",
".",
"AuthorizationData",
")",
"bool",
"{",
"if",
"authData",
"==",
"nil",
"||",
"authData",
".",
"ExpiresAt",
"==",
"nil",
"{",
"return",
"<mask>",
"\n... |
5,252 | all-5253 | [
"Return",
"true",
"if",
"the",
"given",
"request",
"is",
"presenting",
"the",
"given",
"cluster",
"certificate",
"."
] | [
"func",
"tlsCheckCert",
"(",
"r",
"*",
"http",
".",
"Request",
",",
"info",
"*",
"shared",
".",
"CertInfo",
")",
"bool",
"{",
"cert",
",",
"err",
":=",
"x509",
".",
"ParseCertificate",
"(",
"info",
".",
"KeyPair",
"(",
")",
".",
"Certificate",
"[",
"... |
5,253 | all-5254 | [
"Run",
"matches",
"and",
"opens",
"external",
"network",
"ports",
"."
] | [
"func",
"Run",
"(",
"ctx",
"context",
".",
"Context",
",",
"conf",
"*",
"Config",
",",
"logger",
"log",
".",
"Logger",
",",
"ports",
"[",
"]",
"uint16",
")",
"{",
"if",
"conf",
".",
"Mechanism",
"==",
"\"",
"\"",
"{",
"logger",
".",
"Debug",
"(",
... |
5,254 | all-5255 | [
"Given",
"a",
"State",
"type",
"returns",
"its",
"string",
"representation"
] | [
"func",
"(",
"s",
"State",
")",
"<mask>",
"(",
")",
"string",
"{",
"if",
"int",
"(",
"s",
")",
">=",
"0",
"&&",
"int",
"(",
"s",
")",
"<",
"len",
"(",
"states",
")",
"{",
"return",
"states",
"[",
"s",
"]",
"\n",
"}",
"\n",
"return",
"\"",
"... |
5,255 | all-5256 | [
"Uint64",
"defines",
"a",
"uint64",
"flag",
"with",
"specified",
"name",
"default",
"value",
"and",
"usage",
"string",
".",
"The",
"return",
"value",
"is",
"the",
"address",
"of",
"a",
"uint64",
"variable",
"that",
"stores",
"the",
"value",
"of",
"the",
"f... | [
"func",
"Uint64",
"(",
"name",
"string",
",",
"value",
"uint64",
",",
"<mask>",
"string",
")",
"*",
"uint64",
"{",
"return",
"EnvironmentFlags",
".",
"Uint64",
"(",
"name",
",",
"value",
",",
"usage",
")",
"\n",
"}"
] |
5,256 | all-5257 | [
"Commit",
"marks",
"the",
"process",
"of",
"storing",
"the",
"image",
"as",
"successful",
"and",
"asks",
"for",
"the",
"image",
"to",
"be",
"persisted",
".",
"WARNING",
":",
"This",
"does",
"not",
"have",
"any",
"transactional",
"semantics",
":",
"-",
"Upl... | [
"func",
"(",
"d",
"*",
"daemonImageDestination",
")",
"Commit",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"logrus",
".",
"Debugf",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
":=",
"d",
".",
"Destination",
".",
"Commit",
"(",
"ctx",
")",... |
5,257 | all-5258 | [
"RegisterDatasources",
"adds",
"path",
"to",
"the",
"Mapnik",
"plugin",
"search",
"path",
"."
] | [
"func",
"RegisterDatasources",
"(",
"<mask>",
"string",
")",
"error",
"{",
"cs",
":=",
"C",
".",
"CString",
"(",
"path",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cs",
")",
")",
"\n",
"if",
"C",
".",
"mapnik_register_... |
5,258 | all-5259 | [
"Println",
"records",
"the",
"log",
"with",
"trace",
"level"
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Println",
"(",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"Output",
"(",
"2",
",",
"LevelTrace",
",",
"fmt",
".",
"Sprintln",
"(",
"args",
"...",
")",
")",
"\n",
"}"
] |
5,259 | all-5260 | [
"Zones",
"filters",
"map",
"[",
"zoneID",
"]",
"zoneName",
"for",
"names",
"having",
"f",
".",
"domain",
"as",
"suffix"
] | [
"func",
"(",
"f",
"*",
"zoneFilter",
")",
"Zones",
"(",
"zones",
"map",
"[",
"int64",
"]",
"string",
")",
"map",
"[",
"int64",
"]",
"string",
"{",
"result",
":=",
"<mask>",
"[",
"int64",
"]",
"string",
"{",
"}",
"\n",
"for",
"zoneID",
",",
"zoneNam... |
5,260 | all-5261 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"APIType",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"<mask>",
")",
"{",
"out",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
5,261 | all-5262 | [
"GetCookieFloat64",
"returns",
"cookie",
"result",
"in",
"float64",
"type",
"."
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"GetCookieFloat64",
"(",
"name",
"string",
")",
"float64",
"{",
"v",
",",
"_",
":=",
"strconv",
".",
"ParseFloat",
"(",
"ctx",
".",
"GetCookie",
"(",
"<mask>",
")",
",",
"64",
")",
"\n",
"return",
"v",
"\n",
... |
5,262 | all-5263 | [
"Arg2Writer",
"returns",
"a",
"WriteCloser",
"that",
"can",
"be",
"used",
"to",
"write",
"the",
"second",
"argument",
".",
"The",
"returned",
"writer",
"must",
"be",
"closed",
"once",
"the",
"write",
"is",
"complete",
"."
] | [
"func",
"(",
"response",
"*",
"InboundCallResponse",
")",
"Arg2Writer",
"(",
")",
"(",
"ArgWriter",
",",
"error",
")",
"{",
"if",
"err",
":=",
"NewArgWriter",
"(",
"response",
".",
"arg1Writer",
"(",
")",
")",
".",
"Write",
"(",
"nil",
")",
";",
"err",... |
5,263 | all-5264 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventHeapStatsUpdate",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler18",
"(",
... |
5,264 | all-5265 | [
"Flush",
"the",
"output",
"buffer",
"."
] | [
"func",
"yaml_emitter_flush",
"(",
"emitter",
"*",
"yaml_emitter_t",
")",
"bool",
"{",
"if",
"emitter",
".",
"write_handler",
"==",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"// Check if the buffer is empty.",
"if",
"emitter",
".",
"buffer_... |
5,265 | all-5266 | [
"Fuzz",
"is",
"used",
"to",
"run",
"https",
":",
"//",
"github",
".",
"com",
"/",
"dvyukov",
"/",
"go",
"-",
"fuzz"
] | [
"func",
"Fuzz",
"(",
"data",
"[",
"]",
"byte",
")",
"int",
"{",
"<mask>",
":=",
"string",
"(",
"data",
")",
"\n\n",
"_",
"=",
"zxcvbn",
".",
"PasswordStrength",
"(",
"password",
",",
"nil",
")",
"\n",
"return",
"1",
"\n",
"}"
] |
5,266 | all-5267 | [
"GetMetricQueryOk",
"returns",
"a",
"tuple",
"with",
"the",
"MetricQuery",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"ScatterplotRequest",
")",
"GetMetricQueryOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"MetricQuery",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"re... |
5,267 | all-5268 | [
"handleEventError",
"handles",
"a",
"container",
"change",
"event",
"error",
"and",
"decides",
"whether",
"we",
"should",
"proceed",
"to",
"transition",
"the",
"container"
] | [
"func",
"(",
"mtask",
"*",
"managedTask",
")",
"handleEventError",
"(",
"containerChange",
"dockerContainerChange",
",",
"currentKnownStatus",
"apicontainerstatus",
".",
"ContainerStatus",
")",
"bool",
"{",
"container",
":=",
"containerChange",
".",
"container",
"\n",
... |
5,268 | all-5269 | [
"Close",
"shuts",
"down",
"the",
"client",
"s",
"etcd",
"connections",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Close",
"(",
")",
"error",
"{",
"c",
".",
"cancel",
"(",
")",
"\n",
"c",
".",
"Watcher",
".",
"Close",
"(",
")",
"\n",
"c",
".",
"Lease",
".",
"Close",
"(",
")",
"\n",
"if",
"c",
".",
"resolverGroup",
"!... |
5,269 | all-5270 | [
"stopExchanges",
"stops",
"all",
"message",
"exchanges",
"to",
"unblock",
"all",
"waiters",
"on",
"the",
"mex",
".",
"This",
"should",
"only",
"be",
"called",
"on",
"connection",
"failures",
"."
] | [
"func",
"(",
"mexset",
"*",
"messageExchangeSet",
")",
"stopExchanges",
"(",
"err",
"error",
")",
"{",
"if",
"mexset",
".",
"log",
".",
"Enabled",
"(",
"LogLevelDebug",
")",
"{",
"mexset",
".",
"<mask>",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"mexset",
"... |
5,270 | all-5271 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventDomStorageItemsCleared",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage5",
"(",
"&",
"w",
",",
... |
5,271 | all-5272 | [
"CanAuthenticate",
"makes",
"a",
"test",
"authenticated",
"request",
"to",
"the",
"RightScale",
"API",
"and",
"returns",
"an",
"error",
"if",
"it",
"fails",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"CanAuthenticate",
"(",
")",
"error",
"{",
"<mask>",
":=",
"a",
".",
"Auth",
".",
"CanAuthenticate",
"(",
"a",
".",
"Host",
")",
"\n",
"return",
"res",
"\n",
"}"
] |
5,272 | all-5273 | [
"Infof",
"outputs",
"formatted",
"Info",
"level",
"log"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"Infof",
"(",
"<mask>",
"string",
",",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"g",
".",
"out",
"(",
"INFO",
",",
"format",
",",
"val",
"...",
")",
"\n",
"}"
] |
5,273 | all-5274 | [
"TODO",
"(",
"jrick",
")",
"GtkIconSet",
"/",
"*",
"func",
"ImageNewFromIconSet",
"()",
"{",
"}",
"TODO",
"(",
"jrick",
")",
"GdkPixbufAnimation",
"/",
"*",
"func",
"ImageNewFromAnimation",
"()",
"{",
"}",
"ImageNewFromIconName",
"()",
"is",
"a",
"wrapper",
... | [
"func",
"ImageNewFromIconName",
"(",
"iconName",
"string",
",",
"size",
"IconSize",
")",
"(",
"*",
"Image",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"iconName",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer... |
5,274 | all-5275 | [
"Table",
"hash",
"from",
"random",
"value",
"and",
"key",
".",
"Generate",
"()",
"returns",
"these",
"random",
"values",
"."
] | [
"func",
"(",
"h",
"*",
"chdHasher",
")",
"<mask>",
"(",
"r",
"uint64",
",",
"b",
"[",
"]",
"byte",
")",
"uint64",
"{",
"return",
"(",
"hasher",
"(",
"b",
")",
"^",
"h",
".",
"r",
"[",
"0",
"]",
"^",
"r",
")",
"%",
"h",
".",
"size",
"\n",
... |
5,275 | all-5276 | [
"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",
"(",
"h",
"*",
"HostActionMute",
")",
"GetMessageOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
... |
5,276 | all-5277 | [
"Leave",
"a",
"cluster",
".",
"If",
"the",
"force",
"flag",
"is",
"true",
"the",
"node",
"will",
"leave",
"even",
"if",
"it",
"still",
"has",
"containers",
"and",
"images",
".",
"The",
"node",
"will",
"only",
"leave",
"the",
"raft",
"cluster",
"and",
"... | [
"func",
"Leave",
"(",
"state",
"*",
"state",
".",
"State",
",",
"gateway",
"*",
"Gateway",
",",
"name",
"string",
",",
"force",
"bool",
")",
"(",
"string",
",",
"error",
")",
"{",
"logger",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"name",
")",
"\n\n",
... |
5,277 | all-5278 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"MapUint64Option",
")",
"Set",
"(",
"value",
"string",
")",
"error",
"{",
"parts",
":=",
"stringMapRegex",
".",
"Split",
"(",
"value",
",",
"2",
")",
"\n",
"if",
"len",
"(",
"parts",
")",
"!=",
"2",
"{",
"return",
"fmt",
".",... |
5,278 | all-5279 | [
"Update",
"game",
"state",
"by",
"one",
"tick",
"."
] | [
"func",
"(",
"w",
"*",
"World",
")",
"Update",
"(",
")",
"{",
"width",
":=",
"w",
".",
"width",
"\n",
"height",
":=",
"w",
".",
"height",
"\n",
"next",
":=",
"make",
"(",
"[",
"]",
"bool",
",",
"width",
"*",
"height",
")",
"\n",
"for",
"y",
"... |
5,279 | all-5280 | [
"RemoveStream",
"will",
"remove",
"a",
"stream"
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"RemoveStream",
"(",
"id",
"string",
")",
"{",
"s",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"s",
".",
"Streams",
"[",
"id",
"]",
"!=",
"nil"... |
5,280 | all-5281 | [
"Do",
"executes",
"Page",
".",
"getLayoutMetrics",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"layoutViewport",
"-",
"Metrics",
"relating",
"to",
"the",
"layout",
"viewport",
".",
"visualViewport",
"-",
"Metrics",
"relating",
"to",
"the",
"vis... | [
"func",
"(",
"p",
"*",
"GetLayoutMetricsParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"layoutViewport",
"*",
"LayoutViewport",
",",
"visualViewport",
"*",
"VisualViewport",
",",
"contentSize",
"*",
"dom",
".",
"Rect",
",",
"err",
"error... |
5,281 | all-5282 | [
"TODO",
"(",
"jrick",
")",
"PandoAttrList",
"/",
"*",
"func",
"(",
"v",
"*",
"Entry",
")",
"SetAttributes",
"()",
"{",
"}",
"TODO",
"(",
"jrick",
")",
"PandoAttrList",
"/",
"*",
"func",
"(",
"v",
"*",
"Entry",
")",
"GetAttributes",
"()",
"{",
"}",
... | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetMaxLength",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_entry_get_max_length",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"int",
"(",
"c",
")",
"\n",
"}"
] |
5,282 | all-5283 | [
"NewFromHash",
"returns",
"a",
"new",
"Crypter",
"using",
"the",
"prefix",
"in",
"the",
"given",
"hashed",
"key",
"."
] | [
"func",
"NewFromHash",
"(",
"hashedKey",
"string",
")",
"Crypter",
"{",
"var",
"f",
"func",
"(",
")",
"Crypter",
"\n\n",
"if",
"strings",
".",
"HasPrefix",
"(",
"hashedKey",
",",
"cryptPrefixes",
"[",
"SHA512",
"]",
")",
"{",
"f",
"=",
"crypts",
"[",
"... |
5,283 | all-5284 | [
"getCell",
"returns",
"the",
"content",
"of",
"the",
"window",
"cell",
"at",
"the",
"x",
"and",
"y",
"coordinate",
".",
"getCell",
"shall",
"be",
"called",
"from",
"queue",
"context",
"."
] | [
"func",
"(",
"w",
"*",
"Window",
")",
"getCell",
"(",
"x",
",",
"y",
"int",
")",
"*",
"Cell",
"{",
"pos",
":=",
"x",
"+",
"(",
"y",
"*",
"w",
".",
"x",
")",
"\n",
"if",
"<mask>",
"<",
"len",
"(",
"w",
".",
"backingStore",
")",
"{",
"return"... |
5,284 | all-5285 | [
"Profile",
"handling",
"functions",
"GetProfileNames",
"returns",
"a",
"list",
"of",
"available",
"profile",
"names"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetProfileNames",
"(",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"urls",
":=",
"[",
"]",
"string",
"{",
"}",
"\n\n",
"// Fetch the raw value",
"_",
",",
"err",
":=",
"r",
".",
"queryStruct",
"("... |
5,285 | all-5286 | [
"NewTCPTransport",
"returns",
"a",
"NetworkTransport",
"that",
"is",
"built",
"on",
"top",
"of",
"a",
"TCP",
"streaming",
"transport",
"layer",
"."
] | [
"func",
"NewTCPTransport",
"(",
"bindAddr",
"string",
",",
"advertise",
"net",
".",
"Addr",
",",
"maxPool",
"int",
",",
"timeout",
"time",
".",
"Duration",
",",
"logOutput",
"io",
".",
"<mask>",
",",
")",
"(",
"*",
"NetworkTransport",
",",
"error",
")",
... |
5,286 | all-5287 | [
"GetTitleText",
"returns",
"the",
"TitleText",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetTitleText",
"(",
")",
"<mask>",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"TitleText",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"TitleText",
"\n",
"}"
] |
5,287 | all-5288 | [
"bind",
"a",
"buffer",
"object",
"to",
"an",
"indexed",
"buffer",
"target"
] | [
"func",
"BindBufferBase",
"(",
"target",
"uint32",
",",
"index",
"uint32",
",",
"buffer",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpBindBufferBase",
",",
"3",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintptr",
"(",
"index",
")",
",",
"uintp... |
5,288 | all-5289 | [
"SetNumberUpLayout",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_set_number_up_layout",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"SetNumberUpLayout",
"(",
"numberUpLayout",
"NumberUpLayout",
")",
"{",
"C",
".",
"gtk_print_settings_set_number_up_layout",
"(",
"ps",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkNumberUpLayout",
"(",
"numberUpLay... |
5,289 | all-5290 | [
"OptQueryExcludeAttrs",
"enables",
"discarding",
"attributes",
"from",
"a",
"result"
] | [
"func",
"OptQueryExcludeAttrs",
"(",
"<mask>",
"bool",
")",
"QueryOption",
"{",
"return",
"func",
"(",
"options",
"*",
"QueryOptions",
")",
"error",
"{",
"options",
".",
"ExcludeRowAttrs",
"=",
"enable",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
5,290 | all-5291 | [
"SetMarkup",
"is",
"a",
"wrapper",
"around",
"gtk_tooltip_set_markup",
"()",
"."
] | [
"func",
"(",
"t",
"*",
"Tooltip",
")",
"SetMarkup",
"(",
"str",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"str",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
"gt... |
5,291 | all-5292 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ShorthandEntry",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss10",
"(",
"&",
"r",
... |
5,292 | all-5293 | [
"Calculates",
"the",
"per",
"-",
"element",
"bit",
"-",
"wise",
"“exclusive",
"or”",
"operation",
"on",
"an",
"array",
"and",
"a",
"scalar",
"."
] | [
"func",
"XorScalar",
"(",
"src",
"*",
"IplImage",
",",
"<mask>",
"Scalar",
",",
"dst",
"*",
"IplImage",
")",
"{",
"XorScalarWithMask",
"(",
"src",
",",
"value",
",",
"dst",
",",
"nil",
")",
"\n",
"}"
] |
5,293 | all-5294 | [
"getRole",
"is",
"a",
"convenience",
"function",
"supplied",
"to",
"query",
"an",
"instance",
"(",
"master",
"or",
"slave",
")",
"for",
"its",
"role",
".",
"It",
"attempts",
"to",
"use",
"the",
"ROLE",
"command",
"introduced",
"in",
"redis",
"2",
".",
"8... | [
"func",
"getRole",
"(",
"c",
"redis",
".",
"Conn",
")",
"(",
"string",
",",
"error",
")",
"{",
"res",
",",
"err",
":=",
"c",
".",
"Do",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err",
"\n",
"}",
... |
5,294 | all-5295 | [
"parseMediaType",
"is",
"a",
"more",
"tolerant",
"implementation",
"of",
"Go",
"s",
"mime",
".",
"ParseMediaType",
"function",
"."
] | [
"func",
"parseMediaType",
"(",
"ctype",
"string",
")",
"(",
"mtype",
"string",
",",
"params",
"map",
"[",
"string",
"]",
"string",
",",
"invalidParams",
"[",
"]",
"string",
",",
"err",
"error",
")",
"{",
"mtype",
",",
"params",
",",
"err",
"=",
"mime",... |
5,295 | all-5296 | [
"NonceValueFromRequest",
"validates",
"a",
"nonce",
"in",
"the",
"given",
"request",
"and",
"returns",
"the",
"validation",
"status",
"."
] | [
"func",
"NonceValueFromRequest",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"NonceStatus",
"{",
"if",
"c",
":=",
"r",
".",
"Context",
"(",
")",
".",
"Value",
"(",
"nonceValueKey",
")",
";",
"c",
"!=",
"nil",
"{",
"if",
"v",
",",
"<mask>",
":=",
"c... |
5,296 | all-5297 | [
"UpdateAccount",
"updates",
"an",
"account",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"UpdateAccount",
"(",
"tkn",
",",
"account",
",",
"name",
"string",
",",
"isDefault",
",",
"inUse",
"bool",
")",
"error",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",
",",
"\"",
"\"",
... |
5,297 | all-5298 | [
"GetQuery",
"returns",
"the",
"Query",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefEvent",
")",
"GetQuery",
"(",
")",
"string",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Query",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"<mask>",
"\n",
"}"
] |
5,298 | all-5299 | [
"GetBgcolor",
"returns",
"the",
"Bgcolor",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetBgcolor",
"(",
")",
"<mask>",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Bgcolor",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"Bgcolor",
"\n",
"}"
] |
5,299 | all-5300 | [
"Load",
"loads",
"all",
"of",
"the",
"provided",
"properties",
"into",
"l",
".",
"It",
"does",
"not",
"first",
"reset",
"*",
"l",
"to",
"an",
"empty",
"slice",
"."
] | [
"func",
"(",
"l",
"*",
"PropertyList",
")",
"Load",
"(",
"p",
"[",
"]",
"Property",
")",
"error",
"{",
"*",
"l",
"=",
"<mask>",
"(",
"*",
"l",
",",
"p",
"...",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.