id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
21,400 | all-21401 | [
"Asset",
"loads",
"and",
"returns",
"the",
"asset",
"for",
"the",
"given",
"name",
".",
"It",
"returns",
"an",
"error",
"if",
"the",
"asset",
"could",
"not",
"be",
"found",
"or",
"could",
"not",
"be",
"loaded",
"."
] | [
"func",
"<mask>",
"(",
"name",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"if",
"f",
",",
"ok",
":=",
"_bindata",
"[",
"name",
"]",
";",
"ok",
"{",
"return",
"f",
"(",
")",
"\n",
"}",
"\n",
"return",
"nil",
",",
"fmt",
".",... |
21,401 | all-21402 | [
"Generate",
"-",
"used",
"to",
"generate",
"a",
"struct",
"for",
"a",
"given",
"job"
] | [
"func",
"Generate",
"(",
"packagename",
"string",
",",
"fileBytes",
"[",
"]",
"byte",
",",
"outputDir",
"string",
")",
"{",
"b",
":=",
"preprocessJobManifest",
"(",
"fileBytes",
")",
"\n",
"objects",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"map",
"... |
21,402 | all-21403 | [
"newImageDestination",
"sets",
"us",
"up",
"to",
"write",
"a",
"new",
"image",
"caching",
"blobs",
"in",
"a",
"temporary",
"directory",
"until",
"it",
"s",
"time",
"to",
"Commit",
"()",
"the",
"image"
] | [
"func",
"newImageDestination",
"(",
"imageRef",
"storageReference",
")",
"(",
"*",
"storageImageDestination",
",",
"error",
")",
"{",
"directory",
",",
"err",
":=",
"ioutil",
".",
"TempDir",
"(",
"tmpdir",
".",
"TemporaryDirectoryForBigFiles",
"(",
")",
",",
"\"... |
21,403 | all-21404 | [
"formatPointer",
"prints",
"the",
"address",
"of",
"the",
"pointer",
"."
] | [
"func",
"formatPointer",
"(",
"v",
"reflect",
".",
"<mask>",
")",
"string",
"{",
"p",
":=",
"v",
".",
"Pointer",
"(",
")",
"\n",
"if",
"flags",
".",
"Deterministic",
"{",
"p",
"=",
"0xdeadf00f",
"// Only used for stable testing purposes",
"\n",
"}",
"\n",
... |
21,404 | all-21405 | [
"newBuffersFromFiles",
"wraps",
"the",
"specified",
"files",
"with",
"a",
"reader",
"that",
"caches",
"data",
"into",
"a",
"memory",
"buffer"
] | [
"func",
"newBuffersFromFiles",
"(",
"files",
"[",
"]",
"File",
")",
"[",
"]",
"fileBuffer",
"{",
"buffers",
":=",
"make",
"(",
"[",
"]",
"fileBuffer",
",",
"0",
",",
"len",
"(",
"<mask>",
")",
")",
"\n",
"for",
"_",
",",
"file",
":=",
"range",
"fil... |
21,405 | all-21406 | [
"UnmarshalJSON",
"implements",
"the",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"s",
"*",
"untrustedSignature",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"err",
":=",
"s",
".",
"strictUnmarshalJSON",
"(",
"data",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"if",
"_",
",",
"ok",
":=",
"e... |
21,406 | all-21407 | [
"SupportedFunc",
"returns",
"a",
"function",
"that",
"checks",
"if",
"the",
"server",
"can",
"support",
"a",
"specific",
"request",
"."
] | [
"func",
"SupportedFunc",
"(",
"opts",
"*",
"ServerOptions",
")",
"func",
"(",
"*",
"Request",
")",
"error",
"{",
"subjectMap",
":=",
"map",
"[",
"SubjectType",
"]",
"bool",
"{",
"}",
"\n",
"for",
"_",
",",
"subjectType",
":=",
"range",
"opts",
".",
"Su... |
21,407 | all-21408 | [
"newCommitment",
"returns",
"an",
"commitment",
"struct",
"that",
"notifies",
"the",
"provided",
"channel",
"when",
"log",
"entries",
"have",
"been",
"committed",
".",
"A",
"new",
"commitment",
"struct",
"is",
"created",
"each",
"time",
"this",
"server",
"become... | [
"func",
"newCommitment",
"(",
"commitCh",
"chan",
"struct",
"{",
"}",
",",
"configuration",
"Configuration",
",",
"startIndex",
"uint64",
")",
"*",
"commitment",
"{",
"matchIndexes",
":=",
"make",
"(",
"map",
"[",
"ServerID",
"]",
"uint64",
")",
"\n",
"for",... |
21,408 | all-21409 | [
"title",
":",
"service",
"instance",
"update",
"path",
":",
"/",
"services",
"/",
"{",
"service",
"}",
"/",
"instances",
"/",
"{",
"instance",
"}",
"method",
":",
"PUT",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded... | [
"func",
"updateServiceInstance",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"serviceName",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
... |
21,409 | all-21410 | [
"HasMonitor",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"HasMonitor",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"Monitor",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
21,410 | all-21411 | [
"WrapHTMLF",
"is",
"the",
"filter",
"form",
"of",
"WrapHTML",
"."
] | [
"func",
"WrapHTMLF",
"(",
"tag",
"string",
",",
"attrs",
"map",
"[",
"string",
"]",
"string",
")",
"func",
"(",
"string",
")",
"string",
"{",
"return",
"func",
"(",
"s",
"string",
")",
"string",
"{",
"return",
"WrapHTML",
"(",
"s",
",",
"<mask>",
","... |
21,411 | all-21412 | [
"GetPreferredHeight",
"is",
"a",
"wrapper",
"around",
"gtk_widget_get_preferred_height",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"GetPreferredHeight",
"(",
")",
"(",
"int",
",",
"int",
")",
"{",
"<mask>",
"minimum",
",",
"natural",
"C",
".",
"gint",
"\n",
"C",
".",
"gtk_widget_get_preferred_height",
"(",
"v",
".",
"native",
"(",
")",
",",
... |
21,412 | all-21413 | [
"RenderInto",
"combines",
"Render",
"()",
"and",
"writing",
"its",
"results",
"into",
"an",
"io",
".",
"Writer",
".",
"This",
"is",
"a",
"convenience",
"method",
"for",
"frameworks",
"providing",
"a",
"Writer",
"interface",
"such",
"as",
"net",
"/",
"http",
... | [
"func",
"(",
"tx",
"*",
"Xslate",
")",
"RenderInto",
"(",
"w",
"io",
".",
"Writer",
",",
"template",
"string",
",",
"vars",
"Vars",
")",
"error",
"{",
"bc",
",",
"err",
":=",
"<mask>",
".",
"Loader",
".",
"Load",
"(",
"template",
")",
"\n",
"if",
... |
21,413 | all-21414 | [
"Client",
"OAuth",
"authentication",
"requires",
"us",
"to",
"attach",
"an",
"unexpired",
"OAuth",
"token",
"to",
"the",
"request",
"header"
] | [
"func",
"(",
"a",
"clientOAuthAuthentication",
")",
"authenticate",
"(",
"req",
"*",
"http",
".",
"Request",
",",
"endpoint",
"string",
",",
"params",
"[",
"]",
"byte",
")",
"error",
"{",
"// Ensure tokens havent expired",
"if",
"time",
".",
"Now",
"(",
")",... |
21,414 | all-21415 | [
"worker",
"gets",
"a",
"job",
"from",
"the",
"job_pipe",
"passes",
"it",
"to",
"a",
"subworker",
"and",
"puts",
"the",
"job",
"in",
"the",
"done_pipe",
"when",
"finished",
"."
] | [
"func",
"(",
"pool",
"*",
"Pool",
")",
"worker",
"(",
"worker_id",
"uint",
")",
"{",
"job_pipe",
":=",
"make",
"(",
"chan",
"*",
"Job",
")",
"\n",
"WORKER_LOOP",
":",
"for",
"{",
"pool",
".",
"job_wanted_pipe",
"<-",
"job_pipe",
"\n",
"job",
":=",
"<... |
21,415 | all-21416 | [
"/",
"*",
"close",
"video",
"file",
"writer"
] | [
"func",
"(",
"<mask>",
"*",
"VideoWriter",
")",
"Release",
"(",
")",
"{",
"writer_c",
":=",
"(",
"*",
"C",
".",
"CvVideoWriter",
")",
"(",
"writer",
")",
"\n",
"C",
".",
"cvReleaseVideoWriter",
"(",
"&",
"writer_c",
")",
"\n",
"}"
] |
21,416 | all-21417 | [
"GetSetOptionsOp",
"retrieves",
"the",
"SetOptionsOp",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"OperationBody",
")",
"GetSetOptionsOp",
"(",
")",
"(",
"result",
"SetOptionsOp",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armNam... |
21,417 | all-21418 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventDomStorageItemAdded",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage8",
"(",... |
21,418 | all-21419 | [
"Unlock",
"a",
"lock",
"again",
"if",
"we",
"owned",
"it",
".",
"Returns",
"any",
"error",
"that",
"happend",
"during",
"release",
"of",
"lock",
"."
] | [
"func",
"(",
"l",
"Lockfile",
")",
"Unlock",
"(",
")",
"error",
"{",
"proc",
",",
"err",
":=",
"l",
".",
"GetOwner",
"(",
")",
"\n",
"<mask>",
"err",
"{",
"case",
"ErrInvalidPid",
",",
"ErrDeadOwner",
":",
"return",
"ErrRogueDeletion",
"\n",
"case",
"n... |
21,419 | all-21420 | [
"DagPutOptions",
"applies",
"the",
"given",
"options",
"to",
"a",
"DagPutSettings",
"instance",
"."
] | [
"func",
"DagPutOptions",
"(",
"opts",
"...",
"DagPutOption",
")",
"(",
"*",
"DagPutSettings",
",",
"error",
")",
"{",
"options",
":=",
"&",
"DagPutSettings",
"{",
"InputEnc",
":",
"\"",
"\"",
",",
"Kind",
":",
"\"",
"\"",
",",
"Pin",
":",
"\"",
"\"",
... |
21,420 | all-21421 | [
"AttachCDDVD",
"attaches",
"a",
"CD",
"/",
"DVD",
"drive",
"to",
"the",
"virtual",
"machine",
"."
] | [
"func",
"(",
"v",
"*",
"VM",
")",
"AttachCDDVD",
"(",
"drive",
"*",
"CDDVDDrive",
")",
"error",
"{",
"if",
"running",
",",
"_",
":=",
"v",
".",
"IsRunning",
"(",
")",
";",
"running",
"{",
"return",
"&",
"Error",
"{",
"<mask>",
":",
"\"",
"\"",
",... |
21,421 | all-21422 | [
"ReadUint16",
"returns",
"a",
"uint16",
"read",
"from",
"address",
"a",
"of",
"the",
"inferior",
"."
] | [
"func",
"(",
"p",
"*",
"Process",
")",
"ReadUint16",
"(",
"a",
"Address",
")",
"uint16",
"{",
"m",
":=",
"p",
".",
"findMapping",
"(",
"a",
")",
"\n",
"if",
"m",
"==",
"nil",
"{",
"panic",
"(",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"a",
... |
21,422 | all-21423 | [
"return",
"parameters",
"of",
"a",
"query",
"object"
] | [
"func",
"GetQueryObjectuiv",
"(",
"<mask>",
"uint32",
",",
"pname",
"uint32",
",",
"params",
"*",
"uint32",
")",
"{",
"C",
".",
"glowGetQueryObjectuiv",
"(",
"gpGetQueryObjectuiv",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"id",
")",
",",
"(",
"C",
".",
... |
21,423 | all-21424 | [
"Has",
"returns",
"whether",
"the",
"rate",
"limiter",
"has",
"seen",
"a",
"request",
"for",
"a",
"specific",
"id",
"during",
"the",
"current",
"period",
"."
] | [
"func",
"(",
"r",
"*",
"RateLimiter",
")",
"Has",
"(",
"id",
"string",
")",
"(",
"bool",
",",
"error",
")",
"{",
"hash",
":=",
"r",
".",
"hasher",
".",
"Hash",
"(",
"<mask>",
")",
"\n",
"return",
"r",
".",
"redisClient",
".",
"Exists",
"(",
"hash... |
21,424 | all-21425 | [
"TrimBelow",
"returns",
"a",
"slice",
"of",
"the",
"Trace",
"with",
"all",
"entries",
"below",
"pc",
"removed",
"."
] | [
"func",
"(",
"pcs",
"Trace",
")",
"TrimBelow",
"(",
"pc",
"Call",
")",
"Trace",
"{",
"for",
"len",
"(",
"pcs",
")",
">",
"0",
"&&",
"pcs",
"[",
"0",
"]",
"!=",
"<mask>",
"{",
"pcs",
"=",
"pcs",
"[",
"1",
":",
"]",
"\n",
"}",
"\n",
"return",
... |
21,425 | all-21426 | [
"Fill",
"free",
"blocks",
"with",
"a",
"const",
"This",
"can",
"help",
"debugging",
"of",
"memory",
"reclaimer",
"bugs"
] | [
"func",
"debugMarkFree",
"(",
"n",
"*",
"Node",
")",
"{",
"var",
"block",
"[",
"]",
"byte",
"\n",
"l",
":=",
"int",
"(",
"nodeTypes",
"[",
"n",
".",
"level",
"]",
".",
"Size",
"(",
")",
")",
"\n",
"sh",
":=",
"(",
"*",
"reflect",
".",
"SliceHea... |
21,426 | all-21427 | [
"PartialFindItem",
"looks",
"for",
"an",
"item",
"in",
"list",
"which",
"text",
"starts",
"from",
"the",
"given",
"substring",
"by",
"default",
"the",
"search",
"is",
"casesensitive",
".",
"Returns",
"item",
"number",
"in",
"item",
"list",
"or",
"-",
"1",
... | [
"func",
"(",
"l",
"*",
"ListBox",
")",
"PartialFindItem",
"(",
"text",
"string",
",",
"caseSensitive",
"bool",
")",
"int",
"{",
"if",
"!",
"caseSensitive",
"{",
"text",
"=",
"strings",
".",
"ToLower",
"(",
"text",
")",
"\n",
"}",
"\n\n",
"for",
"idx",
... |
21,427 | all-21428 | [
"ServeHTTP",
"or",
"remote",
"cache",
"client",
"whatever",
"you",
"like",
"it",
"s",
"the",
"client",
"-",
"side",
"function",
"of",
"the",
"ServeHTTP",
"sends",
"a",
"request",
"to",
"the",
"server",
"-",
"side",
"remote",
"cache",
"Service",
"and",
"sen... | [
"func",
"(",
"h",
"*",
"ClientHandler",
")",
"ServeHTTP",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"// check for deniers, if at least one of them return true",
"// for this specific request, then skip the whole cache",
"if"... |
21,428 | all-21429 | [
"CPUResource",
"returns",
"the",
"system",
"CPU",
"information"
] | [
"func",
"CPUResource",
"(",
")",
"(",
"*",
"api",
".",
"ResourcesCPU",
",",
"error",
")",
"{",
"c",
":=",
"api",
".",
"ResourcesCPU",
"{",
"}",
"\n\n",
"threads",
",",
"err",
":=",
"getThreads",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"retur... |
21,429 | all-21430 | [
"title",
":",
"app",
"create",
"path",
":",
"/",
"apps",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"201",
":",
"App",
"creat... | [
"func",
"createApp",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"var",
"ia",
"inputApp",
"\n",
"err",
"=",
"ParseInput",
"(",
"r",
",",
"&",
... |
21,430 | all-21431 | [
"DeleteAll",
"deletes",
"all",
"of",
"the",
"chunks",
"in",
"object",
"storage",
"."
] | [
"func",
"(",
"s",
"*",
"Storage",
")",
"DeleteAll",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"error",
"{",
"return",
"s",
".",
"objC",
".",
"Walk",
"(",
"ctx",
",",
"s",
".",
"prefix",
",",
"func",
"(",
"hash",
"string",
")",
"error",
"{",
"ret... |
21,431 | all-21432 | [
"Close",
"is",
"implementation",
"of",
"io",
".",
"Closer",
"s",
"Close",
"."
] | [
"func",
"(",
"s",
"*",
"Stream",
")",
"Close",
"(",
")",
"error",
"{",
"runtime",
".",
"SetFinalizer",
"(",
"s",
",",
"nil",
")",
"\n",
"if",
"<mask>",
":=",
"s",
".",
"decoded",
".",
"Close",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"... |
21,432 | all-21433 | [
"MustAuth",
"retrieves",
"the",
"Auth",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"MustAuth",
"(",
")",
"Auth",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetAuth",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"val",
"\n",
"}"
] |
21,433 | all-21434 | [
"schemaDvsHostInfrastructureTrafficResource",
"returns",
"the",
"respective",
"schema",
"keys",
"for",
"the",
"various",
"kinds",
"of",
"network",
"I",
"/",
"O",
"control",
"traffic",
"classes",
".",
"The",
"schema",
"items",
"are",
"generated",
"dynamically",
"off"... | [
"func",
"schemaDvsHostInfrastructureTrafficResource",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
"{",
"s",
":=",
"make",
"(",
"<mask>",
"[",
"string",
"]",
"*",
"schema",
".",
"Schema",
")",
"\n",
"shareLevelFmt",
":=",
"\"",
"\"",
... |
21,434 | all-21435 | [
"Read",
"meta",
"-",
"info",
"at",
"specified",
"place"
] | [
"func",
"readBlockAt",
"(",
"reader",
"io",
".",
"ReadSeeker",
",",
"offset",
"int64",
")",
"(",
"fileBlock",
",",
"error",
")",
"{",
"var",
"block",
"fileBlock",
"\n",
"_",
",",
"err",
":=",
"reader",
".",
"Seek",
"(",
"offset",
",",
"os",
".",
"SEE... |
21,435 | all-21436 | [
"GetTypeOk",
"returns",
"a",
"tuple",
"with",
"the",
"Type",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"CheckStatusDefinition",
")",
"GetTypeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Type",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*"... |
21,436 | all-21437 | [
"Free",
"is",
"a",
"wrapper",
"around",
"g_slist_free",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"SList",
")",
"Free",
"(",
")",
"{",
"C",
".",
"g_slist_free",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"v",
".",
"<mask>",
"=",
"nil",
"\n",
"}"
] |
21,437 | all-21438 | [
"HTTPLoggerFunc",
"is",
"simple",
"http",
"access",
"logger"
] | [
"func",
"HTTPLoggerFunc",
"(",
"name",
"string",
",",
"hf",
"http",
".",
"HandlerFunc",
")",
"http",
".",
"<mask>",
"{",
"return",
"glg",
".",
"HTTPLoggerFunc",
"(",
"name",
",",
"hf",
")",
"\n",
"}"
] |
21,438 | all-21439 | [
"Rectangle",
"is",
"a",
"wrapper",
"around",
"cairo_rectangle",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"Rectangle",
"(",
"x",
",",
"y",
",",
"w",
",",
"h",
"float64",
")",
"{",
"C",
".",
"cairo_rectangle",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"double",
"(",
"x",
")",
",",
"C",
".",
"double",
... |
21,439 | all-21440 | [
"getConn",
"treats",
"inbound",
"and",
"outbound",
"connections",
"as",
"a",
"single",
"virtual",
"list",
"that",
"can",
"be",
"indexed",
".",
"The",
"peer",
"must",
"be",
"read",
"-",
"locked",
"."
] | [
"func",
"(",
"p",
"*",
"Peer",
")",
"getConn",
"(",
"i",
"int",
")",
"*",
"<mask>",
"{",
"inboundLen",
":=",
"len",
"(",
"p",
".",
"inboundConnections",
")",
"\n",
"if",
"i",
"<",
"inboundLen",
"{",
"return",
"p",
".",
"inboundConnections",
"[",
"i",... |
21,440 | all-21441 | [
"UnmarshalJSON",
"overrides",
"the",
"logic",
"for",
"parsing",
"the",
"JSON",
"-",
"encoded",
"TaskStatus",
"data"
] | [
"func",
"(",
"ts",
"*",
"TaskStatus",
")",
"UnmarshalJSON",
"(",
"b",
"[",
"]",
"byte",
")",
"error",
"{",
"if",
"strings",
".",
"ToLower",
"(",
"string",
"(",
"b",
")",
")",
"==",
"\"",
"\"",
"{",
"*",
"ts",
"=",
"TaskStatusNone",
"\n",
"return",
... |
21,441 | all-21442 | [
"Verify",
"compares",
"data",
"to",
"a",
"signature"
] | [
"func",
"(",
"ePub",
"*",
"ECDSAPublicKey",
")",
"Verify",
"(",
"data",
",",
"sigBytes",
"[",
"]",
"byte",
")",
"(",
"bool",
",",
"error",
")",
"{",
"sig",
":=",
"<mask>",
"(",
"ECDSASig",
")",
"\n",
"if",
"_",
",",
"err",
":=",
"asn1",
".",
"Unm... |
21,442 | all-21443 | [
"u",
".",
"offset",
"<",
"=",
"lo",
"<",
"=",
"hi",
"<",
"=",
"u",
".",
"offset",
"+",
"len",
"(",
"u",
".",
"entries",
")"
] | [
"func",
"(",
"u",
"*",
"unstable",
")",
"mustCheckOutOfBounds",
"(",
"lo",
",",
"hi",
"uint64",
")",
"{",
"if",
"lo",
">",
"hi",
"{",
"u",
".",
"logger",
".",
"Panicf",
"(",
"\"",
"\"",
",",
"lo",
",",
"hi",
")",
"\n",
"}",
"\n",
"upper",
":=",... |
21,443 | all-21444 | [
"AllAlternateNameWithTagAreIA5",
"returns",
"true",
"if",
"all",
"sequence",
"members",
"with",
"the",
"given",
"tag",
"are",
"encoded",
"as",
"IA5",
"strings",
"and",
"false",
"otherwise",
".",
"If",
"it",
"encounters",
"errors",
"parsing",
"asn1",
"err",
"will... | [
"func",
"AllAlternateNameWithTagAreIA5",
"(",
"ext",
"*",
"pkix",
".",
"Extension",
",",
"tag",
"int",
")",
"(",
"bool",
",",
"error",
")",
"{",
"var",
"seq",
"asn1",
".",
"RawValue",
"\n",
"var",
"err",
"error",
"\n",
"// Unmarshal the extension as a sequence... |
21,444 | all-21445 | [
"Count",
"gets",
"the",
"number",
"of",
"cached",
"values",
"by",
"current",
"instance",
"."
] | [
"func",
"(",
"s",
"*",
"Cache",
")",
"Count",
"(",
")",
"int",
"{",
"if",
"s",
".",
"removeExpired",
"(",
")",
"==",
"raiqub",
".",
"WriteLocked",
"{",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n",
"}",
"else",
"{",
"defer",
"s",
".",
"RUnlock",
... |
21,445 | all-21446 | [
"RestoreFromDir",
"cache",
"and",
"input",
"dumps",
"from",
"disk",
"to",
"memory"
] | [
"func",
"(",
"app",
"*",
"App",
")",
"RestoreFromDir",
"(",
"dumpDir",
"string",
",",
"storeFunc",
"func",
"(",
"*",
"points",
".",
"Points",
")",
")",
"{",
"startTime",
":=",
"time",
".",
"Now",
"(",
")",
"\n\n",
"logger",
":=",
"zapwriter",
".",
"L... |
21,446 | all-21447 | [
"NewTransportProtocol",
"returns",
"a",
"TransportProtocol",
"from",
"a",
"string",
"in",
"the",
"task"
] | [
"func",
"NewTransportProtocol",
"(",
"protocol",
"string",
")",
"(",
"TransportProtocol",
",",
"error",
")",
"{",
"switch",
"protocol",
"{",
"<mask>",
"tcp",
":",
"return",
"TransportProtocolTCP",
",",
"nil",
"\n",
"case",
"udp",
":",
"return",
"TransportProtoco... |
21,447 | all-21448 | [
"GetClientEmail",
"returns",
"the",
"ClientEmail",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationGCPCreateRequest",
")",
"GetClientEmail",
"(",
")",
"<mask>",
"{",
"if",
"i",
"==",
"nil",
"||",
"i",
".",
"ClientEmail",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"i",
".",
"ClientEmail"... |
21,448 | all-21449 | [
"HasFillMin",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Style",
")",
"HasFillMin",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"FillMin",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
21,449 | all-21450 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetDOMCountersParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory11",
"(",
"&",
"w",
",",
"v",
"... |
21,450 | all-21451 | [
"Substitute",
"returns",
"string",
"with",
"superseded",
"all",
"substrings",
"from",
"provided",
"substitution",
"map",
".",
"Substitution",
"map",
"will",
"be",
"applied",
"in",
"alphabetic",
"order",
".",
"Many",
"passes",
"on",
"one",
"substitution",
"another"... | [
"func",
"Substitute",
"(",
"s",
"string",
",",
"sub",
"<mask>",
"[",
"string",
"]",
"string",
")",
"(",
"buf",
"string",
")",
"{",
"buf",
"=",
"s",
"\n",
"var",
"keys",
"[",
"]",
"string",
"\n",
"for",
"k",
":=",
"range",
"sub",
"{",
"keys",
"=",... |
21,451 | all-21452 | [
"NewTypeRegistry",
"creates",
"a",
"type",
"registry",
"."
] | [
"func",
"NewTypeRegistry",
"(",
")",
"*",
"TypeRegistry",
"{",
"return",
"&",
"TypeRegistry",
"{",
"NamedTypes",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"*",
"gen",
".",
"ObjectDataType",
")",
",",
"InlineTypes",
":",
"<mask>",
"(",
"map",
"[",
"str... |
21,452 | all-21453 | [
"GetDashboards",
"returns",
"a",
"list",
"of",
"all",
"dashboards",
"created",
"on",
"this",
"account",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetDashboards",
"(",
")",
"(",
"[",
"]",
"DashboardLite",
",",
"error",
")",
"{",
"var",
"<mask>",
"reqGetDashboards",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"\"",
"\""... |
21,453 | all-21454 | [
"copy",
"a",
"one",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"CopyTexSubImage1D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
")",
"{",
"C",
".",
"glowCopyTexSubImage1D",
"(",
"gpCopyTexSubImage1D",
",",
"(",
"C",
".",
... |
21,454 | all-21455 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ReplaySnapshotReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree4",
"(",
"&"... |
21,455 | all-21456 | [
"GetContainerLogfile",
"returns",
"the",
"content",
"of",
"the",
"requested",
"logfile",
"Note",
"that",
"it",
"s",
"the",
"caller",
"s",
"responsibility",
"to",
"close",
"the",
"returned",
"ReadCloser"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetContainerLogfile",
"(",
"name",
"string",
",",
"filename",
"string",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"// Prepare the HTTP request",
"url",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"... |
21,456 | all-21457 | [
"GetYaxis",
"returns",
"the",
"Yaxis",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"ScatterplotDefinition",
")",
"GetYaxis",
"(",
")",
"WidgetAxis",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Yaxis",
"==",
"nil",
"{",
"return",
"WidgetAxis",
"{",
"}",
"\n",
"}",
"\n",
"<mask>",
"*",
"s",
".",
"Yaxis",
"\... |
21,457 | all-21458 | [
"Close",
"shuts",
"down",
"this",
"client",
".",
"Until",
"Close",
"returns",
"new",
"updates",
"and",
"errors",
"will",
"be",
"put",
"into",
"the",
"respective",
"channels",
".",
"Note",
"that",
"if",
"no",
"updates",
"are",
"received",
"this",
"function",
... | [
"func",
"(",
"api",
"*",
"TelegramBotAPI",
")",
"Close",
"(",
")",
"{",
"select",
"{",
"case",
"<-",
"api",
".",
"closed",
":",
"return",
"\n",
"<mask>",
":",
"}",
"\n",
"close",
"(",
"api",
".",
"closed",
")",
"\n",
"api",
".",
"wg",
".",
"Wait"... |
21,458 | all-21459 | [
"Delete",
"adds",
"the",
"route",
"pattern",
"that",
"matches",
"a",
"DELETE",
"http",
"method",
"to",
"execute",
"the",
"handlerFn",
"http",
".",
"HandlerFunc",
"."
] | [
"func",
"(",
"mx",
"*",
"Mux",
")",
"Delete",
"(",
"pattern",
"string",
",",
"handlerFn",
"http",
".",
"HandlerFunc",
")",
"{",
"mx",
".",
"handle",
"(",
"mDELETE",
",",
"<mask>",
",",
"handlerFn",
")",
"\n",
"}"
] |
21,459 | all-21460 | [
"Do",
"executes",
"Network",
".",
"setCookies",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetCookiesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetCookies",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
21,460 | all-21461 | [
"GetChannel",
"gets",
"or",
"creates",
"new",
"pubsub",
"channel",
"."
] | [
"func",
"(",
"hub",
"*",
"hub",
")",
"getChannel",
"(",
"name",
"string",
")",
"*",
"<mask>",
"{",
"hub",
".",
"Lock",
"(",
")",
"\n",
"defer",
"hub",
".",
"Unlock",
"(",
")",
"\n",
"cn",
",",
"ok",
":=",
"hub",
".",
"channels",
"[",
"name",
"]... |
21,461 | all-21462 | [
"delete",
"a",
"contiguous",
"group",
"of",
"display",
"lists"
] | [
"func",
"DeleteLists",
"(",
"<mask>",
"uint32",
",",
"xrange",
"int32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpDeleteLists",
",",
"2",
",",
"uintptr",
"(",
"list",
")",
",",
"uintptr",
"(",
"xrange",
")",
",",
"0",
")",
"\n",
"}"
] |
21,462 | all-21463 | [
"GetAggregator",
"returns",
"the",
"Aggregator",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"ScatterplotRequest",
")",
"GetAggregator",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Aggregator",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
"*",
"s",
".",
"Aggregator",
"\n",
... |
21,463 | all-21464 | [
"First",
"yields",
"the",
"first",
"n",
"items",
"that",
"it",
"receives",
"."
] | [
"func",
"First",
"(",
"n",
"int",
")",
"Filter",
"{",
"return",
"FilterFunc",
"(",
"func",
"(",
"arg",
"Arg",
")",
"error",
"{",
"seen",
":=",
"0",
"\n",
"for",
"s",
":=",
"range",
"arg",
".",
"In",
"{",
"if",
"seen",
">=",
"n",
"{",
"break",
"... |
21,464 | all-21465 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetPartialAXTreeParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6",
"(",
"&",
"w",
",",
... |
21,465 | all-21466 | [
"GetTagReader",
"returns",
"a",
"reader",
"for",
"an",
"object",
"in",
"object",
"store",
"by",
"tag",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"GetTagReader",
"(",
"tag",
"string",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithCancel",
"(",
"c",
".",
"Ctx",
"(",
")",
")",
"\n",
"getTagClient",
... |
21,466 | all-21467 | [
"HTML",
"renders",
"the",
"named",
"files",
"using",
"the",
"text",
"/",
"html",
"content",
"type",
"and",
"the",
"github",
".",
"com",
"/",
"gobuffalo",
"/",
"plush",
"package",
"for",
"templating",
".",
"If",
"more",
"than",
"1",
"file",
"is",
"provide... | [
"func",
"HTML",
"(",
"names",
"...",
"string",
")",
"Renderer",
"{",
"e",
":=",
"New",
"(",
"<mask>",
"{",
"}",
")",
"\n",
"return",
"e",
".",
"HTML",
"(",
"names",
"...",
")",
"\n",
"}"
] |
21,467 | all-21468 | [
"Info",
"calls",
"UI",
".",
"Info",
"to",
"write",
".",
"Useful",
"when",
"you",
"want",
"separate",
"colors",
"or",
"prefixes",
".",
"InfoPrefix",
"is",
"used",
"to",
"prefix",
"the",
"message",
"."
] | [
"func",
"(",
"ui",
"*",
"PrefixUI",
")",
"Info",
"(",
"message",
"string",
")",
"{",
"if",
"ui",
".",
"InfoPrefix",
"==",
"\"",
"\"",
"{",
"//Lets keep the space if they want one",
"message",
"=",
"ui",
".",
"InfoPrefix",
"+",
"message",
"\n",
"}",
"else",... |
21,468 | all-21469 | [
"resourceVSphereDatastoreClusterApplyCustomAttributes",
"processes",
"the",
"custom",
"attributes",
"step",
"for",
"both",
"create",
"and",
"update",
"for",
"vsphere_datastore_cluster",
"."
] | [
"func",
"resourceVSphereDatastoreClusterApplyCustomAttributes",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
"pod",
"*",
"object",
".",
"StoragePod",
")",
"error",
"{",
"<mask>",
":=",
"meta",
".",
"(",
"*",
"VSphereCl... |
21,469 | all-21470 | [
"Do",
"executes",
"CSS",
".",
"takeCoverageDelta",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"coverage"
] | [
"func",
"(",
"p",
"*",
"TakeCoverageDeltaParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"coverage",
"[",
"]",
"*",
"RuleUsage",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"TakeCoverageDeltaReturns",
"\n",
"err",
"=",
... |
21,470 | all-21471 | [
"GetRole",
"is",
"a",
"wrapper",
"around",
"gtk_window_get_role",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"GetRole",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"<mask>",
"stringReturn",
"(",
"C",
".",
"gtk_window_get_role",
"(",
"v",
".",
"native",
"(",
")",
")",
")",
"\n",
"}"
] |
21,471 | all-21472 | [
"NetworkNodes",
"returns",
"the",
"network",
"addresses",
"and",
"exposed",
"ports",
"of",
"current",
"container",
"."
] | [
"func",
"(",
"s",
"*",
"Container",
")",
"NetworkNodes",
"(",
")",
"(",
"[",
"]",
"NetworkNode",
",",
"error",
")",
"{",
"inspect",
",",
"err",
":=",
"s",
".",
"Inspect",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",... |
21,472 | all-21473 | [
"NewCloudFlareProvider",
"initializes",
"a",
"new",
"CloudFlare",
"DNS",
"based",
"Provider",
"."
] | [
"func",
"NewCloudFlareProvider",
"(",
"domainFilter",
"DomainFilter",
",",
"zoneIDFilter",
"ZoneIDFilter",
",",
"zonesPerPage",
"int",
",",
"proxiedByDefault",
"bool",
",",
"dryRun",
"bool",
")",
"(",
"*",
"CloudFlareProvider",
",",
"error",
")",
"{",
"// initialize... |
21,473 | all-21474 | [
"GetRequestID",
"returns",
"a",
"request",
"ID",
"from",
"the",
"given",
"context",
"if",
"one",
"is",
"present",
".",
"Returns",
"the",
"empty",
"string",
"if",
"a",
"request",
"ID",
"cannot",
"be",
"found",
"."
] | [
"func",
"GetRequestID",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"ctx",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"reqID",
",",
"<ma... |
21,474 | all-21475 | [
"strip",
"Prefix",
"for",
"every",
"incoming",
"http",
"request"
] | [
"func",
"Prefix",
"(",
"prefix",
"string",
")",
"martini",
".",
"Handler",
"{",
"return",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"if",
"prefix",
"==",
"\"",
"\"",
"{",
"return",
"\n",
"}",
... |
21,475 | all-21476 | [
"title",
":",
"register",
"unit",
"path",
":",
"/",
"apps",
"/",
"{",
"app",
"}",
"/",
"units",
"/",
"register",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"produce",
":",
"application",
... | [
"func",
"registerUnit",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"appName",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
"(",
"\"",
"\"",
")",... |
21,476 | all-21477 | [
"Parameter",
"image",
"has",
"type",
"C",
".",
"GLeglImageOES",
"."
] | [
"func",
"EGLImageTargetTextureStorageEXT",
"(",
"texture",
"uint32",
",",
"<mask>",
"unsafe",
".",
"Pointer",
",",
"attrib_list",
"*",
"int32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpEGLImageTargetTextureStorageEXT",
",",
"3",
",",
"uintptr",
"(",
"texture",... |
21,477 | all-21478 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StateExplanation",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity",
"(",
"&",
"w",
",",
"v",
")",
... |
21,478 | all-21479 | [
"createBindsEnv",
"will",
"do",
"the",
"appropriate",
"formatting",
"to",
"add",
"a",
"new",
"mount",
"in",
"a",
"container",
"s",
"HostConfig",
"and",
"add",
"the",
"metadata",
"file",
"path",
"as",
"an",
"environment",
"variable",
"ECS_CONTAINER_METADATA_FILE",
... | [
"func",
"createBindsEnv",
"(",
"binds",
"[",
"]",
"string",
",",
"env",
"[",
"]",
"string",
",",
"dataDirOnHost",
"string",
",",
"metadataDirectoryPath",
"string",
")",
"(",
"[",
"]",
"string",
",",
"[",
"]",
"string",
")",
"{",
"randID",
":=",
"uuid",
... |
21,479 | all-21480 | [
"Grant",
"adds",
"a",
"set",
"of",
"permissions",
"to",
"the",
"permission",
"object",
"on",
"which",
"it",
"is",
"called",
"returning",
"a",
"new",
"permission",
"object",
"."
] | [
"func",
"(",
"p",
"Permissions",
")",
"Grant",
"(",
"n",
"*",
"Permissions",
")",
"(",
"Permissions",
",",
"error",
")",
"{",
"var",
"<mask>",
"Permissions",
"\n",
"var",
"err",
"error",
"\n",
"if",
"n",
"==",
"nil",
"{",
"return",
"p",
",",
"nil",
... |
21,480 | all-21481 | [
"UpdateSchema",
"updates",
"the",
"schema",
".",
"go",
"file",
"of",
"the",
"cluster",
"and",
"node",
"databases",
"."
] | [
"func",
"UpdateSchema",
"(",
")",
"error",
"{",
"err",
":=",
"cluster",
".",
"SchemaDotGo",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"errors",
".",
"Wrap",
"(",
"err",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"err",
"=",
"node",
"... |
21,481 | all-21482 | [
"Setup",
"--",
"allows",
"us",
"to",
"setup",
"our",
"fake",
"server"
] | [
"func",
"(",
"s",
"*",
"HTTPServer",
")",
"Setup",
"(",
")",
"{",
"s",
".",
"Mux",
"=",
"<mask>",
".",
"NewServeMux",
"(",
")",
"\n",
"s",
".",
"Server",
"=",
"httptest",
".",
"NewServer",
"(",
"s",
".",
"Mux",
")",
"\n",
"}"
] |
21,482 | all-21483 | [
"export",
"goTickCallbacks"
] | [
"func",
"goTickCallbacks",
"(",
"widget",
"*",
"C",
".",
"GtkWidget",
",",
"frameClock",
"*",
"C",
".",
"GdkFrameClock",
",",
"userData",
"C",
".",
"gpointer",
")",
"C",
".",
"gboolean",
"{",
"id",
":=",
"int",
"(",
"uintptr",
"(",
"userData",
")",
")"... |
21,483 | all-21484 | [
"GetString",
"returns",
"the",
"string",
"value",
"of",
"the",
"variant",
"."
] | [
"func",
"(",
"v",
"*",
"Variant",
")",
"GetString",
"(",
")",
"string",
"{",
"var",
"len",
"C",
".",
"gsize",
"\n",
"gc",
":=",
"C",
".",
"g_variant_get_string",
"(",
"v",
".",
"native",
"(",
")",
",",
"&",
"len",
")",
"\n",
"defer",
"C",
".",
... |
21,484 | all-21485 | [
"Add",
"adds",
"a",
"new",
"group",
".",
"Whether",
"GID",
"is",
"<",
"0",
"it",
"will",
"choose",
"the",
"first",
"id",
"available",
"in",
"the",
"range",
"set",
"in",
"the",
"system",
"configuration",
"."
] | [
"func",
"(",
"g",
"*",
"<mask>",
")",
"Add",
"(",
")",
"(",
"gid",
"int",
",",
"err",
"error",
")",
"{",
"loadConfig",
"(",
")",
"\n\n",
"group",
",",
"err",
":=",
"LookupGroup",
"(",
"g",
".",
"Name",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
21,485 | all-21486 | [
"Ping",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockClient",
")",
"Ping",
"(",
"arg0",
"context",
".",
"Context",
")",
"(",
"types",
".",
"Ping",
",",
"error",
")",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
... |
21,486 | all-21487 | [
"DatabaseSnapshots",
"retrieves",
"a",
"list",
"of",
"all",
"database",
"snapshot"
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"DatabaseSnapshots",
"(",
")",
"(",
"[",
"]",
"DatabaseSnapshot",
",",
"error",
")",
"{",
"var",
"database_snapshot",
"[",
"]",
"DatabaseSnapshot",
"\n",
"_",
",",
"err",
":=",
"c",
".",
"MakeApiRequest",
"(",
"\"",
... |
21,487 | all-21488 | [
"DelUsersInGroup",
"removes",
"the",
"specific",
"members",
"from",
"a",
"group",
"."
] | [
"func",
"DelUsersInGroup",
"(",
"name",
"string",
",",
"members",
"...",
"string",
")",
"error",
"{",
"if",
"len",
"(",
"members",
")",
"==",
"0",
"{",
"return",
"ErrNoMembers",
"\n",
"}",
"\n",
"for",
"i",
",",
"v",
":=",
"range",
"members",
"{",
"i... |
21,488 | all-21489 | [
"InfrastructureClusterClient",
"returns",
"a",
"Kubernetes",
"client",
"for",
"the",
"infrastructure",
"cluster",
"."
] | [
"func",
"(",
"o",
"*",
"ExperimentalKubernetesOptions",
")",
"InfrastructureClusterClient",
"(",
"dryRun",
"bool",
")",
"(",
"kubernetesClient",
"kubernetes",
".",
"Interface",
",",
"err",
"error",
")",
"{",
"if",
"err",
":=",
"o",
".",
"resolve",
"(",
"dryRun... |
21,489 | all-21490 | [
"MutateTransactionEnvelope",
"for",
"TransactionBuilder",
"causes",
"the",
"underylying",
"transaction",
"to",
"be",
"set",
"as",
"the",
"provided",
"envelope",
"s",
"Tx",
"field"
] | [
"func",
"(",
"m",
"*",
"TransactionBuilder",
")",
"MutateTransactionEnvelope",
"(",
"txe",
"*",
"TransactionEnvelopeBuilder",
")",
"error",
"{",
"if",
"m",
".",
"Err",
"!=",
"nil",
"{",
"return",
"m",
".",
"Err",
"\n",
"}",
"\n\n",
"txe",
".",
"E",
".",
... |
21,490 | all-21491 | [
"Add",
"is",
"deprecated",
"as",
"of",
"1",
".",
"5",
".",
"0",
"-",
"alpha",
".",
"Note",
"that",
"this",
"doesn",
"t",
"make",
"sense",
"as",
"an",
"operation",
"for",
"affine",
"matrices",
"."
] | [
"func",
"(",
"c",
"*",
"ColorM",
")",
"Add",
"(",
"<mask>",
"ColorM",
")",
"{",
"c",
".",
"impl",
"=",
"c",
".",
"impl",
".",
"Add",
"(",
"other",
".",
"impl",
")",
"\n",
"}"
] |
21,491 | all-21492 | [
"Off",
"disables",
"maintenance",
"."
] | [
"func",
"(",
"s",
"*",
"FileStore",
")",
"Off",
"(",
")",
"(",
"changed",
"bool",
",",
"err",
"error",
")",
"{",
"_",
",",
"err",
"=",
"os",
".",
"Stat",
"(",
"s",
".",
"filename",
")",
"\n",
"if",
"os",
".",
"IsNotExist",
"(",
"err",
")",
"{... |
21,492 | all-21493 | [
"ExpectFunc",
"returns",
"the",
"first",
"line",
"satisfying",
"the",
"function",
"f",
"."
] | [
"func",
"(",
"ep",
"*",
"ExpectProcess",
")",
"ExpectFunc",
"(",
"f",
"func",
"(",
"string",
")",
"bool",
")",
"(",
"string",
",",
"error",
")",
"{",
"ep",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"for",
"{",
"for",
"len",
"(",
"ep",
".",
"lines... |
21,493 | all-21494 | [
"Make",
"makes",
"new",
"random",
"token",
"."
] | [
"func",
"(",
"t",
"*",
"SimpleToken",
")",
"Make",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"b",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"32",
")",
"\n",
"_",
",",
"err",
":=",
"rand",
".",
"Read",
"(",
"b",
")",
"\n",
"if",
"err"... |
21,494 | all-21495 | [
"retrieve",
"the",
"location",
"of",
"a",
"subroutine",
"uniform",
"of",
"a",
"given",
"shader",
"stage",
"within",
"a",
"program"
] | [
"func",
"GetSubroutineUniformLocation",
"(",
"program",
"uint32",
",",
"shadertype",
"uint32",
",",
"name",
"*",
"uint8",
")",
"int32",
"{",
"<mask>",
",",
"_",
",",
"_",
":=",
"syscall",
".",
"Syscall",
"(",
"gpGetSubroutineUniformLocation",
",",
"3",
",",
... |
21,495 | all-21496 | [
"normalizeOption",
"normalizes",
"the",
"input",
"options",
"such",
"that",
"all",
"Options",
"groups",
"are",
"flattened",
"and",
"groups",
"with",
"a",
"single",
"element",
"are",
"reduced",
"to",
"that",
"element",
".",
"Only",
"coreOptions",
"and",
"Options"... | [
"func",
"normalizeOption",
"(",
"src",
"Option",
")",
"Option",
"{",
"switch",
"opts",
":=",
"flattenOptions",
"(",
"nil",
",",
"Options",
"{",
"src",
"}",
")",
";",
"len",
"(",
"opts",
")",
"{",
"<mask>",
"0",
":",
"return",
"nil",
"\n",
"case",
"1"... |
21,496 | all-21497 | [
"resourceVSphereDatastoreClusterApplyDelete",
"process",
"the",
"removal",
"of",
"a",
"datastore",
"cluster",
"."
] | [
"func",
"resourceVSphereDatastoreClusterApplyDelete",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"pod",
"*",
"object",
".",
"StoragePod",
")",
"error",
"{",
"<mask>",
".",
"Printf",
"(",
"\"",
"\"",
",",
"resourceVSphereDatastoreClusterIDString",
"(",
"d",... |
21,497 | all-21498 | [
"Sign",
"calls",
"the",
"ledger",
"and",
"stores",
"the",
"PubKey",
"for",
"future",
"use",
"Communication",
"is",
"checked",
"on",
"NewPrivKeyLedger",
"and",
"PrivKeyFromBytes",
"returning",
"an",
"error",
"so",
"this",
"should",
"only",
"trigger",
"if",
"the",... | [
"func",
"(",
"pk",
"PrivKeyLedgerSecp256k1",
")",
"Sign",
"(",
"msg",
"[",
"]",
"<mask>",
")",
"(",
"Signature",
",",
"error",
")",
"{",
"dev",
",",
"err",
":=",
"getLedger",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err... |
21,498 | all-21499 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StartTrackingHeapObjectsParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler4",
"(",
"&",
"w",
... |
21,499 | all-21500 | [
"InjectOutboundSpan",
"retrieves",
"OpenTracing",
"Span",
"from",
"response",
"where",
"it",
"is",
"stored",
"when",
"the",
"outbound",
"call",
"is",
"initiated",
".",
"The",
"tracing",
"API",
"is",
"used",
"to",
"serialize",
"the",
"span",
"into",
"the",
"app... | [
"func",
"InjectOutboundSpan",
"(",
"response",
"*",
"OutboundCallResponse",
",",
"headers",
"map",
"[",
"string",
"]",
"string",
")",
"map",
"[",
"string",
"]",
"string",
"{",
"span",
":=",
"response",
".",
"span",
"\n",
"if",
"span",
"==",
"nil",
"{",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.