id
int32 0
25.3k
| idx
stringlengths 5
9
| nl_tokens
sequencelengths 1
418
| pl_tokens
sequencelengths 22
4.98k
|
---|---|---|---|
6,900 | all-6901 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RemoveInstrumentationBreakpointParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
6,901 | all-6902 | [
"PageUp",
"moves",
"the",
"visible",
"list",
"backward",
"by",
"x",
"items",
".",
"Where",
"x",
"is",
"the",
"size",
"of",
"the",
"visible",
"items",
"on",
"the",
"list",
".",
"The",
"selected",
"item",
"becomes",
"the",
"first",
"visible",
"item",
".",
"If",
"the",
"list",
"is",
"already",
"at",
"the",
"bottom",
"the",
"selected",
"item",
"becomes",
"the",
"last",
"visible",
"item",
"."
] | [
"func",
"(",
"l",
"*",
"List",
")",
"PageUp",
"(",
")",
"{",
"start",
":=",
"l",
".",
"start",
"-",
"l",
".",
"<mask>",
"\n",
"if",
"start",
"<",
"0",
"{",
"l",
".",
"start",
"=",
"0",
"\n",
"}",
"else",
"{",
"l",
".",
"start",
"=",
"start",
"\n",
"}",
"\n\n",
"cursor",
":=",
"l",
".",
"start",
"\n\n",
"if",
"cursor",
"<",
"l",
".",
"cursor",
"{",
"l",
".",
"cursor",
"=",
"cursor",
"\n",
"}",
"\n",
"}"
] |
6,902 | all-6903 | [
"PlushValidator",
"validates",
"the",
"file",
"is",
"a",
"valid",
"Plush",
"file",
"if",
"the",
"extension",
"is",
".",
"md",
".",
"html",
"or",
".",
"plush"
] | [
"func",
"PlushValidator",
"(",
"f",
"genny",
".",
"File",
")",
"error",
"{",
"if",
"!",
"genny",
".",
"HasExt",
"(",
"f",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"_",
",",
"err",
":=",
"plush",
".",
"Parse",
"(",
"f",
".",
"<mask>",
"(",
")",
")",
"\n",
"return",
"err",
"\n",
"}"
] |
6,903 | all-6904 | [
"NewMason",
"creates",
"and",
"initialized",
"a",
"new",
"Mason",
"object",
"In",
":",
"rtypes",
"-",
"A",
"list",
"of",
"resource",
"types",
"to",
"act",
"on",
"cleanerCount",
"-",
"Number",
"of",
"cleaning",
"threads",
"client",
"-",
"boskos",
"client",
"waitPeriod",
"-",
"time",
"to",
"wait",
"before",
"a",
"new",
"boskos",
"operation",
"(",
"acquire",
"mostly",
")",
"syncPeriod",
"-",
"time",
"to",
"wait",
"before",
"syncing",
"resource",
"information",
"to",
"boskos",
"Out",
":",
"A",
"Pointer",
"to",
"a",
"Mason",
"Object"
] | [
"func",
"NewMason",
"(",
"cleanerCount",
"int",
",",
"client",
"boskosClient",
",",
"waitPeriod",
",",
"syncPeriod",
"time",
".",
"Duration",
")",
"*",
"Mason",
"{",
"return",
"&",
"Mason",
"{",
"client",
":",
"client",
",",
"cleanerCount",
":",
"cleanerCount",
",",
"storage",
":",
"*",
"newStorage",
"(",
"storage",
".",
"NewMemoryStorage",
"(",
")",
")",
",",
"pending",
":",
"make",
"(",
"chan",
"requirements",
")",
",",
"cleaned",
":",
"make",
"(",
"chan",
"requirements",
",",
"cleanerCount",
"+",
"1",
")",
",",
"fulfilled",
":",
"make",
"(",
"chan",
"requirements",
",",
"cleanerCount",
"+",
"1",
")",
",",
"boskosWaitPeriod",
":",
"waitPeriod",
",",
"boskosSyncPeriod",
":",
"syncPeriod",
",",
"configConverters",
":",
"<mask>",
"[",
"string",
"]",
"ConfigConverter",
"{",
"}",
",",
"}",
"\n",
"}"
] |
6,904 | all-6905 | [
"PopClip",
"restores",
"saved",
"with",
"PushClip",
"clipping",
"window"
] | [
"func",
"PopClip",
"(",
")",
"{",
"if",
"len",
"(",
"canvas",
".",
"clipStack",
")",
"==",
"0",
"{",
"<mask>",
"\n",
"}",
"\n",
"c",
":=",
"canvas",
".",
"clipStack",
"[",
"len",
"(",
"canvas",
".",
"clipStack",
")",
"-",
"1",
"]",
"\n",
"canvas",
".",
"clipStack",
"=",
"canvas",
".",
"clipStack",
"[",
":",
"len",
"(",
"canvas",
".",
"clipStack",
")",
"-",
"1",
"]",
"\n",
"SetClipRect",
"(",
"c",
".",
"x",
",",
"c",
".",
"y",
",",
"c",
".",
"w",
",",
"c",
".",
"h",
")",
"\n",
"}"
] |
6,905 | all-6906 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"SetTimeDomainTimeDomain",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"<mask>",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
6,906 | all-6907 | [
"AddUDPPorts",
"adds",
"UDP",
"-",
"only",
"ports",
".",
"Similar",
"to",
"using",
"-",
"pU",
":",
"<port1",
">",
"<port2",
">",
"..."
] | [
"func",
"(",
"s",
"Scan",
")",
"AddUDPPorts",
"(",
"ports",
"...",
"uint16",
")",
"Scan",
"{",
"s",
".",
"configUDPPorts",
"=",
"<mask>",
"(",
"s",
".",
"configUDPPorts",
",",
"ports",
"...",
")",
"\n",
"return",
"s",
"\n",
"}"
] |
6,907 | all-6908 | [
"Records",
"returns",
"resource",
"records",
"Decrypts",
"TXT",
"records",
"if",
"TXT",
"-",
"Encrypt",
"flag",
"is",
"set",
"and",
"key",
"is",
"provided"
] | [
"func",
"(",
"p",
"*",
"RcodeZeroProvider",
")",
"Records",
"(",
")",
"(",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"error",
")",
"{",
"zones",
",",
"err",
":=",
"p",
".",
"Zones",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"var",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
"\n\n",
"for",
"_",
",",
"zone",
":=",
"<mask>",
"zones",
"{",
"rrset",
",",
"err",
":=",
"p",
".",
"fetchRecords",
"(",
"zone",
".",
"Domain",
")",
"\n\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"r",
":=",
"range",
"rrset",
"{",
"if",
"supportedRecordType",
"(",
"r",
".",
"Type",
")",
"{",
"if",
"p",
".",
"TXTEncrypt",
"&&",
"(",
"p",
".",
"Key",
"!=",
"nil",
")",
"&&",
"strings",
".",
"EqualFold",
"(",
"r",
".",
"Type",
",",
"\"",
"\"",
")",
"{",
"p",
".",
"Client",
".",
"RRSet",
".",
"DecryptTXT",
"(",
"p",
".",
"Key",
",",
"r",
")",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"r",
".",
"Records",
")",
">",
"1",
"{",
"for",
"_",
",",
"_r",
":=",
"range",
"r",
".",
"Records",
"{",
"if",
"!",
"_r",
".",
"Disabled",
"{",
"endpoints",
"=",
"append",
"(",
"endpoints",
",",
"endpoint",
".",
"NewEndpointWithTTL",
"(",
"r",
".",
"Name",
",",
"r",
".",
"Type",
",",
"endpoint",
".",
"TTL",
"(",
"r",
".",
"TTL",
")",
",",
"_r",
".",
"Content",
")",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"}",
"else",
"{",
"if",
"!",
"r",
".",
"Records",
"[",
"0",
"]",
".",
"Disabled",
"{",
"endpoints",
"=",
"append",
"(",
"endpoints",
",",
"endpoint",
".",
"NewEndpointWithTTL",
"(",
"r",
".",
"Name",
",",
"r",
".",
"Type",
",",
"endpoint",
".",
"TTL",
"(",
"r",
".",
"TTL",
")",
",",
"r",
".",
"Records",
"[",
"0",
"]",
".",
"Content",
")",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"endpoints",
",",
"nil",
"\n",
"}"
] |
6,908 | all-6909 | [
"GetLineSize",
"returns",
"the",
"size",
"of",
"the",
"sapin",
"for",
"a",
"specified",
"floor",
"and",
"line",
"."
] | [
"func",
"(",
"s",
"*",
"Sapin",
")",
"GetLineSize",
"(",
"floor",
",",
"line",
"int",
")",
"int",
"{",
"return",
"1",
"+",
"line",
"*",
"2",
"+",
"floor",
"*",
"4",
"+",
"int",
"(",
"floor",
"/",
"2",
"*",
"2",
")",
"*",
"int",
"(",
"(",
"<mask>",
"+",
"1",
")",
"/",
"2",
")",
"\n",
"}"
] |
6,909 | all-6910 | [
"NewString",
"creates",
"a",
"new",
"String"
] | [
"func",
"NewString",
"(",
"s",
"string",
",",
"valid",
"bool",
")",
"<mask>",
"{",
"return",
"String",
"{",
"NullString",
":",
"sql",
".",
"NullString",
"{",
"String",
":",
"s",
",",
"Valid",
":",
"valid",
",",
"}",
",",
"}",
"\n",
"}"
] |
6,910 | all-6911 | [
"SearchInResponseBody",
"searches",
"for",
"given",
"string",
"in",
"response",
"content",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"Network#method",
"-",
"searchInResponseBody",
"parameters",
":",
"requestID",
"-",
"Identifier",
"of",
"the",
"network",
"response",
"to",
"search",
".",
"query",
"-",
"String",
"to",
"search",
"for",
"."
] | [
"func",
"SearchInResponseBody",
"(",
"requestID",
"RequestID",
",",
"query",
"string",
")",
"*",
"SearchInResponseBodyParams",
"{",
"return",
"&",
"SearchInResponseBodyParams",
"{",
"RequestID",
":",
"requestID",
",",
"<mask>",
":",
"query",
",",
"}",
"\n",
"}"
] |
6,911 | all-6912 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventChildNodeCountUpdated",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom65",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
6,912 | all-6913 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StepIntoParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger2",
"(",
"&",
"r",
",",
"v",
")",
"\n",
"return",
"r",
".",
"Error",
"(",
")",
"\n",
"}"
] |
6,913 | all-6914 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StartTabMirroringParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast1",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"<mask>",
"\n",
"}"
] |
6,914 | all-6915 | [
"ReceiveIssue",
"calls",
"plugin",
".",
"ReceiveIssue",
"()",
"if",
"issues",
"are",
"not",
"ignored"
] | [
"func",
"(",
"t",
"*",
"TypeFilterWrapperPlugin",
")",
"ReceiveIssue",
"(",
"issue",
"sql",
".",
"Issue",
")",
"[",
"]",
"Point",
"{",
"if",
"issue",
".",
"IsPR",
"&&",
"t",
".",
"pullRequests",
"{",
"return",
"nil",
"\n",
"}",
"else",
"if",
"!",
"issue",
".",
"IsPR",
"&&",
"t",
".",
"issues",
"{",
"return",
"nil",
"\n",
"}",
"else",
"{",
"t",
".",
"pass",
"[",
"<mask>",
".",
"ID",
"]",
"=",
"true",
"\n",
"return",
"t",
".",
"plugin",
".",
"ReceiveIssue",
"(",
"issue",
")",
"\n",
"}",
"\n",
"}"
] |
6,915 | all-6916 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkTextIter",
"."
] | [
"func",
"(",
"v",
"*",
"TextIter",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkTextIter",
"{",
"if",
"v",
"==",
"nil",
"{",
"<mask>",
"nil",
"\n",
"}",
"\n",
"return",
"(",
"*",
"C",
".",
"GtkTextIter",
")",
"(",
"v",
")",
"\n",
"}"
] |
6,916 | all-6917 | [
"SetLevelMode",
"set",
"glg",
"logging",
"mode",
"*",
"per",
"level"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"SetLevelMode",
"(",
"level",
"LEVEL",
",",
"mode",
"MODE",
")",
"*",
"Glg",
"{",
"lev",
",",
"ok",
":=",
"g",
".",
"logger",
".",
"Load",
"(",
"level",
")",
"\n",
"if",
"ok",
"{",
"l",
":=",
"lev",
".",
"(",
"*",
"logger",
")",
"\n",
"l",
".",
"mode",
"=",
"mode",
"\n",
"l",
".",
"updateMode",
"(",
")",
"\n",
"g",
".",
"logger",
".",
"Store",
"(",
"<mask>",
",",
"l",
")",
"\n",
"}",
"\n\n",
"return",
"g",
"\n",
"}"
] |
6,917 | all-6918 | [
"This",
"is",
"intended",
"for",
"use",
"in",
"development",
"+",
"debugging",
"and",
"not",
"intended",
"to",
"be",
"a",
"production",
"error",
"message",
".",
"it",
"also",
"allows",
"StructErrors",
"to",
"be",
"used",
"as",
"an",
"Error",
"interface"
] | [
"func",
"(",
"e",
"*",
"StructErrors",
")",
"Error",
"(",
")",
"string",
"{",
"buff",
":=",
"bytes",
".",
"NewBufferString",
"(",
"fmt",
".",
"Sprintf",
"(",
"structErrMsg",
",",
"e",
".",
"Struct",
")",
")",
"\n\n",
"for",
"_",
",",
"err",
":=",
"range",
"e",
".",
"Errors",
"{",
"buff",
".",
"WriteString",
"(",
"err",
".",
"Error",
"(",
")",
")",
"\n",
"buff",
".",
"WriteString",
"(",
"\"",
"\\n",
"\"",
")",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"err",
":=",
"range",
"e",
".",
"StructErrors",
"{",
"buff",
".",
"WriteString",
"(",
"err",
".",
"Error",
"(",
")",
")",
"\n",
"}",
"\n\n",
"return",
"strings",
".",
"TrimSpace",
"(",
"buff",
".",
"<mask>",
"(",
")",
")",
"\n",
"}"
] |
6,918 | all-6919 | [
"Do",
"executes",
"Page",
".",
"clearCompilationCache",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"ClearCompilationCacheParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandClearCompilationCache",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
6,919 | all-6920 | [
"UnmarshalJSON",
"implements",
"json",
".",
"Unmarshaler",
".",
"It",
"supports",
"number",
"and",
"null",
"input",
".",
"0",
"will",
"be",
"considered",
"a",
"null",
"Int",
".",
"It",
"also",
"supports",
"unmarshalling",
"a",
"sql",
".",
"NullInt64",
"."
] | [
"func",
"(",
"i",
"*",
"Int",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"var",
"err",
"error",
"\n",
"var",
"v",
"interface",
"{",
"}",
"\n",
"if",
"err",
"=",
"json",
".",
"Unmarshal",
"(",
"data",
",",
"&",
"v",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"switch",
"x",
":=",
"v",
".",
"(",
"<mask>",
")",
"{",
"case",
"float64",
":",
"// Unmarshal again, directly to int64, to avoid intermediate float64",
"err",
"=",
"json",
".",
"Unmarshal",
"(",
"data",
",",
"&",
"i",
".",
"Int64",
")",
"\n",
"case",
"string",
":",
"str",
":=",
"string",
"(",
"x",
")",
"\n",
"if",
"len",
"(",
"str",
")",
"==",
"0",
"{",
"i",
".",
"Valid",
"=",
"false",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"i",
".",
"Int64",
",",
"err",
"=",
"strconv",
".",
"ParseInt",
"(",
"str",
",",
"10",
",",
"64",
")",
"\n",
"case",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
":",
"err",
"=",
"json",
".",
"Unmarshal",
"(",
"data",
",",
"&",
"i",
".",
"NullInt64",
")",
"\n",
"case",
"nil",
":",
"i",
".",
"Valid",
"=",
"false",
"\n",
"return",
"nil",
"\n",
"default",
":",
"err",
"=",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"reflect",
".",
"TypeOf",
"(",
"v",
")",
".",
"Name",
"(",
")",
")",
"\n",
"}",
"\n",
"i",
".",
"Valid",
"=",
"(",
"err",
"==",
"nil",
")",
"&&",
"(",
"i",
".",
"Int64",
"!=",
"0",
")",
"\n",
"return",
"err",
"\n",
"}"
] |
6,920 | all-6921 | [
"Return",
"array",
"values"
] | [
"func",
"getArray",
"(",
"values",
"map",
"[",
"string",
"]",
"<mask>",
"{",
"}",
",",
"key",
"string",
")",
"[",
"]",
"interface",
"{",
"}",
"{",
"if",
"len",
"(",
"key",
")",
"==",
"0",
"||",
"values",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"key",
"=",
"strings",
".",
"ToLower",
"(",
"key",
")",
"\n",
"val",
",",
"ok",
":=",
"values",
"[",
"key",
"]",
"\n\n",
"if",
"ok",
"{",
"switch",
"v",
":=",
"val",
".",
"(",
"type",
")",
"{",
"case",
"[",
"]",
"interface",
"{",
"}",
":",
"return",
"v",
"\n",
"default",
":",
"retVal",
":=",
"make",
"(",
"[",
"]",
"interface",
"{",
"}",
",",
"1",
")",
"\n",
"retVal",
"[",
"0",
"]",
"=",
"val",
"\n",
"return",
"retVal",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] |
6,921 | all-6922 | [
"QueryEscape",
"returns",
"escapred",
"query",
"result",
"."
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"QueryEscape",
"(",
"name",
"string",
")",
"string",
"{",
"return",
"template",
".",
"HTMLEscapeString",
"(",
"ctx",
".",
"Query",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
6,922 | all-6923 | [
"MarshalJSON",
"implements",
"json",
".",
"Marshaler",
"."
] | [
"func",
"(",
"id",
"ID",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"if",
"id",
".",
"IsString",
"{",
"return",
"json",
".",
"Marshal",
"(",
"id",
".",
"Str",
")",
"\n",
"}",
"\n",
"return",
"json",
".",
"Marshal",
"(",
"id",
".",
"Num",
")",
"\n",
"}"
] |
6,923 | all-6924 | [
"GetTextAlignment",
"is",
"a",
"wrapper",
"around",
"gtk_tool_item_get_text_alignment",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"ToolItem",
")",
"GetTextAlignment",
"(",
")",
"float32",
"{",
"c",
":=",
"C",
".",
"gtk_tool_item_get_text_alignment",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"float32",
"(",
"c",
")",
"\n",
"}"
] |
6,924 | all-6925 | [
"AnalyzeParam",
"analyzes",
"input",
"parameters",
"to",
"methods"
] | [
"func",
"(",
"a",
"*",
"APIAnalyzer",
")",
"AnalyzeParam",
"(",
"ec",
"EvalCtx",
",",
"p",
"*",
"Parameter",
")",
"*",
"gen",
".",
"ActionParam",
"{",
"location",
",",
"ok",
":=",
"loc",
"[",
"p",
".",
"In",
"]",
"\n",
"if",
"!",
"ok",
"{",
"location",
"=",
"-",
"1",
"\n",
"}",
"\n",
"ap",
":=",
"&",
"gen",
".",
"ActionParam",
"{",
"Name",
":",
"p",
".",
"Name",
",",
"QueryName",
":",
"p",
".",
"Name",
",",
"Description",
":",
"cleanDescription",
"(",
"p",
".",
"Description",
")",
",",
"VarName",
":",
"toVarName",
"(",
"p",
".",
"Name",
")",
",",
"Location",
":",
"location",
",",
"Mandatory",
":",
"p",
".",
"Required",
",",
"NonBlank",
":",
"p",
".",
"Required",
"||",
"p",
".",
"Pattern",
"!=",
"\"",
"\"",
",",
"Regexp",
":",
"p",
".",
"<mask>",
",",
"ValidValues",
":",
"p",
".",
"Enum",
",",
"}",
"\n",
"if",
"p",
".",
"Schema",
"!=",
"nil",
"{",
"ap",
".",
"Type",
"=",
"a",
".",
"typeForRef",
"(",
"ec",
",",
"p",
".",
"Schema",
")",
"\n",
"}",
"else",
"{",
"ap",
".",
"Type",
"=",
"basicType",
"(",
"p",
".",
"Type",
")",
"\n",
"}",
"\n\n",
"return",
"ap",
"\n",
"}"
] |
6,925 | all-6926 | [
"maskFile",
"bind",
"mounts",
"/",
"dev",
"/",
"null",
"over",
"the",
"top",
"of",
"the",
"specified",
"path",
"inside",
"a",
"container",
"to",
"avoid",
"security",
"issues",
"from",
"processes",
"reading",
"information",
"from",
"non",
"-",
"namespace",
"aware",
"mounts",
"(",
"proc",
"/",
"kcore",
")",
"."
] | [
"func",
"maskFile",
"(",
"path",
"string",
")",
"error",
"{",
"if",
"err",
":=",
"syscall",
".",
"Mount",
"(",
"\"",
"\"",
",",
"<mask>",
",",
"\"",
"\"",
",",
"syscall",
".",
"MS_BIND",
",",
"\"",
"\"",
")",
";",
"err",
"!=",
"nil",
"&&",
"!",
"os",
".",
"IsNotExist",
"(",
"err",
")",
"{",
"return",
"err",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
6,926 | all-6927 | [
"SetSelected",
"selects",
"the",
"radio",
"by",
"its",
"number",
".",
"The",
"function",
"returns",
"false",
"if",
"the",
"number",
"is",
"invalid",
"for",
"the",
"radio",
"group"
] | [
"func",
"(",
"c",
"*",
"RadioGroup",
")",
"SetSelected",
"(",
"id",
"int",
")",
"bool",
"{",
"found",
":=",
"false",
"\n",
"if",
"id",
"<",
"0",
"||",
"id",
">=",
"len",
"(",
"c",
".",
"items",
")",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"for",
"idx",
",",
"item",
":=",
"range",
"c",
".",
"items",
"{",
"if",
"idx",
"==",
"id",
"{",
"<mask>",
"=",
"true",
"\n",
"item",
".",
"SetSelected",
"(",
"true",
")",
"\n",
"}",
"else",
"{",
"item",
".",
"SetSelected",
"(",
"false",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"found",
"\n",
"}"
] |
6,927 | all-6928 | [
"MarshalRaw",
"copies",
"the",
"raw",
"bytes",
"to",
"the",
"buffer",
"without",
"a",
"size",
"prefix",
"or",
"padding",
".",
"This",
"is",
"suitable",
"for",
"appending",
"data",
"already",
"in",
"XDR",
"format",
"from",
"another",
"source",
"."
] | [
"func",
"(",
"m",
"*",
"Marshaller",
")",
"MarshalRaw",
"(",
"bs",
"[",
"]",
"byte",
")",
"{",
"if",
"m",
".",
"Error",
"!=",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"if",
"len",
"(",
"m",
".",
"Data",
")",
"<",
"m",
".",
"<mask>",
"+",
"len",
"(",
"bs",
")",
"{",
"m",
".",
"Error",
"=",
"io",
".",
"ErrShortBuffer",
"\n",
"return",
"\n",
"}",
"\n\n",
"m",
".",
"offset",
"+=",
"copy",
"(",
"m",
".",
"Data",
"[",
"m",
".",
"offset",
":",
"]",
",",
"bs",
")",
"\n",
"}"
] |
6,928 | all-6929 | [
"Extract",
"parameter",
"from",
"metadata",
"that",
"correspond",
"to",
"given",
"command",
"line",
"flag",
"The",
"flag",
"is",
"of",
"the",
"form",
"NAME",
"=",
"VALUE",
"the",
"one",
"complication",
"is",
"for",
"the",
"enumerable",
"case",
"where",
"the",
"flag",
"is",
"of",
"the",
"form",
"NAME",
"[",
"KEY",
"]",
"=",
"VALUE",
"(",
"e",
".",
"g",
".",
"inputs",
")",
".",
"First",
"check",
"if",
"there",
"is",
"a",
"parameter",
"with",
"the",
"given",
"flag",
"name",
"then",
"check",
"for",
"the",
"enumerable",
"case",
"if",
"not",
"found",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"findParamAndValue",
"(",
"action",
"*",
"metadata",
".",
"Action",
",",
"flag",
"string",
")",
"(",
"*",
"metadata",
".",
"ActionParam",
",",
"string",
",",
"error",
")",
"{",
"elems",
":=",
"strings",
".",
"SplitN",
"(",
"flag",
",",
"\"",
"\"",
",",
"2",
")",
"\n",
"if",
"len",
"(",
"elems",
")",
"!=",
"2",
"{",
"return",
"nil",
",",
"\"",
"\"",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"flag",
")",
"\n",
"}",
"\n",
"name",
":=",
"elems",
"[",
"0",
"]",
"\n",
"<mask>",
":=",
"elems",
"[",
"1",
"]",
"\n",
"var",
"param",
"*",
"metadata",
".",
"ActionParam",
"\n",
"for",
"_",
",",
"ap",
":=",
"range",
"action",
".",
"CommandFlags",
"{",
"if",
"ap",
".",
"Name",
"==",
"name",
"{",
"param",
"=",
"ap",
"\n",
"break",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"param",
"==",
"nil",
"&&",
"strings",
".",
"Contains",
"(",
"name",
",",
"\"",
"\"",
")",
"{",
"// Handle enumerable case",
"name",
"=",
"name",
"[",
":",
"strings",
".",
"LastIndex",
"(",
"name",
",",
"\"",
"\"",
")",
"]",
"\n",
"for",
"_",
",",
"ap",
":=",
"range",
"action",
".",
"CommandFlags",
"{",
"if",
"ap",
".",
"Name",
"==",
"name",
"{",
"param",
"=",
"ap",
"\n",
"es",
":=",
"captureEnumRegex",
".",
"FindStringSubmatch",
"(",
"elems",
"[",
"0",
"]",
")",
"\n",
"if",
"es",
"==",
"nil",
"{",
"return",
"nil",
",",
"\"",
"\"",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"flag",
")",
"\n",
"}",
"\n",
"value",
"=",
"es",
"[",
"1",
"]",
"+",
"\"",
"\"",
"+",
"value",
"\n",
"break",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"param",
",",
"value",
",",
"nil",
"\n",
"}"
] |
6,929 | all-6930 | [
"Respond",
"executes",
"template",
"with",
"provided",
"data",
"into",
"buffer",
"then",
"writes",
"the",
"the",
"body",
"to",
"the",
"response",
"writer",
".",
"A",
"panic",
"will",
"be",
"raised",
"if",
"the",
"template",
"does",
"not",
"exist",
"or",
"fails",
"to",
"execute",
"."
] | [
"func",
"(",
"t",
"Templates",
")",
"Respond",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"<mask>",
"string",
",",
"data",
"interface",
"{",
"}",
")",
"{",
"t",
".",
"RespondWithStatus",
"(",
"w",
",",
"name",
",",
"data",
",",
"0",
")",
"\n",
"}"
] |
6,930 | all-6931 | [
"MuteHost",
"mutes",
"all",
"monitors",
"for",
"the",
"given",
"host"
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"MuteHost",
"(",
"host",
"string",
",",
"action",
"*",
"HostActionMute",
")",
"(",
"*",
"HostActionResp",
",",
"error",
")",
"{",
"var",
"out",
"HostActionResp",
"\n",
"uri",
":=",
"\"",
"\"",
"+",
"host",
"+",
"\"",
"\"",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
"\"",
"\"",
",",
"uri",
",",
"<mask>",
",",
"&",
"out",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"return",
"&",
"out",
",",
"nil",
"\n",
"}"
] |
6,931 | all-6932 | [
"assign",
"a",
"binding",
"point",
"to",
"an",
"active",
"uniform",
"block"
] | [
"func",
"UniformBlockBinding",
"(",
"<mask>",
"uint32",
",",
"uniformBlockIndex",
"uint32",
",",
"uniformBlockBinding",
"uint32",
")",
"{",
"C",
".",
"glowUniformBlockBinding",
"(",
"gpUniformBlockBinding",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"program",
")",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"uniformBlockIndex",
")",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"uniformBlockBinding",
")",
")",
"\n",
"}"
] |
6,932 | all-6933 | [
"IgnoreInterfaces",
"returns",
"an",
"Option",
"that",
"ignores",
"all",
"values",
"or",
"references",
"of",
"values",
"assignable",
"to",
"certain",
"interface",
"types",
".",
"These",
"interfaces",
"are",
"specified",
"by",
"passing",
"in",
"an",
"anonymous",
"struct",
"with",
"the",
"interface",
"types",
"embedded",
"in",
"it",
".",
"For",
"example",
"to",
"ignore",
"sync",
".",
"Locker",
"pass",
"in",
"struct",
"{",
"sync",
".",
"Locker",
"}",
"{}",
"."
] | [
"func",
"IgnoreInterfaces",
"(",
"ifaces",
"interface",
"{",
"}",
")",
"cmp",
".",
"Option",
"{",
"tf",
":=",
"newIfaceFilter",
"(",
"ifaces",
")",
"\n",
"return",
"cmp",
".",
"FilterPath",
"(",
"tf",
".",
"<mask>",
",",
"cmp",
".",
"Ignore",
"(",
")",
")",
"\n",
"}"
] |
6,933 | all-6934 | [
"Any",
"returns",
"true",
"if",
"one",
"of",
"the",
"strings",
"in",
"the",
"slice",
"satisfies",
"the",
"predicate",
"f",
"."
] | [
"func",
"Any",
"(",
"<mask>",
"[",
"]",
"string",
",",
"f",
"func",
"(",
"string",
")",
"bool",
")",
"bool",
"{",
"for",
"_",
",",
"v",
":=",
"range",
"vs",
"{",
"if",
"f",
"(",
"v",
")",
"{",
"return",
"true",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"false",
"\n",
"}"
] |
6,934 | all-6935 | [
"This",
"function",
"is",
"required",
"because",
"we",
"want",
"the",
"zero",
"value",
"of",
"Encoder",
".",
"CompressionLevel",
"to",
"map",
"to",
"zlib",
".",
"DefaultCompression",
"."
] | [
"func",
"levelToZlib",
"(",
"l",
"CompressionLevel",
")",
"int",
"{",
"switch",
"l",
"{",
"case",
"DefaultCompression",
":",
"return",
"zlib",
".",
"DefaultCompression",
"\n",
"case",
"NoCompression",
":",
"return",
"zlib",
".",
"NoCompression",
"\n",
"case",
"BestSpeed",
":",
"return",
"zlib",
".",
"BestSpeed",
"\n",
"case",
"BestCompression",
":",
"return",
"zlib",
".",
"BestCompression",
"\n",
"<mask>",
":",
"return",
"zlib",
".",
"DefaultCompression",
"\n",
"}",
"\n",
"}"
] |
6,935 | all-6936 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetNodeValueParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom3",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"<mask>",
"\n",
"}"
] |
6,936 | all-6937 | [
"Debugf",
"writes",
"the",
"formatted",
"string",
"to",
"the",
"Target",
"logger",
"."
] | [
"func",
"(",
"t",
"*",
"Target",
")",
"Debugf",
"(",
"format",
"string",
",",
"v",
"...",
"interface",
"{",
"}",
")",
"{",
"t",
".",
"mut",
".",
"RLock",
"(",
")",
"\n",
"defer",
"t",
".",
"mut",
".",
"RUnlock",
"(",
")",
"\n",
"if",
"t",
".",
"logger",
"!=",
"nil",
"{",
"t",
".",
"logger",
".",
"Debugf",
"(",
"<mask>",
",",
"v",
"...",
")",
"\n",
"}",
"\n",
"}"
] |
6,937 | all-6938 | [
"SearchRuleSets",
"returns",
"rule",
"sets",
"matching",
"the",
"specified",
"search",
"query",
"and",
"/",
"or",
"filter",
".",
"If",
"nil",
"is",
"passed",
"for",
"both",
"parameters",
"all",
"rule",
"sets",
"will",
"be",
"returned",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"SearchRuleSets",
"(",
"searchCriteria",
"*",
"SearchQueryType",
",",
"filterCriteria",
"*",
"SearchFilterType",
")",
"(",
"*",
"[",
"]",
"RuleSet",
",",
"error",
")",
"{",
"q",
":=",
"url",
".",
"Values",
"{",
"}",
"\n\n",
"if",
"searchCriteria",
"!=",
"nil",
"&&",
"*",
"searchCriteria",
"!=",
"\"",
"\"",
"{",
"q",
".",
"Set",
"(",
"\"",
"\"",
",",
"string",
"(",
"*",
"searchCriteria",
")",
")",
"\n",
"}",
"\n\n",
"if",
"filterCriteria",
"!=",
"nil",
"&&",
"len",
"(",
"*",
"filterCriteria",
")",
">",
"0",
"{",
"for",
"filter",
",",
"criteria",
":=",
"range",
"*",
"filterCriteria",
"{",
"for",
"_",
",",
"val",
":=",
"<mask>",
"criteria",
"{",
"q",
".",
"Add",
"(",
"filter",
",",
"val",
")",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"if",
"q",
".",
"Encode",
"(",
")",
"==",
"\"",
"\"",
"{",
"return",
"a",
".",
"FetchRuleSets",
"(",
")",
"\n",
"}",
"\n\n",
"reqURL",
":=",
"url",
".",
"URL",
"{",
"Path",
":",
"config",
".",
"RuleSetPrefix",
",",
"RawQuery",
":",
"q",
".",
"Encode",
"(",
")",
",",
"}",
"\n\n",
"result",
",",
"err",
":=",
"a",
".",
"Get",
"(",
"reqURL",
".",
"String",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n\n",
"var",
"rulesets",
"[",
"]",
"RuleSet",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"result",
",",
"&",
"rulesets",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"rulesets",
",",
"nil",
"\n",
"}"
] |
6,938 | all-6939 | [
"NewCommand",
"creates",
"a",
"new",
"Livestatus",
"command",
"instance",
"."
] | [
"func",
"NewCommand",
"(",
"name",
"string",
",",
"args",
"...",
"string",
")",
"*",
"Command",
"{",
"return",
"&",
"Command",
"{",
"name",
":",
"<mask>",
",",
"args",
":",
"args",
",",
"}",
"\n",
"}"
] |
6,939 | all-6940 | [
"ackMessageId",
"sends",
"an",
"IAMRoleCredentialsAckRequest",
"to",
"the",
"backend"
] | [
"func",
"(",
"refreshHandler",
"*",
"refreshCredentialsHandler",
")",
"ackMessage",
"(",
"ack",
"*",
"ecsacs",
".",
"IAMRoleCredentialsAckRequest",
")",
"{",
"err",
":=",
"refreshHandler",
".",
"acsClient",
".",
"MakeRequest",
"(",
"ack",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"seelog",
".",
"Warnf",
"(",
"\"",
"\"",
",",
"aws",
".",
"StringValue",
"(",
"ack",
".",
"MessageId",
")",
",",
"err",
")",
"\n",
"}",
"\n",
"seelog",
".",
"Debugf",
"(",
"\"",
"\"",
",",
"ack",
".",
"<mask>",
"(",
")",
")",
"\n",
"}"
] |
6,940 | all-6941 | [
"SetLabel",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_button_set_label",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Button",
")",
"SetLabel",
"(",
"<mask>",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"label",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
"gtk_button_set_label",
"(",
"v",
".",
"native",
"(",
")",
",",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"cstr",
")",
")",
"\n",
"}"
] |
6,941 | all-6942 | [
"NOTE",
":",
"UNSAFE"
] | [
"func",
"EncodeFloat64",
"(",
"w",
"io",
".",
"<mask>",
",",
"f",
"float64",
")",
"(",
"err",
"error",
")",
"{",
"return",
"EncodeUint64",
"(",
"w",
",",
"math",
".",
"Float64bits",
"(",
"f",
")",
")",
"\n",
"}"
] |
6,942 | all-6943 | [
"FormatAddress",
"formats",
"an",
"address",
"and",
"a",
"name",
"as",
"a",
"valid",
"RFC",
"5322",
"address",
"."
] | [
"func",
"(",
"m",
"*",
"Message",
")",
"FormatAddress",
"(",
"address",
",",
"name",
"string",
")",
"string",
"{",
"if",
"name",
"==",
"\"",
"\"",
"{",
"return",
"address",
"\n",
"}",
"\n\n",
"enc",
":=",
"m",
".",
"encodeString",
"(",
"name",
")",
"\n",
"if",
"enc",
"==",
"name",
"{",
"m",
".",
"buf",
".",
"WriteByte",
"(",
"'\"'",
")",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"name",
")",
";",
"i",
"++",
"{",
"b",
":=",
"name",
"[",
"i",
"]",
"\n",
"if",
"b",
"==",
"'\\\\'",
"||",
"b",
"==",
"'\"'",
"{",
"m",
".",
"buf",
".",
"WriteByte",
"(",
"'\\\\'",
")",
"\n",
"}",
"\n",
"m",
".",
"buf",
".",
"WriteByte",
"(",
"b",
")",
"\n",
"}",
"\n",
"m",
".",
"buf",
".",
"WriteByte",
"(",
"'\"'",
")",
"\n",
"}",
"else",
"if",
"hasSpecials",
"(",
"name",
")",
"{",
"m",
".",
"buf",
".",
"WriteString",
"(",
"bEncoding",
".",
"Encode",
"(",
"m",
".",
"charset",
",",
"name",
")",
")",
"\n",
"}",
"else",
"{",
"m",
".",
"buf",
".",
"WriteString",
"(",
"enc",
")",
"\n",
"}",
"\n",
"m",
".",
"buf",
".",
"WriteString",
"(",
"\"",
"\"",
")",
"\n",
"m",
".",
"buf",
".",
"WriteString",
"(",
"<mask>",
")",
"\n",
"m",
".",
"buf",
".",
"WriteByte",
"(",
"'>'",
")",
"\n\n",
"addr",
":=",
"m",
".",
"buf",
".",
"String",
"(",
")",
"\n",
"m",
".",
"buf",
".",
"Reset",
"(",
")",
"\n",
"return",
"addr",
"\n",
"}"
] |
6,943 | all-6944 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ClearDataForOriginParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage11",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
6,944 | all-6945 | [
"getFunction",
"returns",
"a",
"predefined",
"Function",
"object",
"for",
"the",
"given",
"name",
"."
] | [
"func",
"getFunction",
"(",
"name",
"string",
")",
"(",
"*",
"Function",
",",
"bool",
")",
"{",
"function",
",",
"ok",
":=",
"functions",
"[",
"<mask>",
"]",
"\n",
"return",
"function",
",",
"ok",
"\n",
"}"
] |
6,945 | all-6946 | [
"WithBody",
"adds",
"the",
"body",
"to",
"the",
"put",
"apps",
"app",
"params"
] | [
"func",
"(",
"o",
"*",
"PutAppsAppParams",
")",
"WithBody",
"(",
"body",
"*",
"models",
".",
"AppWrapper",
")",
"*",
"PutAppsAppParams",
"{",
"o",
".",
"SetBody",
"(",
"<mask>",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
6,946 | all-6947 | [
"GetPresenceMulti",
"retrieves",
"multiple",
"users",
"presence",
".",
"If",
"the",
"from",
"address",
"is",
"an",
"empty",
"string",
"the",
"default",
"(",
"yourapp"
] | [
"func",
"GetPresenceMulti",
"(",
"c",
"context",
".",
"Context",
",",
"to",
"[",
"]",
"string",
",",
"from",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"req",
":=",
"&",
"pb",
".",
"BulkPresenceRequest",
"{",
"Jid",
":",
"to",
",",
"}",
"\n",
"if",
"from",
"!=",
"\"",
"\"",
"{",
"req",
".",
"FromJid",
"=",
"&",
"from",
"\n",
"}",
"\n",
"res",
":=",
"&",
"pb",
".",
"BulkPresenceResponse",
"{",
"}",
"\n\n",
"if",
"err",
":=",
"internal",
".",
"Call",
"(",
"c",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"req",
",",
"res",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"presences",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"0",
",",
"len",
"(",
"<mask>",
".",
"PresenceResponse",
")",
")",
"\n",
"errs",
":=",
"appengine",
".",
"MultiError",
"{",
"}",
"\n\n",
"addResult",
":=",
"func",
"(",
"presence",
"string",
",",
"err",
"error",
")",
"{",
"presences",
"=",
"append",
"(",
"presences",
",",
"presence",
")",
"\n",
"errs",
"=",
"append",
"(",
"errs",
",",
"err",
")",
"\n",
"}",
"\n\n",
"anyErr",
":=",
"false",
"\n",
"for",
"_",
",",
"subres",
":=",
"range",
"res",
".",
"PresenceResponse",
"{",
"if",
"!",
"subres",
".",
"GetValid",
"(",
")",
"{",
"anyErr",
"=",
"true",
"\n",
"addResult",
"(",
"\"",
"\"",
",",
"ErrInvalidJID",
")",
"\n",
"continue",
"\n",
"}",
"\n",
"if",
"!",
"*",
"subres",
".",
"IsAvailable",
"||",
"subres",
".",
"Presence",
"==",
"nil",
"{",
"anyErr",
"=",
"true",
"\n",
"addResult",
"(",
"\"",
"\"",
",",
"ErrPresenceUnavailable",
")",
"\n",
"continue",
"\n",
"}",
"\n",
"presence",
",",
"ok",
":=",
"presenceMap",
"[",
"*",
"subres",
".",
"Presence",
"]",
"\n",
"if",
"ok",
"{",
"addResult",
"(",
"presence",
",",
"nil",
")",
"\n",
"}",
"else",
"{",
"anyErr",
"=",
"true",
"\n",
"addResult",
"(",
"\"",
"\"",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"*",
"subres",
".",
"Presence",
")",
")",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"anyErr",
"{",
"return",
"presences",
",",
"errs",
"\n",
"}",
"\n",
"return",
"presences",
",",
"nil",
"\n",
"}"
] |
6,947 | all-6948 | [
"fromString",
"parses",
"a",
"string",
"into",
"an",
"error",
"type",
".",
"If",
"the",
"type",
"is",
"invalid",
"the",
"Unknown",
"type",
"will",
"be",
"returned",
"as",
"well",
"as",
"an",
"error",
"."
] | [
"func",
"fromString",
"(",
"str",
"string",
")",
"(",
"Type",
",",
"error",
")",
"{",
"enum",
":=",
"strings",
".",
"ToLower",
"(",
"str",
")",
"\n",
"switch",
"enum",
"{",
"case",
"\"",
"\"",
":",
"return",
"Unknown",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"Internal",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"InvalidArgument",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"OutOfRange",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"NotFound",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"Conflict",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"AlreadyExists",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"Unauthorized",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"PermissionDenied",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"Timeout",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"NotImplemented",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"TemporarilyUnavailable",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"PermanentlyUnavailable",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"Canceled",
",",
"nil",
"\n",
"case",
"\"",
"\"",
":",
"return",
"ResourceExhausted",
",",
"nil",
"\n",
"<mask>",
":",
"return",
"Unknown",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"}"
] |
6,948 | all-6949 | [
"Until",
"loops",
"until",
"stop",
"channel",
"is",
"closed",
"running",
"f",
"every",
"period",
".",
"Catches",
"any",
"panics",
"and",
"keeps",
"going",
".",
"f",
"may",
"not",
"be",
"invoked",
"if",
"stop",
"channel",
"is",
"already",
"closed",
"."
] | [
"func",
"Until",
"(",
"f",
"func",
"(",
")",
",",
"period",
"<mask>",
".",
"Duration",
",",
"stopCh",
"<-",
"chan",
"struct",
"{",
"}",
")",
"{",
"for",
"{",
"select",
"{",
"case",
"<-",
"stopCh",
":",
"return",
"\n",
"default",
":",
"}",
"\n",
"func",
"(",
")",
"{",
"defer",
"HandleCrash",
"(",
")",
"\n",
"f",
"(",
")",
"\n",
"}",
"(",
")",
"\n",
"time",
".",
"Sleep",
"(",
"period",
")",
"\n",
"}",
"\n",
"}"
] |
6,949 | all-6950 | [
"ReleaseIPBlock",
"deletes",
"an",
"IP",
"block"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"ReleaseIPBlock",
"(",
"ipblockid",
"string",
")",
"(",
"*",
"http",
".",
"Header",
",",
"error",
")",
"{",
"url",
":=",
"ipblockPath",
"(",
"ipblockid",
")",
"\n",
"ret",
":=",
"&",
"http",
".",
"<mask>",
"{",
"}",
"\n",
"err",
":=",
"c",
".",
"client",
".",
"Delete",
"(",
"url",
",",
"ret",
",",
"http",
".",
"StatusAccepted",
")",
"\n",
"return",
"ret",
",",
"err",
"\n",
"}"
] |
6,950 | all-6951 | [
"WriteMicrosoftAssets",
"writes",
"assets",
"to",
"a",
"microsoft",
"backend"
] | [
"func",
"WriteMicrosoftAssets",
"(",
"encoder",
"Encoder",
",",
"opts",
"*",
"AssetOpts",
",",
"container",
"string",
",",
"id",
"string",
",",
"<mask>",
"string",
",",
"volumeSize",
"int",
")",
"error",
"{",
"if",
"err",
":=",
"WriteAssets",
"(",
"encoder",
",",
"opts",
",",
"microsoftBackend",
",",
"microsoftBackend",
",",
"volumeSize",
",",
"\"",
"\"",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"return",
"WriteSecret",
"(",
"encoder",
",",
"MicrosoftSecret",
"(",
"container",
",",
"id",
",",
"secret",
")",
",",
"opts",
")",
"\n",
"}"
] |
6,951 | all-6952 | [
"AddColor",
"will",
"wrap",
"a",
"colorful",
"UI",
"on",
"top",
"of",
"ui",
".",
"Use",
"wlog",
"s",
"color",
"variables",
"for",
"the",
"color",
".",
"All",
"background",
"colors",
"are",
"not",
"changed",
"by",
"this",
"function",
"but",
"you",
"are",
"able",
"to",
"change",
"them",
"manually",
".",
"Just",
"create",
"this",
"structure",
"manually",
"and",
"change",
"any",
"of",
"the",
"background",
"colors",
"you",
"want",
".",
"Arguments",
"are",
"in",
"alphabetical",
"order",
"."
] | [
"func",
"AddColor",
"(",
"askColor",
",",
"errorColor",
",",
"infoColor",
",",
"logColor",
",",
"outputColor",
",",
"responseColor",
",",
"runningColor",
",",
"successColor",
",",
"warnColor",
"<mask>",
",",
"ui",
"UI",
")",
"*",
"ColorUI",
"{",
"return",
"&",
"ColorUI",
"{",
"LogFGColor",
":",
"logColor",
",",
"LogBGColor",
":",
"None",
",",
"OutputFGColor",
":",
"outputColor",
",",
"OutputBGColor",
":",
"None",
",",
"SuccessFGColor",
":",
"successColor",
",",
"SuccessBGColor",
":",
"None",
",",
"InfoFGColor",
":",
"infoColor",
",",
"InfoBGColor",
":",
"None",
",",
"ErrorFGColor",
":",
"errorColor",
",",
"ErrorBGColor",
":",
"None",
",",
"WarnFGColor",
":",
"warnColor",
",",
"WarnBGColor",
":",
"None",
",",
"RunningFGColor",
":",
"runningColor",
",",
"RunningBGColor",
":",
"None",
",",
"AskFGColor",
":",
"askColor",
",",
"AskBGColor",
":",
"None",
",",
"ResponseFGColor",
":",
"responseColor",
",",
"ResponseBGColor",
":",
"None",
",",
"UI",
":",
"ui",
",",
"}",
"\n",
"}"
] |
6,952 | all-6953 | [
"Update",
"inserts",
"newinput",
"into",
"the",
"input",
"[]",
"rune",
"in",
"the",
"appropriate",
"place",
".",
"The",
"cursor",
"is",
"moved",
"to",
"the",
"end",
"of",
"the",
"inputed",
"sequence",
"."
] | [
"func",
"(",
"c",
"*",
"Cursor",
")",
"Update",
"(",
"newinput",
"string",
")",
"{",
"a",
":=",
"c",
".",
"input",
"\n",
"b",
":=",
"[",
"]",
"rune",
"(",
"newinput",
")",
"\n",
"i",
":=",
"c",
".",
"Position",
"\n",
"a",
"=",
"<mask>",
"(",
"a",
"[",
":",
"i",
"]",
",",
"append",
"(",
"b",
",",
"a",
"[",
"i",
":",
"]",
"...",
")",
"...",
")",
"\n",
"c",
".",
"input",
"=",
"a",
"\n",
"c",
".",
"Move",
"(",
"len",
"(",
"b",
")",
")",
"\n",
"}"
] |
6,953 | all-6954 | [
"Selected",
"returns",
"true",
"if",
"all",
"of",
"the",
"elements",
"that",
"the",
"selection",
"refers",
"to",
"are",
"selected",
"."
] | [
"func",
"(",
"s",
"*",
"Selection",
")",
"Selected",
"(",
")",
"(",
"bool",
",",
"error",
")",
"{",
"return",
"s",
".",
"hasState",
"(",
"<mask>",
".",
"Element",
".",
"IsSelected",
",",
"\"",
"\"",
")",
"\n",
"}"
] |
6,954 | all-6955 | [
"resourceVSphereDatastoreClusterValidateEmptyCluster",
"validates",
"that",
"the",
"datastore",
"cluster",
"is",
"empty",
".",
"This",
"is",
"used",
"to",
"ensure",
"a",
"safe",
"deletion",
"of",
"the",
"cluster",
"-",
"we",
"do",
"not",
"allow",
"deletion",
"of",
"clusters",
"that",
"still",
"have",
"datastores",
"in",
"them",
"."
] | [
"func",
"resourceVSphereDatastoreClusterValidateEmptyCluster",
"(",
"d",
"structure",
".",
"ResourceIDStringer",
",",
"pod",
"*",
"object",
".",
"StoragePod",
")",
"error",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"resourceVSphereDatastoreClusterIDString",
"(",
"d",
")",
")",
"\n",
"<mask>",
",",
"err",
":=",
"storagepod",
".",
"HasChildren",
"(",
"pod",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"if",
"ne",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"pod",
".",
"InventoryPath",
",",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
6,955 | all-6956 | [
"ContainerCreate",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockClient",
")",
"ContainerCreate",
"(",
"arg0",
"context",
".",
"Context",
",",
"arg1",
"*",
"container",
".",
"Config",
",",
"arg2",
"*",
"container",
".",
"HostConfig",
",",
"arg3",
"*",
"network",
".",
"NetworkingConfig",
",",
"arg4",
"string",
")",
"(",
"container",
".",
"ContainerCreateCreatedBody",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
",",
"arg1",
",",
"arg2",
",",
"arg3",
",",
"arg4",
")",
"\n",
"ret0",
",",
"_",
":=",
"<mask>",
"[",
"0",
"]",
".",
"(",
"container",
".",
"ContainerCreateCreatedBody",
")",
"\n",
"ret1",
",",
"_",
":=",
"ret",
"[",
"1",
"]",
".",
"(",
"error",
")",
"\n",
"return",
"ret0",
",",
"ret1",
"\n",
"}"
] |
6,956 | all-6957 | [
"Output",
"returns",
"the",
"current",
"output",
"."
] | [
"func",
"(",
"d",
"*",
"Displayer",
")",
"Output",
"(",
")",
"string",
"{",
"output",
":=",
"d",
".",
"RawOutput",
"\n",
"if",
"output",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"if",
"outputStr",
",",
"ok",
":=",
"d",
".",
"RawOutput",
".",
"(",
"string",
")",
";",
"ok",
"{",
"suffix",
":=",
"\"",
"\"",
"\n",
"if",
"d",
".",
"prettify",
"{",
"suffix",
"=",
"\"",
"\\n",
"\"",
"\n",
"}",
"\n",
"return",
"outputStr",
"+",
"suffix",
"\n",
"}",
"\n",
"var",
"<mask>",
"string",
"\n",
"var",
"err",
"error",
"\n",
"if",
"d",
".",
"prettify",
"{",
"var",
"b",
"[",
"]",
"byte",
"\n",
"b",
",",
"err",
"=",
"json",
".",
"MarshalIndent",
"(",
"output",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"out",
"=",
"string",
"(",
"b",
")",
"+",
"\"",
"\\n",
"\"",
"\n",
"}",
"\n",
"}",
"else",
"{",
"var",
"b",
"[",
"]",
"byte",
"\n",
"b",
",",
"err",
"=",
"json",
".",
"Marshal",
"(",
"output",
")",
"\n",
"out",
"=",
"string",
"(",
"b",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"fm",
":=",
"\"",
"\"",
"\n",
"if",
"d",
".",
"prettify",
"{",
"fm",
"+=",
"\"",
"\\n",
"\"",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"fm",
",",
"output",
")",
"\n",
"}",
"\n",
"return",
"out",
"\n",
"}"
] |
6,957 | all-6958 | [
"Init",
"is",
"used",
"to",
"setup",
"the",
"cgroup",
"root",
"for",
"ecs"
] | [
"func",
"(",
"c",
"*",
"control",
")",
"Init",
"(",
")",
"error",
"{",
"seelog",
".",
"Infof",
"(",
"\"",
"\"",
",",
"config",
".",
"DefaultTaskCgroupPrefix",
")",
"\n\n",
"// Build cgroup spec",
"cgroupSpec",
":=",
"&",
"Spec",
"{",
"<mask>",
":",
"config",
".",
"DefaultTaskCgroupPrefix",
",",
"Specs",
":",
"&",
"specs",
".",
"LinuxResources",
"{",
"}",
",",
"}",
"\n",
"_",
",",
"err",
":=",
"c",
".",
"Create",
"(",
"cgroupSpec",
")",
"\n",
"return",
"err",
"\n",
"}"
] |
6,958 | all-6959 | [
"Properties",
"gets",
"the",
"properties",
"for",
"a",
"specific",
"Network",
".",
"By",
"itself",
"the",
"Network",
"type",
"usually",
"represents",
"a",
"standard",
"port",
"group",
"in",
"vCenter",
"-",
"it",
"has",
"been",
"set",
"up",
"on",
"a",
"host",
"or",
"a",
"set",
"of",
"hosts",
"and",
"is",
"usually",
"configured",
"via",
"through",
"an",
"appropriate",
"HostNetworkSystem",
".",
"vCenter",
"however",
"groups",
"up",
"these",
"networks",
"and",
"displays",
"them",
"as",
"a",
"single",
"network",
"that",
"VM",
"can",
"use",
"across",
"hosts",
"facilitating",
"HA",
"and",
"vMotion",
"for",
"VMs",
"that",
"use",
"standard",
"port",
"groups",
"versus",
"DVS",
"port",
"groups",
".",
"Hence",
"the",
"Network",
"object",
"is",
"mainly",
"a",
"read",
"-",
"only",
"MO",
"and",
"is",
"only",
"useful",
"for",
"checking",
"some",
"very",
"base",
"level",
"attributes",
".",
"While",
"other",
"network",
"MOs",
"extend",
"the",
"base",
"network",
"object",
"(",
"such",
"as",
"DV",
"port",
"groups",
"and",
"opaque",
"networks",
")",
"this",
"only",
"works",
"with",
"the",
"base",
"object",
"only",
".",
"Refer",
"to",
"functions",
"more",
"specific",
"to",
"the",
"MO",
"to",
"get",
"a",
"fully",
"extended",
"property",
"set",
"for",
"the",
"extended",
"objects",
"if",
"you",
"are",
"dealing",
"with",
"those",
"object",
"types",
"."
] | [
"func",
"Properties",
"(",
"net",
"*",
"object",
".",
"Network",
")",
"(",
"*",
"mo",
".",
"Network",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"<mask>",
".",
"Background",
"(",
")",
",",
"provider",
".",
"DefaultAPITimeout",
")",
"\n",
"defer",
"cancel",
"(",
")",
"\n",
"var",
"props",
"mo",
".",
"Network",
"\n",
"if",
"err",
":=",
"net",
".",
"Properties",
"(",
"ctx",
",",
"net",
".",
"Reference",
"(",
")",
",",
"nil",
",",
"&",
"props",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"return",
"&",
"props",
",",
"nil",
"\n",
"}"
] |
6,959 | all-6960 | [
"Post",
"-",
"handle",
"a",
"post",
"lease",
"call"
] | [
"func",
"(",
"s",
"*",
"Lease",
")",
"Post",
"(",
"logger",
"*",
"log",
".",
"Logger",
",",
"req",
"*",
"http",
".",
"Request",
")",
"(",
"statusCode",
"int",
",",
"response",
"interface",
"{",
"}",
")",
"{",
"var",
"(",
"err",
"error",
"\n",
")",
"\n",
"statusCode",
"=",
"http",
".",
"StatusNotFound",
"\n",
"s",
".",
"taskCollection",
".",
"Wake",
"(",
")",
"\n",
"logger",
".",
"Println",
"(",
"\"",
"\"",
")",
"\n\n",
"if",
"err",
"=",
"s",
".",
"InitFromHTTPRequest",
"(",
"req",
")",
";",
"err",
"==",
"nil",
"{",
"logger",
".",
"Println",
"(",
"\"",
"\"",
",",
"s",
")",
"\n",
"s",
".",
"Procurement",
"(",
")",
"\n",
"statusCode",
"=",
"http",
".",
"StatusCreated",
"\n",
"response",
"=",
"s",
".",
"Task",
"\n\n",
"}",
"else",
"{",
"<mask>",
"=",
"map",
"[",
"string",
"]",
"string",
"{",
"\"",
"\"",
":",
"err",
".",
"Error",
"(",
")",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
6,960 | all-6961 | [
"CreateGraph",
"creates",
"a",
"new",
"graph",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"CreateGraph",
"(",
"cfg",
"*",
"Graph",
")",
"(",
"*",
"Graph",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"jsonCfg",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"cfg",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"a",
".",
"Debug",
"{",
"a",
".",
"Log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"string",
"(",
"jsonCfg",
")",
")",
"\n",
"}",
"\n\n",
"<mask>",
",",
"err",
":=",
"a",
".",
"Post",
"(",
"config",
".",
"GraphPrefix",
",",
"jsonCfg",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"graph",
":=",
"&",
"Graph",
"{",
"}",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"result",
",",
"graph",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"graph",
",",
"nil",
"\n",
"}"
] |
6,961 | all-6962 | [
"Syntax",
":",
"foo",
"/",
"bar",
"=",
"2",
"foo",
"/",
"bar",
"/",
".",
"*",
"=",
"1",
"f",
"*",
"=",
"3"
] | [
"func",
"(",
"p",
"*",
"FilepathSpec",
")",
"Set",
"(",
"value",
"string",
")",
"error",
"{",
"var",
"filter",
"[",
"]",
"filepathPat",
"\n",
"for",
"_",
",",
"pat",
":=",
"range",
"strings",
".",
"Split",
"(",
"value",
",",
"\"",
"\"",
")",
"{",
"pattern",
",",
"v",
",",
"err",
":=",
"parseFilter",
"(",
"pat",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"v",
"==",
"0",
"{",
"continue",
"\n",
"}",
"\n",
"re",
",",
"err",
":=",
"regexp",
".",
"Compile",
"(",
"pattern",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"pattern",
",",
"err",
")",
"\n",
"}",
"\n",
"// TODO: check syntax of filter?",
"filter",
"=",
"append",
"(",
"filter",
",",
"filepathPat",
"{",
"<mask>",
",",
"pattern",
",",
"Level",
"(",
"v",
")",
"}",
")",
"\n",
"}",
"\n",
"p",
".",
"filter",
"=",
"filter",
"\n",
"return",
"nil",
"\n",
"}"
] |
6,962 | all-6963 | [
"Stop",
"halts",
"this",
"watcher",
"and",
"any",
"currently",
"polling",
"views",
"immediately",
".",
"If",
"a",
"view",
"was",
"in",
"the",
"middle",
"of",
"a",
"poll",
"no",
"data",
"will",
"be",
"returned",
"."
] | [
"func",
"(",
"w",
"*",
"Watcher",
")",
"Stop",
"(",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"Unlock",
"(",
")",
"\n\n",
"log",
".",
"Printf",
"(",
"\"",
"\"",
")",
"\n\n",
"for",
"_",
",",
"view",
":=",
"range",
"w",
".",
"depViewMap",
"{",
"if",
"view",
"==",
"nil",
"{",
"continue",
"\n",
"}",
"\n",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"view",
".",
"Dependency",
"(",
")",
")",
"\n",
"view",
".",
"<mask>",
"(",
")",
"\n",
"}",
"\n\n",
"// Reset the map to have no views",
"w",
".",
"depViewMap",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"*",
"View",
")",
"\n\n",
"// Close any idle TCP connections",
"w",
".",
"clients",
".",
"Stop",
"(",
")",
"\n",
"}"
] |
6,963 | all-6964 | [
"UnmarshalBinary",
"unmarshals",
"a",
"byte",
"slice",
"into",
"a",
"MACMaskArg",
".",
"If",
"the",
"byte",
"slice",
"does",
"not",
"contain",
"enough",
"bytes",
"to",
"form",
"a",
"valid",
"MACMaskArg",
"or",
"a",
"Directive",
"is",
"malformed",
"io",
".",
"ErrUnexpectedEOF",
"is",
"returned",
".",
"If",
"byte",
"0",
"(",
"reserved",
"byte",
")",
"is",
"not",
"empty",
"ErrorBadArgumentParameter",
"is",
"returned",
"."
] | [
"func",
"(",
"m",
"*",
"MACMaskArg",
")",
"UnmarshalBinary",
"(",
"b",
"[",
"]",
"byte",
")",
"error",
"{",
"// Must contain minimum length for argument",
"if",
"len",
"(",
"b",
")",
"<",
"macMaskArgLen",
"{",
"return",
"io",
".",
"ErrUnexpectedEOF",
"\n",
"}",
"\n\n",
"// 1 byte reserved",
"if",
"b",
"[",
"0",
"]",
"!=",
"0",
"{",
"return",
"ErrorBadArgumentParameter",
"\n",
"}",
"\n\n",
"m",
".",
"Command",
"=",
"MACMaskCommand",
"(",
"b",
"[",
"1",
"]",
")",
"\n",
"m",
".",
"Error",
"=",
"MACMaskError",
"(",
"b",
"[",
"2",
"]",
")",
"\n",
"m",
".",
"DirCount",
"=",
"b",
"[",
"3",
"]",
"\n\n",
"// Must have at least enough bytes for directives with this count",
"if",
"len",
"(",
"b",
"[",
"4",
":",
"]",
")",
"<",
"(",
"directiveLen",
"*",
"int",
"(",
"m",
".",
"DirCount",
")",
")",
"{",
"return",
"io",
".",
"ErrUnexpectedEOF",
"\n",
"}",
"\n\n",
"// Unmarshal each directive bytes and add to slice",
"m",
".",
"Directives",
"=",
"make",
"(",
"[",
"]",
"*",
"Directive",
",",
"m",
".",
"DirCount",
")",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"int",
"(",
"m",
".",
"DirCount",
")",
";",
"i",
"++",
"{",
"d",
":=",
"<mask>",
"(",
"Directive",
")",
"\n",
"if",
"err",
":=",
"d",
".",
"UnmarshalBinary",
"(",
"b",
"[",
"4",
"+",
"(",
"i",
"*",
"directiveLen",
")",
":",
"4",
"+",
"(",
"i",
"*",
"directiveLen",
")",
"+",
"directiveLen",
"]",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"m",
".",
"Directives",
"[",
"i",
"]",
"=",
"d",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] |
6,964 | all-6965 | [
"Swap",
"switches",
"the",
"values",
"that",
"are",
"stored",
"at",
"positions",
"x",
"and",
"y"
] | [
"func",
"(",
"l",
"*",
"<mask>",
")",
"Swap",
"(",
"x",
",",
"y",
"uint",
")",
"bool",
"{",
"l",
".",
"key",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"key",
".",
"Unlock",
"(",
")",
"\n",
"return",
"l",
".",
"swap",
"(",
"x",
",",
"y",
")",
"\n",
"}"
] |
6,965 | all-6966 | [
"Print",
"-",
"Prints",
"table",
"."
] | [
"func",
"(",
"t",
"*",
"<mask>",
")",
"Print",
"(",
")",
"{",
"if",
"len",
"(",
"t",
".",
"Rows",
")",
"==",
"0",
"&&",
"t",
".",
"Footer",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"t",
".",
"calculateSizes",
"(",
"t",
".",
"Footer",
")",
"\n\n",
"if",
"!",
"t",
".",
"Markdown",
"{",
"t",
".",
"printDash",
"(",
")",
"\n",
"}",
"\n\n",
"if",
"!",
"t",
".",
"HideHead",
"{",
"fmt",
".",
"Println",
"(",
"t",
".",
"getHead",
"(",
")",
")",
"\n",
"t",
".",
"printTableDash",
"(",
")",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"r",
":=",
"range",
"t",
".",
"Rows",
"{",
"fmt",
".",
"Println",
"(",
"t",
".",
"rowString",
"(",
"r",
")",
")",
"\n",
"if",
"!",
"t",
".",
"Markdown",
"{",
"t",
".",
"printDash",
"(",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"if",
"t",
".",
"Footer",
"!=",
"nil",
"{",
"t",
".",
"printTableDash",
"(",
")",
"\n",
"fmt",
".",
"Println",
"(",
"t",
".",
"rowString",
"(",
"t",
".",
"Footer",
")",
")",
"\n",
"if",
"!",
"t",
".",
"Markdown",
"{",
"t",
".",
"printTableDash",
"(",
")",
"\n",
"}",
"\n",
"}",
"\n",
"}"
] |
6,966 | all-6967 | [
"Infof",
"outputs",
"formatted",
"Info",
"level",
"log"
] | [
"func",
"Infof",
"(",
"format",
"string",
",",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"glg",
".",
"<mask>",
"(",
"INFO",
",",
"format",
",",
"val",
"...",
")",
"\n",
"}"
] |
6,967 | all-6968 | [
"Scan",
"read",
"a",
"value",
"from",
"a",
"database",
"driver"
] | [
"func",
"(",
"b",
"*",
"Base64",
")",
"Scan",
"(",
"raw",
"interface",
"{",
"}",
")",
"error",
"{",
"switch",
"v",
":=",
"<mask>",
".",
"(",
"type",
")",
"{",
"case",
"[",
"]",
"byte",
":",
"*",
"b",
"=",
"Base64",
"(",
"string",
"(",
"v",
")",
")",
"\n",
"case",
"string",
":",
"*",
"b",
"=",
"Base64",
"(",
"v",
")",
"\n",
"default",
":",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"v",
")",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] |
6,968 | all-6969 | [
"String",
"returns",
"a",
"display",
"friendly",
"form",
"of",
"the",
"asset"
] | [
"func",
"(",
"a",
"Asset",
")",
"String",
"(",
")",
"string",
"{",
"<mask>",
"t",
",",
"c",
",",
"i",
"string",
"\n\n",
"a",
".",
"MustExtract",
"(",
"&",
"t",
",",
"&",
"c",
",",
"&",
"i",
")",
"\n\n",
"if",
"a",
".",
"Type",
"==",
"AssetTypeAssetTypeNative",
"{",
"return",
"t",
"\n",
"}",
"\n\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"t",
",",
"c",
",",
"i",
")",
"\n",
"}"
] |
6,969 | all-6970 | [
"UnmarshalJSON",
"sets",
"the",
"URI",
"from",
"JSON"
] | [
"func",
"(",
"u",
"*",
"URI",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"l",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"u",
".",
"UnmarshalEasyJSON",
"(",
"&",
"l",
")",
"\n",
"return",
"l",
".",
"Error",
"(",
")",
"\n",
"}"
] |
6,970 | all-6971 | [
"TODO",
"(",
"jrick",
")",
"/",
"*",
"func",
"(",
"v",
"*",
"ListStore",
")",
"SetColumnTypes",
"(",
"types",
"...",
"glib",
".",
"Type",
")",
"{",
"}",
"Set",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_list_store_set_value",
"()",
"but",
"provides",
"a",
"function",
"similar",
"to",
"gtk_list_store_set",
"()",
"in",
"that",
"multiple",
"columns",
"may",
"be",
"set",
"by",
"one",
"call",
".",
"The",
"length",
"of",
"columns",
"and",
"values",
"slices",
"must",
"match",
"or",
"Set",
"()",
"will",
"return",
"a",
"non",
"-",
"nil",
"error",
".",
"As",
"an",
"example",
"a",
"call",
"to",
":",
"store",
".",
"Set",
"(",
"iter",
"[]",
"int",
"{",
"0",
"1",
"}",
"[]",
"interface",
"{}",
"{",
"Foo",
"Bar",
"}",
")",
"is",
"functionally",
"equivalent",
"to",
"calling",
"the",
"native",
"C",
"GTK",
"function",
":",
"gtk_list_store_set",
"(",
"store",
"iter",
"0",
"Foo",
"1",
"Bar",
"-",
"1",
")",
";"
] | [
"func",
"(",
"v",
"*",
"ListStore",
")",
"Set",
"(",
"iter",
"*",
"TreeIter",
",",
"columns",
"[",
"]",
"int",
",",
"values",
"[",
"]",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"len",
"(",
"columns",
")",
"!=",
"len",
"(",
"<mask>",
")",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"for",
"i",
",",
"val",
":=",
"range",
"values",
"{",
"v",
".",
"SetValue",
"(",
"iter",
",",
"columns",
"[",
"i",
"]",
",",
"val",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
6,971 | all-6972 | [
"copyHiddenHeaders",
"copies",
"the",
"given",
"map"
] | [
"func",
"copyHiddenHeaders",
"(",
"from",
"map",
"[",
"string",
"]",
"bool",
")",
"(",
"to",
"map",
"[",
"string",
"]",
"bool",
")",
"{",
"to",
"=",
"make",
"(",
"<mask>",
"[",
"string",
"]",
"bool",
")",
"\n",
"for",
"k",
",",
"v",
":=",
"range",
"from",
"{",
"to",
"[",
"k",
"]",
"=",
"v",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
6,972 | all-6973 | [
"GetBytes",
"copies",
"a",
"block",
"of",
"pixels",
"from",
"the",
"storage",
"allocation",
"of",
"texture",
"slice",
"zero",
"into",
"system",
"memory",
"at",
"a",
"specified",
"address",
".",
"Reference",
":",
"https",
":",
"//",
"developer",
".",
"apple",
".",
"com",
"/",
"documentation",
"/",
"metal",
"/",
"mtltexture",
"/",
"1515751",
"-",
"getbytes",
"."
] | [
"func",
"(",
"t",
"Texture",
")",
"GetBytes",
"(",
"pixelBytes",
"*",
"byte",
",",
"bytesPerRow",
"uintptr",
",",
"region",
"Region",
",",
"<mask>",
"int",
")",
"{",
"r",
":=",
"region",
".",
"c",
"(",
")",
"\n",
"C",
".",
"Texture_GetBytes",
"(",
"t",
".",
"texture",
",",
"unsafe",
".",
"Pointer",
"(",
"pixelBytes",
")",
",",
"C",
".",
"size_t",
"(",
"bytesPerRow",
")",
",",
"r",
",",
"C",
".",
"uint_t",
"(",
"level",
")",
")",
"\n",
"}"
] |
6,973 | all-6974 | [
"NewVaultWriteQuery",
"creates",
"a",
"new",
"datacenter",
"dependency",
"."
] | [
"func",
"NewVaultWriteQuery",
"(",
"s",
"string",
",",
"d",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"(",
"*",
"VaultWriteQuery",
",",
"error",
")",
"{",
"s",
"=",
"strings",
".",
"TrimSpace",
"(",
"s",
")",
"\n",
"s",
"=",
"strings",
".",
"Trim",
"(",
"s",
",",
"\"",
"\"",
")",
"\n",
"if",
"s",
"==",
"\"",
"\"",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"s",
")",
"\n",
"}",
"\n\n",
"return",
"&",
"VaultWriteQuery",
"{",
"stopCh",
":",
"<mask>",
"(",
"chan",
"struct",
"{",
"}",
",",
"1",
")",
",",
"path",
":",
"s",
",",
"data",
":",
"d",
",",
"dataHash",
":",
"sha1Map",
"(",
"d",
")",
",",
"}",
",",
"nil",
"\n",
"}"
] |
6,974 | all-6975 | [
"GetTitle",
"is",
"a",
"wrapper",
"around",
"gtk_status_icon_get_title",
"()"
] | [
"func",
"(",
"v",
"*",
"StatusIcon",
")",
"GetTitle",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_status_icon_get_title",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>",
")",
"(",
"c",
")",
")",
"\n",
"}"
] |
6,975 | all-6976 | [
"UnmarshalYAML",
"implements",
"the",
"yaml",
".",
"Unmarshaler",
"interface",
"."
] | [
"func",
"(",
"c",
"*",
"RemoteWriteConfig",
")",
"UnmarshalYAML",
"(",
"unmarshal",
"func",
"(",
"interface",
"{",
"}",
")",
"error",
")",
"error",
"{",
"*",
"c",
"=",
"DefaultRemoteWriteConfig",
"\n",
"type",
"<mask>",
"RemoteWriteConfig",
"\n",
"if",
"err",
":=",
"unmarshal",
"(",
"(",
"*",
"plain",
")",
"(",
"c",
")",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"c",
".",
"URL",
"==",
"nil",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"for",
"_",
",",
"rlcfg",
":=",
"range",
"c",
".",
"WriteRelabelConfigs",
"{",
"if",
"rlcfg",
"==",
"nil",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"}",
"\n\n",
"// The UnmarshalYAML method of HTTPClientConfig is not being called because it's not a pointer.",
"// We cannot make it a pointer as the parser panics for inlined pointer structs.",
"// Thus we just do its validation here.",
"return",
"c",
".",
"HTTPClientConfig",
".",
"Validate",
"(",
")",
"\n",
"}"
] |
6,976 | all-6977 | [
"TODO",
"(",
"jrick",
")",
"GdkRectangle",
"/",
"*",
"func",
"(",
"v",
"*",
"Entry",
")",
"GetTextArea",
"()",
"{",
"}",
"SetVisibility",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_set_visibility",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Entry",
")",
"SetVisibility",
"(",
"visible",
"bool",
")",
"{",
"C",
".",
"gtk_entry_set_visibility",
"(",
"v",
".",
"native",
"(",
")",
",",
"gbool",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
6,977 | all-6978 | [
"GenerateKeyPairWithReader",
"returns",
"a",
"keypair",
"of",
"the",
"given",
"type",
"and",
"bitsize"
] | [
"func",
"GenerateKeyPairWithReader",
"(",
"typ",
",",
"bits",
"int",
",",
"src",
"io",
".",
"Reader",
")",
"(",
"PrivKey",
",",
"PubKey",
",",
"error",
")",
"{",
"switch",
"typ",
"{",
"case",
"RSA",
":",
"return",
"GenerateRSAKeyPair",
"(",
"bits",
",",
"src",
")",
"\n",
"case",
"Ed25519",
":",
"return",
"GenerateEd25519Key",
"(",
"src",
")",
"\n",
"<mask>",
"Secp256k1",
":",
"return",
"GenerateSecp256k1Key",
"(",
"src",
")",
"\n",
"case",
"ECDSA",
":",
"return",
"GenerateECDSAKeyPair",
"(",
"src",
")",
"\n",
"default",
":",
"return",
"nil",
",",
"nil",
",",
"ErrBadKeyType",
"\n",
"}",
"\n",
"}"
] |
6,978 | all-6979 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetRelayoutBoundaryReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom34",
"(",
"&",
"r",
",",
"v",
")",
"\n",
"return",
"r",
".",
"Error",
"(",
")",
"\n",
"}"
] |
6,979 | all-6980 | [
"vimURL",
"returns",
"a",
"URL",
"to",
"pass",
"to",
"the",
"VIM",
"SOAP",
"client",
"."
] | [
"func",
"vimURL",
"(",
"server",
",",
"user",
",",
"password",
"string",
")",
"(",
"*",
"url",
".",
"URL",
",",
"error",
")",
"{",
"u",
",",
"err",
":=",
"url",
".",
"Parse",
"(",
"\"",
"\"",
"+",
"<mask>",
"+",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n\n",
"u",
".",
"User",
"=",
"url",
".",
"UserPassword",
"(",
"user",
",",
"password",
")",
"\n\n",
"return",
"u",
",",
"nil",
"\n",
"}"
] |
6,980 | all-6981 | [
"WithOffset",
"seek",
"to",
"the",
"specified",
"offset",
"before",
"reading",
"(",
"if",
"not",
"specificed",
"proceed",
"with",
"offset",
"following",
"the",
"last",
"read",
")",
".",
"Some",
"types",
"of",
"streams",
"may",
"only",
"support",
"sequential",
"reads",
"."
] | [
"func",
"(",
"p",
"ReadParams",
")",
"WithOffset",
"(",
"offset",
"int64",
")",
"*",
"ReadParams",
"{",
"p",
".",
"Offset",
"=",
"<mask>",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
6,981 | all-6982 | [
"Type",
"returns",
"the",
"RESP",
"error",
"type",
"which",
"is",
"represented",
"by",
"the",
"leading",
"uppercase",
"word",
"in",
"the",
"error",
"string",
"."
] | [
"func",
"(",
"e",
"*",
"Error",
")",
"Type",
"(",
")",
"string",
"{",
"s",
":=",
"e",
".",
"Error",
"(",
")",
"\n\n",
"if",
"i",
":=",
"strings",
".",
"IndexByte",
"(",
"s",
",",
"' '",
")",
";",
"i",
"<",
"0",
"{",
"s",
"=",
"\"",
"\"",
"\n",
"}",
"else",
"{",
"s",
"=",
"s",
"[",
":",
"i",
"]",
"\n\n",
"for",
"_",
",",
"c",
":=",
"<mask>",
"s",
"{",
"if",
"!",
"unicode",
".",
"IsUpper",
"(",
"c",
")",
"{",
"s",
"=",
"\"",
"\"",
"\n",
"break",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"s",
"\n",
"}"
] |
6,982 | all-6983 | [
"Login",
"authenticates",
"with",
"MongoDB",
"using",
"the",
"provided",
"credential",
".",
"The",
"authentication",
"is",
"valid",
"for",
"the",
"whole",
"session",
"and",
"will",
"stay",
"valid",
"until",
"Logout",
"is",
"explicitly",
"called",
"for",
"the",
"same",
"database",
"or",
"the",
"session",
"is",
"closed",
"."
] | [
"func",
"(",
"db",
"*",
"Database",
")",
"Login",
"(",
"user",
",",
"pass",
"string",
")",
"error",
"{",
"return",
"db",
".",
"<mask>",
".",
"Login",
"(",
"&",
"Credential",
"{",
"Username",
":",
"user",
",",
"Password",
":",
"pass",
",",
"Source",
":",
"db",
".",
"Name",
"}",
")",
"\n",
"}"
] |
6,983 | all-6984 | [
"newDataWriter",
"creates",
"a",
"new",
"internalDataWriter",
"writing",
"to",
"w",
".",
"w",
"receives",
"what",
"is",
"written",
"to",
"the",
"*",
"internalDataWriter",
"but",
"escaped",
"according",
"to",
"the",
"TELNET",
"(",
"and",
"TELNETS",
")",
"protocol",
".",
"I",
".",
"e",
".",
"byte",
"255",
"(",
"=",
"IAC",
")",
"gets",
"encoded",
"as",
"255",
"255",
".",
"For",
"example",
"if",
"the",
"following",
"it",
"written",
"to",
"the",
"*",
"internalDataWriter",
"s",
"Write",
"method",
":",
"[]",
"byte",
"{",
"1",
"55",
"2",
"155",
"3",
"255",
"4",
"40",
"255",
"30",
"20",
"}",
"...",
"then",
"(",
"conceptually",
")",
"the",
"following",
"is",
"written",
"to",
"w",
"s",
"Write",
"method",
":",
"[]",
"byte",
"{",
"1",
"55",
"2",
"155",
"3",
"255",
"255",
"4",
"40",
"255",
"255",
"30",
"20",
"}",
"(",
"Notice",
"that",
"each",
"255",
"in",
"the",
"original",
"byte",
"array",
"became",
"2",
"255",
"s",
"in",
"a",
"row",
".",
")",
"*",
"internalDataWriter",
"takes",
"care",
"of",
"all",
"this",
"for",
"you",
"so",
"you",
"do",
"not",
"have",
"to",
"do",
"it",
"."
] | [
"func",
"newDataWriter",
"(",
"w",
"io",
".",
"Writer",
")",
"*",
"internalDataWriter",
"{",
"writer",
":=",
"internalDataWriter",
"{",
"wrapped",
":",
"w",
",",
"}",
"\n\n",
"return",
"&",
"<mask>",
"\n",
"}"
] |
6,984 | all-6985 | [
"DeleteIndex",
"deletes",
"an",
"index",
"on",
"the",
"server",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"DeleteIndex",
"(",
"index",
"*",
"Index",
")",
"error",
"{",
"span",
":=",
"c",
".",
"tracer",
".",
"StartSpan",
"(",
"\"",
"\"",
")",
"\n",
"defer",
"span",
".",
"Finish",
"(",
")",
"\n\n",
"path",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"index",
".",
"name",
")",
"\n",
"_",
",",
"_",
",",
"err",
":=",
"c",
".",
"httpRequest",
"(",
"\"",
"\"",
",",
"<mask>",
",",
"nil",
",",
"nil",
",",
"false",
")",
"\n",
"return",
"err",
"\n\n",
"}"
] |
6,985 | all-6986 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"UniformMatrix4fv",
"(",
"location",
"int32",
",",
"count",
"int32",
",",
"transpose",
"bool",
",",
"<mask>",
"*",
"float32",
")",
"{",
"C",
".",
"glowUniformMatrix4fv",
"(",
"gpUniformMatrix4fv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",
")",
",",
"(",
"C",
".",
"GLsizei",
")",
"(",
"count",
")",
",",
"(",
"C",
".",
"GLboolean",
")",
"(",
"boolToInt",
"(",
"transpose",
")",
")",
",",
"(",
"*",
"C",
".",
"GLfloat",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"value",
")",
")",
")",
"\n",
"}"
] |
6,986 | all-6987 | [
"iterate",
"iterates",
"over",
"log",
"file",
".",
"It",
"doesn",
"t",
"not",
"allocate",
"new",
"memory",
"for",
"every",
"kv",
"pair",
".",
"Therefore",
"the",
"kv",
"pair",
"is",
"only",
"valid",
"for",
"the",
"duration",
"of",
"fn",
"call",
"."
] | [
"func",
"(",
"vlog",
"*",
"valueLog",
")",
"iterate",
"(",
"lf",
"*",
"logFile",
",",
"offset",
"uint32",
",",
"fn",
"logEntry",
")",
"(",
"uint32",
",",
"error",
")",
"{",
"fi",
",",
"err",
":=",
"lf",
".",
"fd",
".",
"Stat",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n",
"if",
"int64",
"(",
"offset",
")",
"==",
"fi",
".",
"Size",
"(",
")",
"{",
"// We're at the end of the file already. No need to do anything.",
"return",
"offset",
",",
"nil",
"\n",
"}",
"\n",
"if",
"vlog",
".",
"opt",
".",
"ReadOnly",
"{",
"// We're not at the end of the file. We'd need to replay the entries, or",
"// possibly truncate the file.",
"return",
"0",
",",
"ErrReplayNeeded",
"\n",
"}",
"\n\n",
"// We're not at the end of the file. Let's Seek to the offset and start reading.",
"if",
"_",
",",
"err",
":=",
"lf",
".",
"fd",
".",
"Seek",
"(",
"int64",
"(",
"offset",
")",
",",
"io",
".",
"SeekStart",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"errFile",
"(",
"err",
",",
"lf",
".",
"path",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"reader",
":=",
"bufio",
".",
"NewReader",
"(",
"lf",
".",
"fd",
")",
"\n",
"read",
":=",
"&",
"safeRead",
"{",
"k",
":",
"make",
"(",
"[",
"]",
"byte",
",",
"10",
")",
",",
"v",
":",
"make",
"(",
"[",
"]",
"byte",
",",
"10",
")",
",",
"recordOffset",
":",
"offset",
",",
"}",
"\n\n",
"var",
"lastCommit",
"uint64",
"\n",
"var",
"validEndOffset",
"uint32",
"\n",
"for",
"{",
"e",
",",
"err",
":=",
"read",
".",
"Entry",
"(",
"reader",
")",
"\n",
"if",
"err",
"==",
"io",
".",
"EOF",
"{",
"break",
"\n",
"}",
"else",
"if",
"err",
"==",
"io",
".",
"ErrUnexpectedEOF",
"||",
"err",
"==",
"errTruncate",
"{",
"break",
"\n",
"}",
"else",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"else",
"if",
"e",
"==",
"nil",
"{",
"continue",
"\n",
"}",
"\n\n",
"var",
"vp",
"valuePointer",
"\n",
"vp",
".",
"Len",
"=",
"uint32",
"(",
"headerBufSize",
"+",
"len",
"(",
"e",
".",
"<mask>",
")",
"+",
"len",
"(",
"e",
".",
"Value",
")",
"+",
"crc32",
".",
"Size",
")",
"\n",
"read",
".",
"recordOffset",
"+=",
"vp",
".",
"Len",
"\n\n",
"vp",
".",
"Offset",
"=",
"e",
".",
"offset",
"\n",
"vp",
".",
"Fid",
"=",
"lf",
".",
"fid",
"\n\n",
"if",
"e",
".",
"meta",
"&",
"bitTxn",
">",
"0",
"{",
"txnTs",
":=",
"y",
".",
"ParseTs",
"(",
"e",
".",
"Key",
")",
"\n",
"if",
"lastCommit",
"==",
"0",
"{",
"lastCommit",
"=",
"txnTs",
"\n",
"}",
"\n",
"if",
"lastCommit",
"!=",
"txnTs",
"{",
"break",
"\n",
"}",
"\n\n",
"}",
"else",
"if",
"e",
".",
"meta",
"&",
"bitFinTxn",
">",
"0",
"{",
"txnTs",
",",
"err",
":=",
"strconv",
".",
"ParseUint",
"(",
"string",
"(",
"e",
".",
"Value",
")",
",",
"10",
",",
"64",
")",
"\n",
"if",
"err",
"!=",
"nil",
"||",
"lastCommit",
"!=",
"txnTs",
"{",
"break",
"\n",
"}",
"\n",
"// Got the end of txn. Now we can store them.",
"lastCommit",
"=",
"0",
"\n",
"validEndOffset",
"=",
"read",
".",
"recordOffset",
"\n\n",
"}",
"else",
"{",
"if",
"lastCommit",
"!=",
"0",
"{",
"// This is most likely an entry which was moved as part of GC.",
"// We shouldn't get this entry in the middle of a transaction.",
"break",
"\n",
"}",
"\n",
"validEndOffset",
"=",
"read",
".",
"recordOffset",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"fn",
"(",
"*",
"e",
",",
"vp",
")",
";",
"err",
"!=",
"nil",
"{",
"if",
"err",
"==",
"errStop",
"{",
"break",
"\n",
"}",
"\n",
"return",
"0",
",",
"errFile",
"(",
"err",
",",
"lf",
".",
"path",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"validEndOffset",
",",
"nil",
"\n",
"}"
] |
6,987 | all-6988 | [
"NewNetAddressStrings",
"returns",
"an",
"array",
"of",
"NetAddress",
"es",
"build",
"using",
"the",
"provided",
"strings",
"."
] | [
"func",
"NewNetAddressStrings",
"(",
"addrs",
"[",
"]",
"string",
")",
"(",
"[",
"]",
"*",
"NetAddress",
",",
"error",
")",
"{",
"netAddrs",
":=",
"make",
"(",
"[",
"]",
"*",
"NetAddress",
",",
"len",
"(",
"addrs",
")",
")",
"\n",
"for",
"i",
",",
"addr",
":=",
"range",
"addrs",
"{",
"netAddr",
",",
"err",
":=",
"NewNetAddressString",
"(",
"addr",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"<mask>",
".",
"New",
"(",
"cmn",
".",
"Fmt",
"(",
"\"",
"\"",
",",
"addr",
",",
"err",
")",
")",
"\n",
"}",
"\n",
"netAddrs",
"[",
"i",
"]",
"=",
"netAddr",
"\n",
"}",
"\n",
"return",
"netAddrs",
",",
"nil",
"\n",
"}"
] |
6,988 | all-6989 | [
"Certificate",
"handling",
"functions",
"GetCertificateFingerprints",
"returns",
"a",
"list",
"of",
"certificate",
"fingerprints"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetCertificateFingerprints",
"(",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"certificates",
":=",
"[",
"]",
"string",
"{",
"}",
"\n\n",
"// Fetch the raw value",
"_",
",",
"err",
":=",
"r",
".",
"queryStruct",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"\"",
"\"",
",",
"&",
"certificates",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// Parse it",
"fingerprints",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"fingerprint",
":=",
"range",
"certificates",
"{",
"fields",
":=",
"strings",
".",
"Split",
"(",
"fingerprint",
",",
"\"",
"\"",
")",
"\n",
"fingerprints",
"=",
"append",
"(",
"fingerprints",
",",
"fields",
"[",
"len",
"(",
"<mask>",
")",
"-",
"1",
"]",
")",
"\n",
"}",
"\n\n",
"return",
"fingerprints",
",",
"nil",
"\n",
"}"
] |
6,989 | all-6990 | [
"NewKeyIterator",
"is",
"just",
"like",
"NewIterator",
"but",
"allows",
"the",
"user",
"to",
"iterate",
"over",
"all",
"versions",
"of",
"a",
"single",
"key",
".",
"Internally",
"it",
"sets",
"the",
"Prefix",
"option",
"in",
"provided",
"opt",
"and",
"uses",
"that",
"prefix",
"to",
"additionally",
"run",
"bloom",
"filter",
"lookups",
"before",
"picking",
"tables",
"from",
"the",
"LSM",
"tree",
"."
] | [
"func",
"(",
"txn",
"*",
"Txn",
")",
"NewKeyIterator",
"(",
"key",
"[",
"]",
"byte",
",",
"opt",
"IteratorOptions",
")",
"*",
"Iterator",
"{",
"if",
"len",
"(",
"opt",
".",
"Prefix",
")",
">",
"0",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"opt",
".",
"Prefix",
"=",
"key",
"// This key must be without the timestamp.",
"\n",
"<mask>",
".",
"prefixIsKey",
"=",
"true",
"\n",
"return",
"txn",
".",
"NewIterator",
"(",
"opt",
")",
"\n",
"}"
] |
6,990 | all-6991 | [
"Contains",
"returns",
"true",
"if",
"a",
"list",
"of",
"object",
"ids",
"contains",
"the",
"specified",
"id",
"."
] | [
"func",
"Contains",
"(",
"<mask>",
"[",
"]",
"bson",
".",
"ObjectId",
",",
"id",
"bson",
".",
"ObjectId",
")",
"bool",
"{",
"for",
"_",
",",
"item",
":=",
"range",
"list",
"{",
"if",
"item",
"==",
"id",
"{",
"return",
"true",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
6,991 | all-6992 | [
"Get",
"a",
"throttled",
"writer",
"that",
"wraps",
"w",
"."
] | [
"func",
"(",
"pool",
"*",
"WriterPool",
")",
"Get",
"(",
"w",
"io",
".",
"Writer",
")",
"(",
"writer",
"io",
".",
"Writer",
",",
"<mask>",
"func",
"(",
")",
")",
"{",
"// don't export a ThrottlerWriter to prevent users changing the rate",
"// and expecting their change to be respected, since we might modify",
"// the rate under their feet",
"// make the initial rate be 0, the actual rate is",
"// set in the call to `setSharedRates`.",
"wr",
":=",
"ThrottledWriter",
"(",
"w",
",",
"0",
",",
"pool",
".",
"maxBurst",
")",
"\n\n",
"pool",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"pool",
".",
"givenOut",
"[",
"wr",
"]",
"=",
"struct",
"{",
"}",
"{",
"}",
"\n",
"pool",
".",
"setSharedRates",
"(",
")",
"\n",
"pool",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"return",
"wr",
",",
"func",
"(",
")",
"{",
"pool",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"delete",
"(",
"pool",
".",
"givenOut",
",",
"wr",
")",
"\n",
"pool",
".",
"setSharedRates",
"(",
")",
"\n",
"pool",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"}",
"\n",
"}"
] |
6,992 | all-6993 | [
"trimWhitespace",
"trims",
"whitespace",
"from",
"all",
"string",
"cfg",
"values",
"with",
"the",
"trim",
"tag"
] | [
"func",
"(",
"cfg",
"*",
"Config",
")",
"trimWhitespace",
"(",
")",
"{",
"cfgElem",
":=",
"reflect",
".",
"ValueOf",
"(",
"cfg",
")",
".",
"Elem",
"(",
")",
"\n",
"cfgStructField",
":=",
"reflect",
".",
"Indirect",
"(",
"reflect",
".",
"ValueOf",
"(",
"cfg",
")",
")",
".",
"Type",
"(",
")",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"cfgElem",
".",
"NumField",
"(",
")",
";",
"i",
"++",
"{",
"cfgField",
":=",
"cfgElem",
".",
"Field",
"(",
"i",
")",
"\n",
"if",
"!",
"cfgField",
".",
"CanInterface",
"(",
")",
"{",
"continue",
"\n",
"}",
"\n",
"trimTag",
":=",
"cfgStructField",
".",
"Field",
"(",
"i",
")",
".",
"Tag",
".",
"Get",
"(",
"\"",
"\"",
")",
"\n",
"if",
"len",
"(",
"trimTag",
")",
"==",
"0",
"{",
"continue",
"\n",
"}",
"\n\n",
"if",
"cfgField",
".",
"Kind",
"(",
")",
"!=",
"reflect",
".",
"<mask>",
"{",
"seelog",
".",
"Warnf",
"(",
"\"",
"\"",
",",
"cfgField",
".",
"Kind",
"(",
")",
".",
"String",
"(",
")",
",",
"i",
")",
"\n",
"continue",
"\n",
"}",
"\n",
"str",
":=",
"cfgField",
".",
"Interface",
"(",
")",
".",
"(",
"string",
")",
"\n",
"cfgField",
".",
"SetString",
"(",
"strings",
".",
"TrimSpace",
"(",
"str",
")",
")",
"\n",
"}",
"\n",
"}"
] |
6,993 | all-6994 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"Content",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHar13",
"(",
"&",
"r",
",",
"v",
")",
"\n",
"return",
"r",
".",
"<mask>",
"(",
")",
"\n",
"}"
] |
6,994 | all-6995 | [
"artifact",
"constructs",
"an",
"artifact",
"handle",
"for",
"the",
"given",
"job",
"build"
] | [
"func",
"(",
"af",
"*",
"PodLogArtifactFetcher",
")",
"artifact",
"(",
"jobName",
",",
"buildID",
"<mask>",
",",
"sizeLimit",
"int64",
")",
"(",
"lenses",
".",
"Artifact",
",",
"error",
")",
"{",
"podLog",
",",
"err",
":=",
"NewPodLogArtifact",
"(",
"jobName",
",",
"buildID",
",",
"sizeLimit",
",",
"af",
".",
"jobAgent",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"return",
"podLog",
",",
"nil",
"\n",
"}"
] |
6,995 | all-6996 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"Instance",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"InstanceLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"return",
"api",
".",
"InstanceLocator",
"(",
"l",
"[",
"\"",
"\"",
"]",
")",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
6,996 | all-6997 | [
"GetSecretEnvVars",
"returns",
"the",
"environment",
"variable",
"specs",
"for",
"the",
"storage",
"secret",
"."
] | [
"func",
"GetSecretEnvVars",
"(",
"storageBackend",
"string",
")",
"[",
"]",
"v1",
".",
"EnvVar",
"{",
"<mask>",
"envVars",
"[",
"]",
"v1",
".",
"EnvVar",
"\n",
"if",
"storageBackend",
"!=",
"\"",
"\"",
"{",
"envVars",
"=",
"append",
"(",
"envVars",
",",
"v1",
".",
"EnvVar",
"{",
"Name",
":",
"obj",
".",
"StorageBackendEnvVar",
",",
"Value",
":",
"storageBackend",
",",
"}",
")",
"\n",
"}",
"\n",
"trueVal",
":=",
"true",
"\n",
"for",
"envVar",
",",
"secretKey",
":=",
"range",
"obj",
".",
"EnvVarToSecretKey",
"{",
"envVars",
"=",
"append",
"(",
"envVars",
",",
"v1",
".",
"EnvVar",
"{",
"Name",
":",
"envVar",
",",
"ValueFrom",
":",
"&",
"v1",
".",
"EnvVarSource",
"{",
"SecretKeyRef",
":",
"&",
"v1",
".",
"SecretKeySelector",
"{",
"LocalObjectReference",
":",
"v1",
".",
"LocalObjectReference",
"{",
"Name",
":",
"client",
".",
"StorageSecretName",
",",
"}",
",",
"Key",
":",
"secretKey",
",",
"Optional",
":",
"&",
"trueVal",
",",
"}",
",",
"}",
",",
"}",
")",
"\n",
"}",
"\n",
"return",
"envVars",
"\n",
"}"
] |
6,997 | all-6998 | [
"GetTypeOk",
"returns",
"a",
"tuple",
"with",
"the",
"Type",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetTypeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"Type",
",",
"true",
"\n",
"}"
] |
6,998 | all-6999 | [
"MergeEnvironmentVariables",
"appends",
"additional",
"envVarName",
":",
"envVarValue",
"pairs",
"to",
"the",
"the",
"container",
"s",
"enviornment",
"values",
"structure"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"MergeEnvironmentVariables",
"(",
"envVars",
"<mask>",
"[",
"string",
"]",
"string",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"// don't assume that the environment variable map has been initialized by others",
"if",
"c",
".",
"Environment",
"==",
"nil",
"{",
"c",
".",
"Environment",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
")",
"\n",
"}",
"\n",
"for",
"k",
",",
"v",
":=",
"range",
"envVars",
"{",
"c",
".",
"Environment",
"[",
"k",
"]",
"=",
"v",
"\n",
"}",
"\n",
"}"
] |
6,999 | all-7000 | [
"sendRoutine",
"polls",
"for",
"packets",
"to",
"send",
"from",
"channels",
"."
] | [
"func",
"(",
"c",
"*",
"MConnection",
")",
"sendRoutine",
"(",
")",
"{",
"defer",
"c",
".",
"_recover",
"(",
")",
"\n\n",
"FOR_LOOP",
":",
"for",
"{",
"var",
"n",
"int",
"\n",
"var",
"err",
"error",
"\n",
"select",
"{",
"case",
"<-",
"c",
".",
"flushTimer",
".",
"Ch",
":",
"// NOTE: flushTimer.Set() must be called every time",
"// something is written to .bufWriter.",
"c",
".",
"flush",
"(",
")",
"\n",
"case",
"<-",
"c",
".",
"chStatsTimer",
".",
"Ch",
":",
"for",
"_",
",",
"channel",
":=",
"range",
"c",
".",
"channels",
"{",
"<mask>",
".",
"updateStats",
"(",
")",
"\n",
"}",
"\n",
"case",
"<-",
"c",
".",
"pingTimer",
".",
"Ch",
":",
"log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"wire",
".",
"WriteByte",
"(",
"packetTypePing",
",",
"c",
".",
"bufWriter",
",",
"&",
"n",
",",
"&",
"err",
")",
"\n",
"c",
".",
"sendMonitor",
".",
"Update",
"(",
"int",
"(",
"n",
")",
")",
"\n",
"c",
".",
"flush",
"(",
")",
"\n",
"case",
"<-",
"c",
".",
"pong",
":",
"log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"wire",
".",
"WriteByte",
"(",
"packetTypePong",
",",
"c",
".",
"bufWriter",
",",
"&",
"n",
",",
"&",
"err",
")",
"\n",
"c",
".",
"sendMonitor",
".",
"Update",
"(",
"int",
"(",
"n",
")",
")",
"\n",
"c",
".",
"flush",
"(",
")",
"\n",
"case",
"<-",
"c",
".",
"quit",
":",
"break",
"FOR_LOOP",
"\n",
"case",
"<-",
"c",
".",
"send",
":",
"// Send some msgPackets",
"eof",
":=",
"c",
".",
"sendSomeMsgPackets",
"(",
")",
"\n",
"if",
"!",
"eof",
"{",
"// Keep sendRoutine awake.",
"select",
"{",
"case",
"c",
".",
"send",
"<-",
"struct",
"{",
"}",
"{",
"}",
":",
"default",
":",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"if",
"!",
"c",
".",
"IsRunning",
"(",
")",
"{",
"break",
"FOR_LOOP",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"log",
".",
"Warn",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"c",
",",
"\"",
"\"",
",",
"err",
")",
"\n",
"c",
".",
"stopForError",
"(",
"err",
")",
"\n",
"break",
"FOR_LOOP",
"\n",
"}",
"\n",
"}",
"\n\n",
"// Cleanup",
"}"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.