id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
8,300 | all-8301 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ComputedProperty",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss60",
"(",
"&",
"w",
",",
"v",
")",
"... |
8,301 | all-8302 | [
"initializeTaskENIDependencies",
"initializes",
"all",
"of",
"the",
"dependencies",
"required",
"by",
"the",
"Agent",
"to",
"support",
"the",
"awsvpc",
"networking",
"mode",
".",
"A",
"non",
"nil",
"error",
"is",
"returned",
"if",
"an",
"error",
"is",
"encounter... | [
"func",
"(",
"agent",
"*",
"ecsAgent",
")",
"initializeTaskENIDependencies",
"(",
"state",
"dockerstate",
".",
"TaskEngineState",
",",
"taskEngine",
"engine",
".",
"TaskEngine",
")",
"(",
"error",
",",
"bool",
")",
"{",
"// Check if the Agent process's pid == 1, whic... |
8,302 | all-8303 | [
"Validate",
"that",
"options",
"are",
"usuable"
] | [
"func",
"(",
"opts",
"*",
"<mask>",
")",
"Validate",
"(",
")",
"error",
"{",
"if",
"opts",
".",
"App",
".",
"IsZero",
"(",
")",
"{",
"opts",
".",
"App",
"=",
"meta",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"if",
"opts",
".",
"Out",... |
8,303 | all-8304 | [
"NewDriverNotSupported",
"creates",
"a",
"placeholder",
"Driver",
"that",
"replaces",
"a",
"driver",
"that",
"is",
"not",
"supported",
"on",
"a",
"given",
"platform",
".",
"eg",
"fusion",
"on",
"linux",
"."
] | [
"func",
"NewDriverNotSupported",
"(",
"driverName",
",",
"hostName",
",",
"storePath",
"string",
")",
"Driver",
"{",
"return",
"&",
"DriverNotSupported",
"{",
"BaseDriver",
":",
"&",
"BaseDriver",
"{",
"MachineName",
":",
"hostName",
",",
"StorePath",
":",
"stor... |
8,304 | all-8305 | [
"AddPattern",
"is",
"a",
"wrapper",
"around",
"gtk_file_filter_add_pattern",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"FileFilter",
")",
"AddPattern",
"(",
"pattern",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"pattern",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
... |
8,305 | all-8306 | [
"Description",
"return",
"a",
"human",
"-",
"readable",
"description",
"of",
"the",
"operation",
"type",
"."
] | [
"func",
"(",
"t",
"OperationType",
")",
"Description",
"(",
")",
"string",
"{",
"switch",
"t",
"{",
"case",
"OperationClusterBootstrap",
":",
"return",
"\"",
"\"",
"\n",
"case",
"OperationClusterJoin",
":",
"return",
"\"",
"\"",
"\n",
"case",
"OperationBackupC... |
8,306 | all-8307 | [
"NextToken",
"from",
"the",
"source",
"input"
] | [
"func",
"(",
"l",
"*",
"Lexer",
")",
"NextToken",
"(",
")",
"token",
".",
"Token",
"{",
"if",
"l",
".",
"inside",
"{",
"return",
"l",
".",
"nextInsideToken",
"(",
")",
"\n",
"}",
"\n",
"var",
"tok",
"token",
".",
"Token",
"\n\n",
"// l.skipWhitespace... |
8,307 | all-8308 | [
"isCDtorConversion",
"returns",
"when",
"an",
"AST",
"is",
"a",
"constructor",
"a",
"destructor",
"or",
"a",
"conversion",
"operator",
"."
] | [
"func",
"isCDtorConversion",
"(",
"a",
"AST",
")",
"bool",
"{",
"switch",
"a",
":=",
"a",
".",
"(",
"type",
")",
"{",
"case",
"*",
"Qualified",
":",
"return",
"isCDtorConversion",
"(",
"a",
".",
"<mask>",
")",
"\n",
"case",
"*",
"Constructor",
",",
"... |
8,308 | all-8309 | [
"Signal",
"sends",
"a",
"signal",
"to",
"the",
"child",
"process",
"if",
"it",
"exists",
".",
"Any",
"errors",
"that",
"occur",
"are",
"returned",
"."
] | [
"func",
"(",
"r",
"*",
"Runner",
")",
"Signal",
"(",
"s",
"<mask>",
".",
"Signal",
")",
"error",
"{",
"r",
".",
"childLock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"r",
".",
"childLock",
".",
"RUnlock",
"(",
")",
"\n",
"if",
"r",
".",
"child",
... |
8,309 | all-8310 | [
"Start",
"starts",
"and",
"begins",
"execution",
"of",
"the",
"child",
"process",
".",
"A",
"buffered",
"channel",
"is",
"returned",
"which",
"is",
"where",
"the",
"command",
"s",
"exit",
"code",
"will",
"be",
"returned",
"upon",
"exit",
".",
"Any",
"error... | [
"func",
"(",
"c",
"*",
"Child",
")",
"Start",
"(",
")",
"error",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"c",
".",
"Command",
"(",
")",
")",
"\n",
"c",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"Unlock",
"(",
")",
"\n",
"retu... |
8,310 | all-8311 | [
"UpdateSession",
"updates",
"and",
"optionally",
"stops",
"the",
"current",
"client",
"session",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"UpdateSession",
"(",
"product",
",",
"productPassword",
",",
"clientKey",
"string",
",",
"units",
"uint64",
",",
"stopSession",
"bool",
")",
"error",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
... |
8,311 | all-8312 | [
"Inspect",
"traverses",
"an",
"AST",
"in",
"depth",
"-",
"first",
"order",
":",
"It",
"starts",
"by",
"calling",
"f",
"(",
"node",
"path",
")",
";",
"node",
"must",
"not",
"be",
"nil",
".",
"If",
"f",
"returns",
"a",
"nil",
"error",
"Inspect",
"invok... | [
"func",
"Inspect",
"(",
"<mask>",
"Node",
",",
"f",
"inspector",
")",
"{",
"Walk",
"(",
"inspector",
"(",
"f",
")",
",",
"node",
",",
"nil",
")",
"\n",
"}"
] |
8,312 | all-8313 | [
"NewStore",
"returns",
"a",
"new",
"store",
".",
"It",
"is",
"useful",
"to",
"create",
"a",
"store",
"inside",
"mvcc",
"pkg",
".",
"It",
"should",
"only",
"be",
"used",
"for",
"testing",
"externally",
"."
] | [
"func",
"NewStore",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"b",
"backend",
".",
"Backend",
",",
"le",
"lease",
".",
"Lessor",
",",
"ig",
"ConsistentIndexGetter",
")",
"*",
"store",
"{",
"s",
":=",
"&",
"store",
"{",
"b",
":",
"b",
",",
"ig",
... |
8,313 | all-8314 | [
"readTarComponent",
"returns",
"full",
"contents",
"of",
"componentPath",
"."
] | [
"func",
"(",
"s",
"*",
"Source",
")",
"readTarComponent",
"(",
"path",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"file",
",",
"err",
":=",
"s",
".",
"openTarComponent",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"r... |
8,314 | all-8315 | [
"reply",
"||",
"error"
] | [
"func",
"(",
"h",
"*",
"segmentHeader",
")",
"read",
"(",
"rd",
"*",
"bufio",
".",
"Reader",
")",
"error",
"{",
"h",
".",
"segmentLength",
"=",
"rd",
".",
"ReadInt32",
"(",
")",
"\n",
"h",
".",
"segmentOfs",
"=",
"rd",
".",
"ReadInt32",
"(",
")",
... |
8,315 | all-8316 | [
"Uname",
"returns",
"Utsname",
"as",
"strings"
] | [
"func",
"Uname",
"(",
")",
"(",
"*",
"Utsname",
",",
"error",
")",
"{",
"/*\n\t * Based on: https://groups.google.com/forum/#!topic/golang-nuts/Jel8Bb-YwX8\n\t * there is really no better way to do this, which is\n\t * unfortunate. Also, we ditch the more accepted CharsToString\n\t * version i... |
8,316 | all-8317 | [
"SetUploadDate",
"changes",
"the",
"file",
"upload",
"time",
".",
"It",
"is",
"a",
"runtime",
"error",
"to",
"call",
"this",
"function",
"when",
"the",
"file",
"is",
"not",
"open",
"for",
"writing",
"."
] | [
"func",
"(",
"file",
"*",
"GridFile",
")",
"SetUploadDate",
"(",
"t",
"time",
".",
"Time",
")",
"{",
"file",
".",
"assertMode",
"(",
"gfsWriting",
")",
"\n",
"file",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"<mask>",
".",
"doc",
".",
"UploadDate",
"=... |
8,317 | all-8318 | [
"compareMajorMinorVersion",
"returns",
"an",
"integer",
"comparing",
"two",
"versions",
"based",
"on",
"their",
"major",
"and",
"minor",
"version",
".",
"The",
"result",
"will",
"be",
"0",
"if",
"a",
"==",
"b",
"-",
"1",
"if",
"a",
"<",
"b",
"and",
"1",
... | [
"func",
"compareMajorMinorVersion",
"(",
"a",
",",
"b",
"*",
"semver",
".",
"Version",
")",
"int",
"{",
"na",
":=",
"&",
"semver",
".",
"Version",
"{",
"Major",
":",
"a",
".",
"Major",
",",
"Minor",
":",
"a",
".",
"Minor",
"}",
"\n",
"nb",
":=",
... |
8,318 | all-8319 | [
"GetActiveWindow",
"is",
"a",
"wrapper",
"around",
"gtk_application_get_active_window",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetActiveWindow",
"(",
")",
"*",
"Window",
"{",
"c",
":=",
"C",
".",
"gtk_application_get_active_window",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
... |
8,319 | all-8320 | [
"createInstance",
"creates",
"a",
"GCE",
"VM",
"instance",
"."
] | [
"func",
"(",
"c",
"*",
"ComputeUtil",
")",
"createInstance",
"(",
"d",
"*",
"Driver",
")",
"error",
"{",
"log",
".",
"Infof",
"(",
"\"",
"\"",
")",
"\n\n",
"var",
"net",
"string",
"\n",
"if",
"strings",
".",
"Contains",
"(",
"d",
".",
"Network",
",... |
8,320 | all-8321 | [
"connectionCreated",
"registers",
"the",
"passed",
"connection",
"and",
"marks",
"the",
"target",
"identified",
"by",
"conn",
".",
"RemoteTCPAddr",
"()",
"as",
"established",
"and",
"puts",
"it",
"in",
"the",
"TargetConnected",
"state",
"."
] | [
"func",
"(",
"cm",
"*",
"connectionMaker",
")",
"connectionCreated",
"(",
"conn",
"Connection",
")",
"{",
"cm",
".",
"actionChan",
"<-",
"func",
"(",
")",
"bool",
"{",
"cm",
".",
"connections",
"[",
"<mask>",
"]",
"=",
"struct",
"{",
"}",
"{",
"}",
"... |
8,321 | all-8322 | [
"Request",
"adds",
"a",
"new",
"request",
"route",
"registry",
"."
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"<mask>",
"(",
"route",
"string",
",",
"handler",
"func",
"(",
"ctx",
"*",
"neptulon",
".",
"ReqCtx",
")",
"error",
")",
"{",
"r",
".",
"routes",
"[",
"route",
"]",
"=",
"handler",
"\n",
"}"
] |
8,322 | all-8323 | [
"Load",
"reads",
"current",
"content",
"of",
"the",
"filename",
"and",
"loads",
"records",
"."
] | [
"func",
"(",
"r",
"*",
"CSVReport",
")",
"Load",
"(",
")",
"error",
"{",
"file",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"r",
".",
"Filename",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"defer",
"file",
".",
... |
8,323 | all-8324 | [
"Error",
"implements",
"the",
"error",
"interface",
".",
"The",
"string",
"returned",
"prints",
"the",
"error",
"text",
"of",
"this",
"error",
"any",
"any",
"wrapped",
"errors",
"each",
"separated",
"by",
"a",
"colon",
"and",
"a",
"space",
"(",
":",
")",
... | [
"func",
"(",
"e",
"*",
"errorT",
")",
"Error",
"(",
")",
"string",
"{",
"var",
"(",
"text",
"=",
"strings",
".",
"TrimSpace",
"(",
"e",
".",
"text",
")",
"\n",
"prevText",
"[",
"]",
"byte",
"\n",
"prevList",
"List",
"\n",
")",
"\n",
"if",
"e",
... |
8,324 | all-8325 | [
"NewWriterLogger",
"creates",
"a",
"new",
"io",
".",
"Writer",
"based",
"logger",
"."
] | [
"func",
"NewWriterLogger",
"(",
"conf",
"*",
"WriterConfig",
",",
"out",
"io",
".",
"Writer",
")",
"(",
"Logger",
",",
"error",
")",
"{",
"l",
":=",
"&",
"writerLogger",
"{",
"}",
"\n\n",
"base",
",",
"err",
":=",
"NewLoggerBase",
"(",
"conf",
".",
"... |
8,325 | all-8326 | [
"UntagResource",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"UntagResource",
"(",
"arg0",
"*",
"secretsmanager",
".",
"UntagResourceInput",
")",
"(",
"*",
"secretsmanager",
".",
"UntagResourceOutput",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Cal... |
8,326 | all-8327 | [
"writeKeyEvent",
"trims",
"the",
"prefix",
"of",
"key",
"path",
"in",
"a",
"single",
"Event",
"under",
"StoreKeysPrefix",
"serializes",
"it",
"and",
"writes",
"the",
"resulting",
"JSON",
"to",
"the",
"given",
"ResponseWriter",
"along",
"with",
"the",
"appropriat... | [
"func",
"writeKeyEvent",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"resp",
"etcdserver",
".",
"Response",
",",
"noValueOnSuccess",
"bool",
")",
"error",
"{",
"ev",
":=",
"resp",
".",
"Event",
"\n",
"if",
"ev",
"==",
"nil",
"{",
"return",
"errors",
".... |
8,327 | all-8328 | [
"SwitchMode",
"is",
"handle",
"to",
"store",
"switch",
"status",
"in",
"cookie"
] | [
"func",
"(",
"controller",
")",
"SwitchMode",
"(",
"context",
"*",
"admin",
".",
"Context",
")",
"{",
"utils",
".",
"SetCookie",
"(",
"http",
".",
"Cookie",
"{",
"Name",
":",
"\"",
"\"",
",",
"<mask>",
":",
"context",
".",
"Request",
".",
"URL",
".",... |
8,328 | all-8329 | [
"SetCurrentTheme",
"changes",
"the",
"current",
"theme",
".",
"Returns",
"false",
"if",
"changing",
"failed",
"-",
"e",
".",
"g",
"theme",
"does",
"not",
"exist"
] | [
"func",
"SetCurrentTheme",
"(",
"name",
"string",
")",
"bool",
"{",
"thememtx",
".",
"RLock",
"(",
")",
"\n",
"_",
",",
"ok",
":=",
"themeManager",
".",
"themes",
"[",
"name",
"]",
"\n",
"thememtx",
".",
"RUnlock",
"(",
")",
"\n\n",
"if",
"!",
"ok",
... |
8,329 | all-8330 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"AddRuleParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss64",
"(",
"&",
"w",
",",
"v",
")",
"\... |
8,330 | all-8331 | [
"CreateAndSync",
"is",
"the",
"main",
"workhorse",
"function",
"of",
"IssueCreator",
".",
"It",
"initializes",
"the",
"IssueCreator",
"asks",
"each",
"source",
"for",
"its",
"issues",
"to",
"sync",
"and",
"syncs",
"the",
"issues",
"."
] | [
"func",
"(",
"c",
"*",
"IssueCreator",
")",
"CreateAndSync",
"(",
")",
"{",
"var",
"err",
"error",
"\n",
"if",
"err",
"=",
"c",
".",
"initialize",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"glog",
".",
"Fatalf",
"(",
"\"",
"\"",
",",
"err",
")",
... |
8,331 | all-8332 | [
"ParallelSelect",
"creates",
"an",
"Enumerable",
"which",
"will",
"use",
"all",
"logically",
"available",
"CPUs",
"to",
"execute",
"a",
"Transform",
"."
] | [
"func",
"ParallelSelect",
"(",
"original",
"Enumerable",
",",
"operation",
"Transform",
")",
"Enumerable",
"{",
"return",
"parallelSelecter",
"{",
"<mask>",
":",
"original",
",",
"operation",
":",
"operation",
",",
"}",
"\n",
"}"
] |
8,332 | all-8333 | [
"matrixIterSlice",
"populates",
"a",
"matrix",
"vector",
"covering",
"the",
"requested",
"range",
"for",
"a",
"single",
"time",
"series",
"with",
"points",
"retrieved",
"from",
"an",
"iterator",
".",
"As",
"an",
"optimization",
"the",
"matrix",
"vector",
"may",
... | [
"func",
"(",
"ev",
"*",
"evaluator",
")",
"matrixIterSlice",
"(",
"it",
"*",
"storage",
".",
"BufferedSeriesIterator",
",",
"mint",
",",
"maxt",
"int64",
",",
"out",
"[",
"]",
"Point",
")",
"[",
"]",
"Point",
"{",
"if",
"len",
"(",
"out",
")",
">",
... |
8,333 | all-8334 | [
"NewNodeId",
"creates",
"a",
"new",
"NodeId",
"."
] | [
"func",
"NewNodeId",
"(",
"aType",
"CryptoKeyType",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"NodeId",
",",
"err",
"error",
")",
"{",
"u",
",",
"err",
":=",
"NewPublicKey",
"(",
"aType",
",",
"value",
")",
"\n",
"<mask>",
"=",
"NodeId",... |
8,334 | all-8335 | [
"SetHTML",
"sets",
"or",
"resets",
"whether",
"the",
"message",
"should",
"be",
"parsed",
"as",
"HTML",
"or",
"plain",
"text",
"(",
"optional",
")",
"."
] | [
"func",
"(",
"om",
"*",
"OutgoingMessage",
")",
"SetHTML",
"(",
"to",
"bool",
")",
"*",
"OutgoingMessage",
"{",
"if",
"to",
"{",
"om",
".",
"ParseMode",
"=",
"ModeHTML",
"\n",
"}",
"else",
"{",
"om",
".",
"ParseMode",
"=",
"ModeDefault",
"\n",
"}",
"... |
8,335 | all-8336 | [
"GetHAdjustment",
"is",
"a",
"wrapper",
"around",
"gtk_scrollable_get_hadjustment",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Scrollable",
")",
"GetHAdjustment",
"(",
")",
"(",
"*",
"Adjustment",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_scrollable_get_hadjustment",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
... |
8,336 | all-8337 | [
"export",
"FrameSet_Start"
] | [
"func",
"FrameSet_Start",
"(",
"id",
"FrameSetId",
")",
"C",
".",
"int",
"{",
"fs",
",",
"<mask>",
":=",
"sFrameSets",
".",
"Get",
"(",
"id",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"C",
".",
"int",
"(",
"0",
")",
"\n",
"}",
"\n",
"return",
... |
8,337 | all-8338 | [
"the",
"caller",
"of",
"this",
"function",
"must",
"have",
"the",
"peers",
"mutex",
"."
] | [
"func",
"(",
"t",
"*",
"Transport",
")",
"removePeer",
"(",
"id",
"types",
".",
"ID",
")",
"{",
"if",
"<mask>",
",",
"ok",
":=",
"t",
".",
"peers",
"[",
"id",
"]",
";",
"ok",
"{",
"peer",
".",
"stop",
"(",
")",
"\n",
"}",
"else",
"{",
"if",
... |
8,338 | all-8339 | [
"GenMyMySQL",
"generates",
"a",
"MyMySQL",
"MySQL",
"DSN",
"from",
"the",
"passed",
"URL",
"."
] | [
"func",
"GenMyMySQL",
"(",
"u",
"*",
"URL",
")",
"(",
"string",
",",
"error",
")",
"{",
"host",
",",
"port",
",",
"dbname",
":=",
"hostname",
"(",
"u",
".",
"Host",
")",
",",
"hostport",
"(",
"u",
".",
"Host",
")",
",",
"strings",
".",
"TrimPrefi... |
8,339 | all-8340 | [
"GetTags",
"returns",
"a",
"map",
"of",
"tags",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetTags",
"(",
"source",
"string",
")",
"(",
"TagMap",
",",
"error",
")",
"{",
"var",
"out",
"reqGetTags",
"\n",
"uri",
":=",
"\"",
"\"",
"\n",
"if",
"source",
"!=",
"\"",
"\"",
"{",
"uri",
"+=",
"\"",
... |
8,340 | all-8341 | [
"Procurement",
"-",
"method",
"to",
"issue",
"a",
"procurement",
"request",
"for",
"the",
"given",
"lease",
"item",
"."
] | [
"func",
"(",
"s",
"*",
"Lease",
")",
"Procurement",
"(",
")",
"(",
"skuTask",
"*",
"taskmanager",
".",
"Task",
")",
"{",
"if",
"skuConstructor",
",",
"ok",
":=",
"s",
".",
"availableSkus",
"[",
"s",
".",
"Sku",
"]",
";",
"ok",
"{",
"leaseMap",
":="... |
8,341 | all-8342 | [
"CloseStreams",
"closes",
"the",
"current",
"streams",
"."
] | [
"func",
"(",
"n",
"*",
"NetworkTransport",
")",
"CloseStreams",
"(",
")",
"{",
"n",
".",
"connPoolLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"n",
".",
"connPoolLock",
".",
"Unlock",
"(",
")",
"\n\n",
"// Close all the connections in the connection pool and the... |
8,342 | all-8343 | [
"remountReadonly",
"will",
"bind",
"over",
"the",
"top",
"of",
"an",
"existing",
"path",
"and",
"ensure",
"that",
"it",
"is",
"read",
"-",
"only",
"."
] | [
"func",
"remountReadonly",
"(",
"<mask>",
"string",
")",
"error",
"{",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"5",
";",
"i",
"++",
"{",
"if",
"err",
":=",
"syscall",
".",
"Mount",
"(",
"\"",
"\"",
",",
"path",
",",
"\"",
"\"",
",",
"syscall",
".... |
8,343 | all-8344 | [
"NewOwners",
"consturcts",
"a",
"new",
"Owners",
"instance",
".",
"filenames",
"is",
"the",
"slice",
"of",
"files",
"changed",
"."
] | [
"func",
"NewOwners",
"(",
"log",
"*",
"logrus",
".",
"Entry",
",",
"filenames",
"[",
"]",
"string",
",",
"r",
"Repo",
",",
"s",
"int64",
")",
"Owners",
"{",
"return",
"Owners",
"{",
"filenames",
":",
"filenames",
",",
"repo",
":",
"r",
",",
"seed",
... |
8,344 | all-8345 | [
"processConversion",
"marks",
"fields",
"as",
"used",
"if",
"they",
"re",
"part",
"of",
"a",
"type",
"conversion",
"."
] | [
"func",
"(",
"c",
"*",
"Checker",
")",
"processConversion",
"(",
"pkg",
"*",
"lint",
".",
"Pkg",
",",
"node",
"ast",
".",
"Node",
")",
"{",
"if",
"node",
",",
"ok",
":=",
"node",
".",
"(",
"*",
"ast",
".",
"CallExpr",
")",
";",
"ok",
"{",
"call... |
8,345 | all-8346 | [
"Index",
"returns",
"the",
"path",
"to",
"the",
"file",
"at",
"the",
"given",
"index",
"in",
"the",
"sequence",
".",
"If",
"a",
"frame",
"range",
"was",
"not",
"parsed",
"from",
"the",
"sequence",
"this",
"will",
"always",
"returns",
"the",
"original",
"... | [
"func",
"(",
"s",
"*",
"FileSequence",
")",
"Index",
"(",
"idx",
"int",
")",
"string",
"{",
"if",
"s",
".",
"frameSet",
"==",
"nil",
"{",
"return",
"s",
".",
"String",
"(",
")",
"\n",
"}",
"\n",
"<mask>",
",",
"err",
":=",
"s",
".",
"frameSet",
... |
8,346 | all-8347 | [
"GuestOS",
"returns",
"the",
"guest",
"os",
"."
] | [
"func",
"(",
"v",
"*",
"VM",
")",
"GuestOS",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"<mask>",
"err",
"C",
".",
"VixError",
"=",
"C",
".",
"VIX_OK",
"\n",
"var",
"os",
"*",
"C",
".",
"char",
"\n\n",
"err",
"=",
"C",
".",
"get_property"... |
8,347 | all-8348 | [
"<array",
"-",
"type",
">",
"::",
"=",
"A",
"<",
"(",
"positive",
"dimension",
")",
"number",
">",
"_",
"<",
"(",
"element",
")",
"type",
">",
"::",
"=",
"A",
"[",
"<",
"(",
"dimension",
")",
"expression",
">",
"]",
"_",
"<",
"(",
"element",
")... | [
"func",
"(",
"st",
"*",
"<mask>",
")",
"arrayType",
"(",
"isCast",
"bool",
")",
"AST",
"{",
"st",
".",
"checkChar",
"(",
"'A'",
")",
"\n\n",
"if",
"len",
"(",
"st",
".",
"str",
")",
"==",
"0",
"{",
"st",
".",
"fail",
"(",
"\"",
"\"",
")",
"\n... |
8,348 | all-8349 | [
"get",
"the",
"initial",
"RPC",
"containing",
"all",
"of",
"our",
"subscriptions",
"to",
"send",
"to",
"new",
"peers"
] | [
"func",
"(",
"p",
"*",
"PubSub",
")",
"getHelloPacket",
"(",
")",
"*",
"RPC",
"{",
"var",
"rpc",
"RPC",
"\n",
"for",
"t",
":=",
"range",
"p",
".",
"myTopics",
"{",
"<mask>",
":=",
"&",
"pb",
".",
"RPC_SubOpts",
"{",
"Topicid",
":",
"proto",
".",
... |
8,349 | all-8350 | [
"Level",
"implements",
"the",
"driver",
".",
"Error",
"interface",
"."
] | [
"func",
"(",
"e",
"*",
"hdbErrors",
")",
"Level",
"(",
")",
"int",
"{",
"return",
"int",
"(",
"e",
".",
"<mask>",
"[",
"e",
".",
"idx",
"]",
".",
"errorLevel",
")",
"\n",
"}"
] |
8,350 | all-8351 | [
"RegisterCacheStats",
"creates",
"a",
"new",
"wrapper",
"for",
"groupcache",
"stats",
"that",
"implements",
"the",
"prometheus",
".",
"Collector",
"interface",
"and",
"registers",
"it"
] | [
"func",
"RegisterCacheStats",
"(",
"cacheName",
"string",
",",
"groupCacheStats",
"*",
"groupcache",
".",
"Stats",
")",
"{",
"c",
":=",
"&",
"cacheStats",
"{",
"cacheName",
":",
"cacheName",
",",
"descriptions",
":",
"make",
"(",
"<mask>",
"[",
"string",
"]"... |
8,351 | all-8352 | [
"Bzip2Decompressor",
"is",
"a",
"DecompressorFunc",
"for",
"the",
"bzip2",
"compression",
"algorithm",
"."
] | [
"func",
"Bzip2Decompressor",
"(",
"r",
"<mask>",
".",
"Reader",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"return",
"ioutil",
".",
"NopCloser",
"(",
"bzip2",
".",
"NewReader",
"(",
"r",
")",
")",
",",
"nil",
"\n",
"}"
] |
8,352 | all-8353 | [
"resourceVSphereComputeClusterVMAffinityRuleObjects",
"handles",
"the",
"fetching",
"of",
"the",
"cluster",
"and",
"rule",
"key",
"depending",
"on",
"what",
"attributes",
"are",
"available",
":",
"*",
"If",
"the",
"resource",
"ID",
"is",
"available",
"the",
"data",
... | [
"func",
"resourceVSphereComputeClusterVMAffinityRuleObjects",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"<mask>",
"{",
"}",
",",
")",
"(",
"*",
"object",
".",
"ClusterComputeResource",
",",
"int32",
",",
"error",
")",
"{",
"if",
"d",
".",
"I... |
8,353 | all-8354 | [
"FetchCheckBySubmissionURL",
"fetch",
"a",
"check",
"configuration",
"by",
"submission_url"
] | [
"func",
"(",
"cm",
"*",
"CheckManager",
")",
"fetchCheckBySubmissionURL",
"(",
"submissionURL",
"api",
".",
"URLType",
")",
"(",
"*",
"api",
".",
"Check",
",",
"error",
")",
"{",
"if",
"string",
"(",
"submissionURL",
")",
"==",
"\"",
"\"",
"{",
"return",... |
8,354 | all-8355 | [
"GenerateSalt",
"génère",
"le",
"salage"
] | [
"func",
"GenerateSalt",
"(",
")",
"(",
"salt",
"[",
"]",
"byte",
",",
"err",
"error",
")",
"{",
"salt",
"=",
"make",
"(",
"[",
"]",
"<mask>",
",",
"S",
")",
"\n",
"_",
",",
"err",
"=",
"rand",
".",
"Read",
"(",
"salt",
")",
"\n",
"if",
"err",... |
8,355 | all-8356 | [
"NodeOfflineThreshold",
"returns",
"the",
"amount",
"of",
"time",
"that",
"needs",
"to",
"elapse",
"after",
"which",
"a",
"series",
"of",
"unsuccessful",
"heartbeat",
"will",
"make",
"the",
"node",
"be",
"considered",
"offline",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"NodeOfflineThreshold",
"(",
")",
"(",
"time",
".",
"Duration",
",",
"error",
")",
"{",
"threshold",
":=",
"<mask>",
".",
"Duration",
"(",
"DefaultOfflineThreshold",
")",
"*",
"time",
".",
"Second",
"\n",
"values",
... |
8,356 | all-8357 | [
"GetIncludeUnitsOk",
"returns",
"a",
"tuple",
"with",
"the",
"IncludeUnits",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"y",
"*",
"Yaxis",
")",
"GetIncludeUnitsOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"y",
"==",
"nil",
"||",
"y",
".",
"IncludeUnits",
"==",
"nil",
"{",
"return",
"false",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"y"... |
8,357 | all-8358 | [
"Status",
"checks",
"the",
"status",
"of",
"an",
"existing",
"GDPR",
"request",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Status",
"(",
"<mask>",
"string",
")",
"(",
"*",
"StatusResponse",
",",
"error",
")",
"{",
"statResp",
":=",
"&",
"StatusResponse",
"{",
"}",
"\n",
"resp",
",",
"err",
":=",
"c",
".",
"caller",
".",
"Call",
"(... |
8,358 | all-8359 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StartParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler12",
"(",
"&",
"r",... |
8,359 | all-8360 | [
"getGTLDData",
"fetches",
"the",
"ICANN_GTLD_JSON",
"and",
"parses",
"it",
"into",
"a",
"list",
"of",
"util",
".",
"GTLDPeriod",
"objects",
"or",
"returns",
"an",
"error",
".",
"The",
"gTLDEntries",
"are",
"returned",
"as",
"-",
"is",
"and",
"may",
"contain"... | [
"func",
"getGTLDData",
"(",
")",
"(",
"[",
"]",
"util",
".",
"GTLDPeriod",
",",
"error",
")",
"{",
"respBody",
",",
"err",
":=",
"getData",
"(",
"ICANN_GTLD_JSON",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
... |
8,360 | all-8361 | [
"Validate",
"flag",
"value",
"using",
"validation",
"criteria",
"provided",
"in",
"metadata"
] | [
"func",
"validateFlagValue",
"(",
"<mask>",
"string",
",",
"param",
"*",
"metadata",
".",
"ActionParam",
")",
"error",
"{",
"if",
"param",
".",
"Regexp",
"!=",
"nil",
"{",
"if",
"!",
"param",
".",
"Regexp",
".",
"MatchString",
"(",
"value",
")",
"{",
"... |
8,361 | all-8362 | [
"Profiler",
"is",
"a",
"convenient",
"subrouter",
"used",
"for",
"mounting",
"net",
"/",
"http",
"/",
"pprof",
".",
"ie",
".",
"func",
"MyService",
"()",
"http",
".",
"Handler",
"{",
"r",
":",
"=",
"chi",
".",
"NewRouter",
"()",
"//",
"..",
"middleware... | [
"func",
"Profiler",
"(",
")",
"http",
".",
"Handler",
"{",
"r",
":=",
"chi",
".",
"NewRouter",
"(",
")",
"\n",
"r",
".",
"Use",
"(",
"NoCache",
")",
"\n\n",
"r",
".",
"Get",
"(",
"\"",
"\"",
",",
"func",
"(",
"w",
"<mask>",
".",
"ResponseWriter",... |
8,362 | all-8363 | [
"Reset",
"indicates",
"an",
"expected",
"call",
"of",
"Reset"
] | [
"func",
"(",
"mr",
"*",
"MockTimerMockRecorder",
")",
"Reset",
"(",
"arg0",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
"mock",
",",
"\"",
"\"",
... |
8,363 | all-8364 | [
"newAgent",
"returns",
"a",
"new",
"ecsAgent",
"object",
"but",
"does",
"not",
"start",
"anything"
] | [
"func",
"newAgent",
"(",
"ctx",
"context",
".",
"Context",
",",
"blackholeEC2Metadata",
"bool",
",",
"acceptInsecureCert",
"*",
"bool",
")",
"(",
"<mask>",
",",
"error",
")",
"{",
"ec2MetadataClient",
":=",
"ec2",
".",
"NewEC2MetadataClient",
"(",
"nil",
")",
... |
8,364 | all-8365 | [
"Retry",
"on",
"transport",
"failures",
".",
"Retries",
"on",
"500s",
"retries",
"after",
"sleep",
"on",
"ratelimit",
"exceeded",
"and",
"retries",
"404s",
"a",
"couple",
"times",
".",
"This",
"function",
"closes",
"the",
"response",
"body",
"iff",
"it",
"al... | [
"func",
"(",
"c",
"*",
"Client",
")",
"requestRetry",
"(",
"method",
",",
"path",
",",
"accept",
"string",
",",
"body",
"<mask>",
"{",
"}",
")",
"(",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"var",
"hostIndex",
"int",
"\n",
"var",
"res... |
8,365 | all-8366 | [
"SeekToLast",
"seeks",
"position",
"at",
"the",
"last",
"entry",
"in",
"list",
".",
"Final",
"state",
"of",
"iterator",
"is",
"Valid",
"()",
"iff",
"list",
"is",
"not",
"empty",
"."
] | [
"func",
"(",
"it",
"*",
"Iterator",
")",
"SeekToLast",
"(",
")",
"{",
"it",
".",
"setNode",
"(",
"it",
".",
"list",
".",
"getPrev",
"(",
"it",
".",
"list",
".",
"tail",
",",
"0",
")",
",",
"<mask>",
")",
"\n",
"}"
] |
8,366 | all-8367 | [
"specify",
"a",
"two",
"-",
"dimensional",
"texture",
"image",
"in",
"a",
"compressed",
"format"
] | [
"func",
"CompressedTexImage2D",
"(",
"target",
"uint32",
",",
"<mask>",
"int32",
",",
"internalformat",
"uint32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"border",
"int32",
",",
"imageSize",
"int32",
",",
"data",
"unsafe",
".",
"Pointer",
")",
"{... |
8,367 | all-8368 | [
"Get",
"subchannel",
"if",
"we",
"have",
"one"
] | [
"func",
"(",
"subChMap",
"*",
"subChannelMap",
")",
"get",
"(",
"serviceName",
"string",
")",
"(",
"*",
"SubChannel",
",",
"bool",
")",
"{",
"subChMap",
".",
"RLock",
"(",
")",
"\n",
"sc",
",",
"<mask>",
":=",
"subChMap",
".",
"subchannels",
"[",
"serv... |
8,368 | all-8369 | [
"NewCompactionCommand",
"returns",
"the",
"cobra",
"command",
"for",
"compaction",
"."
] | [
"func",
"NewCompactionCommand",
"(",
")",
"*",
"cobra",
".",
"Command",
"{",
"cmd",
":=",
"&",
"cobra",
".",
"Command",
"{",
"Use",
":",
"\"",
"\"",
",",
"Short",
":",
"\"",
"\"",
",",
"Run",
":",
"compactionCommandFunc",
",",
"}",
"\n",
"cmd",
".",
... |
8,369 | all-8370 | [
"Loads",
"the",
"registry",
"configuration",
"file",
"from",
"the",
"filesystem",
"and",
"then",
"unmarshals",
"it",
".",
"Returns",
"the",
"unmarshalled",
"object",
"."
] | [
"func",
"loadRegistryConf",
"(",
"sys",
"*",
"<mask>",
".",
"SystemContext",
")",
"(",
"*",
"tomlConfig",
",",
"error",
")",
"{",
"config",
":=",
"&",
"tomlConfig",
"{",
"}",
"\n\n",
"configBytes",
",",
"err",
":=",
"readConf",
"(",
"sys",
")",
"\n",
"... |
8,370 | all-8371 | [
"refType",
"returns",
"the",
"Go",
"code",
"required",
"to",
"declare",
"a",
"variable",
"of",
"the",
"given",
"resource",
"type",
".",
"i",
".",
"e",
".",
"var",
"foo",
"*",
"ResourceName"
] | [
"func",
"refType",
"(",
"resName",
"string",
")",
"string",
"{",
"res",
":=",
"resourceType",
"(",
"resName",
")",
"\n",
"if",
"res",
"!=",
"\"",
"\"",
"{",
"res",
"=",
"\"",
"\"",
"+",
"res",
"\n",
"}",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
8,371 | all-8372 | [
"Canon",
"returns",
"the",
"canonical",
"version",
"of",
"r",
".",
"The",
"returned",
"rectangle",
"has",
"minimum",
"and",
"maximum",
"coordinates",
"swapped",
"if",
"necessary",
"so",
"that",
"it",
"is",
"well",
"-",
"formed",
"."
] | [
"func",
"(",
"r",
"Rectangle",
")",
"Canon",
"(",
")",
"Rectangle",
"{",
"if",
"r",
".",
"Max",
".",
"X",
"<",
"r",
".",
"Min",
".",
"X",
"{",
"r",
".",
"Min",
".",
"X",
",",
"r",
".",
"Max",
".",
"X",
"=",
"r",
".",
"Max",
".",
"X",
",... |
8,372 | all-8373 | [
"Left",
"left",
"-",
"pads",
"the",
"string",
"with",
"pad",
"up",
"to",
"len",
"runes",
"len",
"may",
"be",
"exceeded",
"if"
] | [
"func",
"Left",
"(",
"str",
"string",
",",
"<mask>",
"int",
",",
"pad",
"string",
")",
"string",
"{",
"return",
"times",
"(",
"pad",
",",
"length",
"-",
"len",
"(",
"str",
")",
")",
"+",
"str",
"\n",
"}"
] |
8,373 | all-8374 | [
"NewDefaultServer",
"is",
"like",
"NewServer",
"but",
"we",
"take",
"care",
"of",
"creating",
"a",
"mesh",
".",
"Router",
"and",
"meshconn",
".",
"Peer",
"for",
"you",
"with",
"sane",
"defaults",
".",
"If",
"you",
"need",
"more",
"fine",
"-",
"grained",
... | [
"func",
"NewDefaultServer",
"(",
"minPeerCount",
"int",
",",
"terminatec",
"<-",
"chan",
"struct",
"{",
"}",
",",
"terminatedc",
"chan",
"<-",
"error",
",",
"logger",
"mesh",
".",
"Logger",
",",
")",
"Server",
"{",
"var",
"(",
"peerName",
"=",
"mustPeerNam... |
8,374 | all-8375 | [
"GetChangeTrustResult",
"retrieves",
"the",
"ChangeTrustResult",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"OperationResultTr",
")",
"GetChangeTrustResult",
"(",
")",
"(",
"result",
"ChangeTrustResult",
",",
"<mask>",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",... |
8,375 | all-8376 | [
"Read",
"reads",
"the",
"packed",
"data",
"for",
"the",
"current",
"file",
"into",
"p",
"."
] | [
"func",
"(",
"f",
"*",
"packedFileReader",
")",
"Read",
"(",
"p",
"[",
"]",
"<mask>",
")",
"(",
"int",
",",
"error",
")",
"{",
"n",
",",
"err",
":=",
"f",
".",
"r",
".",
"Read",
"(",
"p",
")",
"// read current block data",
"\n",
"for",
"err",
"==... |
8,376 | all-8377 | [
"assumes",
"a",
"to",
"be",
"sorted",
"in",
"descending",
"order",
"returns",
"a",
"subslice",
"of",
"a",
"along",
"with",
"its",
"indices",
"(",
"inclusive",
")"
] | [
"func",
"cropResults",
"(",
"a",
"[",
"]",
"int64",
",",
"max",
"int64",
")",
"(",
"[",
"]",
"int64",
",",
"int",
",",
"int",
")",
"{",
"res",
":=",
"[",
"]",
"int64",
"{",
"}",
"\n",
"firstIndex",
":=",
"-",
"1",
"\n",
"lastIndex",
":=",
"0",
... |
8,377 | all-8378 | [
"Map",
"maps",
"an",
"array",
"s",
"iitem",
"through",
"an",
"iterator",
"."
] | [
"func",
"<mask>",
"(",
"arr",
"[",
"]",
"string",
",",
"iterator",
"func",
"(",
"string",
")",
"string",
")",
"[",
"]",
"string",
"{",
"r",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"item",
":=",
"range",
"arr",
"{",
"r",
"=",
... |
8,378 | all-8379 | [
"MustPrepare",
"retrieves",
"the",
"Prepare",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"ScpStatementPledges",
")",
"MustPrepare",
"(",
")",
"ScpStatementPrepare",
"{",
"val",
",",
"ok",
":=",
"u",
".",
"GetPrepare",
"(",
")",
"\n\n",
"if",
"!",
"<mask>",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
... |
8,379 | all-8380 | [
"getASMSecretsResource",
"retrieves",
"asmsecret",
"resource",
"from",
"resource",
"map"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"getASMSecretsResource",
"(",
")",
"(",
"[",
"]",
"taskresource",
".",
"TaskResource",
",",
"bool",
")",
"{",
"task",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"task",
".",
"lock",
".",
"RUnlock",
"(",... |
8,380 | all-8381 | [
"ImageNewFromPixbuf",
"is",
"a",
"wrapper",
"around",
"gtk_image_new_from_pixbuf",
"()",
"."
] | [
"func",
"ImageNewFromPixbuf",
"(",
"pixbuf",
"*",
"gdk",
".",
"Pixbuf",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_image_new_from_pixbuf",
"(",
"(",
"*",
"C",
".",
"GdkPixbuf",
")",
"(",
"pixbuf",
".",
"NativePrivate",
"... |
8,381 | all-8382 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ClearBrowserCookiesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork64",
"(",
"&",
"w",
",",
"v... |
8,382 | all-8383 | [
"GetTitle",
"returns",
"the",
"Title",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"e",
"*",
"EventTimelineDefinition",
")",
"GetTitle",
"(",
")",
"string",
"{",
"if",
"e",
"==",
"nil",
"||",
"e",
".",
"Title",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"<mask>",
"*",
"e",
".",
"Title",
"\n",
"}"
] |
8,383 | all-8384 | [
"NewKTrie",
"..."
] | [
"func",
"NewKTrie",
"(",
"data",
"map",
"[",
"string",
"]",
"bool",
")",
"(",
"*",
"KTrie",
",",
"error",
")",
"{",
"n",
":=",
"NewKNode",
"(",
"0",
")",
"\n\n",
"maxDepth",
":=",
"0",
"\n",
"minDepth",
":=",
"9001",
"\n\n",
"for",
"k",
":=",
"ra... |
8,384 | all-8385 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"ClientNavigationReason",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"ClientNavigationReason",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"<mask>",
"ClientNavigationReasonFormSubmissionGet",
":... |
8,385 | all-8386 | [
"SeekToFirst",
"seeks",
"position",
"at",
"the",
"first",
"entry",
"in",
"list",
".",
"Final",
"state",
"of",
"iterator",
"is",
"Valid",
"()",
"iff",
"list",
"is",
"not",
"empty",
"."
] | [
"func",
"(",
"s",
"*",
"Iterator",
")",
"SeekToFirst",
"(",
")",
"{",
"s",
".",
"n",
"=",
"s",
".",
"list",
".",
"getNext",
"(",
"s",
".",
"<mask>",
".",
"head",
",",
"0",
")",
"\n",
"}"
] |
8,386 | all-8387 | [
"BeginCall",
"starts",
"a",
"new",
"call",
"to",
"this",
"specific",
"peer",
"returning",
"an",
"OutboundCall",
"that",
"can",
"be",
"used",
"to",
"write",
"the",
"arguments",
"of",
"the",
"call",
"."
] | [
"func",
"(",
"p",
"*",
"Peer",
")",
"BeginCall",
"(",
"ctx",
"context",
".",
"Context",
",",
"serviceName",
",",
"methodName",
"string",
",",
"callOptions",
"*",
"CallOptions",
")",
"(",
"*",
"OutboundCall",
",",
"error",
")",
"{",
"if",
"callOptions",
"... |
8,387 | all-8388 | [
"DecodeKey",
"decodes",
"a",
"key",
"from",
"the",
"opaque",
"representation",
"returned",
"by",
"Encode",
"."
] | [
"func",
"DecodeKey",
"(",
"encoded",
"string",
")",
"(",
"*",
"Key",
",",
"error",
")",
"{",
"// Re-add padding.",
"if",
"m",
":=",
"len",
"(",
"encoded",
")",
"%",
"4",
";",
"m",
"!=",
"0",
"{",
"encoded",
"+=",
"strings",
".",
"Repeat",
"(",
"\""... |
8,388 | all-8389 | [
"UnmarshalJSON",
"unmarshals",
"ResourcesMap",
"object"
] | [
"func",
"(",
"rm",
"*",
"ResourcesMap",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"resources",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"json",
".",
"RawMessage",
")",
"\n",
"err",
":=",
"json",
".",
"Unmarshal",
"(... |
8,389 | all-8390 | [
"CheckMenuItemNew",
"is",
"a",
"wrapper",
"around",
"gtk_check_menu_item_new",
"()",
"."
] | [
"func",
"CheckMenuItemNew",
"(",
")",
"(",
"*",
"CheckMenuItem",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_check_menu_item_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"<mask>",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"obj",
":=",
"gl... |
8,390 | all-8391 | [
"NewSnapshotCommand",
"returns",
"the",
"cobra",
"command",
"for",
"snapshot",
"."
] | [
"func",
"NewSnapshotCommand",
"(",
")",
"*",
"cobra",
".",
"Command",
"{",
"cmd",
":=",
"&",
"cobra",
".",
"Command",
"{",
"Use",
":",
"\"",
"\"",
",",
"Short",
":",
"\"",
"\"",
",",
"}",
"\n",
"cmd",
".",
"AddCommand",
"(",
"NewSnapshotSaveCommand",
... |
8,391 | all-8392 | [
"PixbufNewFromFile",
"is",
"a",
"wrapper",
"around",
"gdk_pixbuf_new_from_file",
"()",
"."
] | [
"func",
"PixbufNewFromFile",
"(",
"filename",
"string",
")",
"(",
"*",
"Pixbuf",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"filename",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
... |
8,392 | all-8393 | [
"SeekPathConflict",
"seeks",
"an",
"entry",
"which",
"conflicts",
"with",
"path",
"and",
"returns",
"the",
"first",
"encountered",
"or",
"nil",
"nil",
"if",
"none",
"is",
"found",
"."
] | [
"func",
"SeekPathConflict",
"(",
"c",
"*",
"bolt",
".",
"Cursor",
",",
"path",
"[",
"]",
"byte",
")",
"(",
"[",
"]",
"byte",
",",
"[",
"]",
"byte",
")",
"{",
"// Validation",
"if",
"len",
"(",
"path",
")",
"==",
"0",
"{",
"return",
"nil",
",",
... |
8,393 | all-8394 | [
"difference",
"returns",
"a",
"new",
"orgRepoConfig",
"that",
"represents",
"the",
"set",
"difference",
"of",
"the",
"repos",
"specified",
"by",
"the",
"receiver",
"and",
"the",
"parameter",
"orgRepoConfigs",
"."
] | [
"func",
"(",
"c",
"*",
"orgRepoConfig",
")",
"difference",
"(",
"c2",
"*",
"orgRepoConfig",
")",
"*",
"orgRepoConfig",
"{",
"res",
":=",
"&",
"orgRepoConfig",
"{",
"orgExceptions",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"sets",
".",
"String",
")",
... |
8,394 | all-8395 | [
"ImportAccountFromJSON",
"imports",
"private",
"key",
"from",
"JSON",
"blob",
"with",
"password",
"creates",
"account",
"and",
"initiates",
"JobAccountUpdateBalances",
"job",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"ImportAccountFromJSON",
"(",
"tkn",
"string",
",",
"params",
"*",
"AccountParams",
",",
"jsonBlob",
"json",
".",
"RawMessage",
",",
"jsonKeyStorePassword",
"string",
")",
"(",
"*",
"string",
",",
"error",
")",
"{",
"... |
8,395 | all-8396 | [
"Deletes",
"a",
"host",
".",
"Note",
"that",
"this",
"is",
"not",
"the",
"FQDN",
"but",
"a",
"hostname",
"."
] | [
"func",
"(",
"ds",
"*",
"DNSServer",
")",
"DeleteA",
"(",
"<mask>",
"string",
")",
"{",
"ds",
".",
"aMutex",
".",
"Lock",
"(",
")",
"\n",
"delete",
"(",
"ds",
".",
"aRecords",
",",
"ds",
".",
"qualifyHost",
"(",
"host",
")",
")",
"\n",
"ds",
".",... |
8,396 | all-8397 | [
"World",
"is",
"a",
"handler"
] | [
"func",
"(",
"h",
"*",
"Hello",
")",
"World",
"(",
"ctx",
"context",
".",
"Context",
",",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"<mask>",
")",
"{",
"w",
".",
"Write",
"(",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
... |
8,397 | all-8398 | [
"delete",
"named",
"query",
"objects"
] | [
"func",
"DeleteQueries",
"(",
"n",
"int32",
",",
"ids",
"*",
"uint32",
")",
"{",
"C",
".",
"glowDeleteQueries",
"(",
"gpDeleteQueries",
",",
"(",
"C",
".",
"GLsizei",
")",
"(",
"n",
")",
",",
"(",
"*",
"C",
".",
"GLuint",
")",
"(",
"unsafe",
".",
... |
8,398 | all-8399 | [
"AddFlags",
"parses",
"options",
"for",
"database",
"configuration"
] | [
"func",
"(",
"config",
"*",
"MySQLConfig",
")",
"AddFlags",
"(",
"cmd",
"*",
"cobra",
".",
"Command",
")",
"{",
"cmd",
".",
"PersistentFlags",
"(",
")",
".",
"StringVar",
"(",
"&",
"config",
".",
"<mask>",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"... |
8,399 | all-8400 | [
"flattenClusterAffinityRuleSpec",
"saves",
"a",
"ClusterAffinityRuleSpec",
"into",
"the",
"supplied",
"ResourceData",
"."
] | [
"func",
"flattenClusterAffinityRuleSpec",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"interface",
"{",
"}",
",",
"obj",
"*",
"types",
".",
"ClusterAffinityRuleSpec",
")",
"error",
"{",
"client",
",",
"err",
":=",
"resourceVSphereComputeClusterVMGro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.