id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
1,200 | all-1201 | [
"NewArgWriter",
"wraps",
"the",
"result",
"of",
"calling",
"ArgXWriter",
"to",
"provider",
"a",
"simpler",
"interface",
"for",
"writing",
"arguments",
"."
] | [
"func",
"NewArgWriter",
"(",
"writer",
"io",
".",
"WriteCloser",
",",
"err",
"error",
")",
"ArgWriteHelper",
"{",
"return",
"ArgWriteHelper",
"{",
"<mask>",
",",
"err",
"}",
"\n",
"}"
] |
1,201 | all-1202 | [
"HasCustomUnit",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueDefinition",
")",
"HasCustomUnit",
"(",
")",
"bool",
"{",
"if",
"q",
"!=",
"nil",
"&&",
"q",
".",
"CustomUnit",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
1,202 | all-1203 | [
"Debugf",
"outputs",
"formatted",
"Debug",
"level",
"log"
] | [
"func",
"Debugf",
"(",
"format",
"string",
",",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"glg",
".",
"<mask>",
"(",
"DEBG",
",",
"format",
",",
"val",
"...",
")",
"\n",
"}"
] |
1,203 | all-1204 | [
"Render",
"loads",
"the",
"template",
"specified",
"by",
"the",
"given",
"name",
"string",
".",
"By",
"default",
"Xslate",
"looks",
"for",
"files",
"in",
"the",
"local",
"file",
"system",
"and",
"caches",
"the",
"generated",
"bytecode",
"too",
".",
"If",
"... | [
"func",
"(",
"tx",
"Xslate",
")",
"Render",
"(",
"name",
"string",
",",
"vars",
"Vars",
")",
"(",
"string",
",",
"error",
")",
"{",
"buf",
":=",
"rbpool",
".",
"Get",
"(",
")",
"\n",
"defer",
"rbpool",
".",
"Release",
"(",
"buf",
")",
"\n\n",
"er... |
1,204 | all-1205 | [
"IterateForward",
"-",
"iterate",
"over",
"hole",
"stack",
"segment",
"-",
"by",
"-",
"segment",
"from",
"begining",
"to",
"end",
".",
"If",
"all",
"segments",
"iterated",
"stack",
"may",
"be",
"repaired"
] | [
"func",
"(",
"s",
"*",
"Stack",
")",
"IterateForward",
"(",
"handler",
"func",
"(",
"depth",
"int",
",",
"header",
"io",
".",
"Reader",
",",
"body",
"io",
".",
"Reader",
")",
"bool",
")",
"error",
"{",
"// This operation does not relies on depth counter, so ca... |
1,205 | all-1206 | [
"Parse",
"parses",
"the",
"given",
"template",
"and",
"creates",
"an",
"AST"
] | [
"func",
"(",
"p",
"*",
"Kolonish",
")",
"Parse",
"(",
"<mask>",
"string",
",",
"template",
"[",
"]",
"byte",
")",
"(",
"*",
"parser",
".",
"AST",
",",
"error",
")",
"{",
"return",
"p",
".",
"ParseString",
"(",
"name",
",",
"string",
"(",
"template"... |
1,206 | all-1207 | [
"bind",
"an",
"existing",
"texture",
"object",
"to",
"the",
"specified",
"texture",
"unit"
] | [
"func",
"BindTextureUnit",
"(",
"unit",
"uint32",
",",
"texture",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpBindTextureUnit",
",",
"2",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintptr",
"(",
"texture",
")",
",",
"0",
")",
"\n",
"}"
] |
1,207 | all-1208 | [
"GetHideValueOk",
"returns",
"a",
"tuple",
"with",
"the",
"HideValue",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetConditionalFormat",
")",
"GetHideValueOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"HideValue",
"==",
"nil",
"{",
"return",
"false",
",",
"<mask>",
"\n",
"}",
"\n",
"return",... |
1,208 | all-1209 | [
"Rename",
"the",
"label",
"(",
"will",
"also",
"update",
"color",
")"
] | [
"func",
"rename",
"(",
"repo",
"string",
",",
"previous",
",",
"wanted",
"Label",
")",
"Update",
"{",
"logrus",
".",
"WithField",
"(",
"\"",
"\"",
",",
"repo",
")",
".",
"WithField",
"(",
"\"",
"\"",
",",
"previous",
".",
"<mask>",
")",
".",
"WithFie... |
1,209 | all-1210 | [
"SetVertexBytes",
"sets",
"a",
"block",
"of",
"data",
"for",
"the",
"vertex",
"function",
".",
"Reference",
":",
"https",
":",
"//",
"developer",
".",
"apple",
".",
"com",
"/",
"documentation",
"/",
"metal",
"/",
"mtlrendercommandencoder",
"/",
"1515846",
"-... | [
"func",
"(",
"rce",
"RenderCommandEncoder",
")",
"SetVertexBytes",
"(",
"<mask>",
"unsafe",
".",
"Pointer",
",",
"length",
"uintptr",
",",
"index",
"int",
")",
"{",
"C",
".",
"RenderCommandEncoder_SetVertexBytes",
"(",
"rce",
".",
"commandEncoder",
",",
"bytes",... |
1,210 | all-1211 | [
"IsKeyPressed",
"returns",
"a",
"boolean",
"indicating",
"whether",
"key",
"is",
"pressed",
".",
"Known",
"issue",
":",
"On",
"Edge",
"browser",
"some",
"keys",
"don",
"t",
"work",
"well",
":",
"-",
"KeyKPEnter",
"and",
"KeyKPEqual",
"are",
"recognized",
"as... | [
"func",
"IsKeyPressed",
"(",
"key",
"Key",
")",
"bool",
"{",
"return",
"uiDriver",
"(",
")",
".",
"Input",
"(",
")",
".",
"IsKeyPressed",
"(",
"driver",
".",
"Key",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
1,211 | all-1212 | [
"Deref",
"loads",
"from",
"a",
"pointer",
".",
"r",
"must",
"contain",
"a",
"pointer",
"."
] | [
"func",
"(",
"r",
"region",
")",
"Deref",
"(",
")",
"<mask>",
"{",
"if",
"r",
".",
"typ",
".",
"Kind",
"!=",
"KindPtr",
"{",
"panic",
"(",
"\"",
"\"",
"+",
"r",
".",
"typ",
".",
"Name",
")",
"\n",
"}",
"\n",
"if",
"r",
".",
"typ",
".",
"Ele... |
1,212 | all-1213 | [
"Paint",
"satisfies",
"the",
"Painter",
"interface",
"by",
"painting",
"ss",
"onto",
"an",
"image",
".",
"RGBA",
"."
] | [
"func",
"(",
"p",
"*",
"Painter",
")",
"Paint",
"(",
"ss",
"[",
"]",
"raster",
".",
"Span",
",",
"done",
"bool",
")",
"{",
"//gl.Begin(gl.LINES)",
"sslen",
":=",
"len",
"(",
"ss",
")",
"\n",
"clenrequired",
":=",
"sslen",
"*",
"8",
"\n",
"vlenrequire... |
1,213 | all-1214 | [
"GetTaskENI",
"returns",
"the",
"eni",
"of",
"task",
"for",
"now",
"task",
"can",
"only",
"have",
"one",
"enis"
] | [
"func",
"(",
"task",
"*",
"<mask>",
")",
"GetTaskENI",
"(",
")",
"*",
"apieni",
".",
"ENI",
"{",
"task",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"task",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
"task",
".",
"ENI",
"\n"... |
1,214 | all-1215 | [
"ConnectLXDUnix",
"lets",
"you",
"connect",
"to",
"a",
"remote",
"LXD",
"daemon",
"over",
"a",
"local",
"unix",
"socket",
".",
"If",
"the",
"path",
"argument",
"is",
"empty",
"then",
"$LXD_SOCKET",
"will",
"be",
"used",
"if",
"unset",
"$LXD_DIR",
"/",
"uni... | [
"func",
"ConnectLXDUnix",
"(",
"path",
"string",
",",
"args",
"*",
"ConnectionArgs",
")",
"(",
"ContainerServer",
",",
"error",
")",
"{",
"logger",
".",
"Debugf",
"(",
"\"",
"\"",
")",
"\n\n",
"// Use empty args if not specified",
"if",
"args",
"==",
"nil",
... |
1,215 | all-1216 | [
"SelectStrings",
"executes",
"a",
"statement",
"which",
"must",
"yield",
"rows",
"with",
"a",
"single",
"string",
"column",
".",
"It",
"returns",
"the",
"list",
"of",
"column",
"values",
"."
] | [
"func",
"SelectStrings",
"(",
"tx",
"*",
"sql",
".",
"Tx",
",",
"query",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"values",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"scan",
":=",
... |
1,216 | all-1217 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"MediaSource",
")",
"UnmarshalEasyJSON",
"(",
"<mask>",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"MediaSource",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"MediaSourceMediaRule",
":",
"*",
"t",
"=",
"MediaSourceM... |
1,217 | all-1218 | [
"MarshalEasyJSON",
"writes",
"the",
"MAC",
"to",
"a",
"easyjson",
".",
"Writer"
] | [
"func",
"(",
"u",
"MAC",
")",
"MarshalEasyJSON",
"(",
"w",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"w",
".",
"<mask>",
"(",
"string",
"(",
"u",
")",
")",
"\n",
"}"
] |
1,218 | all-1219 | [
"EmbedConfig",
"returns",
"etcd",
"embed",
".",
"Config",
"."
] | [
"func",
"(",
"e",
"*",
"Etcd",
")",
"EmbedConfig",
"(",
")",
"(",
"cfg",
"*",
"embed",
".",
"Config",
",",
"err",
"error",
")",
"{",
"var",
"lcURLs",
"types",
".",
"URLs",
"\n",
"lcURLs",
",",
"err",
"=",
"types",
".",
"NewURLs",
"(",
"e",
".",
... |
1,219 | all-1220 | [
"Deserialize",
"deserializes",
"a",
"hashtree",
"."
] | [
"func",
"(",
"h",
"*",
"dbHashTree",
")",
"Deserialize",
"(",
"_r",
"io",
".",
"Reader",
")",
"error",
"{",
"r",
":=",
"pbutil",
".",
"NewReader",
"(",
"_r",
")",
"\n",
"hdr",
":=",
"&",
"BucketHeader",
"{",
"}",
"\n",
"batchSize",
":=",
"10000",
"... |
1,220 | all-1221 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetStackTraceParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger32",
"(",
"&"... |
1,221 | all-1222 | [
"viewportSize",
"must",
"be",
"called",
"from",
"the",
"main",
"thread",
"."
] | [
"func",
"(",
"i",
"*",
"Image",
")",
"viewportSize",
"(",
")",
"(",
"int",
",",
"int",
")",
"{",
"if",
"i",
".",
"screen",
"{",
"return",
"i",
".",
"<mask>",
",",
"i",
".",
"height",
"\n",
"}",
"\n",
"return",
"graphics",
".",
"InternalImageSize",
... |
1,222 | all-1223 | [
"HaveCSS",
"passes",
"when",
"the",
"expected",
"CSS",
"property",
"and",
"value",
"are",
"present",
"on",
"the",
"element",
".",
"This",
"matcher",
"only",
"matches",
"exact",
"calculated",
"CSS",
"values",
"though",
"there",
"is",
"support",
"for",
"parsing"... | [
"func",
"HaveCSS",
"(",
"property",
"string",
",",
"value",
"string",
")",
"types",
".",
"GomegaMatcher",
"{",
"return",
"&",
"<mask>",
".",
"HaveCSSMatcher",
"{",
"ExpectedProperty",
":",
"property",
",",
"ExpectedValue",
":",
"value",
"}",
"\n",
"}"
] |
1,223 | all-1224 | [
"Stability",
":",
"***",
"EXPERIMENTAL",
"***",
"Get",
"a",
"worker",
"from",
"a",
"worker",
"-",
"type",
".",
"See",
"#getWorker"
] | [
"func",
"(",
"<mask>",
"*",
"Queue",
")",
"GetWorker",
"(",
"provisionerId",
",",
"workerType",
",",
"workerGroup",
",",
"workerId",
"string",
")",
"(",
"*",
"WorkerResponse",
",",
"error",
")",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"queu... |
1,224 | all-1225 | [
"Strs",
"takes",
"a",
"list",
"of",
"Go",
"strings",
"(",
"with",
"or",
"without",
"null",
"-",
"termination",
")",
"and",
"returns",
"their",
"C",
"counterpart",
".",
"The",
"returned",
"free",
"function",
"must",
"be",
"called",
"once",
"you",
"are",
"... | [
"func",
"Strs",
"(",
"strs",
"...",
"string",
")",
"(",
"cstrs",
"*",
"*",
"uint8",
",",
"free",
"func",
"(",
")",
")",
"{",
"if",
"len",
"(",
"strs",
")",
"==",
"0",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"var",
"pinned",
"["... |
1,225 | all-1226 | [
"expandClusterProactiveDrsConfigInfo",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"ClusterProactiveDrsConfigInfo",
"."
] | [
"func",
"expandClusterProactiveDrsConfigInfo",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"*",
"types",
".",
"ClusterProactiveDrsConfigInfo",
"{",
"obj",
":=",
"&",
"<mask>",
".",
"ClusterProactiveDrsConfigInfo",
"{",
"Enabled",
":",
"structure",
".",
"GetBo... |
1,226 | all-1227 | [
"native",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GObject",
"as",
"a",
"GtkNativeDialog",
"."
] | [
"func",
"(",
"v",
"*",
"NativeDialog",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkNativeDialog",
"{",
"if",
"v",
"==",
"nil",
"||",
"v",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
"("... |
1,227 | all-1228 | [
"ContainerCreate",
"adds",
"a",
"new",
"container",
"to",
"the",
"database",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"ContainerCreate",
"(",
"object",
"Container",
")",
"(",
"int64",
",",
"error",
")",
"{",
"// Check if a container with the same key exists.",
"exists",
",",
"err",
":=",
"c",
".",
"ContainerExists",
"(",
"object",
".",
... |
1,228 | all-1229 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventEventSourceMessageReceived",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork55",
"(",
"&",
"w",
","... |
1,229 | all-1230 | [
"PutSecretValueRequest",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"PutSecretValueRequest",
"(",
"arg0",
"*",
"secretsmanager",
".",
"PutSecretValueInput",
")",
"(",
"*",
"request",
".",
"Request",
",",
"*",
"secretsmanager",
".",
"PutSecretValueOutput",
")",
"{",
"ret",
":="... |
1,230 | all-1231 | [
"Get",
"loads",
"the",
"document",
"with",
"the",
"given",
"ID",
"into",
"dst",
".",
"The",
"ID",
"is",
"a",
"human",
"-",
"readable",
"ASCII",
"string",
".",
"It",
"must",
"be",
"non",
"-",
"empty",
"contain",
"no",
"whitespace",
"characters",
"and",
... | [
"func",
"(",
"x",
"*",
"Index",
")",
"Get",
"(",
"c",
"context",
".",
"Context",
",",
"id",
"string",
",",
"dst",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"id",
"==",
"\"",
"\"",
"||",
"!",
"validIndexNameOrDocID",
"(",
"id",
")",
"{",
"re... |
1,231 | all-1232 | [
"SetQuality",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_set_quality",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"SetQuality",
"(",
"<mask>",
"PrintQuality",
")",
"{",
"C",
".",
"gtk_print_settings_set_quality",
"(",
"ps",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkPrintQuality",
"(",
"quality",
")",
")",
"\n",
"}"
] |
1,232 | all-1233 | [
"NewBuilder",
"returns",
"a",
"new",
"LabelsBuilder"
] | [
"func",
"NewBuilder",
"(",
"base",
"Labels",
")",
"*",
"Builder",
"{",
"return",
"&",
"Builder",
"{",
"<mask>",
":",
"base",
",",
"del",
":",
"make",
"(",
"[",
"]",
"string",
",",
"0",
",",
"5",
")",
",",
"add",
":",
"make",
"(",
"[",
"]",
"Lab... |
1,233 | all-1234 | [
"GetColorOk",
"returns",
"a",
"tuple",
"with",
"the",
"Color",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"r",
"*",
"Rule",
")",
"GetColorOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"r",
"==",
"nil",
"||",
"r",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"r",
"."... |
1,234 | all-1235 | [
"WithCondition",
"expression",
"to",
"use",
"as",
"a",
"breakpoint",
"condition",
".",
"When",
"specified",
"debugger",
"will",
"only",
"stop",
"on",
"the",
"breakpoint",
"if",
"this",
"expression",
"evaluates",
"to",
"true",
"."
] | [
"func",
"(",
"p",
"SetBreakpointParams",
")",
"WithCondition",
"(",
"condition",
"string",
")",
"*",
"SetBreakpointParams",
"{",
"p",
".",
"Condition",
"=",
"<mask>",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
1,235 | all-1236 | [
"QueryMetrics",
"takes",
"as",
"input",
"from",
"to",
"(",
"seconds",
"from",
"Unix",
"Epoch",
")",
"and",
"query",
"string",
"and",
"then",
"requests",
"timeseries",
"data",
"for",
"that",
"time",
"peried"
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"QueryMetrics",
"(",
"from",
",",
"to",
"int64",
",",
"<mask>",
"string",
")",
"(",
"[",
"]",
"Series",
",",
"error",
")",
"{",
"v",
":=",
"url",
".",
"Values",
"{",
"}",
"\n",
"v",
".",
"Add",
"(",
"\... |
1,236 | all-1237 | [
"AppendHookOnBeforeUpdate",
"appends",
"a",
"hook",
"function",
"that",
"is",
"run",
"before",
"the",
"main",
"update",
"function",
"every",
"frame",
"."
] | [
"func",
"AppendHookOnBeforeUpdate",
"(",
"f",
"func",
"(",
")",
"error",
")",
"{",
"m",
".",
"Lock",
"(",
")",
"\n",
"onBeforeUpdateHooks",
"=",
"<mask>",
"(",
"onBeforeUpdateHooks",
",",
"f",
")",
"\n",
"m",
".",
"Unlock",
"(",
")",
"\n",
"}"
] |
1,237 | all-1238 | [
"GetItemRow",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_get_item_row",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"GetItemRow",
"(",
"<mask>",
"*",
"TreePath",
")",
"int",
"{",
"return",
"int",
"(",
"C",
".",
"gtk_icon_view_get_item_row",
"(",
"v",
".",
"native",
"(",
")",
",",
"path",
".",
"native",
"(",
")",
")",
")",
... |
1,238 | all-1239 | [
"Debugf",
"formats",
"its",
"arguments",
"according",
"to",
"the",
"format",
"analogous",
"to",
"fmt",
".",
"Printf",
"and",
"records",
"the",
"text",
"as",
"a",
"log",
"message",
"at",
"Debug",
"level",
".",
"The",
"message",
"will",
"be",
"associated",
"... | [
"func",
"Debugf",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"internal",
".",
"Logf",
"(",
"ctx",
",",
"0",
",",
"format",
",",
"args",
"...",
")",
"\n",
"}"
] |
1,239 | all-1240 | [
"Restore",
"restores",
"the",
"images",
".",
"Restoring",
"means",
"to",
"make",
"all",
"*",
"graphicscommand",
".",
"Image",
"objects",
"have",
"their",
"textures",
"and",
"framebuffers",
"."
] | [
"func",
"Restore",
"(",
")",
"error",
"{",
"if",
"<mask>",
":=",
"graphicscommand",
".",
"ResetGraphicsDriverState",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"return",
"theImages",
".",
"restore",
"(",
")",
"\n",
"}"
] |
1,240 | all-1241 | [
"Infoln",
"logs",
"a",
"line",
"with",
"an",
"INFO",
"prefix",
"."
] | [
"func",
"(",
"l",
"*",
"logger",
")",
"Infoln",
"(",
"vals",
"...",
"<mask>",
"{",
"}",
")",
"{",
"l",
".",
"mut",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"mut",
".",
"Unlock",
"(",
")",
"\n",
"s",
":=",
"fmt",
".",
"Sprintln",
"(",
... |
1,241 | all-1242 | [
"Plain",
"renders",
"the",
"named",
"files",
"using",
"the",
"text",
"/",
"plain",
"content",
"type",
"and",
"the",
"github",
".",
"com",
"/",
"gobuffalo",
"/",
"plush",
"package",
"for",
"templating",
".",
"If",
"more",
"than",
"1",
"file",
"is",
"provi... | [
"func",
"(",
"e",
"*",
"Engine",
")",
"Plain",
"(",
"names",
"...",
"string",
")",
"Renderer",
"{",
"hr",
":=",
"&",
"templateRenderer",
"{",
"Engine",
":",
"e",
",",
"contentType",
":",
"\"",
"\"",
",",
"<mask>",
":",
"names",
",",
"}",
"\n",
"ret... |
1,242 | all-1243 | [
"PieceDroppable",
"returns",
"a",
"boolean",
"value",
"indicating",
"whether",
"the",
"piece",
"at",
"(",
"x",
"y",
")",
"with",
"the",
"given",
"angle",
"can",
"drop",
"."
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"PieceDroppable",
"(",
"piece",
"*",
"Piece",
",",
"x",
",",
"y",
"int",
",",
"<mask>",
"Angle",
")",
"bool",
"{",
"return",
"!",
"piece",
".",
"collides",
"(",
"f",
",",
"x",
",",
"y",
"+",
"1",
",",
"angle... |
1,243 | all-1244 | [
"HasTitleAlign",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TimeseriesDefinition",
")",
"HasTitleAlign",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"TitleAlign",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
1,244 | all-1245 | [
"Bool",
"looks",
"up",
"the",
"value",
"of",
"a",
"bool",
"flag",
"returns",
"false",
"if",
"no",
"bool",
"flag",
"exists"
] | [
"func",
"(",
"f",
"Flags",
")",
"Bool",
"(",
"<mask>",
"string",
")",
"bool",
"{",
"return",
"f",
".",
"C",
".",
"Bool",
"(",
"name",
")",
"\n",
"}"
] |
1,245 | all-1246 | [
"Reads",
"the",
"entire",
"method",
"name",
"(",
"arg1",
")",
"from",
"the",
"request",
"stream",
"."
] | [
"func",
"(",
"call",
"*",
"InboundCall",
")",
"readMethod",
"(",
")",
"error",
"{",
"var",
"arg1",
"[",
"]",
"byte",
"\n",
"if",
"err",
":=",
"NewArgReader",
"(",
"call",
".",
"arg1Reader",
"(",
")",
")",
".",
"Read",
"(",
"&",
"arg1",
")",
";",
... |
1,246 | all-1247 | [
"Get",
"read",
"redis",
"session",
"by",
"sid"
] | [
"func",
"(",
"rp",
"*",
"redisProvider",
")",
"Get",
"(",
"sid",
"string",
")",
"(",
"*",
"redisStore",
",",
"error",
")",
"{",
"var",
"rs",
"=",
"&",
"redisStore",
"{",
"}",
"\n",
"var",
"val",
"map",
"[",
"string",
"]",
"string",
"\n",
"var",
"... |
1,247 | all-1248 | [
"addSharedVolumes",
"adds",
"shared",
"volume",
"into",
"task",
"resources",
"and",
"updates",
"container",
"dependency"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"addSharedVolumes",
"(",
"SharedVolumeMatchFullConfig",
"bool",
",",
"ctx",
"context",
".",
"Context",
",",
"dockerClient",
"dockerapi",
".",
"DockerClient",
",",
"vol",
"*",
"TaskVolume",
")",
"error",
"{",
"volumeConfig",... |
1,248 | all-1249 | [
"UploadFile",
"-",
"allows",
"us",
"to",
"upload",
"the",
"contents",
"of",
"the",
"given",
"reader"
] | [
"func",
"(",
"s",
"*",
"RemoteOperations",
")",
"UploadFile",
"(",
"lfile",
"io",
".",
"Reader",
")",
"(",
"err",
"error",
")",
"{",
"var",
"rfile",
"<mask>",
".",
"WriteCloser",
"\n\n",
"if",
"rfile",
",",
"err",
"=",
"s",
".",
"GetRemoteFile",
"(",
... |
1,249 | all-1250 | [
"title",
":",
"team",
"create",
"path",
":",
"/",
"teams",
"method",
":",
"POST",
"consume",
":",
"application",
"/",
"x",
"-",
"www",
"-",
"form",
"-",
"urlencoded",
"responses",
":",
"201",
":",
"Team",
"created",
"400",
":",
"Invalid",
"data",
"401"... | [
"func",
"createTeam",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"allowed",
":=",
"permission",
".",
"Check",
"(",
"t",
",",
"permission",
".",
"PermTeamCreate",
")... |
1,250 | all-1251 | [
"persistVote",
"is",
"used",
"to",
"persist",
"our",
"vote",
"for",
"safety",
"."
] | [
"func",
"(",
"r",
"*",
"Raft",
")",
"persistVote",
"(",
"term",
"uint64",
",",
"candidate",
"[",
"]",
"byte",
")",
"error",
"{",
"if",
"err",
":=",
"r",
".",
"stable",
".",
"SetUint64",
"(",
"keyLastVoteTerm",
",",
"<mask>",
")",
";",
"err",
"!=",
... |
1,251 | all-1252 | [
"HasRetries",
"will",
"return",
"true",
"if",
"there",
"are",
"more",
"retries",
"left",
"."
] | [
"func",
"(",
"rs",
"*",
"RequestState",
")",
"HasRetries",
"(",
"err",
"error",
")",
"bool",
"{",
"if",
"<mask>",
"==",
"nil",
"{",
"return",
"false",
"\n",
"}",
"\n",
"rOpts",
":=",
"rs",
".",
"retryOpts",
"\n",
"return",
"rs",
".",
"Attempt",
"<",
... |
1,252 | all-1253 | [
"ParallelSelect",
"will",
"execute",
"a",
"Transform",
"across",
"all",
"logical",
"CPUs",
"available",
"to",
"the",
"current",
"process",
"."
] | [
"func",
"(",
"iter",
"Enumerator",
")",
"ParallelSelect",
"(",
"operation",
"Transform",
")",
"Enumerator",
"{",
"if",
"cpus",
":=",
"runtime",
".",
"NumCPU",
"(",
")",
";",
"cpus",
"!=",
"1",
"{",
"intermediate",
":=",
"iter",
".",
"splitN",
"(",
"<mask... |
1,253 | all-1254 | [
"HasReady",
"called",
"when",
"RawNode",
"user",
"need",
"to",
"check",
"if",
"any",
"Ready",
"pending",
".",
"Checking",
"logic",
"in",
"this",
"method",
"should",
"be",
"consistent",
"with",
"Ready",
".",
"containsUpdates",
"()",
"."
] | [
"func",
"(",
"rn",
"*",
"RawNode",
")",
"HasReady",
"(",
")",
"bool",
"{",
"r",
":=",
"rn",
".",
"raft",
"\n",
"if",
"!",
"r",
".",
"softState",
"(",
")",
".",
"equal",
"(",
"rn",
".",
"prevSoftSt",
")",
"{",
"return",
"true",
"\n",
"}",
"\n",
... |
1,254 | all-1255 | [
"HasInterval",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Series",
")",
"HasInterval",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"Interval",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
1,255 | all-1256 | [
"InterfaceSlice",
"converts",
"a",
"slice",
"of",
"any",
"type",
"into",
"a",
"slice",
"of",
"interface",
"{}",
"."
] | [
"func",
"InterfaceSlice",
"(",
"slice",
"interface",
"{",
"}",
")",
"[",
"]",
"interface",
"{",
"}",
"{",
"v",
":=",
"reflect",
".",
"ValueOf",
"(",
"slice",
")",
"\n",
"if",
"v",
".",
"Kind",
"(",
")",
"!=",
"reflect",
".",
"Slice",
"{",
"panic",
... |
1,256 | all-1257 | [
"Caputure",
"captures",
"a",
"stacktrace",
"for",
"the",
"current",
"calling",
"go",
"program",
"skip",
"is",
"the",
"number",
"of",
"frames",
"to",
"skip"
] | [
"func",
"Capture",
"(",
"userSkip",
"int",
")",
"Stacktrace",
"{",
"var",
"(",
"skip",
"=",
"userSkip",
"+",
"1",
"// add one for our own function",
"\n",
"frames",
"[",
"]",
"Frame",
"\n",
")",
"\n",
"for",
"i",
":=",
"<mask>",
";",
";",
"i",
"++",
"{... |
1,257 | all-1258 | [
"newVirtualMachineCustomizationWaiter",
"returns",
"a",
"new",
"virtualMachineCustomizationWaiter",
"to",
"use",
"to",
"wait",
"for",
"customization",
"on",
".",
"This",
"should",
"be",
"called",
"**",
"before",
"**",
"the",
"start",
"of",
"the",
"customization",
"t... | [
"func",
"newVirtualMachineCustomizationWaiter",
"(",
"<mask>",
"*",
"govmomi",
".",
"Client",
",",
"vm",
"*",
"object",
".",
"VirtualMachine",
",",
"timeout",
"int",
")",
"*",
"virtualMachineCustomizationWaiter",
"{",
"w",
":=",
"&",
"virtualMachineCustomizationWaiter... |
1,258 | all-1259 | [
"/",
"*",
"resize",
"/",
"move",
"window"
] | [
"func",
"(",
"win",
"*",
"Window",
")",
"Resize",
"(",
"width",
",",
"<mask>",
"int",
")",
"{",
"C",
".",
"cvResizeWindow",
"(",
"win",
".",
"name_c",
",",
"C",
".",
"int",
"(",
"width",
")",
",",
"C",
".",
"int",
"(",
"height",
")",
")",
"\n",... |
1,259 | all-1260 | [
"constructor",
".",
"NewAtomicFixedSizeRingBuf",
"will",
"allocate",
"internally",
"two",
"buffers",
"of",
"size",
"maxViewInBytes",
"."
] | [
"func",
"NewAtomicFixedSizeRingBuf",
"(",
"maxViewInBytes",
"int",
")",
"*",
"AtomicFixedSizeRingBuf",
"{",
"n",
":=",
"maxViewInBytes",
"\n",
"r",
":=",
"&",
"AtomicFixedSizeRingBuf",
"{",
"Use",
":",
"0",
",",
"// 0 or 1, whichever is actually in use at the moment.",
... |
1,260 | all-1261 | [
"HasTags",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"r",
"*",
"reqGetTags",
")",
"HasTags",
"(",
")",
"bool",
"{",
"if",
"r",
"!=",
"nil",
"&&",
"r",
".",
"Tags",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
1,261 | all-1262 | [
"If",
"logerr",
"is",
"true",
"it",
"prints",
"out",
"more",
"error",
"messages",
"."
] | [
"func",
"getClusterFromRemotePeers",
"(",
"lg",
"*",
"zap",
".",
"Logger",
",",
"urls",
"[",
"]",
"string",
",",
"timeout",
"time",
".",
"Duration",
",",
"logerr",
"bool",
",",
"rt",
"http",
".",
"RoundTripper",
")",
"(",
"*",
"membership",
".",
"RaftClu... |
1,262 | all-1263 | [
"release",
"the",
"mapping",
"of",
"a",
"buffer",
"object",
"s",
"data",
"store",
"into",
"the",
"client",
"s",
"address",
"space"
] | [
"func",
"UnmapBuffer",
"(",
"target",
"uint32",
")",
"bool",
"{",
"<mask>",
",",
"_",
",",
"_",
":=",
"syscall",
".",
"Syscall",
"(",
"gpUnmapBuffer",
",",
"1",
",",
"uintptr",
"(",
"target",
")",
",",
"0",
",",
"0",
")",
"\n",
"return",
"ret",
"!=... |
1,263 | all-1264 | [
"NewCubeHash",
"initializes",
"anrd",
"retuns",
"Cubuhash",
"struct",
"."
] | [
"func",
"NewCubeHash",
"(",
")",
"*",
"CubeHash",
"{",
"c",
":=",
"&",
"CubeHash",
"{",
"}",
"\n",
"c",
".",
"x0",
"=",
"iv",
"[",
"0",
"]",
"\n",
"c",
".",
"x1",
"=",
"iv",
"[",
"1",
"]",
"\n",
"c",
".",
"x2",
"=",
"iv",
"[",
"2",
"]",
... |
1,264 | all-1265 | [
"create",
"texture",
"objects"
] | [
"func",
"CreateTextures",
"(",
"target",
"uint32",
",",
"n",
"int32",
",",
"textures",
"*",
"uint32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpCreateTextures",
",",
"3",
",",
"uintptr",
"(",
"<mask>",
")",
",",
"uintptr",
"(",
"n",
")",
",",
"uintp... |
1,265 | all-1266 | [
"===",
"sort",
"(",
"node",
"ValueTypeVector",
")",
"Vector",
"==="
] | [
"func",
"funcSort",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"// NaN should sort to the bottom, so take descending sort with NaN first and",
"// reverse it.",
"byValueSorter",
":=",
"vectorByReverseVa... |
1,266 | all-1267 | [
"GetHostTags",
"returns",
"a",
"slice",
"of",
"tags",
"for",
"a",
"given",
"host",
"and",
"source",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetHostTags",
"(",
"host",
",",
"source",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"var",
"out",
"reqGetHostTags",
"\n",
"uri",
":=",
"\"",
"\"",
"+",
"host",
"\n",
"if",
"source",
... |
1,267 | all-1268 | [
"ModelValidator",
"performs",
"a",
"validation",
"of",
"the",
"model",
"using",
"the",
"Validate",
"method",
"."
] | [
"func",
"ModelValidator",
"(",
")",
"*",
"Callback",
"{",
"return",
"C",
"(",
"\"",
"\"",
",",
"Only",
"(",
"Create",
",",
"Update",
")",
",",
"func",
"(",
"ctx",
"*",
"Context",
")",
"error",
"{",
"// check model",
"m",
",",
"<mask>",
":=",
"ctx",
... |
1,268 | all-1269 | [
"DefaultVM",
"sets",
"up",
"and",
"assigns",
"the",
"default",
"VM",
"to",
"be",
"used",
"by",
"Xslate"
] | [
"func",
"DefaultVM",
"(",
"tx",
"*",
"Xslate",
",",
"args",
"Args",
")",
"error",
"{",
"dvm",
":=",
"vm",
".",
"NewVM",
"(",
")",
"\n",
"dvm",
".",
"Loader",
"=",
"<mask>",
".",
"Loader",
"\n",
"tx",
".",
"VM",
"=",
"dvm",
"\n",
"return",
"nil",
... |
1,269 | all-1270 | [
"Determines",
"if",
"a",
"name",
"corresponds",
"to",
"a",
"program",
"object"
] | [
"func",
"IsProgram",
"(",
"program",
"uint32",
")",
"bool",
"{",
"<mask>",
":=",
"C",
".",
"glowIsProgram",
"(",
"gpIsProgram",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"program",
")",
")",
"\n",
"return",
"ret",
"==",
"TRUE",
"\n",
"}"
] |
1,270 | all-1271 | [
"GetCookieInt",
"returns",
"cookie",
"result",
"in",
"int",
"type",
"."
] | [
"func",
"(",
"ctx",
"*",
"Context",
")",
"GetCookieInt",
"(",
"<mask>",
"string",
")",
"int",
"{",
"return",
"com",
".",
"StrTo",
"(",
"ctx",
".",
"GetCookie",
"(",
"name",
")",
")",
".",
"MustInt",
"(",
")",
"\n",
"}"
] |
1,271 | all-1272 | [
"CloneRefs",
"constructs",
"the",
"container",
"and",
"volumes",
"necessary",
"to",
"clone",
"the",
"refs",
"requested",
"by",
"the",
"ProwJob",
".",
"The",
"container",
"checks",
"out",
"repositories",
"specified",
"by",
"the",
"ProwJob",
"Refs",
"to",
"codeMou... | [
"func",
"CloneRefs",
"(",
"pj",
"prowapi",
".",
"ProwJob",
",",
"codeMount",
",",
"logMount",
"coreapi",
".",
"VolumeMount",
")",
"(",
"*",
"coreapi",
".",
"Container",
",",
"[",
"]",
"prowapi",
".",
"Refs",
",",
"[",
"]",
"coreapi",
".",
"Volume",
","... |
1,272 | all-1273 | [
"Delete",
"sets",
"a",
"header",
"that",
"tells",
"the",
"browser",
"to",
"remove",
"the",
"cookie",
"with",
"the",
"given",
"name",
"."
] | [
"func",
"(",
"c",
"*",
"Cookies",
")",
"Delete",
"(",
"name",
"string",
")",
"{",
"ck",
":=",
"http",
".",
"Cookie",
"{",
"Name",
":",
"name",
",",
"Value",
":",
"\"",
"\"",
",",
"// Setting a time in the distant past, like the unix epoch, removes the cookie,",
... |
1,273 | all-1274 | [
"Flush",
"writes",
"the",
"action",
"history",
"to",
"persistent",
"storage",
"if",
"configured",
"to",
"do",
"so",
"."
] | [
"func",
"(",
"h",
"*",
"History",
")",
"Flush",
"(",
")",
"{",
"if",
"h",
".",
"path",
"==",
"\"",
"\"",
"{",
"return",
"\n",
"}",
"\n",
"records",
":=",
"h",
".",
"AllRecords",
"(",
")",
"\n",
"start",
":=",
"time",
".",
"Now",
"(",
")",
"\n... |
1,274 | all-1275 | [
"Panicln",
"records",
"the",
"log",
"with",
"fatal",
"level",
"and",
"panics"
] | [
"func",
"Panicln",
"(",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"msg",
":=",
"fmt",
".",
"Sprintln",
"(",
"args",
"...",
")",
"\n",
"logger",
".",
"Output",
"(",
"2",
",",
"LevelError",
",",
"<mask>",
")",
"\n",
"panic",
"(",
"msg",
")",
... |
1,275 | all-1276 | [
"Kill",
"sends",
"the",
"kill",
"signal",
"to",
"the",
"child",
"process",
"and",
"waits",
"for",
"successful",
"termination",
".",
"If",
"no",
"kill",
"signal",
"is",
"defined",
"the",
"process",
"is",
"killed",
"with",
"the",
"most",
"aggressive",
"kill",
... | [
"func",
"(",
"c",
"*",
"Child",
")",
"Kill",
"(",
")",
"{",
"<mask>",
".",
"Printf",
"(",
"\"",
"\"",
")",
"\n",
"c",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"kill",
"(",
")",
"\n",
"}"
] |
1,276 | all-1277 | [
"Lex",
"is",
"called",
"by",
"the",
"parser",
"generated",
"by",
"go",
"tool",
"yacc",
"to",
"obtain",
"each",
"token",
".",
"The",
"method",
"is",
"opened",
"before",
"the",
"matching",
"rules",
"block",
"and",
"closed",
"at",
"the",
"end",
"of",
"the",... | [
"func",
"(",
"l",
"*",
"openMetricsLexer",
")",
"Lex",
"(",
")",
"token",
"{",
"if",
"l",
".",
"i",
">=",
"len",
"(",
"l",
".",
"b",
")",
"{",
"return",
"tEOF",
"\n",
"}",
"\n",
"c",
":=",
"l",
".",
"b",
"[",
"l",
".",
"i",
"]",
"\n",
"l"... |
1,277 | all-1278 | [
"GetClientPointer",
"()",
"is",
"a",
"wrapper",
"around",
"gdk_device_manager_get_client_pointer",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"DeviceManager",
")",
"GetClientPointer",
"(",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gdk_device_manager_get_client_pointer",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
... |
1,278 | all-1279 | [
"powerStateFromInstanceView",
"reads",
"the",
"instance",
"view",
"response",
"and",
"extracts",
"the",
"power",
"state",
"status",
"(",
"if",
"exists",
")",
"from",
"there",
".",
"If",
"no",
"status",
"is",
"found",
"or",
"an",
"unknown",
"status",
"has",
"... | [
"func",
"powerStateFromInstanceView",
"(",
"instanceView",
"*",
"compute",
".",
"VirtualMachineInstanceView",
")",
"VMPowerState",
"{",
"if",
"instanceView",
"==",
"nil",
"{",
"log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"return",
"Unknown",
"\n",
"}",
"el... |
1,279 | all-1280 | [
"Repair",
"returns",
"an",
"iterator",
"that",
"goes",
"over",
"all",
"recovered",
"documents",
"in",
"the",
"collection",
"in",
"a",
"best",
"-",
"effort",
"manner",
".",
"This",
"is",
"most",
"useful",
"when",
"there",
"are",
"damaged",
"data",
"files",
... | [
"func",
"(",
"c",
"*",
"Collection",
")",
"Repair",
"(",
")",
"*",
"Iter",
"{",
"// Clone session and set it to Monotonic mode so that the server",
"// used for the query may be safely obtained afterwards, if",
"// necessary for iteration when a cursor is received.",
"session",
":=",... |
1,280 | all-1281 | [
"setupHostVethDevice",
"configures",
"a",
"nic",
"device",
"s",
"host",
"side",
"veth",
"settings",
"."
] | [
"func",
"(",
"c",
"*",
"containerLXC",
")",
"setupHostVethDevice",
"(",
"device",
"types",
".",
"<mask>",
")",
"error",
"{",
"// If not already, populate network device with host name.",
"if",
"device",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"device",
"[",... |
1,281 | all-1282 | [
"getDatastore",
"gets",
"datastore",
"object"
] | [
"func",
"getDatastore",
"(",
"f",
"*",
"find",
".",
"Finder",
",",
"ds",
"string",
")",
"(",
"*",
"object",
".",
"Datastore",
",",
"error",
")",
"{",
"if",
"ds",
"!=",
"\"",
"\"",
"{",
"dso",
",",
"err",
":=",
"f",
".",
"Datastore",
"(",
"context... |
1,282 | all-1283 | [
"GetSignatures",
"returns",
"the",
"image",
"s",
"signatures",
".",
"It",
"may",
"use",
"a",
"remote",
"(",
"=",
"slow",
")",
"service",
".",
"If",
"instanceDigest",
"is",
"not",
"nil",
"it",
"contains",
"a",
"digest",
"of",
"the",
"specific",
"manifest",
... | [
"func",
"(",
"s",
"*",
"dockerImageSource",
")",
"GetSignatures",
"(",
"ctx",
"context",
".",
"Context",
",",
"instanceDigest",
"*",
"digest",
".",
"Digest",
")",
"(",
"[",
"]",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"if",
"err",
":=",
"s",
".",
... |
1,283 | all-1284 | [
"Copy",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_tree_iter_copy",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeIter",
")",
"Copy",
"(",
")",
"(",
"*",
"TreeIter",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_tree_iter_copy",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
... |
1,284 | all-1285 | [
"Parameters",
":",
"-",
"Key",
"-",
"Value"
] | [
"func",
"(",
"p",
"*",
"KeyValueClient",
")",
"<mask>",
"(",
"key",
"string",
",",
"value",
"string",
")",
"(",
"err",
"error",
")",
"{",
"if",
"err",
"=",
"p",
".",
"sendSet",
"(",
"key",
",",
"value",
")",
";",
"err",
"!=",
"nil",
"{",
"return"... |
1,285 | all-1286 | [
"Add",
"returns",
"a",
"new",
"logger",
"with",
"added",
"context",
"variables",
".",
"This",
"function",
"takes",
"alternated",
"key",
"-",
"value",
"pairs",
"(",
"name1",
"val1",
"name1",
"val2",
"...",
")",
".",
"The",
"keys",
"must",
"be",
"strings",
... | [
"func",
"(",
"l",
"*",
"LoggerBase",
")",
"Add",
"(",
"vars",
"...",
"<mask>",
"{",
"}",
")",
"Logger",
"{",
"if",
"len",
"(",
"vars",
")",
"%",
"2",
"==",
"1",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"ctx",
":=",
"map",
"[",
... |
1,286 | all-1287 | [
"specify",
"the",
"diameter",
"of",
"rasterized",
"points"
] | [
"func",
"PointSize",
"(",
"size",
"float32",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpPointSize",
",",
"1",
",",
"uintptr",
"(",
"math",
".",
"Float32bits",
"(",
"<mask>",
")",
")",
",",
"0",
",",
"0",
")",
"\n",
"}"
] |
1,287 | all-1288 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"APIType",
")",
"UnmarshalEasyJSON",
"(",
"<mask>",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"APIType",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"APITypeLog",
":",
"*",
"t",
"=",
"APITypeLog",
"\n",
"case",... |
1,288 | all-1289 | [
"PackageJSONCheck",
"will",
"compare",
"the",
"current",
"default",
"Buffalo",
"package",
".",
"json",
"against",
"the",
"applications",
"package",
".",
"json",
".",
"If",
"they",
"are",
"different",
"you",
"have",
"the",
"option",
"to",
"overwrite",
"the",
"e... | [
"func",
"PackageJSONCheck",
"(",
"r",
"*",
"Runner",
")",
"error",
"{",
"fmt",
".",
"Println",
"(",
"\"",
"\"",
")",
"\n\n",
"if",
"!",
"r",
".",
"App",
".",
"WithWebpack",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"box",
":=",
"webpack",
".",
"Temp... |
1,289 | all-1290 | [
"RemoveIP",
"removes",
"an",
"IP",
"address",
"from",
"Pinger",
".",
"ipaddr",
"arg",
"should",
"be",
"a",
"string",
"like",
"192",
".",
"0",
".",
"2",
".",
"1",
"."
] | [
"func",
"(",
"p",
"*",
"Pinger",
")",
"RemoveIP",
"(",
"ipaddr",
"string",
")",
"error",
"{",
"addr",
":=",
"net",
".",
"ParseIP",
"(",
"ipaddr",
")",
"\n",
"if",
"addr",
"==",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"ip... |
1,290 | all-1291 | [
"func",
"searchString",
"(",
"idx",
"[]",
"string",
"key",
"string",
")",
"int",
"{",
"return",
"sort",
".",
"Search",
"(",
"len",
"(",
"idx",
")",
"func",
"(",
"i",
"int",
")",
"bool",
"{",
"numKey",
"er1",
":",
"=",
"strconv",
".",
"ParseInt",
"(... | [
"func",
"searchString",
"(",
"idx",
"[",
"]",
"string",
",",
"<mask>",
"string",
")",
"int",
"{",
"return",
"sort",
".",
"SearchStrings",
"(",
"idx",
",",
"key",
")",
"\n",
"}"
] |
1,291 | all-1292 | [
"ToASCII",
"converts",
"unicode",
"to",
"ASCII",
"by",
"stripping",
"accents",
"and",
"converting",
"some",
"special",
"characters",
"into",
"their",
"ASCII",
"approximations",
".",
"Anything",
"else",
"will",
"be",
"replaced",
"with",
"an",
"underscore",
"."
] | [
"func",
"ToASCII",
"(",
"s",
"string",
")",
"string",
"{",
"// unicode.Mn: nonspacing marks",
"tr",
":=",
"transform",
".",
"Chain",
"(",
"<mask>",
".",
"NFD",
",",
"runes",
".",
"Remove",
"(",
"runes",
".",
"In",
"(",
"unicode",
".",
"Mn",
")",
")",
"... |
1,292 | all-1293 | [
"NewNetAddress",
"returns",
"a",
"new",
"NetAddress",
"using",
"the",
"provided",
"TCP",
"address",
".",
"When",
"testing",
"other",
"net",
".",
"Addr",
"(",
"except",
"TCP",
")",
"will",
"result",
"in",
"using",
"0",
".",
"0",
".",
"0",
".",
"0",
":",... | [
"func",
"NewNetAddress",
"(",
"addr",
"<mask>",
".",
"Addr",
")",
"*",
"NetAddress",
"{",
"tcpAddr",
",",
"ok",
":=",
"addr",
".",
"(",
"*",
"net",
".",
"TCPAddr",
")",
"\n",
"if",
"!",
"ok",
"{",
"if",
"flag",
".",
"Lookup",
"(",
"\"",
"\"",
")"... |
1,293 | all-1294 | [
"RawRequest",
"allows",
"you",
"to",
"make",
"any",
"request",
"you",
"want",
".",
"This",
"will",
"automatically",
"add",
"the",
"client",
"/",
"user",
"tokens",
".",
"Gives",
"back",
"exactly",
"the",
"response",
"from",
"foursquare",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"RawRequest",
"(",
"url",
"string",
")",
"(",
"*",
"Response",
",",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"response",
":=",
"new",
"(",
"Response",
")",
"\n",
"resp",
",",
"err",
":=",
"c",
".... |
1,294 | all-1295 | [
"GetError",
"returns",
"reader",
"error",
"."
] | [
"func",
"(",
"r",
"*",
"Reader",
")",
"GetError",
"(",
")",
"error",
"{",
"err",
":=",
"r",
".",
"err",
"\n",
"r",
".",
"err",
"=",
"nil",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
1,295 | all-1296 | [
"UnmarshalClusterMap",
"reads",
"a",
"map",
"[",
"string",
"]",
"Cluster",
"in",
"yaml",
"bytes",
"."
] | [
"func",
"UnmarshalClusterMap",
"(",
"data",
"[",
"]",
"byte",
")",
"(",
"map",
"[",
"string",
"]",
"Cluster",
",",
"error",
")",
"{",
"var",
"raw",
"map",
"[",
"string",
"]",
"Cluster",
"\n",
"if",
"err",
":=",
"yaml",
".",
"Unmarshal",
"(",
"data",
... |
1,296 | all-1297 | [
"Start",
"starts",
"the",
"game",
"and",
"returns",
"immediately",
".",
"Different",
"from",
"ebiten",
".",
"Run",
"this",
"invokes",
"only",
"the",
"game",
"loop",
"and",
"not",
"the",
"main",
"(",
"UI",
")",
"loop",
".",
"The",
"unit",
"of",
"width",
... | [
"func",
"Start",
"(",
"f",
"func",
"(",
"*",
"ebiten",
".",
"Image",
")",
"error",
",",
"width",
",",
"height",
"int",
",",
"scale",
"float64",
",",
"title",
"string",
")",
"error",
"{",
"mobileMutex",
".",
"Lock",
"(",
")",
"\n",
"defer",
"mobileMut... |
1,297 | all-1298 | [
"NewMockResponseWriter",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockResponseWriter",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockResponseWriter",
"{",
"mock",
":=",
"&",
"MockResponseWriter",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockResponseWriterMockRecorder",
... |
1,298 | all-1299 | [
"ActionPath",
"computes",
"the",
"path",
"to",
"the",
"given",
"resource",
"action",
".",
"For",
"example",
"given",
"the",
"href",
"/",
"api",
"/",
"servers",
"/",
"123",
"calling",
"ActionPath",
"with",
"resource",
"servers",
"and",
"action",
"clone",
"ret... | [
"func",
"(",
"r",
"*",
"Href",
")",
"ActionPath",
"(",
"rName",
",",
"aName",
"string",
")",
"(",
"*",
"<mask>",
".",
"ActionPath",
",",
"error",
")",
"{",
"res",
",",
"ok",
":=",
"GenMetadata",
"[",
"rName",
"]",
"\n",
"if",
"!",
"ok",
"{",
"ret... |
1,299 | all-1300 | [
"title",
":",
"role",
"list",
"path",
":",
"/",
"roles",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"OK",
"401",
":",
"Unauthorized"
] | [
"func",
"listRoles",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"if",
"!",
"(",
"permission",
".",
"Check",
"(",
"t",
",",
"permission",
".",
"PermRoleUpdate",
")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.