id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
8,700 | all-8701 | [
"GetFillMin",
"returns",
"the",
"FillMin",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefStyle",
")",
"GetFillMin",
"(",
")",
"json",
".",
"Number",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"FillMin",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"FillMin",
"\n",
... |
8,701 | all-8702 | [
"Features",
"returns",
"VM",
"supported",
"features",
".",
"func",
"(",
"v",
"*",
"VM",
")",
"Features",
"()",
"(",
"string",
"error",
")",
"{",
"var",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"var",
"features",
"*",
"C",
".",
"char",
... | [
"func",
"(",
"v",
"*",
"VM",
")",
"EnableSharedFolders",
"(",
"enabled",
"bool",
")",
"error",
"{",
"var",
"jobHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"var",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"\n\n... |
8,702 | all-8703 | [
"LogFactory",
"-",
"a",
"log",
"creator"
] | [
"func",
"LogFactory",
"(",
"name",
"string",
",",
"logType",
"LogType",
",",
"writer",
"io",
".",
"Writer",
")",
"Logger",
"{",
"log",
":=",
"&",
"logger",
"{",
"Name",
":",
"name",
",",
"LogLevel",
":",
"minLogLevel",
",",
"Writer",
":",
"writer",
"}"... |
8,703 | all-8704 | [
"getSystemHandler",
"on",
"Linux",
"writes",
"messages",
"to",
"syslog",
"."
] | [
"func",
"getSystemHandler",
"(",
"syslog",
"string",
",",
"debug",
"bool",
",",
"format",
"log",
".",
"Format",
")",
"log",
".",
"Handler",
"{",
"// SyslogHandler",
"if",
"syslog",
"!=",
"\"",
"\"",
"{",
"if",
"!",
"debug",
"{",
"return",
"log",
".",
"... |
8,704 | all-8705 | [
"determine",
"if",
"a",
"name",
"corresponds",
"to",
"a",
"renderbuffer",
"object"
] | [
"func",
"IsRenderbuffer",
"(",
"renderbuffer",
"uint32",
")",
"bool",
"{",
"<mask>",
",",
"_",
",",
"_",
":=",
"syscall",
".",
"Syscall",
"(",
"gpIsRenderbuffer",
",",
"1",
",",
"uintptr",
"(",
"renderbuffer",
")",
",",
"0",
",",
"0",
")",
"\n",
"retur... |
8,705 | all-8706 | [
"SetAppliedStatus",
"sets",
"the",
"applied",
"status",
"of",
"container",
"and",
"returns",
"whether",
"the",
"container",
"is",
"already",
"in",
"a",
"transition"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"SetAppliedStatus",
"(",
"<mask>",
"apicontainerstatus",
".",
"ContainerStatus",
")",
"bool",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"if",... |
8,706 | all-8707 | [
"SetConsoleCursorPosition",
"location",
"of",
"the",
"console",
"cursor",
".",
"See",
"https",
":",
"//",
"msdn",
".",
"microsoft",
".",
"com",
"/",
"en",
"-",
"us",
"/",
"library",
"/",
"windows",
"/",
"desktop",
"/",
"ms686025",
"(",
"v",
"=",
"vs",
... | [
"func",
"SetConsoleCursorPosition",
"(",
"handle",
"uintptr",
",",
"coord",
"COORD",
")",
"error",
"{",
"r1",
",",
"r2",
",",
"err",
":=",
"setConsoleCursorPositionProc",
".",
"Call",
"(",
"handle",
",",
"coordToPointer",
"(",
"coord",
")",
")",
"\n",
"<mask... |
8,707 | all-8708 | [
"Draw",
"a",
"gopher",
"head",
"(",
"not",
"rotated",
")"
] | [
"func",
"Draw",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"x",
",",
"y",
",",
"w",
",",
"h",
"float64",
")",
"{",
"h23",
":=",
"(",
"h",
"*",
"2",
")",
"/",
"3",
"\n\n",
"blf",
":=",
"color",
".",
"RGBA",
"{",
"0",
",",
"0",
",",
"0"... |
8,708 | all-8709 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"JenkinsSpec",
"."
] | [
"func",
"(",
"in",
"*",
"JenkinsSpec",
")",
"DeepCopy",
"(",
")",
"*",
"JenkinsSpec",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"JenkinsSpec",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
"<mask>",
... |
8,709 | all-8710 | [
"UnrequestReview",
"tries",
"to",
"remove",
"the",
"users",
"listed",
"in",
"logins",
"from",
"the",
"requested",
"reviewers",
"of",
"the",
"specified",
"PR",
".",
"The",
"GitHub",
"API",
"treats",
"deletions",
"of",
"review",
"requests",
"differently",
"than",
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"UnrequestReview",
"(",
"org",
",",
"repo",
"string",
",",
"number",
"int",
",",
"logins",
"[",
"]",
"string",
")",
"error",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
",",
"number",
",",... |
8,710 | all-8711 | [
"CreateDatabaseClient",
"creates",
"and",
"connects",
"a",
"new",
"instance",
"of",
"an",
"InfluxDB",
"It",
"is",
"created",
"based",
"on",
"the",
"fields",
"set",
"in",
"the",
"configuration",
"."
] | [
"func",
"(",
"config",
"*",
"InfluxConfig",
")",
"CreateDatabaseClient",
"(",
")",
"(",
"*",
"InfluxDB",
",",
"error",
")",
"{",
"client",
",",
"err",
":=",
"influxdb",
".",
"NewHTTPClient",
"(",
"influxdb",
".",
"HTTPConfig",
"{",
"Addr",
":",
"config",
... |
8,711 | all-8712 | [
"PutTimestamp",
"writes",
"a",
"64",
"-",
"bit",
"signed",
"integer",
"(",
"using",
"time",
".",
"UnixNano",
"()",
")",
"for",
"the",
"given",
"time",
".",
"Time",
"value",
".",
"The",
"timestamp",
"field",
"type",
"must",
"be",
"a",
"TimestampField",
".... | [
"func",
"(",
"b",
"*",
"TupleBuilder",
")",
"PutTimestamp",
"(",
"field",
"string",
",",
"value",
"<mask>",
".",
"Time",
")",
"(",
"wrote",
"uint64",
",",
"err",
"error",
")",
"{",
"// field type should be",
"if",
"err",
"=",
"b",
".",
"typeCheck",
"(",
... |
8,712 | all-8713 | [
"Labels",
"returns",
"the",
"labels",
"to",
"apply",
"to",
"the",
"issue",
"created",
"for",
"this",
"flaky",
"job",
"on",
"github",
"."
] | [
"func",
"(",
"fj",
"*",
"FlakyJob",
")",
"Labels",
"(",
")",
"[",
"]",
"string",
"{",
"labels",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
"}",
"\n",
"// get sig labels",
"for",
"sig",
":=",
"range",
"fj",
".",
"reporter",
".",
"<mask>",
".",
"Test... |
8,713 | all-8714 | [
"Patch",
"is",
"a",
"shortcut",
"for",
"r",
".",
"Handle",
"(",
"PATCH",
"pattern",
"handlers",
")"
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"Patch",
"(",
"pattern",
"string",
",",
"h",
"...",
"Handler",
")",
"*",
"Route",
"{",
"return",
"r",
".",
"Handle",
"(",
"\"",
"\"",
",",
"<mask>",
",",
"h",
")",
"\n",
"}"
] |
8,714 | all-8715 | [
"Connect",
"..."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"Connect",
"(",
"ctx",
"context",
".",
"Context",
",",
"opts",
"...",
"grpc",
".",
"DialOption",
")",
"error",
"{",
"for",
"i",
",",
"n",
":=",
"range",
"c",
".",
"nodes",
"{",
"if",
"n",
".",
"Addr",
"==",
... |
8,715 | all-8716 | [
"Start",
"runs",
"the",
"goroutine",
"responsible",
"for",
"checking",
"idle",
"connections",
"."
] | [
"func",
"(",
"is",
"*",
"idleSweep",
")",
"start",
"(",
")",
"{",
"if",
"is",
".",
"started",
"||",
"is",
".",
"idleCheckInterval",
"<=",
"0",
"{",
"return",
"\n",
"}",
"\n\n",
"is",
".",
"ch",
".",
"log",
".",
"WithFields",
"(",
"LogField",
"{",
... |
8,716 | all-8717 | [
"HasSourceType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"HasSourceType",
"(",
")",
"bool",
"{",
"if",
"e",
"!=",
"nil",
"&&",
"e",
".",
"SourceType",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
8,717 | all-8718 | [
"Add",
"adds",
"the",
"given",
"dependency",
"to",
"the",
"list",
"of",
"monitored",
"dependencies",
"and",
"start",
"the",
"associated",
"view",
".",
"If",
"the",
"dependency",
"already",
"exists",
"no",
"action",
"is",
"taken",
".",
"If",
"the",
"Dependenc... | [
"func",
"(",
"w",
"*",
"Watcher",
")",
"Add",
"(",
"d",
"dep",
".",
"Dependency",
")",
"(",
"bool",
",",
"error",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"Unlock",
"(",
")",
"\n\n",
"log",
".",
"Printf",
"(",
"\"",
"\""... |
8,718 | all-8719 | [
"Returns",
"a",
"new",
"object",
"implementing",
"the",
"bcd",
".",
"Tracer",
"and",
"bcd",
".",
"TracerSig",
"interfaces",
"using",
"the",
"Backtrace",
"debugging",
"platform",
".",
"Currently",
"only",
"Linux",
"and",
"FreeBSD",
"are",
"supported",
".",
"Rel... | [
"func",
"New",
"(",
"options",
"NewOptions",
")",
"*",
"BTTracer",
"{",
"moduleOpt",
":=",
"\"",
"\"",
"\n",
"if",
"!",
"options",
".",
"IncludeSystemGs",
"{",
"moduleOpt",
"+=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"return",
"&",
"BTTracer",
"{",
"cmd",
":"... |
8,719 | all-8720 | [
"Click",
"clicks",
"on",
"all",
"of",
"the",
"elements",
"that",
"the",
"selection",
"refers",
"to",
"."
] | [
"func",
"(",
"s",
"*",
"Selection",
")",
"Click",
"(",
")",
"error",
"{",
"return",
"s",
".",
"forEachElement",
"(",
"func",
"(",
"selectedElement",
"<mask>",
".",
"Element",
")",
"error",
"{",
"if",
"err",
":=",
"selectedElement",
".",
"Click",
"(",
"... |
8,720 | all-8721 | [
"EntryNew",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_new",
"()",
"."
] | [
"func",
"EntryNew",
"(",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_entry_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"obj",
":=",
"glib",
".",
"Take",
"... |
8,721 | all-8722 | [
"Notify",
"takes",
"three",
"arguments",
":",
"err",
"-",
"standard",
"error",
";",
"sync",
"-",
"if",
"true",
"then",
"the",
"function",
"waits",
"for",
"the",
"end",
"of",
"sending",
";",
"skip",
"-",
"how",
"many",
"errors",
"to",
"remove",
"from",
... | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"Notify",
"(",
"err",
"error",
",",
"sync",
"bool",
",",
"skip",
"int",
")",
"{",
"if",
"c",
".",
"enable",
"{",
"c",
".",
"notify",
"(",
"err",
",",
"sync",
",",
"skip",
")",
"\n",
"}",
"\n",
"}"
] |
8,722 | all-8723 | [
"Parse",
"initializes",
"URI",
"from",
"the",
"given",
"host",
"and",
"uri",
".",
"host",
"may",
"be",
"nil",
".",
"In",
"this",
"case",
"uri",
"must",
"contain",
"fully",
"qualified",
"uri",
"i",
".",
"e",
".",
"with",
"scheme",
"and",
"host",
".",
... | [
"func",
"(",
"u",
"*",
"URI",
")",
"Parse",
"(",
"<mask>",
",",
"uri",
"[",
"]",
"byte",
")",
"{",
"u",
".",
"parse",
"(",
"host",
",",
"uri",
",",
"nil",
")",
"\n",
"}"
] |
8,723 | all-8724 | [
"Record",
"appends",
"an",
"entry",
"to",
"the",
"recordlog",
"specified",
"by",
"the",
"poolKey",
"."
] | [
"func",
"(",
"h",
"*",
"History",
")",
"Record",
"(",
"poolKey",
",",
"action",
",",
"baseSHA",
",",
"err",
"string",
",",
"targets",
"[",
"]",
"prowapi",
".",
"Pull",
")",
"{",
"t",
":=",
"<mask>",
"(",
")",
"\n",
"sort",
".",
"Sort",
"(",
"ByNu... |
8,724 | all-8725 | [
"export",
"goBuilderConnect"
] | [
"func",
"goBuilderConnect",
"(",
"builder",
"*",
"C",
".",
"GtkBuilder",
",",
"object",
"*",
"C",
".",
"GObject",
",",
"signal_name",
"*",
"C",
".",
"gchar",
",",
"handler_name",
"*",
"C",
".",
"gchar",
",",
"connect_object",
"*",
"C",
".",
"GObject",
... |
8,725 | all-8726 | [
"ServeUDP",
"serves",
"requests",
"over",
"UDP",
"connection",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"ServeUDP",
"(",
"<mask>",
"*",
"net",
".",
"UDPConn",
")",
"(",
"err",
"error",
")",
"{",
"s",
".",
"Server",
".",
"Server",
".",
"Addr",
"=",
"conn",
".",
"LocalAddr",
"(",
")",
".",
"String",
"(",
")",
"... |
8,726 | all-8727 | [
"resolveDirectory",
"returns",
"a",
"full",
"directory",
"path",
"based",
"on",
"the",
"supplied",
"dir",
"path",
"if",
"the",
"supplied",
"dir",
"path",
"is",
"absolute",
"(",
"i",
".",
"e",
".",
"it",
"starts",
"with",
"/",
")",
"then",
"it",
"is",
"... | [
"func",
"resolveDirectory",
"(",
"dir",
"string",
",",
"<mask>",
"bool",
")",
"(",
"string",
",",
"error",
")",
"{",
"var",
"resolved",
"string",
"\n",
"if",
"filepath",
".",
"IsAbs",
"(",
"dir",
")",
"{",
"resolved",
"=",
"dir",
"\n",
"}",
"else",
"... |
8,727 | all-8728 | [
"uriForAPI",
"is",
"to",
"be",
"called",
"with",
"something",
"like",
"/",
"v1",
"/",
"events",
"and",
"it",
"will",
"give",
"the",
"proper",
"request",
"URI",
"to",
"be",
"posted",
"to",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"uriForAPI",
"(",
"api",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"apiBase",
",",
"err",
":=",
"url",
".",
"Parse",
"(",
"client",
".",
"baseUrl",
"+",
"\"",
"\"",
"+",
"api",
")",
"\n",
"if... |
8,728 | all-8729 | [
"WriteToRequest",
"writes",
"these",
"params",
"to",
"a",
"swagger",
"request"
] | [
"func",
"(",
"o",
"*",
"GetVMByCidParams",
")",
"WriteToRequest",
"(",
"r",
"runtime",
".",
"ClientRequest",
",",
"reg",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"if",
"err",
":=",
"r",
".",
"SetTimeout",
"(",
"o",
".",
"timeout",
")",
";",
"err",... |
8,729 | all-8730 | [
"WriteTo",
"writes",
"data",
"to",
"w",
"."
] | [
"func",
"(",
"e",
"*",
"helperMethodYield",
")",
"WriteTo",
"(",
"w",
"io",
".",
"Writer",
")",
"(",
"int64",
",",
"error",
")",
"{",
"var",
"bf",
"bytes",
".",
"<mask>",
"\n\n",
"inner",
":=",
"e",
".",
"src",
".",
"inner",
"\n",
"if",
"inner",
... |
8,730 | all-8731 | [
"Create",
"creates",
"a",
"ResourcePool",
"."
] | [
"func",
"Create",
"(",
"rp",
"*",
"object",
".",
"ResourcePool",
",",
"<mask>",
"string",
",",
"spec",
"*",
"types",
".",
"ResourceConfigSpec",
")",
"(",
"*",
"object",
".",
"ResourcePool",
",",
"error",
")",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",... |
8,731 | all-8732 | [
"ConvertColors",
"takes",
"a",
"list",
"of",
"ints",
"representing",
"colors",
"for",
"log",
"levels",
"and",
"converts",
"them",
"into",
"strings",
"for",
"ANSI",
"color",
"formatting"
] | [
"func",
"ConvertColors",
"(",
"colors",
"[",
"]",
"int",
",",
"bold",
"bool",
")",
"[",
"]",
"string",
"{",
"converted",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"i",
":=",
"range",
"colors",
"{",
"if",
"bold",
"{",
"converted",
... |
8,732 | all-8733 | [
"RegionMake2D",
"returns",
"a",
"2D",
"rectangular",
"region",
"for",
"image",
"or",
"texture",
"data",
".",
"Reference",
":",
"https",
":",
"//",
"developer",
".",
"apple",
".",
"com",
"/",
"documentation",
"/",
"metal",
"/",
"1515675",
"-",
"mtlregionmake2... | [
"func",
"RegionMake2D",
"(",
"x",
",",
"y",
",",
"width",
",",
"<mask>",
"int",
")",
"Region",
"{",
"return",
"Region",
"{",
"Origin",
":",
"Origin",
"{",
"x",
",",
"y",
",",
"0",
"}",
",",
"Size",
":",
"Size",
"{",
"width",
",",
"height",
",",
... |
8,733 | all-8734 | [
"GetChangeTypeOk",
"returns",
"a",
"tuple",
"with",
"the",
"ChangeType",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"ChangeRequest",
")",
"GetChangeTypeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"ChangeType",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
... |
8,734 | all-8735 | [
"MustSetOptionsResult",
"retrieves",
"the",
"SetOptionsResult",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"OperationResultTr",
")",
"MustSetOptionsResult",
"(",
")",
"SetOptionsResult",
"{",
"val",
",",
"ok",
":=",
"u",
".",
"GetSetOptionsResult",
"(",
")",
"\n\n",
"if",
"!",
"<mask>",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
... |
8,735 | all-8736 | [
"restSessionFile",
"is",
"takes",
"the",
"session",
"file",
"name",
"generated",
"by",
"sessionFile",
"and",
"then",
"prefixes",
"the",
"REST",
"client",
"session",
"path",
"to",
"it",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"restSessionFile",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"p",
",",
"err",
":=",
"c",
".",
"sessionFile",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
... |
8,736 | all-8737 | [
"GRPCServer",
"converts",
"a",
"metcd",
".",
"Server",
"to",
"a",
"*",
"grpc",
".",
"Server",
"."
] | [
"func",
"GRPCServer",
"(",
"s",
"Server",
",",
"options",
"...",
"grpc",
".",
"ServerOption",
")",
"*",
"grpc",
".",
"Server",
"{",
"srv",
":=",
"grpc",
".",
"NewServer",
"(",
"<mask>",
"...",
")",
"\n",
"//etcdserverpb.RegisterAuthServer(srv, s)",
"//etcdserv... |
8,737 | all-8738 | [
"BeginCall",
"starts",
"a",
"new",
"call",
"to",
"a",
"remote",
"peer",
"returning",
"an",
"OutboundCall",
"that",
"can",
"be",
"used",
"to",
"write",
"the",
"arguments",
"of",
"the",
"call",
"."
] | [
"func",
"(",
"c",
"*",
"SubChannel",
")",
"BeginCall",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"methodName",
"string",
",",
"callOptions",
"*",
"CallOptions",
")",
"(",
"*",
"OutboundCall",
",",
"error",
")",
"{",
"if",
"callOptions",
"==",
"nil",
"{"... |
8,738 | all-8739 | [
"Write",
"writes",
"the",
"provided",
"data",
"to",
"the",
"file",
"and",
"returns",
"the",
"number",
"of",
"bytes",
"written",
"and",
"an",
"error",
"in",
"case",
"something",
"wrong",
"happened",
".",
"The",
"file",
"will",
"internally",
"cache",
"the",
... | [
"func",
"(",
"file",
"*",
"GridFile",
")",
"Write",
"(",
"data",
"[",
"]",
"byte",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"file",
".",
"assertMode",
"(",
"gfsWriting",
")",
"\n",
"file",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"deb... |
8,739 | all-8740 | [
"SelfProxyCmderSupplier",
"returns",
"a",
"supplier",
"that",
"given",
"a",
"command",
"re",
"-",
"invokes",
"the",
"current",
"executable",
"with",
"a",
"proxy",
"version",
"of",
"the",
"provided",
"command",
"."
] | [
"func",
"SelfProxyCmderSupplier",
"(",
")",
"CmderSupplier",
"{",
"return",
"func",
"(",
"cmd",
"Cmd",
")",
"(",
"Cmder",
",",
"error",
")",
"{",
"selfCmder",
",",
"err",
":=",
"selfCmder",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil"... |
8,740 | all-8741 | [
"Wrap",
"for",
"wrapping",
"a",
"handler",
"to",
"After",
"middleware",
"Be",
"aware",
"that",
"it",
"will",
"not",
"be",
"able",
"to",
"stop",
"execution",
"propagation",
"That",
"is",
"it",
"will",
"continue",
"to",
"execute",
"the",
"next",
"middleware",
... | [
"func",
"Wrap",
"(",
"handler",
"HandlerFunc",
")",
"After",
"{",
"return",
"func",
"(",
"next",
"Handler",
")",
"Handler",
"{",
"return",
"HandlerFunc",
"(",
"func",
"(",
"w",
"<mask>",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
","... |
8,741 | all-8742 | [
"expireExchange",
"is",
"similar",
"to",
"removeExchange",
"but",
"it",
"marks",
"the",
"exchange",
"as",
"expired",
"."
] | [
"func",
"(",
"mexset",
"*",
"messageExchangeSet",
")",
"expireExchange",
"(",
"msgID",
"uint32",
")",
"{",
"mexset",
".",
"log",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"mexset",
".",
"<mask>",
",",
"msgID",
",",
")",
"\n\n",
"mexset",
".",
"Lock",
"(",
... |
8,742 | all-8743 | [
"GetOrgConfigs",
"reads",
"all",
"orgs",
"from",
"the",
"cf",
"-",
"mgmt",
"configuration",
"."
] | [
"func",
"(",
"m",
"*",
"yamlManager",
")",
"GetOrgConfigs",
"(",
")",
"(",
"[",
"]",
"OrgConfig",
",",
"error",
")",
"{",
"files",
",",
"err",
":=",
"FindFiles",
"(",
"m",
".",
"ConfigDir",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{... |
8,743 | all-8744 | [
"NewFIFOScheduler",
"returns",
"a",
"Scheduler",
"that",
"schedules",
"jobs",
"in",
"FIFO",
"order",
"sequentially"
] | [
"func",
"NewFIFOScheduler",
"(",
")",
"Scheduler",
"{",
"f",
":=",
"&",
"fifo",
"{",
"resume",
":",
"make",
"(",
"chan",
"struct",
"{",
"}",
",",
"1",
")",
",",
"donec",
":",
"make",
"(",
"chan",
"struct",
"{",
"}",
",",
"1",
")",
",",
"}",
"\n... |
8,744 | all-8745 | [
"/",
"*",
"SetAttr",
"will",
"set",
"the",
"value",
"for",
"the",
"attribute",
"with",
"the",
"name",
"key",
".",
"If",
"the",
"key",
"already",
"exists",
"it",
"will",
"be",
"overwritten",
"with",
"the",
"new",
"value",
"."
] | [
"func",
"(",
"b",
"*",
"Base",
")",
"SetAttr",
"(",
"key",
"string",
",",
"<mask>",
"interface",
"{",
"}",
")",
"{",
"b",
".",
"BaseAttrs",
".",
"SetAttr",
"(",
"key",
",",
"value",
")",
"\n",
"}"
] |
8,745 | all-8746 | [
"SetValid",
"changes",
"this",
"Time",
"s",
"value",
"and",
"sets",
"it",
"to",
"be",
"non",
"-",
"null",
"."
] | [
"func",
"(",
"t",
"*",
"Time",
")",
"SetValid",
"(",
"v",
"time",
".",
"Time",
")",
"{",
"t",
".",
"Time",
"=",
"v",
"\n",
"t",
".",
"Valid",
"=",
"<mask>",
"\n",
"}"
] |
8,746 | all-8747 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"SetDownloadBehaviorBehavior",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"SetDownloadBehaviorBehavior",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"SetDownloadBehaviorBehaviorDeny",
":... |
8,747 | all-8748 | [
"Malloc",
"implements",
"C",
"like",
"memory",
"allocator"
] | [
"func",
"Malloc",
"(",
"l",
"int",
")",
"unsafe",
".",
"Pointer",
"{",
"if",
"Debug",
"{",
"atomic",
".",
"AddUint64",
"(",
"&",
"stats",
".",
"allocs",
",",
"1",
")",
"\n",
"}",
"\n",
"<mask>",
"C",
".",
"mm_malloc",
"(",
"C",
".",
"size_t",
"("... |
8,748 | all-8749 | [
"EndpointZoneID",
"determines",
"zoneID",
"for",
"endpoint",
"from",
"map",
"[",
"zoneID",
"]",
"zoneName",
"by",
"taking",
"longest",
"suffix",
"zoneName",
"match",
"in",
"endpoint",
"DNSName",
"returns",
"0",
"if",
"no",
"matches",
"are",
"found"
] | [
"func",
"(",
"f",
"*",
"zoneFilter",
")",
"EndpointZoneID",
"(",
"endpoint",
"*",
"endpoint",
".",
"Endpoint",
",",
"zones",
"<mask>",
"[",
"int64",
"]",
"string",
")",
"(",
"zoneID",
"int64",
",",
"name",
"string",
")",
"{",
"var",
"matchZoneID",
"int64... |
8,749 | all-8750 | [
"bind",
"a",
"buffer",
"to",
"a",
"vertex",
"buffer",
"bind",
"point"
] | [
"func",
"VertexArrayVertexBuffer",
"(",
"vaobj",
"uint32",
",",
"bindingindex",
"uint32",
",",
"buffer",
"uint32",
",",
"offset",
"int",
",",
"stride",
"int32",
")",
"{",
"C",
".",
"glowVertexArrayVertexBuffer",
"(",
"gpVertexArrayVertexBuffer",
",",
"(",
"C",
"... |
8,750 | all-8751 | [
"Describe",
"generates",
"a",
"human",
"readable",
"description",
"of",
"the",
"behavior",
"that",
"this",
"configuration",
"specifies",
"."
] | [
"func",
"(",
"r",
"RequireMatchingLabel",
")",
"Describe",
"(",
")",
"string",
"{",
"str",
":=",
"&",
"strings",
".",
"Builder",
"{",
"}",
"\n",
"fmt",
".",
"Fprintf",
"(",
"str",
",",
"\"",
"\"",
",",
"r",
".",
"MissingLabel",
")",
"\n",
"if",
"r"... |
8,751 | all-8752 | [
"arrayLen",
"returns",
"the",
"length",
"of",
"the",
"array",
"whose",
"composite",
"literal",
"elements",
"are",
"elts",
"."
] | [
"func",
"(",
"b",
"*",
"builder",
")",
"arrayLen",
"(",
"fn",
"*",
"Function",
",",
"elts",
"[",
"]",
"ast",
".",
"Expr",
")",
"int64",
"{",
"var",
"max",
"int64",
"=",
"-",
"1",
"\n",
"var",
"i",
"int64",
"=",
"-",
"1",
"\n",
"for",
"_",
","... |
8,752 | all-8753 | [
"Validate",
"inspects",
"the",
"fields",
"of",
"the",
"type",
"to",
"determine",
"if",
"they",
"are",
"valid",
"."
] | [
"func",
"(",
"s",
"*",
"ContainerDefinition",
")",
"Validate",
"(",
")",
"error",
"{",
"invalidParams",
":=",
"request",
".",
"ErrInvalidParams",
"{",
"Context",
":",
"\"",
"\"",
"}",
"\n",
"if",
"s",
".",
"DependsOn",
"!=",
"nil",
"{",
"for",
"i",
","... |
8,753 | all-8754 | [
"GetTitleSize",
"returns",
"the",
"TitleSize",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"EventTimelineDefinition",
")",
"GetTitleSize",
"(",
")",
"<mask>",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"TitleSize",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"TitleSize",
"\n",
... |
8,754 | all-8755 | [
"ArmForSwitch",
"returns",
"which",
"field",
"name",
"should",
"be",
"used",
"for",
"storing",
"the",
"value",
"for",
"an",
"instance",
"of",
"PublicKey"
] | [
"func",
"(",
"u",
"NodeId",
")",
"ArmForSwitch",
"(",
"sw",
"int32",
")",
"(",
"<mask>",
",",
"bool",
")",
"{",
"return",
"PublicKey",
"(",
"u",
")",
".",
"ArmForSwitch",
"(",
"sw",
")",
"\n",
"}"
] |
8,755 | all-8756 | [
"BootstrapCluster",
"is",
"equivalent",
"to",
"non",
"-",
"member",
"BootstrapCluster",
"but",
"can",
"be",
"called",
"on",
"an",
"un",
"-",
"bootstrapped",
"Raft",
"instance",
"after",
"it",
"has",
"been",
"created",
".",
"This",
"should",
"only",
"be",
"ca... | [
"func",
"(",
"r",
"*",
"Raft",
")",
"BootstrapCluster",
"(",
"configuration",
"Configuration",
")",
"<mask>",
"{",
"bootstrapReq",
":=",
"&",
"bootstrapFuture",
"{",
"}",
"\n",
"bootstrapReq",
".",
"init",
"(",
")",
"\n",
"bootstrapReq",
".",
"configuration",
... |
8,756 | all-8757 | [
"SetData",
"assign",
"a",
"new",
"bar",
"list",
"to",
"a",
"chart"
] | [
"func",
"(",
"b",
"*",
"BarChart",
")",
"SetData",
"(",
"data",
"[",
"]",
"BarData",
")",
"{",
"b",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n\n",
"b",
".",
"data",
"=",
"make",
"(",
"[",
... |
8,757 | all-8758 | [
"Error",
"returns",
"an",
"error",
"string",
"for",
"the",
"ContainerNotFound",
"error"
] | [
"func",
"(",
"cnferror",
"ContainerNotFound",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"cnferror",
".",
"ContainerName",
",",
"cnferror",
".",
"TaskArn",
")",
"\n",
"}"
] |
8,758 | all-8759 | [
"HostPort",
"returns",
"Host",
":",
"Port"
] | [
"func",
"(",
"u",
"*",
"URI",
")",
"HostPort",
"(",
")",
"string",
"{",
"s",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"u",
".",
"host",
",",
"u",
".",
"<mask>",
")",
"\n",
"return",
"s",
"\n",
"}"
] |
8,759 | all-8760 | [
"resourceVSphereComputeClusterDeleteProcessForceRemoveHosts",
"process",
"force",
"-",
"evacuation",
"if",
"the",
"resource",
"has",
"been",
"configured",
"to",
"do",
"so",
".",
"NOTE",
":",
"As",
"documented",
"this",
"should",
"only",
"be",
"used",
"in",
"testing"... | [
"func",
"resourceVSphereComputeClusterDeleteProcessForceRemoveHosts",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
"cluster",
"*",
"object",
".",
"ClusterComputeResource",
",",
")",
"error",
"{",
"if",
"!",
"d",
".",
"Ge... |
8,760 | all-8761 | [
"ensureDefault",
"creates",
"and",
"stores",
"an",
"autogenerated",
"plan",
"in",
"case",
"of",
"no",
"plans",
"exists",
"."
] | [
"func",
"(",
"s",
"*",
"planService",
")",
"ensureDefault",
"(",
")",
"error",
"{",
"plans",
",",
"err",
":=",
"s",
".",
"storage",
".",
"FindAll",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"len",
"(",... |
8,761 | all-8762 | [
"MarshalBinary",
"is",
"used",
"to",
"serialize",
"an",
"Op",
"into",
"a",
"binary",
"form",
".",
"This",
"is",
"used",
"to",
"cache",
"the",
"ByteCode"
] | [
"func",
"(",
"o",
"op",
")",
"MarshalBinary",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"buf",
":=",
"rbpool",
".",
"Get",
"(",
")",
"\n",
"defer",
"rbpool",
".",
"Release",
"(",
"buf",
")",
"\n\n",
"// Write the code/opcode",
"if",
... |
8,762 | all-8763 | [
"GetOperator",
"is",
"a",
"wrapper",
"around",
"cairo_get_operator",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetOperator",
"(",
")",
"Operator",
"{",
"c",
":=",
"C",
".",
"cairo_get_operator",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"Operator",
"(",
"c",
")",
"\n",
"}"
] |
8,763 | all-8764 | [
"Errorf",
"logs",
"provided",
"message",
"with",
"formatting",
"in",
"ERROR",
"level",
"."
] | [
"func",
"(",
"logger",
"*",
"Logger",
")",
"Errorf",
"(",
"<mask>",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"{",
"logger",
".",
"log",
"(",
"ERROR",
",",
"format",
",",
"a",
"...",
")",
"\n",
"}"
] |
8,764 | all-8765 | [
"ClientOpen",
"decrypts",
"message",
"using",
"client",
"s",
"key",
"and",
"verifies",
"using",
"agent",
"s",
"key",
"."
] | [
"func",
"ClientOpen",
"(",
"c",
",",
"agentPub",
"[",
"]",
"byte",
",",
"clientPrv",
"*",
"ecdsa",
".",
"PrivateKey",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"sealed",
",",
"sig",
":=",
"UnpackSignature",
"(",
"c",
")",
"\n",
"hash",
":... |
8,765 | all-8766 | [
"GetTooltipContext",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_get_tooltip_context",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"GetTooltipContext",
"(",
"x",
",",
"y",
"int",
",",
"keyboardTip",
"bool",
")",
"(",
"*",
"TreeModel",
",",
"*",
"TreePath",
",",
"*",
"TreeIter",
")",
"{",
"var",
"(",
"cmodel",
"*",
"C",
".",
"GtkTreeModel",... |
8,766 | all-8767 | [
"Repaint",
"draws",
"the",
"control",
"on",
"its",
"View",
"surface"
] | [
"func",
"(",
"f",
"*",
"Frame",
")",
"Draw",
"(",
")",
"{",
"if",
"f",
".",
"hidden",
"{",
"return",
"\n",
"}",
"\n\n",
"PushAttributes",
"(",
")",
"\n",
"defer",
"PopAttributes",
"(",
")",
"\n\n",
"x",
",",
"y",
",",
"w",
",",
"h",
":=",
"f",
... |
8,767 | all-8768 | [
"GetClientOfferings",
"returns",
"active",
"offerings",
"available",
"for",
"a",
"client",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"GetClientOfferings",
"(",
"tkn",
"string",
",",
"agent",
"data",
".",
"HexString",
",",
"minUnitPrice",
",",
"maxUnitPrice",
"uint64",
",",
"countries",
"[",
"]",
"string",
",",
"offset",
",",
"limit",
"uint",
")",
... |
8,768 | all-8769 | [
"AddFieldError",
"appends",
"an",
"error",
"to",
"a",
"list",
"of",
"field",
"specific",
"errors",
"."
] | [
"func",
"(",
"f",
"*",
"FormErrors",
")",
"AddFieldError",
"(",
"<mask>",
",",
"e",
"string",
")",
"{",
"if",
"f",
".",
"FieldErrors",
"==",
"nil",
"{",
"f",
".",
"FieldErrors",
"=",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
"{",
"}",
"\n",
... |
8,769 | all-8770 | [
"AddVoter",
"will",
"add",
"the",
"given",
"server",
"to",
"the",
"cluster",
"as",
"a",
"staging",
"server",
".",
"If",
"the",
"server",
"is",
"already",
"in",
"the",
"cluster",
"as",
"a",
"voter",
"this",
"updates",
"the",
"server",
"s",
"address",
".",... | [
"func",
"(",
"r",
"*",
"Raft",
")",
"AddVoter",
"(",
"id",
"ServerID",
",",
"address",
"ServerAddress",
",",
"prevIndex",
"uint64",
",",
"timeout",
"time",
".",
"Duration",
")",
"IndexFuture",
"{",
"if",
"r",
".",
"protocolVersion",
"<",
"2",
"{",
"retur... |
8,770 | all-8771 | [
"deprecated",
"since",
"2",
".",
"38",
":",
"g_simple_action_group_lookup",
"()",
"g_simple_action_group_insert",
"()",
"g_simple_action_group_remove",
"()",
"g_simple_action_group_add_entries",
"()",
"-",
">",
"See",
"implementations",
"in",
"ActionMap",
"native",
"()",
... | [
"func",
"(",
"v",
"*",
"SimpleActionGroup",
")",
"native",
"(",
")",
"*",
"C",
".",
"GSimpleActionGroup",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"<mask>",
"nil",
"\n",
"}",
"\n",
"return",
"C",
".",
"toGSimpleAction... |
8,771 | all-8772 | [
"lexKeywordOrIdentifier",
"scans",
"an",
"alphanumeric",
"identifier",
"which",
"may",
"contain",
"a",
"colon",
"rune",
".",
"If",
"the",
"identifier",
"is",
"a",
"keyword",
"the",
"respective",
"keyword",
"item",
"is",
"scanned",
"."
] | [
"func",
"lexKeywordOrIdentifier",
"(",
"l",
"*",
"lexer",
")",
"stateFn",
"{",
"Loop",
":",
"for",
"{",
"switch",
"r",
":=",
"l",
".",
"next",
"(",
")",
";",
"{",
"case",
"isAlphaNumeric",
"(",
"r",
")",
"||",
"r",
"==",
"':'",
":",
"// absorb.",
"... |
8,772 | all-8773 | [
"Func",
"returns",
"the",
"package",
"-",
"level",
"function",
"of",
"the",
"specified",
"name",
"or",
"nil",
"if",
"not",
"found",
"."
] | [
"func",
"(",
"p",
"*",
"Package",
")",
"Func",
"(",
"name",
"string",
")",
"(",
"f",
"*",
"Function",
")",
"{",
"f",
",",
"_",
"=",
"p",
".",
"Members",
"[",
"<mask>",
"]",
".",
"(",
"*",
"Function",
")",
"\n",
"return",
"\n",
"}"
] |
8,773 | all-8774 | [
"Signature",
"returns",
"the",
"signature",
"of",
"the",
"called",
"function",
".",
"For",
"an",
"invoke",
"-",
"mode",
"call",
"the",
"signature",
"of",
"the",
"interface",
"method",
"is",
"returned",
".",
"In",
"either",
"call",
"or",
"invoke",
"mode",
"... | [
"func",
"(",
"c",
"*",
"CallCommon",
")",
"Signature",
"(",
")",
"*",
"types",
".",
"Signature",
"{",
"if",
"c",
".",
"Method",
"!=",
"nil",
"{",
"return",
"c",
".",
"Method",
".",
"Type",
"(",
")",
".",
"(",
"*",
"types",
".",
"Signature",
")",
... |
8,774 | all-8775 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventExecutionContextsCleared",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime30",
"... |
8,775 | all-8776 | [
"StrIn",
"param",
"is",
"a",
"string",
"the",
"string",
"is",
"in",
"array"
] | [
"func",
"(",
"c",
"*",
"Controller",
")",
"StrIn",
"(",
"fieldName",
"string",
",",
"p",
"interface",
"{",
"}",
",",
"l",
"...",
"string",
")",
"string",
"{",
"if",
"p",
"==",
"nil",
"{",
"p",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"v",
",",
"ok",
... |
8,776 | all-8777 | [
"Used",
"for",
"user",
"&",
"password",
"based",
"authentication"
] | [
"func",
"(",
"s",
"*",
"Session",
")",
"makeAuthorizationHeaders",
"(",
")",
"(",
"string",
",",
"*",
"<mask>",
")",
"{",
"if",
"s",
".",
"Username",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
",",
"NewBambouError",
"(",
"\"",
"\"",
",",
"\"",
"\... |
8,777 | all-8778 | [
"FinalHandlerFunc",
"is",
"a",
"helper",
"function",
"to",
"wrap",
"the",
"last",
"function",
"with",
"signature",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
"r",
"*",
"http",
".",
"Request",
")",
"in",
"the",
"ChainHandlers",
"function",
"."
] | [
"func",
"FinalHandlerFunc",
"(",
"h",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
")",
"func",
"(",
"http",
".",
"Handler",
")",
"http",
".",
"Handler",
"{",
"return",
"func",
"(",
"_",
"http",
".",
... |
8,778 | all-8779 | [
"SetIconFromPixbuf",
"is",
"a",
"wrapper",
"around",
"gtk_entry_set_icon_from_pixbuf",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetIconFromPixbuf",
"(",
"iconPos",
"EntryIconPosition",
",",
"pixbuf",
"*",
"gdk",
".",
"Pixbuf",
")",
"{",
"C",
".",
"gtk_entry_set_icon_from_pixbuf",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkEntryIconP... |
8,779 | all-8780 | [
"RegisterContainerInstance",
"indicates",
"an",
"expected",
"call",
"of",
"RegisterContainerInstance"
] | [
"func",
"(",
"mr",
"*",
"MockECSSDKMockRecorder",
")",
"RegisterContainerInstance",
"(",
"arg0",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
"mock",
",... |
8,780 | all-8781 | [
"Events",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockClient",
")",
"Events",
"(",
"arg0",
"context",
".",
"Context",
",",
"arg1",
"types",
".",
"EventsOptions",
")",
"(",
"<-",
"chan",
"events",
".",
"Message",
",",
"<-",
"chan",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"... |
8,781 | all-8782 | [
"WriteTaskStatsResponse",
"writes",
"the",
"task",
"stats",
"to",
"response",
"writer",
"."
] | [
"func",
"WriteTaskStatsResponse",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"taskARN",
"string",
",",
"state",
"dockerstate",
".",
"TaskEngineState",
",",
"statsEngine",
"stats",
".",
"<mask>",
")",
"{",
"taskStatsResponse",
",",
"err",
":=",
"NewTaskStatsResp... |
8,782 | all-8783 | [
"SetsysForUid",
"sets",
"the",
"value",
"of",
"the",
"environment",
"variable",
"named",
"by",
"the",
"key",
"that",
"affects",
"the",
"system",
"as",
"a",
"whole",
".",
"You",
"must",
"be",
"Root",
".",
"It",
"returns",
"an",
"error",
"if",
"any",
"."
] | [
"func",
"SetsysForUid",
"(",
"id",
"int",
",",
"key",
",",
"value",
"string",
")",
"error",
"{",
"if",
"!",
"_IS_ROOT",
"{",
"return",
"ErrNoRoot",
"\n",
"}",
"\n\n",
"_settings",
",",
"err",
":=",
"getSettingsForUid",
"(",
"id",
")",
"\n",
"if",
"err"... |
8,783 | all-8784 | [
"GrepNot",
"emits",
"every",
"input",
"x",
"that",
"does",
"not",
"match",
"the",
"regular",
"expression",
"r",
"."
] | [
"func",
"GrepNot",
"(",
"r",
"string",
")",
"Filter",
"{",
"re",
",",
"err",
":=",
"regexp",
".",
"Compile",
"(",
"r",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"FilterFunc",
"(",
"func",
"(",
"Arg",
")",
"error",
"{",
"return",
"err",
... |
8,784 | all-8785 | [
"ContainerDockerStats",
"returns",
"the",
"last",
"stored",
"raw",
"docker",
"stats",
"object",
"for",
"a",
"container"
] | [
"func",
"(",
"engine",
"*",
"DockerStatsEngine",
")",
"ContainerDockerStats",
"(",
"taskARN",
"string",
",",
"containerID",
"string",
")",
"(",
"*",
"types",
".",
"StatsJSON",
",",
"error",
")",
"{",
"engine",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"... |
8,785 | all-8786 | [
"GetChildSecondary",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_button_box_get_child_secondary",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ButtonBox",
")",
"GetChildSecondary",
"(",
"child",
"IWidget",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_button_box_get_child_secondary",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"toWidget",
"(",
")",
")",
"\n",
... |
8,786 | all-8787 | [
"HexToAddress",
"returns",
"ethereum",
"s",
"address",
"from",
"base",
"64",
"encoded",
"string",
"."
] | [
"func",
"HexToAddress",
"(",
"addr",
"HexString",
")",
"(",
"common",
".",
"<mask>",
",",
"error",
")",
"{",
"addrBytes",
",",
"err",
":=",
"HexToBytes",
"(",
"addr",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"fmt",
".",
"Errorf",
"(",
... |
8,787 | all-8788 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ObjectStore",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb7",
"(",
"&",
"w",
",",
"v",
")",
"... |
8,788 | all-8789 | [
"GetColumnsOk",
"returns",
"a",
"tuple",
"with",
"the",
"Columns",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetColumnsOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Columns",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"w",
... |
8,789 | all-8790 | [
"Manager",
"returns",
"the",
"current",
"configured",
"manager",
"as",
"defined",
"in",
"the",
"configuration",
"file",
"."
] | [
"func",
"Manager",
"(",
")",
"RepositoryManager",
"{",
"managerName",
",",
"err",
":=",
"config",
".",
"GetString",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"managerName",
"=",
"defaultManager",
"\n",
"}",
"\n",
"if",
"_",
",",
"ok",
... |
8,790 | all-8791 | [
"GetLineWidthOk",
"returns",
"a",
"tuple",
"with",
"the",
"LineWidth",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TimeseriesRequestStyle",
")",
"GetLineWidthOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"LineWidth",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"ret... |
8,791 | all-8792 | [
"ExportPubKey",
"returns",
"public",
"keys",
"in",
"ASCII",
"armored",
"format",
".",
"Retrieve",
"a",
"Info",
"object",
"by",
"its",
"name",
"and",
"return",
"the",
"public",
"key",
"in",
"a",
"portable",
"format",
"."
] | [
"func",
"(",
"kb",
"dbKeybase",
")",
"ExportPubKey",
"(",
"name",
"string",
")",
"(",
"armor",
"string",
",",
"err",
"error",
")",
"{",
"bz",
":=",
"kb",
".",
"db",
".",
"Get",
"(",
"infoKey",
"(",
"name",
")",
")",
"\n",
"if",
"bz",
"==",
"nil",... |
8,792 | all-8793 | [
"dirname",
"returns",
"the",
"logical",
"parent",
"directory",
"of",
"the",
"path",
".",
"This",
"is",
"different",
"than",
"path",
".",
"Split",
"()",
"in",
"that",
"we",
"want",
"dirname",
"(",
"foo",
"/",
"bar",
"/",
")",
"-",
">",
"foo",
"/",
"wh... | [
"func",
"dirname",
"(",
"path",
"string",
")",
"string",
"{",
"leading",
":=",
"\"",
"\"",
"\n",
"if",
"strings",
".",
"HasPrefix",
"(",
"path",
",",
"\"",
"\"",
")",
"{",
"leading",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
":=",
"strings",
".",... |
8,793 | all-8794 | [
"userGetCommandFunc",
"executes",
"the",
"user",
"get",
"command",
"."
] | [
"func",
"userGetCommandFunc",
"(",
"cmd",
"*",
"cobra",
".",
"Command",
",",
"args",
"[",
"]",
"string",
")",
"{",
"if",
"len",
"(",
"args",
")",
"!=",
"1",
"{",
"ExitWithError",
"(",
"ExitBadArgs",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
... |
8,794 | all-8795 | [
"WriteToRequest",
"writes",
"these",
"params",
"to",
"a",
"swagger",
"request"
] | [
"func",
"(",
"o",
"*",
"OrderVMByFilterParams",
")",
"WriteToRequest",
"(",
"r",
"runtime",
".",
"ClientRequest",
",",
"reg",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"if",
"err",
":=",
"r",
".",
"SetTimeout",
"(",
"o",
".",
"timeout",
")",
";",
"... |
8,795 | all-8796 | [
"return",
"the",
"result",
"that",
"has",
"the",
"route",
"defined",
"the",
"earliest"
] | [
"func",
"(",
"rt",
"*",
"router",
")",
"ofFirstDefinedRoute",
"(",
"matches",
"[",
"]",
"*",
"trie",
".",
"Match",
")",
"*",
"trie",
".",
"Match",
"{",
"minIndex",
":=",
"-",
"1",
"\n",
"<mask>",
"bestMatch",
"*",
"trie",
".",
"Match",
"\n\n",
"for",... |
8,796 | all-8797 | [
"ContainsSameLabelset",
"checks",
"if",
"a",
"vector",
"has",
"samples",
"with",
"the",
"same",
"labelset",
"Such",
"a",
"behavior",
"is",
"semantically",
"undefined",
"https",
":",
"//",
"github",
".",
"com",
"/",
"prometheus",
"/",
"prometheus",
"/",
"issues... | [
"func",
"(",
"vec",
"Vector",
")",
"ContainsSameLabelset",
"(",
")",
"bool",
"{",
"l",
":=",
"make",
"(",
"map",
"[",
"uint64",
"]",
"struct",
"{",
"}",
",",
"len",
"(",
"vec",
")",
")",
"\n",
"for",
"_",
",",
"s",
":=",
"range",
"vec",
"{",
"<... |
8,797 | all-8798 | [
"GetRequiredVersion",
"is",
"a",
"wrapper",
"around",
"gdk_gl_context_get_required_version",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"GLContext",
")",
"GetRequiredVersion",
"(",
")",
"(",
"MajorVersion",
",",
"MinorVersion",
")",
"{",
"var",
"major",
",",
"minor",
"int",
"\n",
"C",
".",
"gdk_gl_context_get_required_version",
"(",
"v",
".",
"native",
"(",
")",
",",... |
8,798 | all-8799 | [
"NewPublishMetricsRequest",
"creates",
"a",
"PublishMetricsRequest",
"object",
"."
] | [
"func",
"NewPublishMetricsRequest",
"(",
"metadata",
"*",
"MetricsMetadata",
",",
"taskMetrics",
"[",
"]",
"*",
"TaskMetric",
")",
"*",
"PublishMetricsRequest",
"{",
"return",
"&",
"PublishMetricsRequest",
"{",
"Metadata",
":",
"<mask>",
",",
"TaskMetrics",
":",
"... |
8,799 | all-8800 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ResetPageScaleFactorParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation16",
"(",
"&",
"w",
",",... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.