id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
1,700 | all-1701 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"EnvelopeType"
] | [
"func",
"(",
"e",
"EnvelopeType",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"ok",
":=",
"envelopeTypeMap",
"[",
"v",
"]",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
1,701 | all-1702 | [
"start",
"starts",
"the",
"ECS",
"Agent"
] | [
"func",
"(",
"agent",
"*",
"ecsAgent",
")",
"<mask>",
"(",
")",
"int",
"{",
"sighandlers",
".",
"StartDebugHandler",
"(",
")",
"\n\n",
"containerChangeEventStream",
":=",
"eventstream",
".",
"NewEventStream",
"(",
"containerChangeEventStreamName",
",",
"agent",
".... |
1,702 | all-1703 | [
"TimeSince",
"calls",
"time",
".",
"Since"
] | [
"func",
"(",
"g",
"GitOS",
")",
"TimeSince",
"(",
"t",
"<mask>",
".",
"Time",
")",
"time",
".",
"Duration",
"{",
"return",
"time",
".",
"Since",
"(",
"t",
")",
"\n",
"}"
] |
1,703 | all-1704 | [
"shouldCall",
"returns",
"true",
"if",
"Walk",
"should",
"call",
"the",
"callback",
"in",
"the",
"directory",
"rel",
"."
] | [
"func",
"shouldCall",
"(",
"rel",
"string",
",",
"<mask>",
"Mode",
",",
"updateRels",
"map",
"[",
"string",
"]",
"bool",
")",
"bool",
"{",
"return",
"mode",
"!=",
"UpdateDirsMode",
"||",
"updateRels",
"[",
"rel",
"]",
"\n",
"}"
] |
1,704 | all-1705 | [
"restore",
"recovers",
"the",
"state",
"machine",
"from",
"a",
"snapshot",
".",
"It",
"restores",
"the",
"log",
"and",
"the",
"configuration",
"of",
"state",
"machine",
"."
] | [
"func",
"(",
"r",
"*",
"raft",
")",
"restore",
"(",
"s",
"pb",
".",
"Snapshot",
")",
"bool",
"{",
"if",
"s",
".",
"Metadata",
".",
"Index",
"<=",
"r",
".",
"raftLog",
".",
"committed",
"{",
"return",
"false",
"\n",
"}",
"\n",
"if",
"r",
".",
"r... |
1,705 | all-1706 | [
"===",
"exp",
"(",
"Vector",
"ValueTypeVector",
")",
"Vector",
"==="
] | [
"func",
"funcExp",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"<mask>",
"{",
"return",
"simpleFunc",
"(",
"vals",
",",
"enh",
",",
"math",
".",
"Exp",
")",
"\n",
"}"
] |
1,706 | all-1707 | [
"Actual",
"calls",
"DO",
"firewall",
"Api",
"and",
"returns",
"the",
"actual",
"state",
"of",
"firewall",
"in",
"the",
"cloud",
"."
] | [
"func",
"(",
"r",
"*",
"Firewall",
")",
"Actual",
"(",
"immutable",
"*",
"cluster",
".",
"Cluster",
")",
"(",
"*",
"cluster",
".",
"Cluster",
",",
"cloud",
".",
"Resource",
",",
"error",
")",
"{",
"logger",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n\n... |
1,707 | all-1708 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkOverlay",
"."
] | [
"func",
"(",
"v",
"*",
"Overlay",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkOverlay",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"<mask>",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
"v",
... |
1,708 | all-1709 | [
"AddRow",
"-",
"Adds",
"row",
"to",
"the",
"table",
"."
] | [
"func",
"(",
"t",
"*",
"Table",
")",
"AddRow",
"(",
"row",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"{",
"newRow",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"string",
")",
"\n",
"for",
"_",
",",
"k",
":=",
"range",
"t",
".",... |
1,709 | all-1710 | [
"userChangePasswordCommandFunc",
"executes",
"the",
"user",
"passwd",
"command",
"."
] | [
"func",
"userChangePasswordCommandFunc",
"(",
"cmd",
"*",
"cobra",
".",
"Command",
",",
"args",
"[",
"]",
"string",
")",
"{",
"if",
"len",
"(",
"args",
")",
"!=",
"1",
"{",
"ExitWithError",
"(",
"ExitBadArgs",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\""... |
1,710 | all-1711 | [
"encryptionKey",
"returns",
"the",
"best",
"candidate",
"Key",
"for",
"encrypting",
"a",
"message",
"to",
"the",
"given",
"Entity",
"."
] | [
"func",
"(",
"e",
"*",
"Entity",
")",
"encryptionKey",
"(",
"now",
"time",
".",
"Time",
")",
"(",
"Key",
",",
"bool",
")",
"{",
"candidateSubkey",
":=",
"-",
"1",
"\n\n",
"for",
"i",
",",
"subkey",
":=",
"<mask>",
"e",
".",
"Subkeys",
"{",
"if",
... |
1,711 | all-1712 | [
"title",
":",
"deploy",
"diff",
"path",
":",
"/",
"apps",
"/",
"{",
"appname",
"}",
"/",
"diff",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":",
"200",
":",
"OK",
"400",
... | [
"func",
"diffDeploy",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"writer",
":=",
"tsuruIo",
".",
"NewKeepAliveWriter",
"(",
"w",
",",
"30",
"*",
"time",
".",
"Sec... |
1,712 | all-1713 | [
"WithPatterns",
"if",
"specified",
"only",
"requests",
"matching",
"any",
"of",
"these",
"patterns",
"will",
"produce",
"fetchRequested",
"event",
"and",
"will",
"be",
"paused",
"until",
"clients",
"response",
".",
"If",
"not",
"set",
"all",
"requests",
"will",
... | [
"func",
"(",
"p",
"EnableParams",
")",
"WithPatterns",
"(",
"patterns",
"[",
"]",
"*",
"RequestPattern",
")",
"*",
"EnableParams",
"{",
"p",
".",
"Patterns",
"=",
"patterns",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
1,713 | all-1714 | [
"MustSet",
"will",
"set",
"the",
"given",
"field",
"to",
"the",
"the",
"passed",
"valued",
".",
"MustSet",
"will",
"panic",
"if",
"no",
"field",
"has",
"been",
"found",
"."
] | [
"func",
"(",
"b",
"*",
"<mask>",
")",
"MustSet",
"(",
"name",
"string",
",",
"value",
"interface",
"{",
"}",
")",
"{",
"// find field",
"field",
":=",
"b",
".",
"meta",
".",
"Fields",
"[",
"name",
"]",
"\n",
"if",
"field",
"==",
"nil",
"{",
"panic"... |
1,714 | all-1715 | [
"SendRequestArr",
"sends",
"a",
"JSON",
"-",
"RPC",
"request",
"through",
"the",
"connection",
"with",
"array",
"params",
"and",
"auto",
"generated",
"request",
"ID",
".",
"resHandler",
"is",
"called",
"when",
"a",
"response",
"is",
"returned",
"."
] | [
"func",
"(",
"c",
"*",
"Conn",
")",
"SendRequestArr",
"(",
"method",
"string",
",",
"resHandler",
"func",
"(",
"<mask>",
"*",
"ResCtx",
")",
"error",
",",
"params",
"...",
"interface",
"{",
"}",
")",
"(",
"reqID",
"string",
",",
"err",
"error",
")",
... |
1,715 | all-1716 | [
"StoragePoolVolumeUpdate",
"updates",
"the",
"storage",
"volume",
"attached",
"to",
"a",
"given",
"storage",
"pool",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"StoragePoolVolumeUpdate",
"(",
"volumeName",
"string",
",",
"volumeType",
"int",
",",
"poolID",
"int64",
",",
"volumeDescription",
"string",
",",
"volumeConfig",
"map",
"[",
"string",
"]",
"string",
")",
"error",
"{",
... |
1,716 | all-1717 | [
"parse",
"hostname",
"to",
"namespace",
"(",
"domain",
")",
"and",
"service"
] | [
"func",
"(",
"p",
"*",
"AWSSDProvider",
")",
"parseHostname",
"(",
"hostname",
"string",
")",
"(",
"namespace",
"string",
",",
"service",
"string",
")",
"{",
"<mask>",
":=",
"strings",
".",
"Split",
"(",
"hostname",
",",
"\"",
"\"",
")",
"\n",
"service",... |
1,717 | all-1718 | [
"GetBgcolorOk",
"returns",
"a",
"tuple",
"with",
"the",
"Bgcolor",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetBgcolorOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Bgcolor",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"w",... |
1,718 | all-1719 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SimulatePressureNotificationParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory2",
"(",
"&",
"w",
... |
1,719 | all-1720 | [
"Subsystems",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockCgroup",
")",
"Subsystems",
"(",
")",
"[",
"]",
"cgroups",
".",
"Subsystem",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"ret0",
",",
"_",
":=",
"ret",
"[",
"0",
"]",
"... |
1,720 | all-1721 | [
"OnGossip",
"should",
"return",
"everything",
"new",
"I",
"ve",
"just",
"learnt",
".",
"surrogateGossiper",
"doesn",
"t",
"understand",
"the",
"content",
"of",
"messages",
"but",
"it",
"can",
"eliminate",
"simple",
"duplicates"
] | [
"func",
"(",
"s",
"*",
"surrogateGossiper",
")",
"OnGossip",
"(",
"update",
"[",
"]",
"byte",
")",
"(",
"GossipData",
",",
"error",
")",
"{",
"hash",
":=",
"fnv",
".",
"New64a",
"(",
")",
"\n",
"_",
",",
"_",
"=",
"hash",
".",
"Write",
"(",
"upda... |
1,721 | all-1722 | [
"subresourceListString",
"takes",
"a",
"list",
"of",
"sub",
"-",
"resources",
"and",
"pretty",
"-",
"prints",
"the",
"key",
"and",
"device",
"address",
"."
] | [
"func",
"subresourceListString",
"(",
"data",
"[",
"]",
"interface",
"{",
"}",
")",
"string",
"{",
"var",
"strs",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"v",
":=",
"<mask>",
"data",
"{",
"if",
"v",
"==",
"nil",
"{",
"strs",
"=",
"append",
"(",
... |
1,722 | all-1723 | [
"Create",
"a",
"bundle",
"whose",
"operations",
"are",
"fed",
"a",
"context",
"inheriting",
"from",
"the",
"given",
"parent",
"context",
"which",
"must",
"be",
"non",
"-",
"nil",
".",
"The",
"bundle",
"must",
"eventually",
"be",
"joined",
"with",
"Join",
"... | [
"func",
"NewBundle",
"(",
"<mask>",
"context",
".",
"Context",
")",
"*",
"Bundle",
"{",
"b",
":=",
"&",
"Bundle",
"{",
"}",
"\n",
"b",
".",
"context",
",",
"b",
".",
"cancel",
"=",
"context",
".",
"WithCancel",
"(",
"parent",
")",
"\n\n",
"return",
... |
1,723 | all-1724 | [
"getRemotePeerURLs",
"returns",
"peer",
"urls",
"of",
"remote",
"members",
"in",
"the",
"cluster",
".",
"The",
"returned",
"list",
"is",
"sorted",
"in",
"ascending",
"lexicographical",
"order",
"."
] | [
"func",
"getRemotePeerURLs",
"(",
"cl",
"*",
"membership",
".",
"RaftCluster",
",",
"<mask>",
"string",
")",
"[",
"]",
"string",
"{",
"us",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"0",
")",
"\n",
"for",
"_",
",",
"m",
":=",
"range",
"cl",
".",
... |
1,724 | all-1725 | [
"Watch",
"posts",
"a",
"watch",
"request",
"to",
"run",
"()",
"and",
"waits",
"for",
"a",
"new",
"watcher",
"channel"
] | [
"func",
"(",
"w",
"*",
"watcher",
")",
"Watch",
"(",
"ctx",
"context",
".",
"Context",
",",
"key",
"string",
",",
"opts",
"...",
"OpOption",
")",
"WatchChan",
"{",
"ow",
":=",
"opWatch",
"(",
"key",
",",
"opts",
"...",
")",
"\n\n",
"var",
"filters",
... |
1,725 | all-1726 | [
"Skip",
"creates",
"a",
"reusable",
"stream",
"which",
"will",
"skip",
"the",
"first",
"n",
"elements",
"before",
"iterating",
"over",
"the",
"rest",
"of",
"the",
"elements",
"in",
"an",
"Enumerable",
"."
] | [
"func",
"Skip",
"(",
"<mask>",
"Enumerable",
",",
"n",
"uint",
")",
"Enumerable",
"{",
"return",
"skipper",
"{",
"original",
":",
"subject",
",",
"skipCount",
":",
"n",
",",
"}",
"\n",
"}"
] |
1,726 | all-1727 | [
"UpdateOrg",
"updates",
"all",
"repos",
"in",
"the",
"org",
"with",
"the",
"specified",
"defaults"
] | [
"func",
"(",
"p",
"*",
"protector",
")",
"UpdateOrg",
"(",
"orgName",
"string",
",",
"org",
"config",
".",
"Org",
")",
"error",
"{",
"var",
"repos",
"[",
"]",
"string",
"\n",
"if",
"org",
".",
"Protect",
"!=",
"nil",
"{",
"// Strongly opinionated org, co... |
1,727 | all-1728 | [
"SetThemePath",
"changes",
"the",
"directory",
"that",
"contains",
"themes",
".",
"If",
"new",
"path",
"does",
"not",
"equal",
"old",
"one",
"theme",
"list",
"reloads"
] | [
"func",
"SetThemePath",
"(",
"path",
"string",
")",
"{",
"if",
"path",
"==",
"themeManager",
".",
"themePath",
"{",
"return",
"\n",
"}",
"\n\n",
"themeManager",
".",
"themePath",
"=",
"<mask>",
"\n",
"ThemeReset",
"(",
")",
"\n",
"}"
] |
1,728 | all-1729 | [
"removePeer",
"remove",
"peer",
"at",
"specific",
"index",
"."
] | [
"func",
"(",
"ph",
"*",
"peerHeap",
")",
"removePeer",
"(",
"peerScore",
"*",
"peerScore",
")",
"{",
"heap",
".",
"Remove",
"(",
"ph",
",",
"peerScore",
".",
"<mask>",
")",
"\n",
"}"
] |
1,729 | all-1730 | [
"filterByAnnotations",
"filters",
"a",
"list",
"of",
"configs",
"by",
"a",
"given",
"annotation",
"selector",
"."
] | [
"func",
"(",
"sc",
"*",
"gatewaySource",
")",
"filterByAnnotations",
"(",
"configs",
"[",
"]",
"istiomodel",
".",
"Config",
")",
"(",
"[",
"]",
"istiomodel",
".",
"Config",
",",
"error",
")",
"{",
"labelSelector",
",",
"err",
":=",
"metav1",
".",
"ParseT... |
1,730 | all-1731 | [
"ListRequests",
"lists",
"all",
"requests"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListRequests",
"(",
")",
"(",
"*",
"Requests",
",",
"error",
")",
"{",
"url",
":=",
"\"",
"\"",
"+",
"`?depth=`",
"+",
"c",
".",
"client",
".",
"depth",
"+",
"`&pretty=`",
"+",
"strconv",
".",
"FormatBool",
"(... |
1,731 | all-1732 | [
"Do",
"executes",
"Profiler",
".",
"getBestEffortCoverage",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"result",
"-",
"Coverage",
"data",
"for",
"the",
"current",
"isolate",
"."
] | [
"func",
"(",
"p",
"*",
"GetBestEffortCoverageParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"result",
"[",
"]",
"*",
"ScriptCoverage",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"<mask>",
"GetBestEffortCoverageReturns",
"\n",
"... |
1,732 | all-1733 | [
"newProblems",
"compares",
"the",
"list",
"of",
"problems",
"with",
"the",
"list",
"of",
"past",
"comments",
"on",
"the",
"PR",
"to",
"decide",
"which",
"are",
"new",
"."
] | [
"func",
"newProblems",
"(",
"cs",
"[",
"]",
"github",
".",
"ReviewComment",
",",
"ps",
"map",
"[",
"string",
"]",
"map",
"[",
"int",
"]",
"lint",
".",
"Problem",
")",
"map",
"[",
"string",
"]",
"map",
"[",
"int",
"]",
"lint",
".",
"Problem",
"{",
... |
1,733 | all-1734 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetRecordingParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice2",
"(",
... |
1,734 | all-1735 | [
"Get",
"CN",
"of",
"Broker",
"associated",
"with",
"submission_url",
"to",
"satisfy",
"no",
"IP",
"SANS",
"in",
"certs"
] | [
"func",
"(",
"cm",
"*",
"CheckManager",
")",
"getBrokerCN",
"(",
"broker",
"*",
"api",
".",
"Broker",
",",
"submissionURL",
"api",
".",
"URLType",
")",
"(",
"string",
",",
"error",
")",
"{",
"u",
",",
"err",
":=",
"<mask>",
".",
"Parse",
"(",
"string... |
1,735 | all-1736 | [
"Put",
"adds",
"a",
"slice",
"to",
"the",
"right",
"bucket",
"in",
"the",
"pool",
"."
] | [
"func",
"(",
"p",
"*",
"Pool",
")",
"Put",
"(",
"s",
"interface",
"{",
"}",
")",
"{",
"slice",
":=",
"reflect",
".",
"ValueOf",
"(",
"s",
")",
"\n\n",
"if",
"slice",
".",
"Kind",
"(",
")",
"!=",
"reflect",
".",
"Slice",
"{",
"panic",
"(",
"fmt"... |
1,736 | all-1737 | [
"Debug",
"records",
"the",
"log",
"with",
"debug",
"level"
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Debug",
"(",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"Output",
"(",
"2",
",",
"LevelDebug",
",",
"fmt",
".",
"Sprint",
"(",
"args",
"...",
")",
")",
"\n",
"}"
] |
1,737 | all-1738 | [
"HasTileDef",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"HasTileDef",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"TileDef",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
1,738 | all-1739 | [
"CVAPI",
"(",
"void",
")",
"cvCvtColor",
"(",
"const",
"CvArr",
"*",
"src",
"CvArr",
"*",
"dst",
"int",
"code",
")",
";",
"/",
"*",
"Runs",
"canny",
"edge",
"detector"
] | [
"func",
"Canny",
"(",
"<mask>",
",",
"edges",
"*",
"IplImage",
",",
"threshold1",
",",
"threshold2",
"float64",
",",
"aperture_size",
"int",
")",
"{",
"C",
".",
"cvCanny",
"(",
"unsafe",
".",
"Pointer",
"(",
"image",
")",
",",
"unsafe",
".",
"Pointer",
... |
1,739 | all-1740 | [
"Parameter",
"clientBuffer",
"has",
"type",
"C",
".",
"GLeglClientBufferEXT",
"."
] | [
"func",
"BufferStorageExternalEXT",
"(",
"target",
"uint32",
",",
"offset",
"int",
",",
"size",
"int",
",",
"clientBuffer",
"unsafe",
".",
"Pointer",
",",
"flags",
"uint32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpBufferStorageExternalEXT",
",",
"5",
","... |
1,740 | all-1741 | [
"UnmarshalYAML",
"implements",
"the",
"yaml",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"interface",
"{",
"}",
")",
"error",
")",
"error",
"{",
"*",
"c",
"=",
"DefaultRelabelConfig",
"\n",
"type",
"plain",
"Config",
"\n",
"if",
"err",
":=",
"unmarshal",
... |
1,741 | all-1742 | [
"expandStorageDrsOptionSpec",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"StorageDrsOptionSpec",
"."
] | [
"func",
"expandStorageDrsOptionSpec",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"[",
"]",
"types",
".",
"StorageDrsOptionSpec",
"{",
"var",
"opts",
"[",
"]",
"types",
".",
"StorageDrsOptionSpec",
"\n\n",
"m",
":=",
"d",
".",
"Get",
"(",
"\"",
"\""... |
1,742 | all-1743 | [
"Records",
"calls",
"AWS",
"SD",
"API",
"and",
"expects",
"AWS",
"SD",
"provider",
"to",
"provider",
"Owner",
"/",
"Resource",
"information",
"as",
"a",
"serialized",
"value",
"in",
"the",
"AWSSDDescriptionLabel",
"value",
"in",
"the",
"Labels",
"map"
] | [
"func",
"(",
"sdr",
"*",
"AWSSDRegistry",
")",
"Records",
"(",
")",
"(",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"error",
")",
"{",
"records",
",",
"err",
":=",
"sdr",
".",
"provider",
".",
"Records",
"(",
")",
"\n",
"if",
"err",
"!=",
"... |
1,743 | all-1744 | [
"WithButton",
"mouse",
"button",
"(",
"default",
":",
"none",
")",
"."
] | [
"func",
"(",
"p",
"DispatchMouseEventParams",
")",
"WithButton",
"(",
"<mask>",
"ButtonType",
")",
"*",
"DispatchMouseEventParams",
"{",
"p",
".",
"Button",
"=",
"button",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
1,744 | all-1745 | [
"GetNameOk",
"returns",
"a",
"tuple",
"with",
"the",
"Name",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"u",
"*",
"<mask>",
")",
"GetNameOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"u",
"==",
"nil",
"||",
"u",
".",
"Name",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"u",
".",... |
1,745 | all-1746 | [
"NetworkConfigGet",
"returns",
"the",
"config",
"map",
"of",
"the",
"network",
"with",
"the",
"given",
"ID",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"NetworkConfigGet",
"(",
"id",
"int64",
")",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"var",
"key",
",",
"value",
"string",
"\n",
"<mask>",
":=",
"`\n SELECT\n key, value\n ... |
1,746 | all-1747 | [
"AddColorStopRGB",
"is",
"a",
"wrapper",
"around",
"cairo_pattern_add_color_stop_rgb",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Pattern",
")",
"AddColorStopRGB",
"(",
"offset",
",",
"red",
",",
"green",
",",
"blue",
"float64",
")",
"error",
"{",
"C",
".",
"cairo_pattern_add_color_stop_rgb",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"double",
"(",... |
1,747 | all-1748 | [
"ForwardCursorPositions",
"is",
"a",
"wrapper",
"around",
"gtk_text_iter_forward_cursor_positions",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextIter",
")",
"ForwardCursorPositions",
"(",
"v1",
"int",
")",
"bool",
"{",
"<mask>",
"gobool",
"(",
"C",
".",
"gtk_text_iter_forward_cursor_positions",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"v1",
")",
... |
1,748 | all-1749 | [
"CheckMetrics",
"performs",
"a",
"linting",
"pass",
"on",
"input",
"metrics",
"."
] | [
"func",
"CheckMetrics",
"(",
")",
"int",
"{",
"l",
":=",
"promlint",
".",
"New",
"(",
"<mask>",
".",
"Stdin",
")",
"\n",
"problems",
",",
"err",
":=",
"l",
".",
"Lint",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"fmt",
".",
"Fprintln",
"(",
... |
1,749 | all-1750 | [
"expandVmwareUplinkPortTeamingPolicy",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"VmwareUplinkPortTeamingPolicy",
"."
] | [
"func",
"expandVmwareUplinkPortTeamingPolicy",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"*",
"types",
".",
"VmwareUplinkPortTeamingPolicy",
"{",
"obj",
":=",
"&",
"types",
".",
"VmwareUplinkPortTeamingPolicy",
"{",
"<mask>",
":",
"structure",
".",
"GetStri... |
1,750 | all-1751 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StartScreencastParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage5",
"(",
"&",
"w",
",",
"v",
")"... |
1,751 | all-1752 | [
"simultaneously",
"specify",
"storage",
"for",
"all",
"levels",
"of",
"a",
"three",
"-",
"dimensional",
"two",
"-",
"dimensional",
"array",
"or",
"cube",
"-",
"map",
"array",
"texture"
] | [
"func",
"TexStorage3D",
"(",
"target",
"uint32",
",",
"levels",
"int32",
",",
"internalformat",
"uint32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"<mask>",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpTexStorage3D",
",",
"6",
",",
"ui... |
1,752 | all-1753 | [
"Update",
"changes",
"informations",
"of",
"the",
"application",
"."
] | [
"func",
"(",
"app",
"*",
"App",
")",
"Update",
"(",
"updateData",
"App",
",",
"w",
"io",
".",
"Writer",
")",
"(",
"err",
"error",
")",
"{",
"description",
":=",
"updateData",
".",
"Description",
"\n",
"planName",
":=",
"updateData",
".",
"Plan",
".",
... |
1,753 | all-1754 | [
"NewCachedLoader",
"creates",
"a",
"Loader",
"that",
"will",
"cache",
"the",
"provided",
"namespace",
"on",
"initialization",
"and",
"return",
"data",
"from",
"that",
"cache",
"on",
"Get"
] | [
"func",
"NewCachedLoader",
"(",
"namespace",
"string",
",",
"consulAddr",
"string",
")",
"(",
"config",
".",
"Loader",
",",
"error",
")",
"{",
"config",
":=",
"api",
".",
"DefaultConfig",
"(",
")",
"\n",
"config",
".",
"<mask>",
"=",
"consulAddr",
"\n",
... |
1,754 | all-1755 | [
"Consume",
"reads",
"the",
"buffer",
"and",
"write",
"to",
"a",
"listener",
"channel"
] | [
"func",
"(",
"buffer",
"*",
"InfiniteBuffer",
")",
"Consume",
"(",
"in",
"chan",
"<-",
"*",
"events",
".",
"Message",
")",
"{",
"for",
"{",
"buffer",
".",
"lock",
".",
"Lock",
"(",
")",
"\n\n",
"if",
"len",
"(",
"buffer",
".",
"events",
")",
"==",
... |
1,755 | all-1756 | [
"Err",
"return",
"a",
"controller",
"error"
] | [
"func",
"(",
"m",
"*",
"Model",
")",
"Err",
"(",
"errno",
"int",
",",
"message",
"string",
")",
"error",
"{",
"return",
"validationError",
".",
"New",
"(",
"<mask>",
")",
"\n",
"}"
] |
1,756 | all-1757 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"MapUint16Option",
")",
"<mask>",
"(",
"value",
"string",
")",
"error",
"{",
"parts",
":=",
"stringMapRegex",
".",
"Split",
"(",
"value",
",",
"2",
")",
"\n",
"if",
"len",
"(",
"parts",
")",
"!=",
"2",
"{",
"return",
"fmt",
"... |
1,757 | all-1758 | [
"newImageSource",
"creates",
"a",
"new",
"ImageSource",
"for",
"the",
"specified",
"reference",
".",
"The",
"caller",
"must",
"call",
".",
"Close",
"()",
"on",
"the",
"returned",
"ImageSource",
"."
] | [
"func",
"newImageSource",
"(",
"sys",
"*",
"types",
".",
"SystemContext",
",",
"ref",
"openshiftReference",
")",
"(",
"types",
".",
"ImageSource",
",",
"error",
")",
"{",
"client",
",",
"err",
":=",
"newOpenshiftClient",
"(",
"ref",
")",
"\n",
"if",
"err",... |
1,758 | all-1759 | [
"GetTextOk",
"returns",
"a",
"tuple",
"with",
"the",
"Text",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetTextOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Text",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",... |
1,759 | all-1760 | [
"Replace",
"the",
"current",
"configuration",
"with",
"the",
"given",
"values",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"Replace",
"(",
"values",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"return",
"c",
".",
"update",
"(",
"<mask>",
")",
"\n",
"}"
] |
1,760 | all-1761 | [
"RegisterSourceOrDie",
"registers",
"a",
"source",
"of",
"auto",
"-",
"filed",
"issues",
"."
] | [
"func",
"RegisterSourceOrDie",
"(",
"name",
"string",
",",
"src",
"IssueSource",
")",
"{",
"if",
"_",
",",
"ok",
":=",
"sources",
"[",
"name",
"]",
";",
"ok",
"{",
"glog",
".",
"Fatalf",
"(",
"\"",
"\"",
",",
"<mask>",
")",
"\n",
"}",
"\n",
"source... |
1,761 | all-1762 | [
"Using",
"the",
"EZ",
"API",
"posts",
"a",
"value",
"to",
"a",
"stat",
"."
] | [
"func",
"(",
"r",
"*",
"BasicReporter",
")",
"PostEZValue",
"(",
"statName",
",",
"ezkey",
"string",
",",
"<mask>",
"float64",
")",
"error",
"{",
"r",
".",
"add",
"(",
"newEZStatValue",
"(",
"statName",
",",
"ezkey",
",",
"value",
")",
")",
"\n",
"retu... |
1,762 | all-1763 | [
"Suspend",
"suspends",
"a",
"virtual",
"machine",
".",
"Remarks",
":",
"*",
"If",
"the",
"virtual",
"machine",
"is",
"not",
"powered",
"on",
"when",
"you",
"call",
"this",
"function",
"the",
"function",
"returns",
"the",
"error",
"VIX_E_VM_NOT_RUNNING",
".",
... | [
"func",
"(",
"v",
"*",
"VM",
")",
"Suspend",
"(",
")",
"error",
"{",
"var",
"jobHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"var",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"\n\n",
"jobHandle",
"=",
"C",
"... |
1,763 | all-1764 | [
"GetIdOk",
"returns",
"a",
"tuple",
"with",
"the",
"Id",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsUser",
")",
"GetIdOk",
"(",
")",
"(",
"int",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"0",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"... |
1,764 | all-1765 | [
"DeleteFile",
"deletes",
"a",
"regular",
"file",
"or",
"directory",
"(",
"along",
"with",
"its",
"children",
")",
"."
] | [
"func",
"(",
"h",
"*",
"dbHashTree",
")",
"DeleteFile",
"(",
"path",
"string",
")",
"error",
"{",
"path",
"=",
"clean",
"(",
"path",
")",
"\n\n",
"// Delete root means delete all files",
"if",
"path",
"==",
"\"",
"\"",
"{",
"path",
"=",
"\"",
"\"",
"\n",... |
1,765 | all-1766 | [
"ExerciseUpdate",
"is",
"a",
"convenience",
"for",
"exercising",
"a",
"particular",
"update",
"of",
"a",
"schema",
".",
"It",
"first",
"creates",
"an",
"in",
"-",
"memory",
"SQLite",
"database",
"then",
"it",
"applies",
"all",
"updates",
"up",
"to",
"the",
... | [
"func",
"(",
"s",
"*",
"Schema",
")",
"ExerciseUpdate",
"(",
"version",
"int",
",",
"hook",
"func",
"(",
"*",
"sql",
".",
"DB",
")",
")",
"(",
"*",
"sql",
".",
"DB",
",",
"error",
")",
"{",
"// Create an in-memory database.",
"<mask>",
",",
"err",
":... |
1,766 | all-1767 | [
"/",
"*",
"InitializeFromPath",
"takes",
"a",
"path",
"treats",
"it",
"as",
"a",
"file",
"and",
"scans",
"it",
"for",
"an",
"ini",
"configuration",
"."
] | [
"func",
"(",
"config",
"*",
"Config",
")",
"InitializeFromPath",
"(",
"path",
"string",
")",
"error",
"{",
"f",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"<mask>",
")",
"\n\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"def... |
1,767 | all-1768 | [
"String",
"returns",
"the",
"name",
"of",
"e"
] | [
"func",
"(",
"e",
"CryptoKeyType",
")",
"String",
"(",
")",
"string",
"{",
"<mask>",
",",
"_",
":=",
"cryptoKeyTypeMap",
"[",
"int32",
"(",
"e",
")",
"]",
"\n",
"return",
"name",
"\n",
"}"
] |
1,768 | all-1769 | [
"syncServersLoop",
"loops",
"while",
"the",
"cluster",
"is",
"alive",
"to",
"keep",
"its",
"idea",
"of",
"the",
"server",
"topology",
"up",
"-",
"to",
"-",
"date",
".",
"It",
"must",
"be",
"called",
"just",
"once",
"from",
"newCluster",
".",
"The",
"loop... | [
"func",
"(",
"cluster",
"*",
"mongoCluster",
")",
"syncServersLoop",
"(",
")",
"{",
"for",
"{",
"debugf",
"(",
"\"",
"\"",
",",
"cluster",
")",
"\n\n",
"cluster",
".",
"Lock",
"(",
")",
"\n",
"if",
"cluster",
".",
"references",
"==",
"0",
"{",
"clust... |
1,769 | all-1770 | [
"SetPullStoppedAt",
"sets",
"the",
"task",
"pullstoppedat",
"timestamp"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"SetPullStoppedAt",
"(",
"timestamp",
"time",
".",
"Time",
")",
"{",
"task",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"task",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"task",
".",
"PullStoppedAt... |
1,770 | all-1771 | [
"GetRunCheck",
"returns",
"the",
"RunCheck",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationSlackRequest",
")",
"GetRunCheck",
"(",
")",
"bool",
"{",
"if",
"i",
"==",
"nil",
"||",
"i",
".",
"RunCheck",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"i",
".",
"RunCheck",
"\n",
"}"
] |
1,771 | all-1772 | [
"NewLocalClient",
"returns",
"a",
"Client",
"that",
"stores",
"data",
"on",
"the",
"local",
"file",
"system"
] | [
"func",
"NewLocalClient",
"(",
"<mask>",
"string",
")",
"(",
"Client",
",",
"error",
")",
"{",
"if",
"err",
":=",
"os",
".",
"MkdirAll",
"(",
"root",
",",
"0755",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"r... |
1,772 | all-1773 | [
"SetMaxRetryCount",
"sets",
"the",
"maximum",
"number",
"of",
"reconnnection",
"attemps",
"that",
"methods",
"on",
"c",
"(",
"e",
".",
"g",
".",
"Firehose",
"Stream",
"TailingLogs",
")",
"will",
"make",
"before",
"failing",
".",
"Defaults",
"to",
"DefaultMaxRe... | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"SetMaxRetryCount",
"(",
"count",
"int",
")",
"{",
"atomic",
".",
"StoreInt64",
"(",
"&",
"c",
".",
"maxRetryCount",
",",
"int64",
"(",
"count",
")",
")",
"\n",
"}"
] |
1,773 | all-1774 | [
"storeV3EndpointIDToContainerNameUnsafe",
"adds",
"v3EndpointID",
"-",
">",
"dockerID",
"mapping",
"to",
"state"
] | [
"func",
"(",
"state",
"*",
"DockerTaskEngineState",
")",
"storeV3EndpointIDToDockerIDUnsafe",
"(",
"v3EndpointID",
",",
"dockerID",
"string",
")",
"{",
"<mask>",
".",
"v3EndpointIDToDockerID",
"[",
"v3EndpointID",
"]",
"=",
"dockerID",
"\n",
"}"
] |
1,774 | all-1775 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"SignedExchangeErrorField",
")",
"MarshalEasyJSON",
"(",
"<mask>",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"out",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
1,775 | all-1776 | [
"GetPriority",
"returns",
"the",
"Priority",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"GetPriority",
"(",
")",
"string",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"Priority",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"e",
".",
"Priority",
"\n",
"}"
] |
1,776 | all-1777 | [
"GetWidthOk",
"returns",
"a",
"tuple",
"with",
"the",
"Width",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefRequestStyle",
")",
"GetWidthOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Width",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*... |
1,777 | all-1778 | [
"Metric",
"returns",
"a",
"metric",
"object",
"with",
"metrics",
"filled",
"in"
] | [
"func",
"(",
"r",
"*",
"Ranch",
")",
"Metric",
"(",
"rtype",
"string",
")",
"(",
"common",
".",
"Metric",
",",
"error",
")",
"{",
"metric",
":=",
"common",
".",
"Metric",
"{",
"Type",
":",
"rtype",
",",
"Current",
":",
"map",
"[",
"string",
"]",
... |
1,778 | all-1779 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"BeginFrameParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental5",
"(",
"&",
"w",
",",
... |
1,779 | all-1780 | [
"Descriptions",
"returns",
"descriptions",
"for",
"all",
"known",
"peers",
"."
] | [
"func",
"(",
"peers",
"*",
"Peers",
")",
"Descriptions",
"(",
")",
"[",
"]",
"PeerDescription",
"{",
"peers",
".",
"RLock",
"(",
")",
"\n",
"defer",
"peers",
".",
"RUnlock",
"(",
")",
"\n",
"descriptions",
":=",
"make",
"(",
"[",
"]",
"PeerDescription"... |
1,780 | all-1781 | [
"NewPage",
"opens",
"a",
"Page",
"using",
"the",
"provided",
"WebDriver",
"URL",
".",
"This",
"method",
"takes",
"the",
"same",
"Options",
"as",
"*",
"WebDriver",
".",
"NewPage",
".",
"Unlike",
"*",
"WebDriver",
".",
"NewPage",
"this",
"method",
"will",
"r... | [
"func",
"NewPage",
"(",
"url",
"string",
",",
"<mask>",
"...",
"Option",
")",
"(",
"*",
"Page",
",",
"error",
")",
"{",
"pageOptions",
":=",
"config",
"{",
"}",
".",
"Merge",
"(",
"options",
")",
"\n",
"session",
",",
"err",
":=",
"api",
".",
"Open... |
1,781 | all-1782 | [
"export",
"goPrintSettings"
] | [
"func",
"goPrintSettings",
"(",
"key",
"*",
"C",
".",
"gchar",
",",
"value",
"*",
"C",
".",
"gchar",
",",
"userData",
"C",
".",
"gpointer",
")",
"{",
"<mask>",
":=",
"int",
"(",
"uintptr",
"(",
"userData",
")",
")",
"\n\n",
"printSettingsCallbackRegistry... |
1,782 | all-1783 | [
"findVirtualDeviceInListControllerSelectFunc",
"returns",
"a",
"function",
"that",
"can",
"be",
"used",
"with",
"VirtualDeviceList",
".",
"Select",
"to",
"locate",
"a",
"controller",
"device",
"based",
"on",
"the",
"criteria",
"that",
"we",
"have",
"laid",
"out",
... | [
"func",
"findVirtualDeviceInListControllerSelectFunc",
"(",
"ct",
"string",
",",
"cb",
"int",
")",
"func",
"(",
"types",
".",
"BaseVirtualDevice",
")",
"bool",
"{",
"return",
"func",
"(",
"device",
"types",
".",
"BaseVirtualDevice",
")",
"bool",
"{",
"switch",
... |
1,783 | all-1784 | [
"LoadAccount",
"loads",
"the",
"account",
"state",
"from",
"horizon",
".",
"err",
"can",
"be",
"either",
"error",
"object",
"or",
"horizon",
".",
"Error",
"object",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"LoadAccount",
"(",
"accountID",
"string",
")",
"(",
"account",
"Account",
",",
"err",
"error",
")",
"{",
"c",
".",
"initHTTPClient",
"(",
")",
"\n",
"resp",
",",
"err",
":=",
"c",
".",
"Client",
".",
"Get",
"(... |
1,784 | all-1785 | [
"Register",
"-",
"Registers",
"a",
"remote",
"handler",
"to",
"this",
"event",
"bus",
"for",
"a",
"remote",
"subscribe",
"-",
"a",
"given",
"client",
"address",
"only",
"needs",
"to",
"subscribe",
"once",
"event",
"will",
"be",
"republished",
"in",
"local",
... | [
"func",
"(",
"service",
"*",
"ServerService",
")",
"Register",
"(",
"arg",
"*",
"SubscribeArg",
",",
"success",
"*",
"bool",
")",
"error",
"{",
"subscribers",
":=",
"service",
".",
"server",
".",
"subscribers",
"\n",
"if",
"!",
"service",
".",
"server",
... |
1,785 | all-1786 | [
"specify",
"a",
"two",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"TexSubImage2D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"format",
"uint32",
",",
"xtype",
"uint32",
",",
"pixels",
"unsafe",
".",
"Pointe... |
1,786 | all-1787 | [
"GetOrientation",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_orientation",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"GetOrientation",
"(",
")",
"PageOrientation",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_orientation",
"(",
"ps",
".",
"native",
"(",
")",
")",
"\n",
"return",
"PageOrientation",
"(",
"c",
")",
"\n",
... |
1,787 | all-1788 | [
"AddFilter",
"will",
"enforce",
"the",
"authorization",
"by",
"adding",
"the",
"passed",
"filter",
"to",
"the",
"Filter",
"query",
"of",
"the",
"context",
".",
"It",
"should",
"be",
"used",
"if",
"the",
"candidate",
"is",
"allowed",
"to",
"access",
"the",
... | [
"func",
"AddFilter",
"(",
"filter",
"bson",
".",
"M",
")",
"*",
"Enforcer",
"{",
"return",
"E",
"(",
"\"",
"\"",
",",
"fire",
".",
"Except",
"(",
"fire",
".",
"Create",
",",
"fire",
".",
"CollectionAction",
")",
",",
"func",
"(",
"ctx",
"*",
"fire"... |
1,788 | all-1789 | [
"GamepadButtonPressDuration",
"returns",
"how",
"long",
"the",
"gamepad",
"button",
"of",
"the",
"gamepad",
"id",
"is",
"pressed",
"in",
"frames",
".",
"GamepadButtonPressDuration",
"is",
"concurrent",
"safe",
"."
] | [
"func",
"GamepadButtonPressDuration",
"(",
"id",
"int",
",",
"button",
"ebiten",
".",
"GamepadButton",
")",
"int",
"{",
"theInputState",
".",
"m",
".",
"RLock",
"(",
")",
"\n",
"s",
":=",
"0",
"\n",
"if",
"_",
",",
"ok",
":=",
"theInputState",
".",
"ga... |
1,789 | all-1790 | [
"upload",
"the",
"result",
"downloaded",
"from",
"path",
"into",
"project",
"."
] | [
"func",
"upload",
"(",
"rsClient",
"*",
"resultstore",
".",
"Client",
",",
"inv",
"resultstore",
".",
"Invocation",
",",
"target",
"resultstore",
".",
"Target",
",",
"test",
"resultstore",
".",
"Test",
")",
"(",
"string",
",",
"error",
")",
"{",
"targetID"... |
1,790 | all-1791 | [
"SetTiming",
"sets",
"the",
"timing",
"of",
"an",
"animation",
"node",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"Animation#method",
"-",
"setTiming",
"parameters",
"... | [
"func",
"SetTiming",
"(",
"animationID",
"string",
",",
"duration",
"float64",
",",
"delay",
"float64",
")",
"*",
"SetTimingParams",
"{",
"return",
"&",
"SetTimingParams",
"{",
"AnimationID",
":",
"animationID",
",",
"Duration",
":",
"duration",
",",
"Delay",
... |
1,791 | all-1792 | [
"handleMessages",
"processes",
"payload",
"messages",
"in",
"the",
"payload",
"message",
"buffer",
"in",
"-",
"order"
] | [
"func",
"(",
"payloadHandler",
"*",
"payloadRequestHandler",
")",
"handleMessages",
"(",
")",
"{",
"for",
"{",
"<mask>",
"{",
"case",
"payload",
":=",
"<-",
"payloadHandler",
".",
"messageBuffer",
":",
"payloadHandler",
".",
"handleSingleMessage",
"(",
"payload",
... |
1,792 | all-1793 | [
"ArmForSwitch",
"returns",
"which",
"field",
"name",
"should",
"be",
"used",
"for",
"storing",
"the",
"value",
"for",
"an",
"instance",
"of",
"CreateAccountResult"
] | [
"func",
"(",
"u",
"CreateAccountResult",
")",
"ArmForSwitch",
"(",
"sw",
"int32",
")",
"(",
"string",
",",
"bool",
")",
"{",
"switch",
"CreateAccountResultCode",
"(",
"sw",
")",
"{",
"case",
"CreateAccountResultCodeCreateAccountSuccess",
":",
"return",
"\"",
"\"... |
1,793 | all-1794 | [
"Handle",
"register",
"handler"
] | [
"func",
"(",
"mux",
"*",
"LoggingServeMux",
")",
"Handle",
"(",
"pattern",
"string",
",",
"handler",
"http",
".",
"Handler",
")",
"{",
"var",
"log",
"=",
"logrus",
".",
"New",
"(",
")",
"\n\n",
"logFile",
",",
"err",
":=",
"os",
".",
"OpenFile",
"(",... |
1,794 | all-1795 | [
"convertSuiteMeta",
"converts",
"a",
"junit",
"result",
"in",
"gcs",
"to",
"a",
"ResultStore",
"Suite",
"."
] | [
"func",
"convertSuiteMeta",
"(",
"suiteMeta",
"gcs",
".",
"SuitesMeta",
")",
"resultstore",
".",
"Suite",
"{",
"out",
":=",
"resultstore",
".",
"Suite",
"{",
"Name",
":",
"path",
".",
"Base",
"(",
"suiteMeta",
".",
"Path",
")",
",",
"Files",
":",
"[",
... |
1,795 | all-1796 | [
"SnapshotByName",
"returns",
"a",
"Snapshot",
"object",
"matching",
"the",
"given",
"name",
".",
"Parameters",
":",
"name",
":",
"Identifies",
"a",
"snapshot",
"name",
".",
"Remarks",
":",
"*",
"When",
"the",
"snapshot",
"name",
"is",
"a",
"duplicate",
"it",... | [
"func",
"(",
"v",
"*",
"VM",
")",
"SnapshotByName",
"(",
"name",
"string",
")",
"(",
"*",
"Snapshot",
",",
"error",
")",
"{",
"<mask>",
"snapshotHandle",
"C",
".",
"VixHandle",
"=",
"C",
".",
"VIX_INVALID_HANDLE",
"\n",
"var",
"err",
"C",
".",
"VixErro... |
1,796 | all-1797 | [
"MarkOffset",
"implements",
"PartitionConsumer"
] | [
"func",
"(",
"c",
"*",
"partitionConsumer",
")",
"MarkOffset",
"(",
"offset",
"int64",
",",
"metadata",
"string",
")",
"{",
"c",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"if",
"next",
":=",
"offset",
"+",
"1",
";",
"<mask>",
">",
"c",
".",
"state",
... |
1,797 | all-1798 | [
"Client",
"returns",
"a",
"HTTP",
"client",
"using",
"the",
"provided",
"context",
"and",
"scopes",
"for",
"the",
"service",
"account",
"as",
"the",
"underlying",
"transport",
".",
"When",
"called",
"with",
"the",
"appropriate",
"scopes",
"the",
"created",
"cl... | [
"func",
"(",
"gsa",
"*",
"GServiceAccount",
")",
"Client",
"(",
"ctxt",
"context",
".",
"<mask>",
",",
"scopes",
"...",
"string",
")",
"(",
"*",
"http",
".",
"Client",
",",
"error",
")",
"{",
"b",
",",
"err",
":=",
"gsa",
".",
"TokenSource",
"(",
"... |
1,798 | all-1799 | [
"Scan",
"implements",
"the",
"Scanner",
"interface",
"."
] | [
"func",
"(",
"n",
"*",
"NullBytes",
")",
"Scan",
"(",
"value",
"interface",
"{",
"}",
")",
"error",
"{",
"n",
".",
"Bytes",
",",
"n",
".",
"Valid",
"=",
"<mask>",
".",
"(",
"[",
"]",
"byte",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
1,799 | all-1800 | [
"ResizeToGeometry",
"is",
"a",
"wrapper",
"around",
"gtk_window_resize_to_geometry",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"ResizeToGeometry",
"(",
"width",
",",
"<mask>",
"int",
")",
"{",
"C",
".",
"gtk_window_resize_to_geometry",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"width",
")",
",",
"C",
".",
"gint",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.