id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
6,400 | all-6401 | [
"HandleBasic",
"adds",
"handlers",
"to",
"a",
"mux",
"for",
"serving",
"JSON",
"etcd",
"client",
"requests",
"that",
"do",
"not",
"access",
"the",
"v2",
"store",
"."
] | [
"func",
"HandleBasic",
"(",
"mux",
"*",
"http",
".",
"ServeMux",
",",
"server",
"etcdserver",
".",
"ServerPeer",
")",
"{",
"mux",
".",
"HandleFunc",
"(",
"varsPath",
",",
"serveVars",
")",
"\n\n",
"// TODO: deprecate '/config/local/log' in v3.5",
"mux",
".",
"Ha... |
6,401 | all-6402 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetResourceTreeReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage30",
"(",
"&",... |
6,402 | all-6403 | [
"Uint64ToBytes",
"using",
"big",
"endian",
"."
] | [
"func",
"Uint64ToBytes",
"(",
"x",
"uint64",
")",
"[",
"8",
"]",
"byte",
"{",
"<mask>",
"xBytes",
"[",
"8",
"]",
"byte",
"\n",
"binary",
".",
"BigEndian",
".",
"PutUint64",
"(",
"xBytes",
"[",
":",
"]",
",",
"x",
")",
"\n",
"return",
"xBytes",
"\n"... |
6,403 | all-6404 | [
"PutManifest",
"writes",
"manifest",
"to",
"the",
"destination",
".",
"FIXME?",
"This",
"should",
"also",
"receive",
"a",
"MIME",
"type",
"if",
"known",
"to",
"differentiate",
"between",
"schema",
"versions",
".",
"If",
"the",
"destination",
"is",
"in",
"princ... | [
"func",
"(",
"d",
"*",
"ostreeImageDestination",
")",
"PutManifest",
"(",
"ctx",
"context",
".",
"Context",
",",
"manifestBlob",
"[",
"]",
"byte",
")",
"error",
"{",
"d",
".",
"manifest",
"=",
"string",
"(",
"manifestBlob",
")",
"\n\n",
"if",
"err",
":="... |
6,404 | all-6405 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventContextDestroyed",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio2",
"(",
"&... |
6,405 | all-6406 | [
"Return",
"dumpable",
"representation",
"of",
"given",
"object"
] | [
"func",
"prettify",
"(",
"o",
"<mask>",
"{",
"}",
")",
"string",
"{",
"s",
",",
"err",
":=",
"json",
".",
"MarshalIndent",
"(",
"o",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Sprintf",
"(... |
6,406 | all-6407 | [
"FetchTemplate",
"returns",
"a",
"TemplateSource",
"representing",
"the",
"template",
"at",
"path",
"path",
".",
"Paths",
"are",
"searched",
"relative",
"to",
"the",
"paths",
"given",
"to",
"NewFileTemplateFetcher",
"()"
] | [
"func",
"(",
"l",
"*",
"FileTemplateFetcher",
")",
"FetchTemplate",
"(",
"<mask>",
"string",
")",
"(",
"TemplateSource",
",",
"error",
")",
"{",
"if",
"filepath",
".",
"IsAbs",
"(",
"path",
")",
"{",
"return",
"nil",
",",
"ErrAbsolutePathNotAllowed",
"\n",
... |
6,407 | all-6408 | [
"String",
"returns",
"a",
"human",
"readable",
"version",
"of",
"the",
"ENI",
"object"
] | [
"func",
"(",
"eni",
"*",
"ENI",
")",
"String",
"(",
")",
"string",
"{",
"var",
"ipv4Addresses",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"addr",
":=",
"range",
"eni",
".",
"IPV4Addresses",
"{",
"ipv4Addresses",
"=",
"append",
"(",
"ipv4Addresses",
",... |
6,408 | all-6409 | [
"Fetch",
"fetches",
"a",
"glyph",
"from",
"the",
"cache",
"calling",
"renderGlyph",
"first",
"if",
"it",
"doesn",
"t",
"already",
"exist"
] | [
"func",
"(",
"glyphCache",
"*",
"GlyphCacheImp",
")",
"Fetch",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"fontName",
"string",
",",
"chr",
"rune",
")",
"*",
"Glyph",
"{",
"if",
"glyphCache",
".",
"glyphs",
"[",
"fontName",
"]",
"==",
"nil",
"{",
... |
6,409 | all-6410 | [
"populate",
"record",
"with",
"message"
] | [
"func",
"loadmessage",
"(",
"mesg",
"string",
")",
"IP2Locationrecord",
"{",
"<mask>",
"x",
"IP2Locationrecord",
"\n",
"x",
".",
"Country_short",
"=",
"mesg",
"\n",
"x",
".",
"Country_long",
"=",
"mesg",
"\n",
"x",
".",
"Region",
"=",
"mesg",
"\n",
"x",
... |
6,410 | all-6411 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Media",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss31",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"ret... |
6,411 | all-6412 | [
"NewMicrosoftClient",
"creates",
"a",
"microsoft",
"client",
":",
"container",
"-",
"Azure",
"Blob",
"Container",
"name",
"accountName",
"-",
"Azure",
"Storage",
"Account",
"name",
"accountKey",
"-",
"Azure",
"Storage",
"Account",
"key"
] | [
"func",
"NewMicrosoftClient",
"(",
"container",
"string",
",",
"accountName",
"string",
",",
"accountKey",
"string",
")",
"(",
"Client",
",",
"error",
")",
"{",
"return",
"newMicrosoftClient",
"(",
"<mask>",
",",
"accountName",
",",
"accountKey",
")",
"\n",
"}... |
6,412 | all-6413 | [
"See",
"bcd",
".",
"Tracer",
".",
"ClearOptions",
"()",
"."
] | [
"func",
"(",
"t",
"*",
"BTTracer",
")",
"ClearOptions",
"(",
")",
"{",
"t",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"defer",
"t",
".",
"m",
".",
"Unlock",
"(",
")",
"\n\n",
"t",
".",
"<mask>",
"=",
"nil",
"\n",
"}"
] |
6,413 | all-6414 | [
"GetEnvironment",
"returns",
"a",
"SMTP",
"Server",
"configuration",
"for",
"the",
"specified",
"environment",
"in",
"parameter"
] | [
"func",
"(",
"se",
"*",
"SMTPEnvironment",
")",
"GetEnvironment",
"(",
"<mask>",
"string",
")",
"interface",
"{",
"}",
"{",
"for",
"env",
",",
"conf",
":=",
"range",
"se",
".",
"Env",
"{",
"if",
"strings",
".",
"Compare",
"(",
"environment",
",",
"env"... |
6,414 | all-6415 | [
"GetRegistries",
"loads",
"and",
"returns",
"the",
"registries",
"specified",
"in",
"the",
"config",
".",
"Note",
"the",
"parsed",
"content",
"of",
"registry",
"config",
"files",
"is",
"cached",
".",
"For",
"reloading",
"use",
"InvalidateCache",
"and",
"re",
"... | [
"func",
"GetRegistries",
"(",
"ctx",
"*",
"<mask>",
".",
"SystemContext",
")",
"(",
"[",
"]",
"Registry",
",",
"error",
")",
"{",
"configPath",
":=",
"getConfigPath",
"(",
"ctx",
")",
"\n\n",
"configMutex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"configMu... |
6,415 | all-6416 | [
"Write",
"serializes",
"the",
"command",
"to",
"the",
"given",
"buffered",
"output",
"satisfies",
"the",
"Command",
"interface",
"."
] | [
"func",
"(",
"c",
"Identify",
")",
"Write",
"(",
"w",
"*",
"bufio",
".",
"Writer",
")",
"(",
"err",
"error",
")",
"{",
"var",
"data",
"[",
"]",
"byte",
"\n\n",
"if",
"data",
",",
"err",
"=",
"json",
".",
"Marshal",
"(",
"identifyBody",
"{",
"Clie... |
6,416 | all-6417 | [
"GetInsecureRegistries",
"returns",
"an",
"array",
"of",
"strings",
"that",
"contain",
"the",
"names",
"of",
"the",
"insecure",
"registries",
"as",
"defined",
"in",
"the",
"system",
"-",
"wide",
"registries",
"file",
".",
"it",
"returns",
"an",
"empty",
"array... | [
"func",
"GetInsecureRegistries",
"(",
"sys",
"*",
"<mask>",
".",
"SystemContext",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"config",
",",
"err",
":=",
"loadRegistryConf",
"(",
"sys",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil... |
6,417 | all-6418 | [
"Warn",
"outputs",
"Warn",
"level",
"log"
] | [
"func",
"Warn",
"(",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"glg",
".",
"out",
"(",
"<mask>",
",",
"blankFormat",
"(",
"len",
"(",
"val",
")",
")",
",",
"val",
"...",
")",
"\n",
"}"
] |
6,418 | all-6419 | [
"monitorVersions",
"checks",
"the",
"member",
"s",
"version",
"every",
"monitorVersionInterval",
".",
"It",
"updates",
"the",
"cluster",
"version",
"if",
"all",
"members",
"agrees",
"on",
"a",
"higher",
"one",
".",
"It",
"prints",
"out",
"log",
"if",
"there",
... | [
"func",
"(",
"s",
"*",
"EtcdServer",
")",
"monitorVersions",
"(",
")",
"{",
"for",
"{",
"select",
"{",
"case",
"<-",
"s",
".",
"forceVersionC",
":",
"case",
"<-",
"time",
".",
"After",
"(",
"monitorVersionInterval",
")",
":",
"case",
"<-",
"s",
".",
... |
6,419 | all-6420 | [
"<template",
"-",
"param",
">",
"::",
"=",
"T_",
"::",
"=",
"T",
"<",
"(",
"parameter",
"-",
"2",
"non",
"-",
"negative",
")",
"number",
">",
"_",
"When",
"a",
"template",
"parameter",
"is",
"a",
"substitution",
"candidate",
"any",
"reference",
"to",
... | [
"func",
"(",
"st",
"*",
"state",
")",
"templateParam",
"(",
")",
"AST",
"{",
"if",
"len",
"(",
"st",
".",
"templates",
")",
"==",
"0",
"{",
"st",
".",
"fail",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"off",
":=",
"st",
".",
"off",
"\n\n",
"st",... |
6,420 | all-6421 | [
"WithProviderSpecific",
"attaches",
"a",
"key",
"/",
"value",
"pair",
"to",
"the",
"Endpoint",
"and",
"returns",
"the",
"Endpoint",
".",
"This",
"can",
"be",
"used",
"to",
"pass",
"additional",
"data",
"through",
"the",
"stages",
"of",
"ExternalDNS",
"s",
"E... | [
"func",
"(",
"e",
"*",
"Endpoint",
")",
"WithProviderSpecific",
"(",
"key",
",",
"value",
"string",
")",
"*",
"Endpoint",
"{",
"if",
"e",
".",
"ProviderSpecific",
"==",
"nil",
"{",
"e",
".",
"ProviderSpecific",
"=",
"ProviderSpecific",
"{",
"}",
"\n",
"}... |
6,421 | all-6422 | [
"readBlockHeader",
"returns",
"the",
"next",
"block",
"header",
"in",
"the",
"archive",
".",
"It",
"will",
"return",
"io",
".",
"EOF",
"if",
"there",
"were",
"no",
"bytes",
"read",
"."
] | [
"func",
"(",
"a",
"*",
"archive15",
")",
"readBlockHeader",
"(",
")",
"(",
"*",
"blockHeader15",
",",
"error",
")",
"{",
"var",
"err",
"error",
"\n",
"b",
":=",
"a",
".",
"buf",
"[",
":",
"7",
"]",
"\n",
"r",
":=",
"io",
".",
"Reader",
"(",
"a"... |
6,422 | all-6423 | [
"Creates",
"a",
"binding",
"between",
"source",
"property",
"on",
"source",
"and",
"target",
"property",
"on",
"target",
".",
"Whenever",
"the",
"source",
"property",
"is",
"changed",
"the",
"target_property",
"is",
"updated",
"using",
"the",
"same",
"value",
... | [
"func",
"BindProperty",
"(",
"source",
"*",
"Object",
",",
"sourceProperty",
"string",
",",
"<mask>",
"*",
"Object",
",",
"targetProperty",
"string",
",",
"flags",
"BindingFlags",
")",
"*",
"Binding",
"{",
"srcStr",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
... |
6,423 | all-6424 | [
"/",
"*",
"Set1D",
"sets",
"a",
"particular",
"element",
"in",
"them",
"matrix"
] | [
"func",
"(",
"m",
"*",
"Mat",
")",
"Set1D",
"(",
"x",
"int",
",",
"<mask>",
"Scalar",
")",
"{",
"C",
".",
"cvSet1D",
"(",
"unsafe",
".",
"Pointer",
"(",
"m",
")",
",",
"C",
".",
"int",
"(",
"x",
")",
",",
"(",
"C",
".",
"CvScalar",
")",
"("... |
6,424 | all-6425 | [
"IsNotExist",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockOS",
")",
"IsNotExist",
"(",
"arg0",
"error",
")",
"bool",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
",",
"_",
":=",
"ret",
"[",
"0",
"]",
".",
... |
6,425 | all-6426 | [
"newPRMExactRepository",
"is",
"NewPRMExactRepository",
"except",
"it",
"resturns",
"the",
"private",
"type",
"."
] | [
"func",
"newPRMExactRepository",
"(",
"dockerRepository",
"string",
")",
"(",
"*",
"prmExactRepository",
",",
"error",
")",
"{",
"if",
"_",
",",
"err",
":=",
"reference",
".",
"ParseNormalizedNamed",
"(",
"dockerRepository",
")",
";",
"err",
"!=",
"nil",
"{",
... |
6,426 | all-6427 | [
"OptImportStatusChannel",
"is",
"a",
"channel",
"which",
"carry",
"import",
"status",
"information",
".",
"Make",
"sure",
"to",
"read",
"from",
"this",
"channel",
"otherwise",
"the",
"import",
"process",
"will",
"stall",
"."
] | [
"func",
"OptImportStatusChannel",
"(",
"statusChan",
"chan",
"<-",
"ImportStatusUpdate",
")",
"ImportOption",
"{",
"return",
"func",
"(",
"options",
"*",
"ImportOptions",
")",
"error",
"{",
"<mask>",
".",
"statusChan",
"=",
"statusChan",
"\n",
"return",
"nil",
"... |
6,427 | all-6428 | [
"mutateRecords",
"takes",
"a",
"list",
"of",
"endpoints",
"and",
"creates",
"replaces",
"or",
"deletes",
"them",
"based",
"on",
"the",
"changetype"
] | [
"func",
"(",
"p",
"*",
"PDNSProvider",
")",
"mutateRecords",
"(",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"changetype",
"pdnsChangeType",
")",
"error",
"{",
"zonelist",
",",
"err",
":=",
"p",
".",
"ConvertEndpointsToZones",
"(",
"endpoi... |
6,428 | all-6429 | [
"GetStorageType",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_image_get_storage_type",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetStorageType",
"(",
")",
"ImageType",
"{",
"c",
":=",
"C",
".",
"gtk_image_get_storage_type",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"ImageType",
"(",
"c",
")",
"\n",
"}"
] |
6,429 | all-6430 | [
"Step",
"increases",
"ProgressBar",
"value",
"by",
"1",
"if",
"the",
"value",
"is",
"less",
"than",
"ProgressBar",
"high",
"limit"
] | [
"func",
"(",
"b",
"*",
"ProgressBar",
")",
"Step",
"(",
")",
"int",
"{",
"b",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n",
"b",
".",
"value",
"++",
"\n\n",
"if",
"b",
".",
"value",
">",
"... |
6,430 | all-6431 | [
"HasTimezone",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"Downtime",
")",
"HasTimezone",
"(",
")",
"bool",
"{",
"if",
"d",
"!=",
"nil",
"&&",
"d",
".",
"Timezone",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
6,431 | all-6432 | [
"names",
"should",
"have",
"been",
"sorted",
"based",
"on",
"sequence",
"number",
".",
"isValidSeq",
"checks",
"whether",
"seq",
"increases",
"continuously",
"."
] | [
"func",
"isValidSeq",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"names",
"[",
"]",
"string",
")",
"bool",
"{",
"var",
"lastSeq",
"uint64",
"\n",
"for",
"_",
",",
"name",
":=",
"range",
"names",
"{",
"curSeq",
",",
"_",
",",
"err",
":=",
"parseWALN... |
6,432 | all-6433 | [
"HasResource",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"Comment",
")",
"HasResource",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"Resource",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
6,433 | all-6434 | [
"copies",
"environment",
"variables",
"to",
"new",
"names",
"without",
"overwriting",
"existing",
"values"
] | [
"func",
"remapEnv",
"(",
"mapping",
"map",
"[",
"string",
"]",
"string",
")",
"{",
"for",
"k",
",",
"v",
":=",
"range",
"mapping",
"{",
"currentVal",
":=",
"os",
".",
"Getenv",
"(",
"k",
")",
"\n",
"newVal",
":=",
"<mask>",
".",
"Getenv",
"(",
"v",... |
6,434 | all-6435 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"SetOptionsResultCode"
] | [
"func",
"(",
"e",
"SetOptionsResultCode",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"<mask>",
":=",
"setOptionsResultCodeMap",
"[",
"v",
"]",
"\n",
"return",
"ok",
"\n",
"}"
] |
6,435 | all-6436 | [
"Open",
"returns",
"a",
"new",
"storage",
"backed",
"by",
"a",
"TSDB",
"database",
"that",
"is",
"configured",
"for",
"Prometheus",
"."
] | [
"func",
"Open",
"(",
"path",
"string",
",",
"l",
"<mask>",
".",
"Logger",
",",
"r",
"prometheus",
".",
"Registerer",
",",
"opts",
"*",
"Options",
")",
"(",
"*",
"tsdb",
".",
"DB",
",",
"error",
")",
"{",
"if",
"opts",
".",
"MinBlockDuration",
">",
... |
6,436 | all-6437 | [
"ReadResponse",
"reads",
"a",
"server",
"response",
"into",
"the",
"received",
"o",
"."
] | [
"func",
"(",
"o",
"*",
"ListVMReader",
")",
"ReadResponse",
"(",
"response",
"runtime",
".",
"ClientResponse",
",",
"<mask>",
"runtime",
".",
"Consumer",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"switch",
"response",
".",
"Code",
"(",
")"... |
6,437 | all-6438 | [
"Parse",
"Link",
"headers",
"returning",
"a",
"map",
"from",
"Rel",
"to",
"URL",
".",
"Only",
"understands",
"the",
"URI",
"and",
"rel",
"parameter",
".",
"Very",
"limited",
".",
"See",
"https",
":",
"//",
"tools",
".",
"ietf",
".",
"org",
"/",
"html",... | [
"func",
"parseLinks",
"(",
"h",
"string",
")",
"map",
"[",
"string",
"]",
"string",
"{",
"<mask>",
":=",
"map",
"[",
"string",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"m",
":=",
"range",
"lre",
".",
"FindAllStringSubmatch",
"(",
"h",
",",
"... |
6,438 | all-6439 | [
"Range",
"returns",
"points",
"or",
"count",
"points",
"depending",
"on",
"the",
"size",
"of",
"the",
"topLeft",
"and",
"bottomRight",
"range",
"."
] | [
"func",
"(",
"index",
"*",
"ClusteringIndex",
")",
"Range",
"(",
"topLeft",
"Point",
",",
"bottomRight",
"<mask>",
")",
"[",
"]",
"Point",
"{",
"dist",
":=",
"distance",
"(",
"topLeft",
",",
"bottomRight",
")",
"\n\n",
"if",
"dist",
"<",
"streetLevel",
"... |
6,439 | all-6440 | [
"gitCmdWithKey",
"is",
"used",
"for",
"private",
"repositories",
"and",
"requires",
"an",
"ssh",
"key",
".",
"Note",
":",
"currently",
"only",
"limited",
"to",
"Linux",
"and",
"OSX",
"."
] | [
"func",
"(",
"r",
"*",
"Repo",
")",
"gitCmdWithKey",
"(",
"params",
"[",
"]",
"string",
",",
"dir",
"string",
")",
"error",
"{",
"var",
"gitSSH",
",",
"script",
"gitos",
".",
"File",
"\n",
"// ensure temporary files deleted after usage",
"defer",
"func",
"("... |
6,440 | all-6441 | [
"GetParentId",
"returns",
"the",
"ParentId",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"Downtime",
")",
"GetParentId",
"(",
")",
"int",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"ParentId",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"<mask>",
"*",
"d",
".",
"ParentId",
"\n",
"}"
] |
6,441 | all-6442 | [
"Do",
"executes",
"Debugger",
".",
"getStackTrace",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"stackTrace"
] | [
"func",
"(",
"p",
"*",
"GetStackTraceParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"stackTrace",
"*",
"runtime",
".",
"StackTrace",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetStackTraceReturns",
"\n",
"err",
"=",
... |
6,442 | all-6443 | [
"NewPermission",
"initialize",
"permission"
] | [
"func",
"(",
"role",
"*",
"Role",
")",
"NewPermission",
"(",
")",
"*",
"Permission",
"{",
"return",
"&",
"Permission",
"{",
"<mask>",
":",
"role",
",",
"AllowedRoles",
":",
"map",
"[",
"PermissionMode",
"]",
"[",
"]",
"string",
"{",
"}",
",",
"DeniedRo... |
6,443 | all-6444 | [
"Accept",
"waits",
"for",
"and",
"returns",
"the",
"next",
"connection",
"to",
"the",
"listener",
"."
] | [
"func",
"(",
"s",
"*",
"listener",
")",
"Accept",
"(",
")",
"(",
"<mask>",
".",
"Conn",
",",
"error",
")",
"{",
"s",
".",
"incRef",
"(",
")",
"\n",
"defer",
"s",
".",
"decRef",
"(",
")",
"\n",
"return",
"s",
".",
"Listener",
".",
"Accept",
"(",... |
6,444 | all-6445 | [
"IsRetryable",
"determines",
"if",
"an",
"operation",
"should",
"be",
"retried",
"given",
"an",
"error"
] | [
"func",
"IsRetryable",
"(",
"<mask>",
"Client",
",",
"err",
"error",
")",
"bool",
"{",
"return",
"isNetRetryable",
"(",
"err",
")",
"||",
"client",
".",
"IsRetryable",
"(",
"err",
")",
"\n",
"}"
] |
6,445 | all-6446 | [
"Stop",
"stops",
"the",
"server",
"gracefully",
"and",
"shuts",
"down",
"the",
"running",
"goroutine",
".",
"Stop",
"should",
"be",
"called",
"after",
"a",
"Start",
"(",
"s",
")",
"otherwise",
"it",
"will",
"block",
"forever",
".",
"When",
"stopping",
"lea... | [
"func",
"(",
"s",
"*",
"EtcdServer",
")",
"Stop",
"(",
")",
"{",
"if",
"err",
":=",
"s",
".",
"TransferLeadership",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"if",
"lg",
":=",
"s",
".",
"getLogger",
"(",
")",
";",
"lg",
"!=",
"nil",
"{",
"lg",
... |
6,446 | all-6447 | [
"SimpleHashFromTwoHashes",
"is",
"the",
"basic",
"operation",
"of",
"the",
"Merkle",
"tree",
":",
"Hash",
"(",
"left",
"|",
"right",
")",
"."
] | [
"func",
"SimpleHashFromTwoHashes",
"(",
"left",
",",
"<mask>",
"[",
"]",
"byte",
")",
"[",
"]",
"byte",
"{",
"var",
"hasher",
"=",
"tmhash",
".",
"New",
"(",
")",
"\n",
"err",
":=",
"encodeByteSlice",
"(",
"hasher",
",",
"left",
")",
"\n",
"if",
"err... |
6,447 | all-6448 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventSetChildNodes",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom57",
"(",
"&",
"w",
",",
"v",
")",
... |
6,448 | all-6449 | [
"Freezer",
"functions"
] | [
"func",
"(",
"c",
"*",
"containerLXC",
")",
"Freeze",
"(",
")",
"error",
"{",
"ctxMap",
":=",
"log",
".",
"Ctx",
"{",
"\"",
"\"",
":",
"c",
".",
"project",
",",
"\"",
"\"",
":",
"c",
".",
"name",
",",
"\"",
"\"",
":",
"c",
".",
"creationDate",
... |
6,449 | all-6450 | [
"getVal",
"returns",
"byte",
"slice",
"at",
"offset",
".",
"The",
"given",
"size",
"should",
"be",
"just",
"the",
"value",
"size",
"and",
"should",
"NOT",
"include",
"the",
"meta",
"bytes",
"."
] | [
"func",
"(",
"s",
"*",
"Arena",
")",
"getVal",
"(",
"offset",
"uint32",
",",
"<mask>",
"uint16",
")",
"(",
"ret",
"y",
".",
"ValueStruct",
")",
"{",
"ret",
".",
"Decode",
"(",
"s",
".",
"buf",
"[",
"offset",
":",
"offset",
"+",
"uint32",
"(",
"si... |
6,450 | all-6451 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkSearchEntry",
"."
] | [
"func",
"(",
"v",
"*",
"SearchEntry",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkSearchEntry",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"<mask>",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"(",
... |
6,451 | all-6452 | [
"LinkButtonNewWithLabel",
"is",
"a",
"wrapper",
"around",
"gtk_link_button_new_with_label",
"()",
"."
] | [
"func",
"LinkButtonNewWithLabel",
"(",
"uri",
",",
"<mask>",
"string",
")",
"(",
"*",
"LinkButton",
",",
"error",
")",
"{",
"curi",
":=",
"C",
".",
"CString",
"(",
"uri",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"curi... |
6,452 | all-6453 | [
"Push",
"a",
"point",
"to",
"the",
"database",
".",
"This",
"appends",
"to",
"current",
"batchpoint"
] | [
"func",
"(",
"i",
"*",
"InfluxDB",
")",
"Push",
"(",
"tags",
"map",
"[",
"string",
"]",
"string",
",",
"fields",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
",",
"date",
"time",
".",
"Time",
")",
"error",
"{",
"pt",
",",
"err",
":=",
"influ... |
6,453 | all-6454 | [
"Stability",
":",
"***",
"EXPERIMENTAL",
"***",
"Return",
"a",
"list",
"of",
"the",
"most",
"recent",
"errors",
"encountered",
"by",
"a",
"worker",
"type",
"See",
"https",
":",
"//",
"docs",
".",
"taskcluster",
".",
"net",
"/",
"reference",
"/",
"core",
... | [
"func",
"(",
"eC2Manager",
"*",
"EC2Manager",
")",
"WorkerTypeErrors",
"(",
"workerType",
"string",
")",
"(",
"*",
"Errors",
",",
"error",
")",
"{",
"<mask>",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"eC2Manager",
")",
"\n",
"responseObject",
",",
"_",
... |
6,454 | all-6455 | [
"flattenVAppConfig",
"reads",
"in",
"the",
"vAppConfig",
"from",
"a",
"running",
"virtual",
"machine",
"and",
"sets",
"all",
"keys",
"in",
"vapp",
"."
] | [
"func",
"flattenVAppConfig",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"config",
"types",
".",
"BaseVmConfigInfo",
")",
"error",
"{",
"if",
"config",
"==",
"nil",
"{",
"d",
".",
"Set",
"(",
"\"",
"\"",
",",
"[",
"]",
"string",
"{",
"}",
")",... |
6,455 | all-6456 | [
"cmps",
"guards",
"the",
"txn",
"from",
"updates",
"to",
"read",
"set"
] | [
"func",
"(",
"s",
"*",
"stm",
")",
"cmps",
"(",
")",
"[",
"]",
"v3",
".",
"Cmp",
"{",
"cmps",
":=",
"make",
"(",
"[",
"]",
"v3",
".",
"Cmp",
",",
"0",
",",
"len",
"(",
"s",
".",
"rset",
")",
")",
"\n",
"for",
"k",
",",
"rk",
":=",
"<mas... |
6,456 | all-6457 | [
"SetAccelsForAction",
"is",
"a",
"wrapper",
"around",
"gtk_application_set_accels_for_action",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Application",
")",
"SetAccelsForAction",
"(",
"act",
"string",
",",
"accels",
"[",
"]",
"string",
")",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"act",
")",
")",
"\n",
"defer",
"C... |
6,457 | all-6458 | [
"PutFileSplit",
"writes",
"a",
"file",
"to",
"PFS",
"from",
"a",
"reader",
"delimiter",
"is",
"used",
"to",
"tell",
"PFS",
"how",
"to",
"break",
"the",
"input",
"into",
"blocks"
] | [
"func",
"(",
"c",
"APIClient",
")",
"PutFileSplit",
"(",
"repoName",
"string",
",",
"commitID",
"string",
",",
"path",
"string",
",",
"delimiter",
"pfs",
".",
"Delimiter",
",",
"targetFileDatums",
"int64",
",",
"targetFileBytes",
"int64",
",",
"headerRecords",
... |
6,458 | all-6459 | [
"MetricWithPrefix",
"is",
"the",
"default",
"mapping",
"for",
"metrics",
"to",
"statsd",
"keys",
"."
] | [
"func",
"MetricWithPrefix",
"(",
"prefix",
",",
"name",
"string",
",",
"tags",
"map",
"[",
"string",
"]",
"string",
")",
"string",
"{",
"buf",
":=",
"bufPool",
".",
"Get",
"(",
")",
".",
"(",
"*",
"bytes",
".",
"Buffer",
")",
"\n",
"buf",
".",
"Res... |
6,459 | all-6460 | [
"save",
"reads",
"the",
"applied",
"ipvsadm",
"rules",
"from",
"the",
"host",
"and",
"saves",
"them",
"as",
"i",
".",
"Services"
] | [
"func",
"(",
"i",
"*",
"Ipvs",
")",
"Save",
"(",
")",
"error",
"{",
"out",
",",
"err",
":=",
"backendRun",
"(",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
"}",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
... |
6,460 | all-6461 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RequestMemoryDumpParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing3",
"(",
"&",
"w",
",",
"v",
... |
6,461 | all-6462 | [
"GetUnknown",
"returns",
"the",
"Unknown",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"ThresholdCount",
")",
"GetUnknown",
"(",
")",
"json",
".",
"Number",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Unknown",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"<mask>",
"\n",... |
6,462 | all-6463 | [
"GetCurrentUri",
"is",
"a",
"wrapper",
"around",
"gtk_label_get_current_uri",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Label",
")",
"GetCurrentUri",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_label_get_current_uri",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>",
")",
... |
6,463 | all-6464 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventFrameRequestedNavigation",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage63",
"(",... |
6,464 | all-6465 | [
"Only",
"available",
"from",
"2",
".",
"42",
"//",
"SetPriority",
"is",
"a",
"wrapper",
"around",
"g_notification_set_priority",
"()",
".",
"func",
"(",
"v",
"*",
"Notification",
")",
"SetPriority",
"(",
"prio",
"NotificationPriority",
")",
"{",
"C",
".",
"g... | [
"func",
"(",
"v",
"*",
"Notification",
")",
"SetDefaultAction",
"(",
"detailedAction",
"string",
")",
"{",
"cstr1",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"detailedAction",
")",
")",
"\n",
"defer",
"C",
".",
"<mask>",
... |
6,465 | all-6466 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform1ui",
"(",
"program",
"uint32",
",",
"location",
"int32",
",",
"v0",
"uint32",
")",
"{",
"C",
".",
"glowProgramUniform1ui",
"(",
"gpProgramUniform1ui",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"program",
")",
",",
"(",
"C",
".",
"GL... |
6,466 | all-6467 | [
"WaitForMark",
"waits",
"until",
"the",
"given",
"index",
"is",
"marked",
"as",
"done",
"."
] | [
"func",
"(",
"w",
"*",
"WaterMark",
")",
"WaitForMark",
"(",
"ctx",
"context",
".",
"Context",
",",
"index",
"uint64",
")",
"error",
"{",
"if",
"w",
".",
"DoneUntil",
"(",
")",
">=",
"index",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"waitCh",
":=",
"... |
6,467 | all-6468 | [
"ConvertPath",
"converts",
"a",
"paths",
"to",
"the",
"pdf",
"api"
] | [
"func",
"ConvertPath",
"(",
"path",
"*",
"draw2d",
".",
"Path",
",",
"pdf",
"Vectorizer",
")",
"{",
"var",
"startX",
",",
"startY",
"float64",
"=",
"0",
",",
"0",
"\n",
"i",
":=",
"0",
"\n",
"for",
"_",
",",
"cmp",
":=",
"range",
"path",
".",
"Co... |
6,468 | all-6469 | [
"Cat",
"the",
"content",
"at",
"the",
"given",
"path",
".",
"Callers",
"need",
"to",
"drain",
"and",
"close",
"the",
"returned",
"reader",
"after",
"usage",
"."
] | [
"func",
"(",
"s",
"*",
"Shell",
")",
"Cat",
"(",
"path",
"string",
")",
"(",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"Request",
"(",
"\"",
"\"",
",",
"path",
")",
".",
"Send",
"(",
"context",
".",
... |
6,469 | all-6470 | [
"Draw",
"a",
"tiger"
] | [
"func",
"Draw",
"(",
"gc",
"draw2d",
".",
"GraphicContext",
",",
"filename",
"string",
")",
"{",
"// Open the postscript",
"src",
",",
"err",
":=",
"os",
".",
"OpenFile",
"(",
"filename",
",",
"0",
",",
"0",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
6,470 | all-6471 | [
"GetName",
"returns",
"the",
"Name",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"m",
"*",
"Monitor",
")",
"GetName",
"(",
")",
"string",
"{",
"if",
"m",
"==",
"nil",
"||",
"m",
".",
"Name",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"m",
".",
"<mask>",
"\n",
"}"
] |
6,471 | all-6472 | [
"UnmarshalYAML",
"implements",
"the",
"yaml",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"c",
"*",
"SDConfig",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"<mask>",
"{",
"}",
")",
"error",
")",
"error",
"{",
"*",
"c",
"=",
"DefaultSDConfig",
"\n",
"type",
"plain",
"SDConfig",
"\n",
"err",
":=",
"unmarshal",
"(",
"(",
... |
6,472 | all-6473 | [
"merge",
"merges",
"two",
"similar",
"Args",
"zapping",
"out",
"differences",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"merge",
"(",
"r",
"*",
"Args",
")",
"Args",
"{",
"out",
":=",
"Args",
"{",
"Values",
":",
"make",
"(",
"[",
"]",
"Arg",
",",
"len",
"(",
"a",
".",
"Values",
")",
")",
",",
"Elided",
":",
"a",
".",
"Elide... |
6,473 | all-6474 | [
"SearchWorksheets",
"returns",
"worksheets",
"matching",
"the",
"specified",
"search",
"query",
"and",
"/",
"or",
"filter",
".",
"If",
"nil",
"is",
"passed",
"for",
"both",
"parameters",
"all",
"worksheets",
"will",
"be",
"returned",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"SearchWorksheets",
"(",
"searchCriteria",
"*",
"SearchQueryType",
",",
"filterCriteria",
"*",
"SearchFilterType",
")",
"(",
"*",
"[",
"]",
"Worksheet",
",",
"error",
")",
"{",
"q",
":=",
"url",
".",
"Values",
"{",
"}",... |
6,474 | all-6475 | [
"ProfileConfig",
"gets",
"the",
"profile",
"configuration",
"map",
"from",
"the",
"DB",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"ProfileConfig",
"(",
"project",
",",
"name",
"string",
")",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"err",
":=",
"c",
".",
"Transaction",
"(",
"func",
"(",
"tx",
"*",
"ClusterTx",
")... |
6,475 | all-6476 | [
"HasPalette",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HostmapStyle",
")",
"HasPalette",
"(",
")",
"bool",
"{",
"if",
"h",
"!=",
"nil",
"&&",
"h",
".",
"Palette",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
6,476 | all-6477 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"TextBoxSnapshot",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot",
"(",
"&",
"... |
6,477 | all-6478 | [
"ParamsEscape",
"returns",
"escapred",
"params",
"result",
".",
"e",
".",
"g",
".",
"ctx",
".",
"ParamsEscape",
"(",
":",
"uname",
")"
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"ParamsEscape",
"(",
"name",
"string",
")",
"string",
"{",
"return",
"template",
".",
"HTMLEscapeString",
"(",
"ctx",
".",
"Params",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
6,478 | all-6479 | [
"SetDockerAuthConfig",
"sets",
"the",
"credentials",
"to",
"pull",
"from",
"ECR",
"in",
"the",
"auth"
] | [
"func",
"(",
"auth",
"*",
"ASMAuthData",
")",
"SetDockerAuthConfig",
"(",
"dac",
"types",
".",
"AuthConfig",
")",
"{",
"auth",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"auth",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"auth",
".",
"do... |
6,479 | all-6480 | [
"GetDisabled",
"returns",
"the",
"Disabled",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"d",
"*",
"Downtime",
")",
"GetDisabled",
"(",
")",
"bool",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"Disabled",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"Disabled",
"\n",
"}"
] |
6,480 | all-6481 | [
"Do",
"executes",
"Animation",
".",
"getPlaybackRate",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"playbackRate",
"-",
"Playback",
"rate",
"for",
"animations",
"on",
"page",
"."
] | [
"func",
"(",
"p",
"*",
"GetPlaybackRateParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"playbackRate",
"float64",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetPlaybackRateReturns",
"\n",
"err",
"=",
"cdp",
".",
"Execu... |
6,481 | all-6482 | [
"specify",
"storage",
"for",
"a",
"two",
"-",
"dimensional",
"multisample",
"array",
"texture"
] | [
"func",
"TexStorage3DMultisample",
"(",
"target",
"uint32",
",",
"samples",
"int32",
",",
"internalformat",
"uint32",
",",
"<mask>",
"int32",
",",
"height",
"int32",
",",
"depth",
"int32",
",",
"fixedsamplelocations",
"bool",
")",
"{",
"syscall",
".",
"Syscall9"... |
6,482 | all-6483 | [
"WriteInt16",
"writes",
"an",
"int16",
"."
] | [
"func",
"(",
"w",
"*",
"Writer",
")",
"WriteInt16",
"(",
"i",
"int16",
")",
"{",
"if",
"w",
".",
"err",
"!=",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"<mask>",
".",
"LittleEndian",
".",
"PutUint16",
"(",
"w",
".",
"b",
"[",
":",
"2",
"]",
",",
... |
6,483 | all-6484 | [
"Throttle",
"client",
"to",
"a",
"rate",
"of",
"at",
"most",
"hourlyTokens",
"requests",
"per",
"hour",
"allowing",
"burst",
"tokens",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Throttle",
"(",
"hourlyTokens",
",",
"burst",
"int",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"hourlyTokens",
",",
"burst",
")",
"\n",
"c",
".",
"throttle",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
... |
6,484 | all-6485 | [
"Returns",
"a",
"signed",
"URL",
"for",
"AzureAccounts",
"valid",
"for",
"the",
"specified",
"duration",
".",
"Required",
"scopes",
":",
"auth",
":",
"azure",
"-",
"table",
":",
"list",
"-",
"accounts",
"See",
"AzureAccounts",
"for",
"more",
"details",
"."
] | [
"func",
"(",
"auth",
"*",
"Auth",
")",
"AzureAccounts_SignedURL",
"(",
"duration",
"time",
".",
"Duration",
")",
"(",
"*",
"url",
".",
"URL",
",",
"error",
")",
"{",
"cd",
":=",
"tcclient",
".",
"<mask>",
"(",
"*",
"auth",
")",
"\n",
"return",
"(",
... |
6,485 | all-6486 | [
"NetworkCreatePending",
"creates",
"a",
"new",
"pending",
"network",
"on",
"the",
"node",
"with",
"the",
"given",
"name",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"NetworkCreatePending",
"(",
"<mask>",
",",
"name",
"string",
",",
"conf",
"map",
"[",
"string",
"]",
"string",
")",
"error",
"{",
"// First check if a network with the given name exists, and, if",
"// so, that it's in the pendin... |
6,486 | all-6487 | [
"GetFontSizeOk",
"returns",
"a",
"tuple",
"with",
"the",
"FontSize",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"f",
"*",
"FreeTextDefinition",
")",
"GetFontSizeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"f",
"==",
"nil",
"||",
"f",
".",
"FontSize",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",... |
6,487 | all-6488 | [
"RetryClusterClient",
"implements",
"a",
"ClusterClient",
"."
] | [
"func",
"RetryClusterClient",
"(",
"c",
"*",
"Client",
")",
"<mask>",
".",
"ClusterClient",
"{",
"return",
"&",
"retryClusterClient",
"{",
"cc",
":",
"pb",
".",
"NewClusterClient",
"(",
"c",
".",
"conn",
")",
",",
"}",
"\n",
"}"
] |
6,488 | all-6489 | [
"HasTitleSize",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HeatmapDefinition",
")",
"HasTitleSize",
"(",
")",
"bool",
"{",
"if",
"h",
"!=",
"nil",
"&&",
"h",
".",
"TitleSize",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
6,489 | all-6490 | [
"Route",
"returns",
"the",
"subrouter",
"for",
"a",
"pettern"
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"Route",
"(",
"pattern",
"string",
")",
"*",
"Router",
"{",
"c",
":=",
"r",
".",
"pattern",
"(",
"<mask>",
")",
"\n",
"return",
"r",
".",
"clone",
"(",
"c",
")",
"\n",
"}"
] |
6,490 | all-6491 | [
"MutateChangeTrust",
"for",
"Asset",
"sets",
"the",
"ChangeTrustOp",
"s",
"Line",
"field"
] | [
"func",
"(",
"m",
"<mask>",
")",
"MutateChangeTrust",
"(",
"o",
"*",
"xdr",
".",
"ChangeTrustOp",
")",
"(",
"err",
"error",
")",
"{",
"if",
"m",
".",
"Native",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"o",
"."... |
6,491 | all-6492 | [
"KeyPairAndCA",
"returns",
"a",
"CertInfo",
"object",
"with",
"a",
"reference",
"to",
"the",
"key",
"pair",
"and",
"(",
"optionally",
")",
"CA",
"certificate",
"located",
"in",
"the",
"given",
"directory",
"and",
"having",
"the",
"given",
"name",
"prefix",
"... | [
"func",
"KeyPairAndCA",
"(",
"dir",
",",
"prefix",
"string",
",",
"kind",
"CertKind",
")",
"(",
"*",
"CertInfo",
",",
"error",
")",
"{",
"certFilename",
":=",
"filepath",
".",
"Join",
"(",
"dir",
",",
"<mask>",
"+",
"\"",
"\"",
")",
"\n",
"keyFilename"... |
6,492 | all-6493 | [
"ExecSudo",
"executes",
"a",
"command",
"under",
"sudo",
"."
] | [
"func",
"ExecSudo",
"(",
"cmd",
"string",
",",
"args",
"...",
"string",
")",
"error",
"{",
"return",
"Exec",
"(",
"\"",
"\"",
",",
"<mask>",
"(",
"[",
"]",
"string",
"{",
"cmd",
"}",
",",
"args",
"...",
")",
"...",
")",
"\n",
"}"
] |
6,493 | all-6494 | [
"copy",
"all",
"or",
"part",
"of",
"the",
"data",
"store",
"of",
"a",
"buffer",
"object",
"to",
"the",
"data",
"store",
"of",
"another",
"buffer",
"object"
] | [
"func",
"CopyBufferSubData",
"(",
"readTarget",
"uint32",
",",
"writeTarget",
"uint32",
",",
"readOffset",
"int",
",",
"writeOffset",
"int",
",",
"size",
"int",
")",
"{",
"C",
".",
"glowCopyBufferSubData",
"(",
"gpCopyBufferSubData",
",",
"(",
"C",
".",
"GLenu... |
6,494 | all-6495 | [
"See",
"http",
":",
"//",
"www",
".",
"vt100",
".",
"net",
"/",
"emu",
"/",
"vt500_parser",
".",
"png",
"for",
"description",
"of",
"the",
"complex",
"byte",
"ranges",
"below"
] | [
"func",
"getEscapeToGroundBytes",
"(",
")",
"[",
"]",
"byte",
"{",
"escapeToGroundBytes",
":=",
"getByteRange",
"(",
"0x30",
",",
"0x4F",
")",
"\n",
"escapeToGroundBytes",
"=",
"append",
"(",
"escapeToGroundBytes",
",",
"getByteRange",
"(",
"0x51",
",",
"0x57",
... |
6,495 | all-6496 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetFrameOwnerReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom40",
"(",
"&",
... |
6,496 | all-6497 | [
"newClient",
"creates",
"a",
"new",
"Pact",
"client",
"manager",
"with",
"the",
"provided",
"services"
] | [
"func",
"newClient",
"(",
"MockServiceManager",
"client",
".",
"Service",
",",
"verificationServiceManager",
"client",
".",
"Service",
",",
"messageServiceManager",
"client",
".",
"Service",
",",
"publishServiceManager",
"<mask>",
".",
"Service",
")",
"*",
"PactClient... |
6,497 | all-6498 | [
"Serialize",
"action",
"parameters"
] | [
"func",
"parameters",
"(",
"a",
"*",
"gen",
".",
"Action",
")",
"string",
"{",
"var",
"m",
"=",
"a",
".",
"MandatoryParams",
"(",
")",
"\n",
"var",
"hasOptional",
"=",
"a",
".",
"HasOptionalParams",
"(",
")",
"\n",
"<mask>",
"countParams",
"=",
"len",
... |
6,498 | all-6499 | [
"return",
"the",
"polygon",
"stipple",
"pattern"
] | [
"func",
"GetPolygonStipple",
"(",
"mask",
"*",
"uint8",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpGetPolygonStipple",
",",
"1",
",",
"uintptr",
"(",
"unsafe",
".",
"Pointer",
"(",
"<mask>",
")",
")",
",",
"0",
",",
"0",
")",
"\n",
"}"
] |
6,499 | all-6500 | [
"Given",
"a",
"path",
"and",
"an",
"http",
"method",
"return",
"all",
"the",
"matching",
"routes",
"."
] | [
"func",
"(",
"t",
"*",
"Trie",
")",
"FindRoutes",
"(",
"httpMethod",
",",
"path",
"string",
")",
"[",
"]",
"*",
"Match",
"{",
"context",
":=",
"newFindContext",
"(",
")",
"\n",
"matches",
":=",
"[",
"]",
"*",
"Match",
"{",
"}",
"\n",
"<mask>",
".",... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.