id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
8,600 | all-8601 | [
"TransferLeader",
"tries",
"to",
"transfer",
"leadership",
"to",
"the",
"given",
"transferee",
"."
] | [
"func",
"(",
"rn",
"*",
"RawNode",
")",
"TransferLeader",
"(",
"transferee",
"uint64",
")",
"{",
"_",
"=",
"rn",
".",
"raft",
".",
"Step",
"(",
"pb",
".",
"<mask>",
"{",
"Type",
":",
"pb",
".",
"MsgTransferLeader",
",",
"From",
":",
"transferee",
"}"... |
8,601 | all-8602 | [
"SaveToPdfFile",
"creates",
"and",
"saves",
"a",
"pdf",
"document",
"to",
"a",
"file"
] | [
"func",
"SaveToPdfFile",
"(",
"filePath",
"<mask>",
",",
"pdf",
"*",
"gofpdf",
".",
"Fpdf",
")",
"error",
"{",
"return",
"pdf",
".",
"OutputFileAndClose",
"(",
"filePath",
")",
"\n",
"}"
] |
8,602 | all-8603 | [
"Validate",
"ensures",
"that",
"the",
"set",
"of",
"options",
"are",
"self",
"-",
"consistent",
"and",
"valid"
] | [
"func",
"(",
"o",
"*",
"Options",
")",
"Validate",
"(",
")",
"error",
"{",
"if",
"o",
".",
"NumWorkers",
"==",
"0",
"{",
"return",
"<mask>",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"o",
".",
"ProwJobNamespace",
"==",
"\"",
"\""... |
8,603 | all-8604 | [
"NewZookeeperTreeCache",
"creates",
"a",
"new",
"ZookeeperTreeCache",
"for",
"a",
"given",
"path",
"."
] | [
"func",
"NewZookeeperTreeCache",
"(",
"conn",
"*",
"zk",
".",
"Conn",
",",
"path",
"string",
",",
"events",
"chan",
"ZookeeperTreeCacheEvent",
",",
"logger",
"<mask>",
".",
"Logger",
")",
"*",
"ZookeeperTreeCache",
"{",
"tc",
":=",
"&",
"ZookeeperTreeCache",
"... |
8,604 | all-8605 | [
"Append",
"is",
"a",
"wrapper",
"around",
"g_list_append",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"Append",
"(",
"data",
"uintptr",
")",
"*",
"List",
"{",
"glist",
":=",
"C",
".",
"g_list_append",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gpointer",
"(",
"data",
")",
")",
"\n",
"return",
"v",
"... |
8,605 | all-8606 | [
"Create",
"a",
"new",
"blocking",
"pool",
".",
"As",
"no",
"new",
"connections",
"would",
"be",
"made",
"when",
"the",
"pool",
"is",
"busy",
"the",
"number",
"of",
"connections",
"of",
"the",
"pool",
"is",
"kept",
"no",
"more",
"than",
"initCap",
"and",
... | [
"func",
"NewBlockingPool",
"(",
"initCap",
",",
"maxCap",
"int",
",",
"livetime",
"<mask>",
".",
"Duration",
",",
"factory",
"Factory",
")",
"(",
"Pool",
",",
"error",
")",
"{",
"if",
"initCap",
"<",
"0",
"||",
"maxCap",
"<",
"1",
"||",
"initCap",
">",... |
8,606 | all-8607 | [
"SetReader",
"sets",
"the",
"io",
".",
"Reader",
"source",
"for",
"a",
"lob",
"field",
"to",
"be",
"written",
"to",
"database",
"and",
"return",
"*",
"Lob",
"to",
"enable",
"simple",
"call",
"chaining",
"."
] | [
"func",
"(",
"l",
"*",
"Lob",
")",
"SetReader",
"(",
"rd",
"<mask>",
".",
"Reader",
")",
"*",
"Lob",
"{",
"l",
".",
"rd",
"=",
"rd",
"\n",
"return",
"l",
"\n",
"}"
] |
8,607 | all-8608 | [
"SetColor",
"sets",
"the",
"color",
"to",
"paint",
"the",
"spans",
"."
] | [
"func",
"(",
"p",
"*",
"Painter",
")",
"SetColor",
"(",
"c",
"color",
".",
"<mask>",
")",
"{",
"r",
",",
"g",
",",
"b",
",",
"a",
":=",
"c",
".",
"RGBA",
"(",
")",
"\n",
"if",
"a",
"==",
"0",
"{",
"p",
".",
"cr",
"=",
"0",
"\n",
"p",
".... |
8,608 | all-8609 | [
"MutateOperation",
"for",
"SourceAccount",
"sets",
"the",
"operation",
"s",
"SourceAccount",
"to",
"the",
"pubilic",
"key",
"for",
"the",
"address",
"provided"
] | [
"func",
"(",
"m",
"SourceAccount",
")",
"MutateOperation",
"(",
"o",
"*",
"xdr",
".",
"<mask>",
")",
"error",
"{",
"o",
".",
"SourceAccount",
"=",
"&",
"xdr",
".",
"AccountId",
"{",
"}",
"\n",
"return",
"setAccountId",
"(",
"m",
".",
"AddressOrSeed",
"... |
8,609 | all-8610 | [
"CommentM",
"inserts",
"the",
"comment",
"character",
"in",
"lines",
"that",
"mach",
"any",
"regular",
"expression",
"in",
"reLine",
"in",
"the",
"named",
"file",
"."
] | [
"func",
"CommentM",
"(",
"filename",
"string",
",",
"reLine",
"[",
"]",
"string",
")",
"error",
"{",
"e",
",",
"err",
":=",
"NewEdit",
"(",
"filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"err",
"=",
"e",
... |
8,610 | all-8611 | [
"Register",
"a",
"function",
"table",
".",
"name",
"equivalent",
"to",
"ProxyIpairs",
"that",
"uses",
"ipairs",
"when",
"__ipairs",
"is",
"not",
"present",
".",
"This",
"is",
"much",
"faster",
"than",
"ProxyIpairs",
"."
] | [
"func",
"RegProxyIpairs",
"(",
"L",
"*",
"lua",
".",
"State",
",",
"table",
",",
"name",
"string",
")",
"{",
"L",
".",
"GetGlobal",
"(",
"\"",
"\"",
")",
"\n",
"ref",
":=",
"L",
".",
"Ref",
"(",
"lua",
".",
"LUA_REGISTRYINDEX",
")",
"\n\n",
"f",
... |
8,611 | all-8612 | [
"Capitalize",
"uppercases",
"the",
"first",
"char",
"of",
"s",
"and",
"lowercases",
"the",
"rest",
"."
] | [
"func",
"Capitalize",
"(",
"s",
"string",
")",
"<mask>",
"{",
"return",
"strings",
".",
"ToUpper",
"(",
"s",
"[",
"0",
":",
"1",
"]",
")",
"+",
"strings",
".",
"ToLower",
"(",
"s",
"[",
"1",
":",
"]",
")",
"\n",
"}"
] |
8,612 | all-8613 | [
"digitVal",
"returns",
"the",
"digit",
"value",
"of",
"a",
"rune",
"or",
"16",
"in",
"case",
"the",
"rune",
"does",
"not",
"represent",
"a",
"valid",
"digit",
"."
] | [
"func",
"digitVal",
"(",
"ch",
"rune",
")",
"int",
"{",
"switch",
"{",
"<mask>",
"'0'",
"<=",
"ch",
"&&",
"ch",
"<=",
"'9'",
":",
"return",
"int",
"(",
"ch",
"-",
"'0'",
")",
"\n",
"case",
"'a'",
"<=",
"ch",
"&&",
"ch",
"<=",
"'f'",
":",
"retur... |
8,613 | all-8614 | [
"IsAssignee",
"checks",
"if",
"a",
"user",
"is",
"assigned",
"to",
"the",
"issue",
"."
] | [
"func",
"(",
"i",
"Issue",
")",
"IsAssignee",
"(",
"login",
"string",
")",
"bool",
"{",
"for",
"_",
",",
"assignee",
":=",
"range",
"i",
".",
"Assignees",
"{",
"if",
"NormLogin",
"(",
"login",
")",
"==",
"NormLogin",
"(",
"assignee",
".",
"Login",
")... |
8,614 | all-8615 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform2f",
"(",
"location",
"int32",
",",
"v0",
"float32",
",",
"v1",
"float32",
")",
"{",
"C",
".",
"glowUniform2f",
"(",
"gpUniform2f",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"<mask>",
")",
",",
"(",
"C",
".",
"GLfloat",
")",
"(",
"v0",... |
8,615 | all-8616 | [
"handlerFunc",
"returns",
"a",
"function",
"to",
"enqueue",
"requests",
"onto",
"attachENIHandler",
"buffer"
] | [
"func",
"(",
"attachENIHandler",
"*",
"attachENIHandler",
")",
"handlerFunc",
"(",
")",
"func",
"(",
"<mask>",
"*",
"ecsacs",
".",
"AttachTaskNetworkInterfacesMessage",
")",
"{",
"return",
"func",
"(",
"message",
"*",
"ecsacs",
".",
"AttachTaskNetworkInterfacesMessa... |
8,616 | all-8617 | [
"BuildCgroupRoot",
"helps",
"build",
"the",
"task",
"cgroup",
"prefix",
"Example",
":",
"/",
"ecs",
"/",
"task",
"-",
"id"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"BuildCgroupRoot",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"taskID",
",",
"err",
":=",
"<mask>",
".",
"GetID",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"errors",
"."... |
8,617 | all-8618 | [
"bind",
"a",
"buffer",
"object",
"to",
"a",
"transform",
"feedback",
"buffer",
"object"
] | [
"func",
"TransformFeedbackBufferBase",
"(",
"xfb",
"uint32",
",",
"index",
"uint32",
",",
"buffer",
"uint32",
")",
"{",
"C",
".",
"glowTransformFeedbackBufferBase",
"(",
"gpTransformFeedbackBufferBase",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"xfb",
")",
",",
... |
8,618 | all-8619 | [
"define",
"the",
"scissor",
"box"
] | [
"func",
"Scissor",
"(",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpScissor",
",",
"4",
",",
"uintptr",
"(",
"x",
")",
",",
"uintptr",
"(",
"y",
")",
",",
"uintptr",
... |
8,619 | all-8620 | [
"Validate",
"returns",
"an",
"error",
"if",
"the",
"provided",
"checksum",
"does",
"not",
"match",
"the",
"calculated",
"checksum",
"of",
"the",
"provided",
"data"
] | [
"func",
"Validate",
"(",
"data",
"[",
"]",
"byte",
",",
"expected",
"[",
"]",
"byte",
")",
"error",
"{",
"actual",
":=",
"Checksum",
"(",
"data",
")",
"\n\n",
"// validate the provided checksum against the calculated",
"if",
"!",
"bytes",
".",
"Equal",
"(",
... |
8,620 | all-8621 | [
"AddHost",
"adds",
"a",
"host",
"to",
"the",
"cluster",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"AddHost",
"(",
"<mask>",
"*",
"URI",
")",
"{",
"c",
".",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"mutex",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"hosts",
"=",
"append",
"(",
"c",
".",... |
8,621 | all-8622 | [
"export",
"FrameSet_String"
] | [
"func",
"FrameSet_String",
"(",
"id",
"FrameSetId",
")",
"(",
"str",
"*",
"C",
".",
"char",
")",
"{",
"<mask>",
",",
"ok",
":=",
"sFrameSets",
".",
"Get",
"(",
"id",
")",
"\n",
"if",
"!",
"ok",
"{",
"str",
"=",
"C",
".",
"CString",
"(",
"\"",
"... |
8,622 | all-8623 | [
"RemoveItem",
"deletes",
"an",
"item",
"which",
"number",
"is",
"id",
"in",
"item",
"list",
"Returns",
"true",
"if",
"item",
"is",
"deleted"
] | [
"func",
"(",
"l",
"*",
"ListBox",
")",
"RemoveItem",
"(",
"id",
"int",
")",
"bool",
"{",
"if",
"id",
"<",
"0",
"||",
"<mask>",
">=",
"len",
"(",
"l",
".",
"items",
")",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"l",
".",
"items",
"=",
"append"... |
8,623 | all-8624 | [
"Get",
"fetches",
"the",
"data",
"found",
"in",
"the",
"provided",
"path",
".",
"It",
"returns",
"the",
"content",
"of",
"the",
"response",
"or",
"any",
"errors",
"that",
"occurred",
"during",
"the",
"request",
"or",
"http",
"errors",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Get",
"(",
"path",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"c",
".",
"<mask>",
"(",
"http",
".",
"MethodGet",
",",
"path",
",",
"nil",
",",
"true",
")",
"\... |
8,624 | all-8625 | [
"writeAsFits",
"writes",
"as",
"many",
"bytes",
"from",
"the",
"given",
"slice",
"as",
"fits",
"into",
"the",
"chunk"
] | [
"func",
"(",
"c",
"*",
"writableChunk",
")",
"writeAsFits",
"(",
"b",
"[",
"]",
"byte",
")",
"int",
"{",
"if",
"len",
"(",
"b",
")",
">",
"c",
".",
"contents",
".",
"BytesRemaining",
"(",
")",
"{",
"b",
"=",
"b",
"[",
":",
"c",
".",
"contents",... |
8,625 | all-8626 | [
"FetchCheckBundleMetrics",
"retrieves",
"metrics",
"for",
"the",
"check",
"bundle",
"with",
"passed",
"cid",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"FetchCheckBundleMetrics",
"(",
"cid",
"CIDType",
")",
"(",
"*",
"CheckBundleMetrics",
",",
"error",
")",
"{",
"if",
"cid",
"==",
"nil",
"||",
"*",
"cid",
"==",
"\"",
"\"",
"{",
"return",
"nil",
",",
"fmt",
".",
"... |
8,626 | all-8627 | [
"Output",
"runs",
"the",
"command",
"and",
"returns",
"its",
"standard",
"output",
".",
"Any",
"returned",
"error",
"will",
"usually",
"be",
"of",
"type",
"*",
"ExitError",
".",
"If",
"c",
".",
"Stderr",
"was",
"nil",
"Output",
"populates",
"ExitError",
".... | [
"func",
"(",
"c",
"*",
"Cmd",
")",
"Output",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"if",
"c",
".",
"Stdout",
"!=",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"var",
"std... |
8,627 | all-8628 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform2f",
"(",
"location",
"int32",
",",
"v0",
"float32",
",",
"v1",
"float32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpUniform2f",
",",
"3",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintptr",
"(",
"math",
".",
"Float32bits",
"(",
"v0"... |
8,628 | all-8629 | [
"DeserializeDBHashTree",
"deserializes",
"a",
"hashtree",
"into",
"a",
"database",
"(",
"bolt",
")",
"backed",
"hashtree",
"."
] | [
"func",
"DeserializeDBHashTree",
"(",
"storageRoot",
"string",
",",
"r",
"io",
".",
"Reader",
")",
"(",
"_",
"HashTree",
",",
"retErr",
"error",
")",
"{",
"result",
",",
"err",
":=",
"NewDBHashTree",
"(",
"storageRoot",
")",
"\n",
"if",
"err",
"!=",
"nil... |
8,629 | all-8630 | [
"GetOverride",
"returns",
"the",
"Override",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"h",
"*",
"HostActionMute",
")",
"GetOverride",
"(",
")",
"bool",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"Override",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"h",
".",
"Override",
"\n",
"}"
] |
8,630 | all-8631 | [
"FromItem",
"implements",
"Object",
"interface"
] | [
"func",
"(",
"in",
"*",
"ResourceObject",
")",
"FromItem",
"(",
"i",
"common",
".",
"Item",
")",
"{",
"r",
",",
"err",
":=",
"<mask>",
".",
"ItemToResource",
"(",
"i",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"in",
".",
"fromResource",
"(",
"r",
... |
8,631 | all-8632 | [
"Close",
"closes",
"the",
"bot"
] | [
"func",
"(",
"bot",
"*",
"Bot",
")",
"Close",
"(",
")",
"error",
"{",
"if",
"bot",
".",
"unixlist",
"!=",
"nil",
"{",
"return",
"<mask>",
".",
"unixlist",
".",
"Close",
"(",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
8,632 | all-8633 | [
"FromPath",
"gets",
"a",
"portgroup",
"object",
"from",
"its",
"path",
"."
] | [
"func",
"FromPath",
"(",
"client",
"*",
"govmomi",
".",
"Client",
",",
"name",
"string",
",",
"dc",
"*",
"<mask>",
".",
"Datacenter",
")",
"(",
"*",
"object",
".",
"DistributedVirtualPortgroup",
",",
"error",
")",
"{",
"finder",
":=",
"find",
".",
"NewFi... |
8,633 | all-8634 | [
"Close",
"removes",
"resources",
"associated",
"with",
"an",
"initialized",
"ImageSource",
"if",
"any",
"."
] | [
"func",
"(",
"s",
"*",
"ostreeImageSource",
")",
"Close",
"(",
")",
"<mask>",
"{",
"if",
"s",
".",
"repo",
"!=",
"nil",
"{",
"C",
".",
"g_object_unref",
"(",
"C",
".",
"gpointer",
"(",
"s",
".",
"repo",
")",
")",
"\n",
"}",
"\n",
"return",
"nil",... |
8,634 | all-8635 | [
"Grab",
"every",
"thing",
"from",
"current",
"mark",
"up",
"to",
"the",
"tip",
"of",
"the",
"stack",
"and",
"make",
"it",
"a",
"list"
] | [
"func",
"txMakeArray",
"(",
"st",
"*",
"State",
")",
"{",
"start",
":=",
"st",
".",
"CurrentMark",
"(",
")",
"// start",
"\n",
"end",
":=",
"st",
".",
"StackTip",
"(",
")",
"// end",
"\n\n",
"if",
"end",
"<=",
"start",
"{",
"panic",
"(",
"fmt",
"."... |
8,635 | all-8636 | [
"NewJobInput",
"creates",
"a",
"pps",
".",
"JobInput",
"."
] | [
"func",
"NewJobInput",
"(",
"repoName",
"<mask>",
",",
"commitID",
"string",
",",
"glob",
"string",
")",
"*",
"pps",
".",
"JobInput",
"{",
"return",
"&",
"pps",
".",
"JobInput",
"{",
"Commit",
":",
"NewCommit",
"(",
"repoName",
",",
"commitID",
")",
",",... |
8,636 | all-8637 | [
"Execute",
"executes",
"the",
"pipeline",
".",
"The",
"execution",
"starts",
"in",
"the",
"forward",
"phase",
"calling",
"the",
"Forward",
"function",
"of",
"all",
"actions",
".",
"If",
"none",
"of",
"the",
"Forward",
"calls",
"return",
"error",
"the",
"pipe... | [
"func",
"(",
"p",
"*",
"Pipeline",
")",
"Execute",
"(",
"params",
"...",
"interface",
"{",
"}",
")",
"(",
"err",
"error",
")",
"{",
"var",
"r",
"Result",
"\n",
"if",
"len",
"(",
"p",
".",
"actions",
")",
"==",
"0",
"{",
"return",
"ErrPipelineNoActi... |
8,637 | all-8638 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"HighlightRectParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay9",
"(",
"&",
"w",
",",
"v",
")... |
8,638 | all-8639 | [
"Bytes",
"()",
"returns",
"a",
"slice",
"of",
"the",
"contents",
"of",
"the",
"unread",
"portion",
"of",
"the",
"buffer",
".",
"To",
"avoid",
"copying",
"see",
"the",
"companion",
"BytesTwo",
"()",
"call",
".",
"Unlike",
"the",
"standard",
"library",
"Byte... | [
"func",
"(",
"b",
"*",
"AtomicFixedSizeRingBuf",
")",
"Bytes",
"(",
"makeCopy",
"bool",
")",
"[",
"]",
"byte",
"{",
"b",
".",
"tex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"tex",
".",
"Unlock",
"(",
")",
"\n\n",
"extent",
":=",
"b",
".",... |
8,639 | all-8640 | [
"To",
"check",
"this",
"line",
"is",
"a",
"valid",
"key",
"-",
"value",
"pair",
"or",
"not",
"."
] | [
"func",
"checkLine",
"(",
"line",
"string",
")",
"(",
"string",
",",
"string",
",",
"bool",
")",
"{",
"key",
":=",
"\"",
"\"",
"\n",
"value",
":=",
"\"",
"\"",
"\n",
"sp",
":=",
"strings",
".",
"SplitN",
"(",
"line",
",",
"\"",
"\"",
",",
"2",
... |
8,640 | all-8641 | [
"----------------------------------------------------------------",
"Expects",
"hashes!"
] | [
"func",
"simpleHashFromHashes",
"(",
"hashes",
"[",
"]",
"[",
"]",
"byte",
")",
"[",
"]",
"byte",
"{",
"// Recursive impl.",
"<mask>",
"len",
"(",
"hashes",
")",
"{",
"case",
"0",
":",
"return",
"nil",
"\n",
"case",
"1",
":",
"return",
"hashes",
"[",
... |
8,641 | all-8642 | [
"NewURLsMap",
"returns",
"a",
"URLsMap",
"instantiated",
"from",
"the",
"given",
"string",
"which",
"consists",
"of",
"discovery",
"-",
"formatted",
"names",
"-",
"to",
"-",
"URLs",
"like",
":",
"mach0",
"=",
"http",
":",
"//",
"1",
".",
"1",
".",
"1",
... | [
"func",
"NewURLsMap",
"(",
"s",
"string",
")",
"(",
"URLsMap",
",",
"error",
")",
"{",
"m",
":=",
"parse",
"(",
"s",
")",
"\n\n",
"cl",
":=",
"URLsMap",
"{",
"}",
"\n",
"for",
"<mask>",
",",
"urls",
":=",
"range",
"m",
"{",
"us",
",",
"err",
":... |
8,642 | all-8643 | [
"UpdateServer",
"updates",
"an",
"existing",
"server",
"s",
"attributes",
".",
"Not",
"all",
"attributes",
"can",
"be",
"changed",
"after",
"creation",
"time",
"(",
"such",
"as",
"Image",
"ServerType",
"and",
"Zone",
")",
".",
"Specify",
"the",
"server",
"yo... | [
"func",
"(",
"c",
"*",
"Client",
")",
"UpdateServer",
"(",
"updateServer",
"*",
"ServerOptions",
")",
"(",
"*",
"Server",
",",
"error",
")",
"{",
"server",
":=",
"new",
"(",
"<mask>",
")",
"\n",
"_",
",",
"err",
":=",
"c",
".",
"MakeApiRequest",
"(",... |
8,643 | all-8644 | [
"Visualize",
"emits",
"a",
"string",
"in",
"dot",
"format",
"which",
"when",
"rendered",
"with",
"graphviz",
"visualizes",
"the",
"models",
"and",
"their",
"relationships",
"."
] | [
"func",
"(",
"c",
"*",
"Catalog",
")",
"Visualize",
"(",
"title",
"string",
")",
"string",
"{",
"// prepare buffer",
"var",
"out",
"bytes",
".",
"Buffer",
"\n\n",
"// start graph",
"out",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
")",
"\n",
"out",
".",... |
8,644 | all-8645 | [
"ReadTLSConfig",
"reads",
"the",
"tls",
"config",
"for",
"a",
"machine",
"."
] | [
"func",
"(",
"xcg",
"*",
"X509CertGenerator",
")",
"ReadTLSConfig",
"(",
"addr",
"string",
",",
"authOptions",
"*",
"auth",
".",
"Options",
")",
"(",
"*",
"tls",
".",
"Config",
",",
"error",
")",
"{",
"caCertPath",
":=",
"authOptions",
".",
"CaCertPath",
... |
8,645 | all-8646 | [
"Index",
"returns",
"an",
"index",
"with",
"a",
"name",
"."
] | [
"func",
"(",
"s",
"*",
"Schema",
")",
"Index",
"(",
"name",
"string",
",",
"<mask>",
"...",
"IndexOption",
")",
"*",
"Index",
"{",
"if",
"index",
",",
"ok",
":=",
"s",
".",
"indexes",
"[",
"name",
"]",
";",
"ok",
"{",
"return",
"index",
"\n",
"}"... |
8,646 | all-8647 | [
"SetMarkupWithMnemonic",
"is",
"a",
"wrapper",
"around",
"gtk_label_set_markup_with_mnemonic",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetMarkupWithMnemonic",
"(",
"str",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"str",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
"... |
8,647 | all-8648 | [
"Snapshot",
"will",
"force",
"the",
"performed",
"query",
"to",
"make",
"use",
"of",
"an",
"available",
"index",
"on",
"the",
"_id",
"field",
"to",
"prevent",
"the",
"same",
"document",
"from",
"being",
"returned",
"more",
"than",
"once",
"in",
"a",
"singl... | [
"func",
"(",
"q",
"*",
"Query",
")",
"Snapshot",
"(",
")",
"*",
"Query",
"{",
"q",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"q",
".",
"op",
".",
"options",
".",
"Snapshot",
"=",
"<mask>",
"\n",
"q",
".",
"op",
".",
"hasOptions",
"=",
"true",
"\... |
8,648 | all-8649 | [
"flattenVirtualMachineFlagInfo",
"reads",
"various",
"fields",
"from",
"a",
"VirtualMachineFlagInfo",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenVirtualMachineFlagInfo",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"types",
".",
"VirtualMachineFlagInfo",
")",
"error",
"{",
"d",
".",
"Set",
"(",
"\"",
"\"",
",",
"obj",
".",
"DiskUuidEnabled",
")",
"\n",
"d",
".",
... |
8,649 | all-8650 | [
"And",
"succeeds",
"only",
"if",
"all",
"of",
"the",
"given",
"matchers",
"succeed",
".",
"The",
"matchers",
"are",
"tried",
"in",
"order",
"and",
"will",
"fail",
"-",
"fast",
"if",
"one",
"doesn",
"t",
"succeed",
".",
"Expect",
"(",
"hi",
")",
".",
... | [
"func",
"And",
"(",
"ms",
"...",
"types",
".",
"GomegaMatcher",
")",
"<mask>",
".",
"GomegaMatcher",
"{",
"return",
"&",
"matchers",
".",
"AndMatcher",
"{",
"Matchers",
":",
"ms",
"}",
"\n",
"}"
] |
8,650 | all-8651 | [
"Wrap",
"returns",
"a",
"new",
"Listener",
"around",
"the",
"provided",
"net",
".",
"Listener",
".",
"The",
"returned",
"Listener",
"has",
"a",
"guarantee",
"that",
"when",
"Close",
"returns",
"it",
"will",
"no",
"longer",
"accept",
"any",
"new",
"connection... | [
"func",
"Wrap",
"(",
"l",
"<mask>",
".",
"Listener",
")",
"net",
".",
"Listener",
"{",
"return",
"&",
"listener",
"{",
"Listener",
":",
"l",
",",
"cond",
":",
"sync",
".",
"NewCond",
"(",
"&",
"sync",
".",
"Mutex",
"{",
"}",
")",
"}",
"\n",
"}"
] |
8,651 | all-8652 | [
"makeTable",
"checks",
"each",
"coverage",
"change",
"and",
"produce",
"the",
"table",
"content",
"for",
"coverage",
"bot",
"post",
"It",
"also",
"report",
"on",
"whether",
"any",
"coverage",
"fells",
"below",
"the",
"given",
"threshold"
] | [
"func",
"makeTable",
"(",
"baseCovList",
",",
"newCovList",
"*",
"calculation",
".",
"CoverageList",
",",
"coverageThreshold",
"float32",
")",
"(",
"string",
",",
"bool",
")",
"{",
"var",
"rows",
"[",
"]",
"string",
"\n",
"isCoverageLow",
":=",
"false",
"\n"... |
8,652 | all-8653 | [
"GetSkipMetrics",
"fetches",
"the",
"data",
"found",
"in",
"the",
"provided",
"path",
".",
"It",
"returns",
"the",
"content",
"of",
"the",
"response",
"or",
"any",
"errors",
"that",
"occurred",
"during",
"the",
"request",
"or",
"http",
"errors",
".",
"Metric... | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetSkipMetrics",
"(",
"path",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"c",
".",
"request",
"(",
"<mask>",
".",
"MethodGet",
",",
"path",
",",
"nil",
",",
"fals... |
8,653 | all-8654 | [
"Pixels",
"returns",
"the",
"image",
"s",
"pixels",
".",
"Pixels",
"might",
"return",
"nil",
"when",
"OpenGL",
"error",
"happens",
"."
] | [
"func",
"(",
"i",
"*",
"Image",
")",
"Pixels",
"(",
")",
"[",
"]",
"byte",
"{",
"c",
":=",
"&",
"pixelsCommand",
"{",
"<mask>",
":",
"nil",
",",
"img",
":",
"i",
",",
"}",
"\n",
"theCommandQueue",
".",
"Enqueue",
"(",
"c",
")",
"\n",
"theCommandQ... |
8,654 | all-8655 | [
"title",
":",
"remove",
"team",
"path",
":",
"/",
"teams",
"/",
"{",
"name",
"}",
"method",
":",
"DELETE",
"responses",
":",
"200",
":",
"Team",
"removed",
"401",
":",
"Unauthorized",
"403",
":",
"Forbidden",
"404",
":",
"Not",
"found"
] | [
"func",
"removeTeam",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"name",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
"(",
"... |
8,655 | all-8656 | [
"ReadWhisperSchemas",
"reads",
"and",
"parses",
"a",
"storage",
"-",
"schemas",
".",
"conf",
"file",
"and",
"returns",
"a",
"sorted",
"schemas",
"structure",
"see",
"https",
":",
"//",
"graphite",
".",
"readthedocs",
".",
"io",
"/",
"en",
"/",
"0",
".",
... | [
"func",
"ReadWhisperSchemas",
"(",
"filename",
"string",
")",
"(",
"WhisperSchemas",
",",
"error",
")",
"{",
"config",
",",
"err",
":=",
"parseIniFile",
"(",
"filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
... |
8,656 | all-8657 | [
"pack28",
"packs",
"28",
"values",
"from",
"in",
"using",
"1",
"bit",
"each"
] | [
"func",
"pack28",
"(",
"in",
"[",
"]",
"uint32",
")",
"uint32",
"{",
"return",
"in",
"[",
"0",
"]",
"|",
"in",
"[",
"1",
"]",
"<<",
"1",
"|",
"in",
"[",
"2",
"]",
"<<",
"2",
"|",
"in",
"[",
"3",
"]",
"<<",
"3",
"|",
"in",
"[",
"4",
"]",... |
8,657 | all-8658 | [
"GetVerified",
"returns",
"the",
"Verified",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"u",
"*",
"<mask>",
")",
"GetVerified",
"(",
")",
"bool",
"{",
"if",
"u",
"==",
"nil",
"||",
"u",
".",
"Verified",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"return",
"*",
"u",
".",
"Verified",
"\n",
"}"
] |
8,658 | all-8659 | [
"Read",
"the",
"secret",
"associated",
"with",
"some",
"key",
".",
"If",
"the",
"secret",
"has",
"recently",
"expired",
"the",
"response",
"code",
"410",
"is",
"returned",
".",
"If",
"the",
"caller",
"lacks",
"the",
"scope",
"necessary",
"to",
"get",
"the"... | [
"func",
"(",
"secrets",
"*",
"Secrets",
")",
"Get",
"(",
"name",
"string",
")",
"(",
"*",
"Secret",
",",
"error",
")",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"secrets",
")",
"\n",
"responseObject",
",",
"_",
",",
"err",
":=",
"(",
... |
8,659 | all-8660 | [
"configures",
"element",
"array",
"buffer",
"binding",
"of",
"a",
"vertex",
"array",
"object"
] | [
"func",
"VertexArrayElementBuffer",
"(",
"vaobj",
"uint32",
",",
"buffer",
"uint32",
")",
"{",
"C",
".",
"glowVertexArrayElementBuffer",
"(",
"gpVertexArrayElementBuffer",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"vaobj",
")",
",",
"(",
"C",
".",
"GLuint",
")... |
8,660 | all-8661 | [
"HTTPUnmarshalRequestBodyJSON",
"reads",
"a",
"http",
".",
"Request",
"body",
"and",
"unmarshals",
"it",
"as",
"JSON",
"to",
"result",
"."
] | [
"func",
"HTTPUnmarshalRequestBodyJSON",
"(",
"request",
"*",
"http",
".",
"<mask>",
",",
"result",
"interface",
"{",
"}",
")",
"error",
"{",
"defer",
"request",
".",
"Body",
".",
"Close",
"(",
")",
"\n",
"body",
",",
"err",
":=",
"ioutil",
".",
"ReadAll"... |
8,661 | all-8662 | [
"joinSubstreams",
"waits",
"for",
"all",
"substream",
"goroutines",
"to",
"complete",
"."
] | [
"func",
"(",
"w",
"*",
"watchGrpcStream",
")",
"joinSubstreams",
"(",
")",
"{",
"for",
"_",
",",
"ws",
":=",
"range",
"w",
".",
"substreams",
"{",
"<-",
"<mask>",
".",
"donec",
"\n",
"}",
"\n",
"for",
"_",
",",
"ws",
":=",
"range",
"w",
".",
"res... |
8,662 | all-8663 | [
"TimestampValidator",
"will",
"set",
"timestamp",
"fields",
"on",
"create",
"and",
"update",
"operations",
".",
"The",
"fields",
"are",
"inferred",
"from",
"the",
"model",
"using",
"the",
"fire",
"-",
"created",
"-",
"timestamp",
"and",
"fire",
"-",
"updated",... | [
"func",
"TimestampValidator",
"(",
")",
"*",
"Callback",
"{",
"return",
"C",
"(",
"\"",
"\"",
",",
"Only",
"(",
"Create",
",",
"Update",
")",
",",
"func",
"(",
"ctx",
"*",
"Context",
")",
"error",
"{",
"// get time",
"now",
":=",
"time",
".",
"Now",
... |
8,663 | all-8664 | [
"failed",
"indicates",
"the",
"reader",
"failed"
] | [
"func",
"(",
"r",
"*",
"reqResReader",
")",
"<mask>",
"(",
"err",
"error",
")",
"error",
"{",
"r",
".",
"log",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"err",
",",
"r",
".",
"err",
")",
"\n",
"if",
"r",
".",
"err",
"!=",
"nil",
"{",
"return",
"r"... |
8,664 | all-8665 | [
"AddRemoteRelease",
"-",
"adds",
"a",
"remote",
"release",
"to",
"the",
"manifest",
".",
"Url",
"should",
"not",
"contain",
"version",
"information"
] | [
"func",
"(",
"s",
"*",
"DeploymentManifest",
")",
"AddRemoteRelease",
"(",
"releaseName",
",",
"<mask>",
",",
"url",
",",
"sha1",
"string",
")",
"(",
"err",
"error",
")",
"{",
"s",
".",
"Releases",
"=",
"append",
"(",
"s",
".",
"Releases",
",",
"Releas... |
8,665 | all-8666 | [
"Convenience",
"method",
"which",
"just",
"delegates",
"to",
"mgo",
".",
"Note",
"that",
"hooks",
"are",
"NOT",
"run"
] | [
"func",
"(",
"c",
"*",
"Collection",
")",
"Delete",
"(",
"query",
"bson",
".",
"M",
")",
"(",
"*",
"mgo",
".",
"ChangeInfo",
",",
"error",
")",
"{",
"sess",
":=",
"c",
".",
"<mask>",
".",
"Session",
".",
"Clone",
"(",
")",
"\n",
"defer",
"sess",
... |
8,666 | all-8667 | [
"GetMetricOk",
"returns",
"a",
"tuple",
"with",
"the",
"Metric",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Series",
")",
"GetMetricOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Metric",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"s",
... |
8,667 | all-8668 | [
"insertChild",
"registers",
"given",
"node",
"in",
"the",
"route",
"node",
"tree",
"If",
"there",
"is",
"already",
"a",
"similar",
"node",
"it",
"will",
"not",
"insert",
"new",
"node",
"The",
"returned",
"node",
"is",
"always",
"the",
"registered",
"one",
... | [
"func",
"(",
"n",
"*",
"routeNode",
")",
"insertChild",
"(",
"nn",
"*",
"routeNode",
")",
"*",
"routeNode",
"{",
"if",
"child",
":=",
"n",
".",
"findChild",
"(",
"nn",
")",
";",
"child",
"!=",
"nil",
"{",
"return",
"child",
"\n",
"}",
"\n\n",
"if",... |
8,668 | all-8669 | [
"GetMinWidth",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_tree_view_column_get_min_width",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeViewColumn",
")",
"GetMinWidth",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_tree_view_column_get_min_width",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"int",
"(",
"c",
")",
"\n",
"}"
] |
8,669 | all-8670 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsDevice",
")",
"GetId",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Id",
"\n",
"}"
] |
8,670 | all-8671 | [
"sendENIStateChange",
"handles",
"the",
"eni",
"event",
"from",
"udev",
"or",
"reconcile",
"phase"
] | [
"func",
"(",
"udevWatcher",
"*",
"UdevWatcher",
")",
"sendENIStateChange",
"(",
"mac",
"string",
")",
"error",
"{",
"if",
"mac",
"==",
"\"",
"\"",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"// check if this is an eni requi... |
8,671 | all-8672 | [
"Less",
"helps",
"implement",
"sort",
".",
"Interface",
"for",
"MoRefSorter",
"."
] | [
"func",
"(",
"s",
"MoRefSorter",
")",
"Less",
"(",
"i",
",",
"j",
"int",
")",
"bool",
"{",
"return",
"s",
"[",
"i",
"]",
".",
"<mask>",
"<",
"s",
"[",
"j",
"]",
".",
"Value",
"\n",
"}"
] |
8,672 | all-8673 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"ListBoolOption",
")",
"<mask>",
"(",
"value",
"string",
")",
"error",
"{",
"val",
":=",
"BoolOption",
"{",
"}",
"\n",
"val",
".",
"Set",
"(",
"value",
")",
"\n",
"*",
"o",
"=",
"append",
"(",
"*",
"o",
",",
"val",
")",
"... |
8,673 | all-8674 | [
"returns",
"a",
"list",
"of",
"countries",
"where",
"Twilio",
"messaging",
"services",
"are",
"available",
"and",
"the",
"corresponding",
"URL",
"for",
"retrieving",
"the",
"country",
"specific",
"messaging",
"prices",
"."
] | [
"func",
"(",
"cmps",
"*",
"CountryMessagingPriceService",
")",
"GetPage",
"(",
"ctx",
"context",
".",
"Context",
",",
"data",
"url",
".",
"Values",
")",
"(",
"*",
"CountriesPricePage",
",",
"error",
")",
"{",
"return",
"cmps",
".",
"GetPageIterator",
"(",
... |
8,674 | all-8675 | [
"newConsole",
"returns",
"an",
"initalized",
"console",
"that",
"can",
"be",
"used",
"within",
"a",
"container",
"by",
"copying",
"bytes",
"from",
"the",
"master",
"side",
"to",
"the",
"slave",
"that",
"is",
"attached",
"as",
"the",
"tty",
"for",
"the",
"c... | [
"func",
"newConsole",
"(",
"uid",
",",
"gid",
"int",
")",
"(",
"Console",
",",
"error",
")",
"{",
"master",
",",
"err",
":=",
"os",
".",
"OpenFile",
"(",
"\"",
"\"",
",",
"syscall",
".",
"O_RDWR",
"|",
"syscall",
".",
"O_NOCTTY",
"|",
"syscall",
".... |
8,675 | all-8676 | [
"newRawClient",
"creates",
"an",
"http",
"package",
"Client",
"taking",
"into",
"account",
"both",
"the",
"parameters",
"and",
"package",
"variables",
"."
] | [
"func",
"newRawClient",
"(",
"noRedirect",
",",
"noCertCheck",
",",
"disableKeepAlives",
"bool",
",",
"responseHeaderTimeout",
"time",
".",
"Duration",
")",
"*",
"http",
".",
"Client",
"{",
"tr",
":=",
"http",
".",
"Transport",
"{",
"DisableKeepAlives",
":",
"... |
8,676 | all-8677 | [
"putBuffer",
"returns",
"a",
"buffer",
"to",
"the",
"free",
"list",
"."
] | [
"func",
"(",
"l",
"*",
"Log",
")",
"putBuffer",
"(",
"b",
"*",
"buffer",
")",
"{",
"if",
"b",
".",
"Len",
"(",
")",
">=",
"256",
"{",
"// Let big buffers die a natural death.",
"return",
"\n",
"}",
"\n",
"l",
".",
"freeListMu",
".",
"Lock",
"(",
")",... |
8,677 | all-8678 | [
"title",
":",
"service",
"update",
"path",
":",
"/",
"services",
"/",
"{",
"name",
"}",
"method",
":",
"PUT",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":",
"200",
":",
"Service",
"updated",
"400"... | [
"func",
"serviceUpdate",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"d",
":=",
"service",
".",
"Service",
"{",
"Username",
":",
"InputValue",
"("... |
8,678 | all-8679 | [
"NewAWSSDRegistry",
"returns",
"implementation",
"of",
"registry",
"for",
"AWS",
"SD"
] | [
"func",
"NewAWSSDRegistry",
"(",
"provider",
"provider",
".",
"<mask>",
",",
"ownerID",
"string",
")",
"(",
"*",
"AWSSDRegistry",
",",
"error",
")",
"{",
"if",
"ownerID",
"==",
"\"",
"\"",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"",
"\"... |
8,679 | all-8680 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventDomStorageItemUpdated",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage6",
"(... |
8,680 | all-8681 | [
"UnmarshalText",
"hydrates",
"this",
"instance",
"from",
"text"
] | [
"func",
"(",
"r",
"*",
"RGBColor",
")",
"UnmarshalText",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"// validation is performed later on",
"*",
"r",
"=",
"RGBColor",
"(",
"string",
"(",
"data",
")",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
8,681 | all-8682 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform3iv",
"(",
"location",
"int32",
",",
"count",
"int32",
",",
"<mask>",
"*",
"int32",
")",
"{",
"C",
".",
"glowUniform3iv",
"(",
"gpUniform3iv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",
")",
",",
"(",
"C",
".",
"GLsizei",
")",... |
8,682 | all-8683 | [
"Logf",
"is",
"a",
"sentinel",
"option",
"to",
"set",
"a",
"logger",
"."
] | [
"func",
"Logf",
"(",
"f",
"func",
"(",
"string",
",",
"...",
"<mask>",
"{",
"}",
")",
")",
"Option",
"{",
"return",
"func",
"(",
"s",
"*",
"Sentinel",
")",
"error",
"{",
"s",
".",
"logf",
"=",
"f",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
8,683 | all-8684 | [
"ParseTarget",
"parses",
"a",
"endpoint",
":",
"//",
"<id",
">",
"/",
"<endpoint",
">",
"string",
"and",
"returns",
"the",
"parsed",
"id",
"and",
"endpoint",
".",
"If",
"the",
"target",
"is",
"malformed",
"an",
"error",
"is",
"returned",
"."
] | [
"func",
"ParseTarget",
"(",
"target",
"string",
")",
"(",
"string",
",",
"string",
",",
"error",
")",
"{",
"noPrefix",
":=",
"strings",
".",
"TrimPrefix",
"(",
"target",
",",
"targetPrefix",
")",
"\n",
"if",
"noPrefix",
"==",
"target",
"{",
"return",
"\"... |
8,684 | all-8685 | [
"LineCount",
"returns",
"the",
"number",
"of",
"recorded",
"lines",
"since",
"the",
"beginning",
"of",
"the",
"process",
"."
] | [
"func",
"(",
"ep",
"*",
"ExpectProcess",
")",
"LineCount",
"(",
")",
"int",
"{",
"ep",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ep",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"return",
"ep",
".",
"<mask>",
"\n",
"}"
] |
8,685 | all-8686 | [
"HasStyle",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TimeseriesRequest",
")",
"HasStyle",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"Style",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
8,686 | all-8687 | [
"NewClientWithDialer",
"creates",
"a",
"new",
"Livestatus",
"client",
"instance",
"using",
"a",
"provided",
"network",
"dialer",
"."
] | [
"func",
"NewClientWithDialer",
"(",
"<mask>",
",",
"address",
"string",
",",
"dialer",
"*",
"net",
".",
"Dialer",
")",
"*",
"Client",
"{",
"return",
"&",
"Client",
"{",
"network",
":",
"network",
",",
"address",
":",
"address",
",",
"dialer",
":",
"diale... |
8,687 | all-8688 | [
"newDigitalOceanChanges",
"returns",
"a",
"collection",
"of",
"Changes",
"based",
"on",
"the",
"given",
"records",
"and",
"action",
"."
] | [
"func",
"newDigitalOceanChanges",
"(",
"action",
"string",
",",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
")",
"[",
"]",
"*",
"DigitalOceanChange",
"{",
"changes",
":=",
"make",
"(",
"[",
"]",
"*",
"DigitalOceanChange",
",",
"0",
",",
"len",... |
8,688 | all-8689 | [
"tagByName",
"converts",
"a",
"tag",
"name",
"into",
"its",
"ID",
"."
] | [
"func",
"tagByName",
"(",
"ctx",
"context",
".",
"Context",
",",
"client",
"*",
"tags",
".",
"RestClient",
",",
"name",
",",
"categoryID",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"tids",
",",
"err",
":=",
"client",
".",
"GetTagByNameForCate... |
8,689 | all-8690 | [
"BroadcastTopologyUpdate",
"is",
"invoked",
"whenever",
"there",
"is",
"a",
"change",
"to",
"the",
"mesh",
"topology",
"and",
"broadcasts",
"the",
"new",
"set",
"of",
"peers",
"to",
"the",
"mesh",
"."
] | [
"func",
"(",
"router",
"*",
"Router",
")",
"broadcastTopologyUpdate",
"(",
"update",
"[",
"]",
"*",
"Peer",
")",
"{",
"names",
":=",
"make",
"(",
"peerNameSet",
")",
"\n",
"for",
"_",
",",
"p",
":=",
"range",
"update",
"{",
"<mask>",
"[",
"p",
".",
... |
8,690 | all-8691 | [
"DeepCopy",
"copies",
"the",
"receiver",
"into",
"a",
"new",
"IPv6",
"."
] | [
"func",
"(",
"u",
"*",
"IPv6",
")",
"DeepCopy",
"(",
")",
"*",
"IPv6",
"{",
"if",
"u",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"<mask>",
":=",
"new",
"(",
"IPv6",
")",
"\n",
"u",
".",
"DeepCopyInto",
"(",
"out",
")",
"\n",
"return",... |
8,691 | all-8692 | [
"GetImageURL",
"returns",
"the",
"ImageURL",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"c",
"*",
"ConditionalFormat",
")",
"GetImageURL",
"(",
")",
"<mask>",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"ImageURL",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"c",
".",
"ImageURL",
"\n",
"}"
] |
8,692 | all-8693 | [
"WriteTo",
"writes",
"data",
"to",
"w",
"."
] | [
"func",
"(",
"e",
"*",
"htmlTag",
")",
"WriteTo",
"(",
"w",
"io",
".",
"Writer",
")",
"(",
"int64",
",",
"error",
")",
"{",
"var",
"bf",
"bytes",
".",
"Buffer",
"\n\n",
"// Write an open tag.",
"bf",
".",
"WriteString",
"(",
"lt",
")",
"\n",
"bf",
... |
8,693 | all-8694 | [
"specify",
"a",
"three",
"-",
"dimensional",
"texture",
"subimage",
"in",
"a",
"compressed",
"format"
] | [
"func",
"CompressedTexSubImage3D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"zoffset",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"depth",
"int32",
",",
"format",
"uint32",
",",
... |
8,694 | all-8695 | [
"argsOrEnv",
"allows",
"you",
"to",
"pick",
"an",
"environmental",
"variable",
"for",
"a",
"setting",
"if",
"the",
"arg",
"is",
"not",
"set"
] | [
"func",
"argsOrEnv",
"(",
"args",
"map",
"[",
"string",
"]",
"string",
",",
"<mask>",
",",
"env",
"string",
")",
"string",
"{",
"if",
"value",
",",
"ok",
":=",
"args",
"[",
"key",
"]",
";",
"ok",
"{",
"return",
"value",
"\n",
"}",
"\n",
"return",
... |
8,695 | all-8696 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventEntryAdded",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog3",
"(",
"&",
"r",
... |
8,696 | all-8697 | [
"bind",
"an",
"existing",
"texture",
"object",
"to",
"the",
"specified",
"texture",
"unit"
] | [
"func",
"BindTextureUnit",
"(",
"<mask>",
"uint32",
",",
"texture",
"uint32",
")",
"{",
"C",
".",
"glowBindTextureUnit",
"(",
"gpBindTextureUnit",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"unit",
")",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"texture",
"... |
8,697 | all-8698 | [
"PutManifest",
"writes",
"manifest",
"to",
"the",
"destination",
".",
"FIXME?",
"This",
"should",
"also",
"receive",
"a",
"MIME",
"type",
"if",
"known",
"to",
"differentiate",
"between",
"schema",
"versions",
".",
"If",
"the",
"destination",
"is",
"in",
"princ... | [
"func",
"(",
"d",
"*",
"Destination",
")",
"PutManifest",
"(",
"ctx",
"context",
".",
"Context",
",",
"m",
"[",
"]",
"byte",
")",
"error",
"{",
"// We do not bother with types.ManifestTypeRejectedError; our .SupportedManifestMIMETypes() above is already providing only one alt... |
8,698 | all-8699 | [
"UnmarshalWithParams",
"allows",
"field",
"parameters",
"to",
"be",
"specified",
"for",
"the",
"top",
"-",
"level",
"element",
".",
"The",
"form",
"of",
"the",
"params",
"is",
"the",
"same",
"as",
"the",
"field",
"tags",
"."
] | [
"func",
"UnmarshalWithParams",
"(",
"b",
"[",
"]",
"byte",
",",
"val",
"<mask>",
"{",
"}",
",",
"params",
"string",
")",
"(",
"rest",
"[",
"]",
"byte",
",",
"err",
"error",
")",
"{",
"v",
":=",
"reflect",
".",
"ValueOf",
"(",
"val",
")",
".",
"El... |
8,699 | all-8700 | [
"WriteOut",
"writes",
"the",
"frame",
"to",
"the",
"given",
"io",
".",
"Writer"
] | [
"func",
"(",
"f",
"*",
"Frame",
")",
"WriteOut",
"(",
"w",
"io",
".",
"Writer",
")",
"error",
"{",
"var",
"wbuf",
"typed",
".",
"WriteBuffer",
"\n",
"wbuf",
".",
"Wrap",
"(",
"f",
".",
"headerBuffer",
")",
"\n\n",
"if",
"err",
":=",
"f",
".",
"<m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.