id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
20,200 | all-20201 | [
"Write",
"writes",
"argument",
"data",
"breaking",
"it",
"into",
"fragments",
"as",
"needed"
] | [
"func",
"(",
"w",
"*",
"fragmentingWriter",
")",
"Write",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"w",
".",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"w",
".",
"err",
"\n",
"}",
"\n\n",
"if",
"!",
"w",
... |
20,201 | all-20202 | [
"GetPalette",
"returns",
"the",
"Palette",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetRequestStyle",
")",
"GetPalette",
"(",
")",
"<mask>",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Palette",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"Palette",
"\n",
"}"
] |
20,202 | all-20203 | [
"EnterExclusive",
"acquires",
"a",
"lock",
"on",
"the",
"cluster",
"db",
"so",
"any",
"successive",
"call",
"to",
"Transaction",
"will",
"block",
"until",
"ExitExclusive",
"has",
"been",
"called",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"EnterExclusive",
"(",
")",
"error",
"{",
"logger",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n\n",
"ch",
":=",
"<mask>",
"(",
"chan",
"struct",
"{",
"}",
")",
"\n",
"go",
"func",
"(",
")",
"{",
"c",
".",
"mu"... |
20,203 | all-20204 | [
"Commit",
"commits",
"a",
"previous",
"tx",
"and",
"begins",
"a",
"new",
"writable",
"one",
"."
] | [
"func",
"(",
"t",
"*",
"batchTx",
")",
"Commit",
"(",
")",
"{",
"t",
".",
"Lock",
"(",
")",
"\n",
"t",
".",
"commit",
"(",
"<mask>",
")",
"\n",
"t",
".",
"Unlock",
"(",
")",
"\n",
"}"
] |
20,204 | all-20205 | [
"processExternalLabels",
"merges",
"externalLabels",
"into",
"ls",
".",
"If",
"ls",
"contains",
"a",
"label",
"in",
"externalLabels",
"the",
"value",
"in",
"ls",
"wins",
"."
] | [
"func",
"processExternalLabels",
"(",
"ls",
"tsdbLabels",
".",
"Labels",
",",
"externalLabels",
"labels",
".",
"Labels",
")",
"labels",
".",
"Labels",
"{",
"i",
",",
"j",
",",
"result",
":=",
"0",
",",
"0",
",",
"make",
"(",
"labels",
".",
"Labels",
",... |
20,205 | all-20206 | [
"Error",
"calls",
"fmt",
".",
"Println",
"for",
"of",
"every",
"error",
"in",
"the",
"list",
"and",
"returns",
"the",
"concernated",
"text",
".",
"Can",
"be",
"called",
"for",
"a",
"nil",
"ErrorList",
"."
] | [
"func",
"(",
"list",
"ErrorList",
")",
"<mask>",
"(",
")",
"string",
"{",
"if",
"len",
"(",
"list",
")",
"==",
"0",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"var",
"b",
"strings",
".",
"Builder",
"\n",
"for",
"_",
",",
"err",
":=",
"range",
... |
20,206 | all-20207 | [
"baseConfig",
"is",
"called",
"on",
"initial",
"TLS",
"handshake",
"start",
".",
"Previously",
"1",
".",
"Server",
"has",
"non",
"-",
"empty",
"(",
"*",
"tls",
".",
"Config",
")",
".",
"Certificates",
"on",
"client",
"hello",
"2",
".",
"Server",
"calls",... | [
"func",
"(",
"info",
"TLSInfo",
")",
"baseConfig",
"(",
")",
"(",
"*",
"tls",
".",
"Config",
",",
"error",
")",
"{",
"if",
"info",
".",
"KeyFile",
"==",
"\"",
"\"",
"||",
"info",
".",
"CertFile",
"==",
"\"",
"\"",
"{",
"return",
"nil",
",",
"fmt"... |
20,207 | all-20208 | [
"Trending",
"returns",
"a",
"list",
"of",
"venues",
"near",
"the",
"current",
"location",
"with",
"the",
"most",
"people",
"currently",
"checked",
"in",
".",
"https",
":",
"//",
"developer",
".",
"foursquare",
".",
"com",
"/",
"docs",
"/",
"api",
"/",
"v... | [
"func",
"(",
"s",
"*",
"VenueService",
")",
"Trending",
"(",
"params",
"*",
"VenueTrendingParams",
")",
"(",
"[",
"]",
"Venue",
",",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"venues",
":=",
"new",
"(",
"venueTrendingResp",
")",
"\n",
"resp... |
20,208 | all-20209 | [
"Commit",
"marks",
"the",
"process",
"of",
"storing",
"the",
"image",
"as",
"successful",
"and",
"asks",
"for",
"the",
"image",
"to",
"be",
"persisted",
".",
"WARNING",
":",
"This",
"does",
"not",
"have",
"any",
"transactional",
"semantics",
":",
"-",
"Upl... | [
"func",
"(",
"d",
"*",
"archiveImageDestination",
")",
"Commit",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"error",
"{",
"return",
"d",
".",
"Destination",
".",
"Commit",
"(",
"ctx",
")",
"\n",
"}"
] |
20,209 | all-20210 | [
"GetDoubleWithDefault",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_double_with_default",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"GetDoubleWithDefault",
"(",
"<mask>",
"string",
",",
"def",
"float64",
")",
"float64",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"key",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer... |
20,210 | all-20211 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"RemoveNodeParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom15",
"(",
"&",
"r",
... |
20,211 | all-20212 | [
"HasLabel",
"checks",
"if",
"an",
"issue",
"has",
"a",
"given",
"label",
"."
] | [
"func",
"(",
"i",
"Issue",
")",
"HasLabel",
"(",
"labelToFind",
"string",
")",
"bool",
"{",
"for",
"_",
",",
"label",
":=",
"range",
"i",
".",
"Labels",
"{",
"if",
"strings",
".",
"ToLower",
"(",
"label",
".",
"Name",
")",
"==",
"strings",
".",
"To... |
20,212 | all-20213 | [
"NewManageOfferSuccessResultOffer",
"creates",
"a",
"new",
"ManageOfferSuccessResultOffer",
"."
] | [
"func",
"NewManageOfferSuccessResultOffer",
"(",
"effect",
"ManageOfferEffect",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"ManageOfferSuccessResultOffer",
",",
"err",
"error",
")",
"{",
"result",
".",
"Effect",
"=",
"effect",
"\n",
"switch",
"Manage... |
20,213 | all-20214 | [
"creates",
"and",
"initializes",
"a",
"buffer",
"object",
"s",
"immutable",
"data",
"store"
] | [
"func",
"BufferStorage",
"(",
"target",
"uint32",
",",
"size",
"int",
",",
"data",
"unsafe",
".",
"Pointer",
",",
"flags",
"uint32",
")",
"{",
"C",
".",
"glowBufferStorage",
"(",
"gpBufferStorage",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"target",
")",
... |
20,214 | all-20215 | [
"GetMessage",
"returns",
"the",
"Message",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsTest",
")",
"GetMessage",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Message",
"\n",
"}"
] |
20,215 | all-20216 | [
"Giving",
"a",
"value",
"a",
"multi",
"-",
"index",
"and",
"the",
"key",
"of",
"the",
"item",
"return",
"the",
"paths",
"under",
"which",
"the",
"multi",
"-",
"index",
"items",
"should",
"be",
"stored",
"."
] | [
"func",
"(",
"c",
"*",
"readWriteCollection",
")",
"getMultiIndexPaths",
"(",
"val",
"<mask>",
"{",
"}",
",",
"index",
"*",
"Index",
",",
"key",
"string",
")",
"[",
"]",
"string",
"{",
"var",
"indexPaths",
"[",
"]",
"string",
"\n",
"field",
":=",
"refl... |
20,216 | all-20217 | [
"contextsToStrings",
"converts",
"a",
"list",
"Context",
"to",
"a",
"list",
"of",
"string"
] | [
"func",
"contextsToStrings",
"(",
"contexts",
"[",
"]",
"Context",
")",
"[",
"]",
"string",
"{",
"<mask>",
"names",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"c",
":=",
"range",
"contexts",
"{",
"names",
"=",
"append",
"(",
"names",
",",
"string",
"... |
20,217 | all-20218 | [
"MutatePayment",
"for",
"Asset",
"sets",
"the",
"PaymentOp",
"s",
"Asset",
"field"
] | [
"func",
"(",
"m",
"CreditAmount",
")",
"MutatePayment",
"(",
"o",
"interface",
"{",
"}",
")",
"(",
"err",
"error",
")",
"{",
"switch",
"o",
":=",
"o",
".",
"(",
"type",
")",
"{",
"default",
":",
"err",
"=",
"errors",
".",
"New",
"(",
"\"",
"\"",
... |
20,218 | all-20219 | [
"ParseRange",
"returns",
"a",
"new",
"range",
"object",
"and",
"nil",
"if",
"the",
"given",
"range",
"definition",
"was",
"valid",
"or",
"nil",
"and",
"an",
"error",
"if",
"it",
"was",
"invalid",
"."
] | [
"func",
"ParseRange",
"(",
"rangeStr",
"string",
")",
"(",
"*",
"Range",
",",
"error",
")",
"{",
"// Set defaults",
"t",
":=",
"&",
"Range",
"{",
"Start",
":",
"0",
",",
"End",
":",
"math",
".",
"Inf",
"(",
"1",
")",
",",
"AlertOnInside",
":",
"fal... |
20,219 | all-20220 | [
"Use",
"the",
"leafHash",
"and",
"innerHashes",
"to",
"get",
"the",
"root",
"merkle",
"hash",
".",
"If",
"the",
"length",
"of",
"the",
"innerHashes",
"slice",
"isn",
"t",
"exactly",
"correct",
"the",
"result",
"is",
"nil",
".",
"Recursive",
"impl",
"."
] | [
"func",
"computeHashFromAunts",
"(",
"index",
"int",
",",
"total",
"int",
",",
"leafHash",
"[",
"]",
"byte",
",",
"innerHashes",
"[",
"]",
"[",
"]",
"byte",
")",
"[",
"]",
"byte",
"{",
"if",
"index",
">=",
"total",
"||",
"index",
"<",
"0",
"||",
"t... |
20,220 | all-20221 | [
"ReadResponse",
"reads",
"a",
"http",
".",
"Response",
"from",
"the",
"given",
"readers",
"."
] | [
"func",
"ReadResponse",
"(",
"call",
"tchannel",
".",
"ArgReadable",
")",
"(",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"var",
"arg2",
"[",
"]",
"byte",
"\n",
"if",
"err",
":=",
"tchannel",
".",
"NewArgReader",
"(",
"call",
".",
"Arg2Reade... |
20,221 | all-20222 | [
"loadTemplate",
"parses",
"the",
"specified",
"template",
"and",
"returns",
"it"
] | [
"func",
"(",
"r",
"*",
"Render",
")",
"loadTemplate",
"(",
"name",
"string",
")",
"*",
"template",
".",
"Template",
"{",
"tpl",
",",
"err",
":=",
"<mask>",
".",
"ParseFiles",
"(",
"r",
".",
"Files",
"[",
"name",
"]",
"...",
")",
"\n",
"if",
"err",
... |
20,222 | all-20223 | [
"BackendStatus",
"maps",
"the",
"internal",
"container",
"status",
"in",
"the",
"agent",
"to",
"that",
"in",
"the",
"backend"
] | [
"func",
"(",
"cs",
"*",
"ContainerStatus",
")",
"BackendStatus",
"(",
"steadyStateStatus",
"ContainerStatus",
")",
"ContainerStatus",
"{",
"if",
"*",
"cs",
"==",
"steadyStateStatus",
"{",
"return",
"ContainerRunning",
"\n",
"}",
"\n\n",
"if",
"*",
"<mask>",
"=="... |
20,223 | all-20224 | [
"iinfo",
":",
"TypeInfo",
"for",
"the",
"interface",
"for",
"which",
"we",
"must",
"decode",
"a",
"concrete",
"type",
"with",
"prefix",
"bytes",
"pb",
"."
] | [
"func",
"(",
"cdc",
"*",
"Codec",
")",
"getTypeInfoFromPrefix_rlock",
"(",
"iinfo",
"*",
"TypeInfo",
",",
"pb",
"PrefixBytes",
")",
"(",
"info",
"*",
"TypeInfo",
",",
"err",
"error",
")",
"{",
"// We do not use defer cdc.mtx.Unlock() here due to performance overhead o... |
20,224 | all-20225 | [
"layerPath",
"returns",
"a",
"path",
"for",
"a",
"layer",
"tarball",
"within",
"a",
"directory",
"using",
"our",
"conventions",
"."
] | [
"func",
"(",
"<mask>",
"dirReference",
")",
"layerPath",
"(",
"digest",
"digest",
".",
"Digest",
")",
"string",
"{",
"// FIXME: Should we keep the digest identification?",
"return",
"filepath",
".",
"Join",
"(",
"ref",
".",
"path",
",",
"digest",
".",
"Hex",
"("... |
20,225 | all-20226 | [
"Start",
"creates",
"goroutines",
"to",
"monitor",
"the",
"files",
"that",
"contain",
"the",
"secret",
"value",
"."
] | [
"func",
"(",
"a",
"*",
"Agent",
")",
"Start",
"(",
"paths",
"[",
"]",
"string",
")",
"error",
"{",
"secretsMap",
",",
"err",
":=",
"LoadSecrets",
"(",
"paths",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"a",
"."... |
20,226 | all-20227 | [
"createMapKeyValueExpression",
"creates",
"a",
"new",
"map",
"key",
"value",
"function",
"expression",
"of",
"the",
"form",
"{{",
"name",
"}}",
":",
"func",
"()",
"{",
"{{",
"namedImport",
"}}",
".",
"{{",
"amalgomatedMain",
"}}",
"()",
"}",
".",
"In",
"mo... | [
"func",
"createMapKeyValueExpression",
"(",
"<mask>",
",",
"namedImport",
"string",
")",
"*",
"ast",
".",
"KeyValueExpr",
"{",
"return",
"&",
"ast",
".",
"KeyValueExpr",
"{",
"Key",
":",
"&",
"ast",
".",
"BasicLit",
"{",
"Kind",
":",
"token",
".",
"STRING"... |
20,227 | all-20228 | [
"WithExecutionContextID",
"execution",
"context",
"in",
"which",
"to",
"resolve",
"the",
"node",
"."
] | [
"func",
"(",
"p",
"ResolveNodeParams",
")",
"WithExecutionContextID",
"(",
"executionContextID",
"runtime",
".",
"ExecutionContextID",
")",
"*",
"ResolveNodeParams",
"{",
"p",
".",
"ExecutionContextID",
"=",
"executionContextID",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
... |
20,228 | all-20229 | [
"Hash",
"is",
"an",
"option",
"for",
"Dag",
".",
"Put",
"which",
"specifies",
"the",
"hash",
"function",
"to",
"use"
] | [
"func",
"(",
"dagOpts",
")",
"Hash",
"(",
"<mask>",
"string",
")",
"DagPutOption",
"{",
"return",
"func",
"(",
"opts",
"*",
"DagPutSettings",
")",
"error",
"{",
"opts",
".",
"Hash",
"=",
"hash",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
20,229 | all-20230 | [
"ProcessHostCheckResult",
"creates",
"a",
"new",
"PROCESS_HOST_CHECK_RESULT",
"Nagios",
"command",
".",
"This",
"is",
"used",
"to",
"submit",
"a",
"passive",
"check",
"result",
"for",
"a",
"particular",
"host",
".",
"The",
"status_code",
"indicates",
"the",
"state... | [
"func",
"ProcessHostCheckResult",
"(",
"host_name",
"string",
",",
"status_code",
"int",
",",
"plugin_output",
"<mask>",
",",
")",
"*",
"livestatus",
".",
"Command",
"{",
"return",
"livestatus",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"stringifyArg",
"(",
"\"... |
20,230 | all-20231 | [
"FilterValues",
"returns",
"a",
"new",
"Option",
"where",
"opt",
"is",
"only",
"evaluated",
"if",
"filter",
"f",
"which",
"is",
"a",
"function",
"of",
"the",
"form",
"func",
"(",
"T",
"T",
")",
"bool",
"returns",
"true",
"for",
"the",
"current",
"pair",
... | [
"func",
"FilterValues",
"(",
"f",
"interface",
"{",
"}",
",",
"opt",
"Option",
")",
"Option",
"{",
"v",
":=",
"reflect",
".",
"ValueOf",
"(",
"f",
")",
"\n",
"if",
"!",
"function",
".",
"IsType",
"(",
"v",
".",
"Type",
"(",
")",
",",
"<mask>",
".... |
20,231 | all-20232 | [
"DeepCopy",
"copies",
"the",
"receiver",
"into",
"a",
"new",
"Base64",
"."
] | [
"func",
"(",
"b",
"*",
"Base64",
")",
"DeepCopy",
"(",
")",
"*",
"Base64",
"{",
"if",
"b",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"<mask>",
"(",
"Base64",
")",
"\n",
"b",
".",
"DeepCopyInto",
"(",
"out",
")",
"\n",
"re... |
20,232 | all-20233 | [
"InputName",
"computes",
"the",
"name",
"of",
"an",
"Input",
"."
] | [
"func",
"InputName",
"(",
"input",
"*",
"Input",
")",
"string",
"{",
"switch",
"{",
"case",
"input",
"==",
"nil",
":",
"return",
"\"",
"\"",
"\n",
"case",
"input",
".",
"Pfs",
"!=",
"nil",
":",
"return",
"input",
".",
"Pfs",
".",
"Name",
"\n",
"cas... |
20,233 | all-20234 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetEncodedResponseReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits",
"(",
"&",
"w",
",",
"v",
... |
20,234 | all-20235 | [
"AppendHTMLEscape",
"appends",
"html",
"-",
"escaped",
"s",
"to",
"dst",
"and",
"returns",
"the",
"extended",
"dst",
"."
] | [
"func",
"AppendHTMLEscape",
"(",
"dst",
"[",
"]",
"byte",
",",
"s",
"string",
")",
"[",
"]",
"byte",
"{",
"if",
"strings",
".",
"IndexByte",
"(",
"s",
",",
"'<'",
")",
"<",
"0",
"&&",
"strings",
".",
"IndexByte",
"(",
"s",
",",
"'>'",
")",
"<",
... |
20,235 | all-20236 | [
"DropPrefix",
"would",
"drop",
"all",
"the",
"keys",
"with",
"the",
"provided",
"prefix",
".",
"It",
"does",
"this",
"in",
"the",
"following",
"way",
":",
"-",
"Stop",
"accepting",
"new",
"writes",
".",
"-",
"Stop",
"memtable",
"flushes",
"and",
"compactio... | [
"func",
"(",
"db",
"*",
"DB",
")",
"DropPrefix",
"(",
"prefix",
"[",
"]",
"byte",
")",
"error",
"{",
"db",
".",
"opt",
".",
"Infof",
"(",
"\"",
"\"",
",",
"hex",
".",
"Dump",
"(",
"prefix",
")",
")",
"\n",
"f",
":=",
"<mask>",
".",
"prepareToDr... |
20,236 | all-20237 | [
"pushByte",
"puts",
"a",
"byte",
"on",
"the",
"heap",
"and",
"returns",
"a",
"state",
".",
"succ",
"index",
"that",
"can",
"be",
"used",
"to",
"retrieve",
"it",
"."
] | [
"func",
"(",
"a",
"*",
"subAllocator",
")",
"pushByte",
"(",
"c",
"byte",
")",
"int32",
"{",
"si",
":=",
"a",
".",
"heap1Lo",
"/",
"6",
"// state index",
"\n",
"oi",
":=",
"a",
".",
"heap1Lo",
"%",
"6",
"// byte position in state",
"\n",
"switch",
"oi"... |
20,237 | all-20238 | [
"CONTRACT",
":",
"rv",
".",
"CanAddr",
"()",
"is",
"true",
"."
] | [
"func",
"(",
"cdc",
"*",
"Codec",
")",
"decodeReflectJSONArray",
"(",
"bz",
"[",
"]",
"byte",
",",
"info",
"*",
"TypeInfo",
",",
"rv",
"reflect",
".",
"Value",
",",
"fopts",
"FieldOptions",
")",
"(",
"err",
"error",
")",
"{",
"if",
"!",
"rv",
".",
... |
20,238 | all-20239 | [
"SetMetadataFileUpdated",
"sets",
"the",
"container",
"s",
"MetadataFileUpdated",
"status",
"to",
"true"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"SetMetadataFileUpdated",
"(",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"c",
".",
"MetadataFileUpdated",
"=",
"true",
"\n",
"}"
] |
20,239 | all-20240 | [
"TagResourceRequest",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"TagResourceRequest",
"(",
"arg0",
"*",
"secretsmanager",
".",
"TagResourceInput",
")",
"(",
"*",
"request",
".",
"Request",
",",
"*",
"secretsmanager",
".",
"TagResourceOutput",
")",
"{",
"ret",
":=",
"m",
... |
20,240 | all-20241 | [
"DeriveConcatKDF",
"implements",
"NIST",
"SP",
"800",
"-",
"56A",
"Concatenation",
"Key",
"Derivation",
"Function",
".",
"Derives",
"key",
"material",
"of",
"keydatalen",
"bits",
"size",
"given",
"Z",
"(",
"sharedSecret",
")",
"OtherInfo",
"(",
"AlgorithmID",
"|... | [
"func",
"DeriveConcatKDF",
"(",
"keydatalen",
"int",
",",
"sharedSecret",
",",
"algId",
",",
"partyUInfo",
",",
"partyVInfo",
",",
"suppPubInfo",
",",
"suppPrivInfo",
"[",
"]",
"byte",
",",
"h",
"hash",
".",
"Hash",
")",
"[",
"]",
"byte",
"{",
"otherInfo",... |
20,241 | all-20242 | [
"WaitIsTargetAvailable",
"is",
"a",
"wrapper",
"around",
"gtk_clipboard_wait_is_target_available"
] | [
"func",
"(",
"v",
"*",
"Clipboard",
")",
"WaitIsTargetAvailable",
"(",
"target",
"gdk",
".",
"Atom",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_clipboard_wait_is_target_available",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GdkAtom",
"(",
"unsaf... |
20,242 | all-20243 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EvaluateParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime38",
"(",
"&",
"r... |
20,243 | all-20244 | [
"VerifyMessageProvider",
"accepts",
"an",
"instance",
"of",
"*",
"testing",
".",
"T",
"running",
"provider",
"message",
"verification",
"with",
"granular",
"test",
"reporting",
"and",
"automatic",
"failure",
"reporting",
"for",
"nice",
"simple",
"tests",
".",
"A",... | [
"func",
"(",
"p",
"*",
"Pact",
")",
"VerifyMessageProvider",
"(",
"t",
"*",
"testing",
".",
"T",
",",
"request",
"VerifyMessageRequest",
")",
"(",
"res",
"types",
".",
"ProviderVerifierResponse",
",",
"err",
"error",
")",
"{",
"res",
",",
"err",
"=",
"p"... |
20,244 | all-20245 | [
"#define",
"cvGetSubArr",
"cvGetSubRect",
"/",
"*",
"Selects",
"row",
"span",
"of",
"the",
"input",
"array",
":",
"arr",
"(",
"start_row",
":",
"delta_row",
":",
"end_row",
":",
")",
"(",
"end_row",
"is",
"not",
"included",
"into",
"the",
"span",
")",
".... | [
"func",
"GetRows",
"(",
"arr",
"Arr",
",",
"submat",
"*",
"Mat",
",",
"start_row",
",",
"end_row",
",",
"delta_row",
"int",
")",
"*",
"Mat",
"{",
"mat_new",
":=",
"C",
".",
"cvGetRows",
"(",
"unsafe",
".",
"Pointer",
"(",
"arr",
")",
",",
"(",
"*",... |
20,245 | all-20246 | [
"Type",
"returns",
"the",
"package",
"-",
"level",
"type",
"of",
"the",
"specified",
"name",
"or",
"nil",
"if",
"not",
"found",
"."
] | [
"func",
"(",
"p",
"*",
"Package",
")",
"<mask>",
"(",
"name",
"string",
")",
"(",
"t",
"*",
"Type",
")",
"{",
"t",
",",
"_",
"=",
"p",
".",
"Members",
"[",
"name",
"]",
".",
"(",
"*",
"Type",
")",
"\n",
"return",
"\n",
"}"
] |
20,246 | all-20247 | [
"Error",
"writes",
"message",
"to",
"ErrorWriter",
"."
] | [
"func",
"(",
"ui",
"*",
"BasicUI",
")",
"Error",
"(",
"message",
"string",
")",
"{",
"if",
"ui",
".",
"ErrorWriter",
"!=",
"nil",
"{",
"fmt",
".",
"Fprint",
"(",
"ui",
".",
"ErrorWriter",
",",
"message",
")",
"\n",
"fmt",
".",
"Fprint",
"(",
"ui",
... |
20,247 | all-20248 | [
"New",
"creates",
"a",
"new",
"client",
"with",
"your",
"personal",
"API",
"key",
"."
] | [
"func",
"New",
"(",
"apikey",
"string",
")",
"*",
"Client",
"{",
"endpoint",
":=",
"Endpoint",
"{",
"URL",
":",
"EndpointURL",
"}",
"\n",
"return",
"&",
"<mask>",
"{",
"apikey",
",",
"http",
".",
"DefaultClient",
",",
"endpoint",
"}",
"\n",
"}"
] |
20,248 | all-20249 | [
"WriteMetadata",
"writes",
"the",
"data",
"structures",
"that",
"describe",
"the",
"API",
"resources",
"and",
"actions",
"."
] | [
"func",
"(",
"c",
"*",
"MetadataWriter",
")",
"WriteMetadata",
"(",
"d",
"*",
"gen",
".",
"APIDescriptor",
",",
"w",
"io",
".",
"Writer",
")",
"error",
"{",
"resources",
":=",
"make",
"(",
"[",
"]",
"*",
"<mask>",
".",
"Resource",
",",
"len",
"(",
... |
20,249 | all-20250 | [
"formatMapKey",
"formats",
"v",
"as",
"if",
"it",
"were",
"a",
"map",
"key",
".",
"The",
"result",
"is",
"guaranteed",
"to",
"be",
"a",
"single",
"line",
"."
] | [
"func",
"formatMapKey",
"(",
"v",
"reflect",
".",
"<mask>",
")",
"string",
"{",
"var",
"opts",
"formatOptions",
"\n",
"opts",
".",
"TypeMode",
"=",
"elideType",
"\n",
"opts",
".",
"AvoidStringer",
"=",
"true",
"\n",
"opts",
".",
"ShallowPointers",
"=",
"tr... |
20,250 | all-20251 | [
"WithObjectID",
"JavaScript",
"object",
"id",
"of",
"the",
"node",
"wrapper",
"."
] | [
"func",
"(",
"p",
"DescribeNodeParams",
")",
"WithObjectID",
"(",
"objectID",
"runtime",
".",
"RemoteObjectID",
")",
"*",
"DescribeNodeParams",
"{",
"p",
".",
"ObjectID",
"=",
"objectID",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
20,251 | all-20252 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"UniformMatrix3x4fv",
"(",
"location",
"int32",
",",
"<mask>",
"int32",
",",
"transpose",
"bool",
",",
"value",
"*",
"float32",
")",
"{",
"C",
".",
"glowUniformMatrix3x4fv",
"(",
"gpUniformMatrix3x4fv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"locatio... |
20,252 | all-20253 | [
"error",
"log"
] | [
"func",
"(",
"f",
"*",
"FileLogger",
")",
"Error",
"(",
"<mask>",
"string",
",",
"v",
"...",
"interface",
"{",
"}",
")",
"{",
"_",
",",
"file",
",",
"line",
",",
"_",
":=",
"runtime",
".",
"Caller",
"(",
"2",
")",
"//calldepth=3",
"\n",
"if",
"f"... |
20,253 | all-20254 | [
"AddMulti",
"is",
"a",
"batch",
"version",
"of",
"Add",
".",
"appengine",
".",
"MultiError",
"may",
"be",
"returned",
"."
] | [
"func",
"(",
"cd",
"Codec",
")",
"AddMulti",
"(",
"c",
"context",
".",
"<mask>",
",",
"items",
"[",
"]",
"*",
"Item",
")",
"error",
"{",
"return",
"cd",
".",
"set",
"(",
"c",
",",
"items",
",",
"pb",
".",
"MemcacheSetRequest_ADD",
")",
"\n",
"}"
] |
20,254 | all-20255 | [
"RegisterDriver",
"registers",
"driver",
"with",
"given",
"names",
"."
] | [
"func",
"RegisterDriver",
"(",
"d",
"Driver",
",",
"knownNames",
"...",
"string",
")",
"{",
"for",
"_",
",",
"k",
":=",
"range",
"knownNames",
"{",
"drivers",
"[",
"strings",
".",
"ToLower",
"(",
"k",
")",
"]",
"=",
"d",
"\n",
"}",
"\n",
"<mask>",
... |
20,255 | all-20256 | [
"IssueHandlers",
"returns",
"a",
"map",
"of",
"plugin",
"names",
"to",
"handlers",
"for",
"the",
"repo",
"."
] | [
"func",
"(",
"pa",
"*",
"ConfigAgent",
")",
"IssueHandlers",
"(",
"owner",
",",
"repo",
"string",
")",
"map",
"[",
"string",
"]",
"IssueHandler",
"{",
"pa",
".",
"mut",
".",
"Lock",
"(",
")",
"\n",
"defer",
"pa",
".",
"mut",
".",
"Unlock",
"(",
")"... |
20,256 | all-20257 | [
"WriteJSONToResponse",
"writes",
"the",
"header",
"JSON",
"response",
"to",
"a",
"ResponseWriter",
"and",
"log",
"the",
"error",
"if",
"necessary",
"."
] | [
"func",
"WriteJSONToResponse",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"httpStatusCode",
"int",
",",
"responseJSON",
"[",
"]",
"byte",
",",
"requestType",
"string",
")",
"{",
"w",
".",
"<mask>",
"(",
")",
".",
"Set",
"(",
"\"",
"\"",
",",
"\"",
"... |
20,257 | all-20258 | [
"StringToWaitDurationHookFunc",
"returns",
"a",
"function",
"that",
"converts",
"strings",
"to",
"wait",
"value",
".",
"This",
"is",
"designed",
"to",
"be",
"used",
"with",
"mapstructure",
"for",
"parsing",
"out",
"a",
"wait",
"value",
"."
] | [
"func",
"StringToWaitDurationHookFunc",
"(",
")",
"mapstructure",
".",
"DecodeHookFunc",
"{",
"return",
"func",
"(",
"f",
"reflect",
".",
"<mask>",
",",
"t",
"reflect",
".",
"Type",
",",
"data",
"interface",
"{",
"}",
")",
"(",
"interface",
"{",
"}",
",",
... |
20,258 | all-20259 | [
"TODO",
"(",
"c4milo",
")",
":",
"Legacy",
"function",
"this",
"is",
"to",
"be",
"removed",
"once",
"we",
"migrate",
"the",
"dependant",
"code"
] | [
"func",
"readVmx",
"(",
"path",
"string",
")",
"(",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"data",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"er... |
20,259 | all-20260 | [
"ItemsFunc",
"returns",
"slice",
"of",
"all",
"items",
"that",
"when",
"passed",
"to",
"f",
"f",
"returns",
"true",
".",
"Modification",
"to",
"the",
"returned",
"slice",
"does",
"not",
"affect",
"the",
"structure",
"of",
"the",
"set",
".",
"However",
"any... | [
"func",
"(",
"s",
"*",
"Set",
")",
"ItemsFunc",
"(",
"f",
"func",
"(",
"value",
"interface",
"{",
"}",
")",
"bool",
")",
"[",
"]",
"interface",
"{",
"}",
"{",
"s",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"RUnlock",
"(",
")",
"\n",
"i... |
20,260 | all-20261 | [
"AllTasks",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockTaskEngineState",
")",
"AllTasks",
"(",
")",
"[",
"]",
"*",
"task",
".",
"Task",
"{",
"<mask>",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
")",
"\n",
"ret0",
",",
"_",
":=",
"ret",
"[",
"0",
"]... |
20,261 | all-20262 | [
"transform",
"YAML",
"to",
"JSON"
] | [
"func",
"transform",
"(",
"in",
"interface",
"{",
"}",
")",
"(",
"_",
"interface",
"{",
"}",
",",
"err",
"error",
")",
"{",
"switch",
"in",
".",
"(",
"type",
")",
"{",
"case",
"map",
"[",
"interface",
"{",
"}",
"]",
"interface",
"{",
"}",
":",
... |
20,262 | all-20263 | [
"WithQuality",
"the",
"quality",
"of",
"the",
"encoding",
"(",
"0",
"-",
"1",
")",
".",
"(",
"defaults",
"to",
"1",
")",
"."
] | [
"func",
"(",
"p",
"GetEncodedResponseParams",
")",
"WithQuality",
"(",
"quality",
"float64",
")",
"*",
"GetEncodedResponseParams",
"{",
"p",
".",
"Quality",
"=",
"<mask>",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
20,263 | all-20264 | [
"Read",
"reads",
"into",
"b",
"the",
"next",
"available",
"data",
"from",
"the",
"file",
"and",
"returns",
"the",
"number",
"of",
"bytes",
"written",
"and",
"an",
"error",
"in",
"case",
"something",
"wrong",
"happened",
".",
"At",
"the",
"end",
"of",
"th... | [
"func",
"(",
"file",
"*",
"GridFile",
")",
"Read",
"(",
"b",
"[",
"]",
"byte",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"file",
".",
"assertMode",
"(",
"gfsReading",
")",
"\n",
"file",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"debugf"... |
20,264 | all-20265 | [
"Send",
"broadcasts",
"a",
"message",
"to",
"every",
"one",
"of",
"a",
"Group",
"s",
"members",
"."
] | [
"func",
"(",
"g",
"*",
"Group",
")",
"Send",
"(",
"val",
"interface",
"{",
"}",
")",
"{",
"g",
".",
"in",
"<-",
"<mask>",
"{",
"sender",
":",
"nil",
",",
"payload",
":",
"val",
"}",
"\n",
"}"
] |
20,265 | all-20266 | [
"PutManifest",
"writes",
"the",
"manifest",
"to",
"the",
"destination",
"."
] | [
"func",
"(",
"s",
"*",
"storageImageDestination",
")",
"PutManifest",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"manifestBlob",
"[",
"]",
"byte",
")",
"error",
"{",
"if",
"s",
".",
"imageRef",
".",
"named",
"!=",
"nil",
"{",
"if",
"digested",
",",
"ok... |
20,266 | all-20267 | [
"GetDialPeerTimeout",
"returns",
"the",
"current",
"DialPeer",
"timeout",
"(",
"or",
"the",
"default",
")",
"."
] | [
"func",
"GetDialPeerTimeout",
"(",
"ctx",
"context",
".",
"Context",
")",
"time",
".",
"Duration",
"{",
"if",
"to",
",",
"ok",
":=",
"ctx",
".",
"Value",
"(",
"dialPeerTimeoutCtxKey",
"{",
"}",
")",
".",
"(",
"<mask>",
".",
"Duration",
")",
";",
"ok",
... |
20,267 | all-20268 | [
"Despite",
"returning",
"a",
"uint64",
"this",
"actually",
"reads",
"a",
"uint32",
".",
"All",
"table",
"indices",
"and",
"lengths",
"are",
"stored",
"as",
"uint32",
"values",
"."
] | [
"func",
"(",
"b",
"*",
"sliceReader",
")",
"ReadInt",
"(",
")",
"uint64",
"{",
"return",
"uint64",
"(",
"<mask>",
".",
"LittleEndian",
".",
"Uint32",
"(",
"b",
".",
"Read",
"(",
"4",
")",
")",
")",
"\n",
"}"
] |
20,268 | all-20269 | [
"MarshalJSON",
"returns",
"the",
"ObjectId",
"as",
"JSON"
] | [
"func",
"(",
"id",
"*",
"ObjectId",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"<mask>",
"w",
"jwriter",
".",
"Writer",
"\n",
"id",
".",
"MarshalEasyJSON",
"(",
"&",
"w",
")",
"\n",
"return",
"w",
".",
"BuildBytes"... |
20,269 | all-20270 | [
"RefreshTrap",
"check",
"when",
"the",
"last",
"time",
"the",
"URL",
"was",
"reset",
"reset",
"if",
"needed"
] | [
"func",
"(",
"cm",
"*",
"CheckManager",
")",
"RefreshTrap",
"(",
")",
"error",
"{",
"if",
"cm",
".",
"trapURL",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"if",
"<mask>",
".",
"Since",
"(",
"cm",
".",
"trapLastUpdate",
")",
">=",
"c... |
20,270 | all-20271 | [
"void",
"pango_font_descriptions_free",
"(",
"PangoFontDescription",
"**",
"descs",
"int",
"n_descs",
")",
";",
"func",
"(",
"v",
"*",
"FontDescription",
")",
"FontDescriptionsFree",
"(",
"n_descs",
"int",
")",
"{",
"C",
".",
"pango_font_descriptions_free",
"(",
"... | [
"func",
"(",
"v",
"*",
"FontDescription",
")",
"SetFamily",
"(",
"family",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"family",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C"... |
20,271 | all-20272 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetCategoriesReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing6",
"(",
"&",
"w",
",",
"v",
... |
20,272 | all-20273 | [
"SetWidthChars",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_set_width_chars",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetWidthChars",
"(",
"nChars",
"int",
")",
"{",
"C",
".",
"gtk_entry_set_width_chars",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"nChars",
")",
")",
"\n",
"}"
] |
20,273 | all-20274 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SelectorList",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss22",
"(",
"&",
"w",
",",
"v",
")",
"\n... |
20,274 | all-20275 | [
"parseSequenceOf",
"is",
"used",
"for",
"SEQUENCE",
"OF",
"and",
"SET",
"OF",
"values",
".",
"It",
"tries",
"to",
"parse",
"a",
"number",
"of",
"ASN",
".",
"1",
"values",
"from",
"the",
"given",
"byte",
"slice",
"and",
"returns",
"them",
"as",
"a",
"sl... | [
"func",
"parseSequenceOf",
"(",
"bytes",
"[",
"]",
"byte",
",",
"sliceType",
"reflect",
".",
"Type",
",",
"elemType",
"reflect",
".",
"Type",
")",
"(",
"ret",
"reflect",
".",
"Value",
",",
"err",
"error",
")",
"{",
"expectedTag",
",",
"compoundType",
","... |
20,275 | all-20276 | [
"Close",
"removes",
"resources",
"associated",
"with",
"an",
"initialized",
"ImageDestination",
"if",
"any",
"."
] | [
"func",
"(",
"d",
"*",
"daemonImageDestination",
")",
"Close",
"(",
")",
"error",
"{",
"if",
"!",
"d",
".",
"committed",
"{",
"logrus",
".",
"Debugf",
"(",
"\"",
"\"",
")",
"\n",
"// In principle, goroutineCancel() should abort the HTTP request and stop the process ... |
20,276 | all-20277 | [
"EnsureIndexes",
"will",
"ensure",
"that",
"the",
"required",
"indexes",
"exist",
"."
] | [
"func",
"EnsureIndexes",
"(",
"store",
"*",
"coal",
".",
"<mask>",
")",
"error",
"{",
"// ensure model indexes",
"err",
":=",
"indexer",
".",
"Ensure",
"(",
"store",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"return",
... |
20,277 | all-20278 | [
"HasQuery",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetEvent",
")",
"HasQuery",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
20,278 | all-20279 | [
"Next",
"generates",
"a",
"id",
"that",
"is",
"unique",
"."
] | [
"func",
"(",
"g",
"*",
"Generator",
")",
"Next",
"(",
")",
"uint64",
"{",
"suffix",
":=",
"atomic",
".",
"AddUint64",
"(",
"&",
"g",
".",
"suffix",
",",
"1",
")",
"\n",
"id",
":=",
"g",
".",
"prefix",
"|",
"lowbit",
"(",
"suffix",
",",
"suffixLen... |
20,279 | all-20280 | [
"HasTextAlign",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueDefinition",
")",
"HasTextAlign",
"(",
")",
"bool",
"{",
"if",
"q",
"!=",
"nil",
"&&",
"q",
".",
"TextAlign",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
20,280 | all-20281 | [
"HasIncreaseGood",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"ChangeRequest",
")",
"HasIncreaseGood",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"IncreaseGood",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
20,281 | all-20282 | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"get",
"apps",
"app",
"routes",
"params"
] | [
"func",
"(",
"o",
"*",
"GetAppsAppRoutesParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"*",
"GetAppsAppRoutesParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
20,282 | all-20283 | [
"NewImage",
"returns",
"a",
"types",
".",
"ImageCloser",
"for",
"this",
"reference",
"possibly",
"specialized",
"for",
"this",
"ImageTransport",
".",
"The",
"caller",
"must",
"call",
".",
"Close",
"()",
"on",
"the",
"returned",
"ImageCloser",
".",
"NOTE",
":",... | [
"func",
"(",
"ref",
"archiveReference",
")",
"NewImage",
"(",
"ctx",
"context",
".",
"Context",
",",
"sys",
"*",
"types",
".",
"SystemContext",
")",
"(",
"<mask>",
".",
"ImageCloser",
",",
"error",
")",
"{",
"src",
",",
"err",
":=",
"newImageSource",
"("... |
20,283 | all-20284 | [
"hashToken",
"converts",
"a",
"token",
"to",
"a",
"cryptographic",
"hash",
".",
"We",
"don",
"t",
"want",
"to",
"store",
"tokens",
"verbatim",
"in",
"the",
"database",
"as",
"then",
"whoever",
"that",
"has",
"access",
"to",
"the",
"database",
"has",
"acces... | [
"func",
"hashToken",
"(",
"<mask>",
"string",
")",
"string",
"{",
"sum",
":=",
"sha256",
".",
"Sum256",
"(",
"[",
"]",
"byte",
"(",
"token",
")",
")",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"sum",
")",
"\n",
"}"
] |
20,284 | all-20285 | [
"Do",
"executes",
"Overlay",
".",
"setShowHitTestBorders",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetShowHitTestBordersParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetShowHitTestBorders",
",",
"p",
",",
"nil",
")",
"\n",
... |
20,285 | all-20286 | [
"fillOffering",
"fills",
"offerings",
"nonce",
"status",
"hash",
"and",
"signature",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"fillOffering",
"(",
"logger",
"log",
".",
"Logger",
",",
"offering",
"*",
"data",
".",
"Offering",
")",
"error",
"{",
"agent",
":=",
"&",
"data",
".",
"Account",
"{",
"}",
"\n",
"// TODO: This is definitely wrong, sh... |
20,286 | all-20287 | [
"WithDetailed",
"collect",
"block",
"-",
"based",
"coverage",
"."
] | [
"func",
"(",
"p",
"StartPreciseCoverageParams",
")",
"WithDetailed",
"(",
"detailed",
"bool",
")",
"*",
"StartPreciseCoverageParams",
"{",
"p",
".",
"Detailed",
"=",
"detailed",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
20,287 | all-20288 | [
"OpenType",
"opens",
"a",
"specified",
"GeoIP",
"database",
"type",
"in",
"the",
"default",
"location",
"with",
"the",
"specified",
"GeoIPOptions",
"flag",
".",
"Constants",
"are",
"defined",
"for",
"each",
"database",
"type",
"(",
"for",
"example",
"GEOIP_COUNT... | [
"func",
"OpenTypeFlag",
"(",
"dbType",
"int",
",",
"flag",
"int",
")",
"(",
"*",
"GeoIP",
",",
"error",
")",
"{",
"g",
":=",
"&",
"GeoIP",
"{",
"}",
"\n",
"runtime",
".",
"SetFinalizer",
"(",
"g",
",",
"(",
"*",
"GeoIP",
")",
".",
"free",
")",
... |
20,288 | all-20289 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"RemoteObject",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime9",
"(",
"&",
"r",
... |
20,289 | all-20290 | [
"GetBSON",
"returns",
"the",
"hex",
"representation",
"of",
"the",
"ObjectId",
"as",
"a",
"bson",
".",
"M",
"{}",
"map",
"."
] | [
"func",
"(",
"id",
"*",
"ObjectId",
")",
"GetBSON",
"(",
")",
"(",
"<mask>",
"{",
"}",
",",
"error",
")",
"{",
"return",
"bson",
".",
"M",
"{",
"\"",
"\"",
":",
"bson",
".",
"ObjectId",
"(",
"*",
"id",
")",
".",
"Hex",
"(",
")",
"}",
",",
"... |
20,290 | all-20291 | [
"GetProject",
"returns",
"a",
"Project",
"entry",
"for",
"the",
"provided",
"name"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetProject",
"(",
"name",
"string",
")",
"(",
"*",
"api",
".",
"Project",
",",
"string",
",",
"error",
")",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"nil",
",",
"\"... |
20,291 | all-20292 | [
"SetFromIconName",
"is",
"a",
"wrapper",
"around",
"gtk_status_icon_set_from_icon_name",
"()"
] | [
"func",
"(",
"v",
"*",
"StatusIcon",
")",
"SetFromIconName",
"(",
"iconName",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"iconName",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
... |
20,292 | all-20293 | [
"flattenVMwareDVSPortgroupPolicy",
"reads",
"various",
"fields",
"from",
"a",
"VMwareDVSPortgroupPolicy",
"into",
"the",
"passed",
"in",
"ResourceData",
"."
] | [
"func",
"flattenVMwareDVSPortgroupPolicy",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"obj",
"*",
"types",
".",
"VMwareDVSPortgroupPolicy",
")",
"error",
"{",
"d",
".",
"Set",
"(",
"\"",
"\"",
",",
"obj",
".",
"BlockOverrideAllowed",
")",
"\n",
"d",
... |
20,293 | all-20294 | [
"AccountLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"AccountLocator",
"(",
"href",
"<mask>",
")",
"*",
"AccountLocator",
"{",
"return",
"&",
"AccountLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
20,294 | all-20295 | [
"TargetsAll",
"returns",
"active",
"and",
"dropped",
"targets",
"grouped",
"by",
"job_name",
"."
] | [
"func",
"(",
"m",
"*",
"Manager",
")",
"TargetsAll",
"(",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"*",
"Target",
"{",
"m",
".",
"mtxScrape",
".",
"Lock",
"(",
")",
"\n",
"defer",
"m",
".",
"mtxScrape",
".",
"Unlock",
"(",
")",
"\n\n",
"targets"... |
20,295 | all-20296 | [
"Validate",
"implements",
"the",
"fire",
".",
"ValidatableModel",
"interface",
"."
] | [
"func",
"(",
"t",
"*",
"<mask>",
")",
"Validate",
"(",
")",
"error",
"{",
"// check id",
"if",
"!",
"t",
".",
"ID",
"(",
")",
".",
"Valid",
"(",
")",
"{",
"return",
"fire",
".",
"E",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"// check expires at",... |
20,296 | all-20297 | [
"Reset",
"called",
"each",
"time",
"the",
"entry",
"is",
"expired",
"and",
"the",
"handler",
"calls",
"this",
"after",
"the",
"original",
"handler",
"executed",
"to",
"re",
"-",
"set",
"the",
"response",
"with",
"the",
"new",
"handler",
"s",
"content",
"re... | [
"func",
"(",
"e",
"*",
"Entry",
")",
"Reset",
"(",
"statusCode",
"int",
",",
"contentType",
"string",
",",
"body",
"[",
"]",
"byte",
",",
"lifeChanger",
"LifeChanger",
")",
"{",
"if",
"e",
".",
"response",
"==",
"nil",
"{",
"e",
".",
"response",
"=",... |
20,297 | all-20298 | [
"UncompressBlock",
"uncompresses",
"the",
"source",
"buffer",
"into",
"the",
"destination",
"one",
"and",
"returns",
"the",
"uncompressed",
"size",
".",
"The",
"destination",
"buffer",
"must",
"be",
"sized",
"appropriately",
".",
"An",
"error",
"is",
"returned",
... | [
"func",
"UncompressBlock",
"(",
"src",
",",
"dst",
"[",
"]",
"<mask>",
")",
"(",
"di",
"int",
",",
"err",
"error",
")",
"{",
"sn",
":=",
"len",
"(",
"src",
")",
"\n",
"if",
"sn",
"==",
"0",
"{",
"return",
"0",
",",
"nil",
"\n",
"}",
"\n\n",
"... |
20,298 | all-20299 | [
"StoragePoolGet",
"returns",
"a",
"single",
"storage",
"pool",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"StoragePoolGet",
"(",
"poolName",
"string",
")",
"(",
"int64",
",",
"*",
"api",
".",
"StoragePool",
",",
"error",
")",
"{",
"var",
"poolDriver",
"string",
"\n",
"poolID",
":=",
"int64",
"(",
"-",
"1",
")",
"\n"... |
20,299 | all-20300 | [
"Connect",
"is",
"a",
"convenience",
"around",
"lxd",
".",
"ConnectLXD",
"that",
"configures",
"the",
"client",
"with",
"the",
"correct",
"parameters",
"for",
"node",
"-",
"to",
"-",
"node",
"communication",
".",
"If",
"notify",
"switch",
"is",
"true",
"then... | [
"func",
"Connect",
"(",
"address",
"string",
",",
"cert",
"*",
"shared",
".",
"CertInfo",
",",
"notify",
"bool",
")",
"(",
"lxd",
".",
"ContainerServer",
",",
"error",
")",
"{",
"args",
":=",
"&",
"lxd",
".",
"ConnectionArgs",
"{",
"TLSServerCert",
":",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.