id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
5,400 | all-5401 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CallFunctionOnParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47",
"(",
"&",
"w",
",",
"v",
... |
5,401 | all-5402 | [
"Do",
"executes",
"Debugger",
".",
"setSkipAllPauses",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetSkipAllPausesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetSkipAllPauses",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
5,402 | all-5403 | [
"OpenDir",
"opens",
"a",
"directory",
"in",
"windows",
"with",
"write",
"access",
"for",
"syncing",
"."
] | [
"func",
"OpenDir",
"(",
"path",
"string",
")",
"(",
"*",
"os",
".",
"<mask>",
",",
"error",
")",
"{",
"fd",
",",
"err",
":=",
"openDir",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"retur... |
5,403 | all-5404 | [
"SetResponseSensitive",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_dialog_set_response_sensitive",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Dialog",
")",
"SetResponseSensitive",
"(",
"id",
"ResponseType",
",",
"setting",
"bool",
")",
"{",
"C",
".",
"gtk_dialog_set_response_sensitive",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"<mask>",
")",
",",
... |
5,404 | all-5405 | [
"deleteExchange",
"will",
"delete",
"msgID",
"and",
"return",
"whether",
"it",
"was",
"found",
"or",
"whether",
"it",
"was",
"timed",
"out",
".",
"This",
"method",
"must",
"be",
"called",
"with",
"the",
"lock",
"."
] | [
"func",
"(",
"mexset",
"*",
"messageExchangeSet",
")",
"deleteExchange",
"(",
"msgID",
"uint32",
")",
"(",
"found",
",",
"timedOut",
"bool",
")",
"{",
"if",
"_",
",",
"found",
":=",
"mexset",
".",
"exchanges",
"[",
"msgID",
"]",
";",
"found",
"{",
"del... |
5,405 | all-5406 | [
"getHead",
"-",
"Returns",
"table",
"header",
"containing",
"fields",
"names",
"."
] | [
"func",
"(",
"t",
"*",
"Table",
")",
"getHead",
"(",
")",
"string",
"{",
"s",
":=",
"\"",
"\"",
"\n",
"for",
"_",
",",
"<mask>",
":=",
"range",
"t",
".",
"Fields",
"{",
"s",
"+=",
"t",
".",
"fieldString",
"(",
"name",
",",
"strings",
".",
"Titl... |
5,406 | all-5407 | [
"MakePath",
"generates",
"the",
"path",
"corresponding",
"to",
"this",
"Route",
"and",
"the",
"provided",
"path",
"parameters",
".",
"This",
"is",
"used",
"for",
"reverse",
"route",
"resolution",
"."
] | [
"func",
"(",
"route",
"*",
"Route",
")",
"MakePath",
"(",
"pathParams",
"map",
"[",
"string",
"]",
"string",
")",
"string",
"{",
"path",
":=",
"route",
".",
"PathExp",
"\n",
"for",
"paramName",
",",
"paramValue",
":=",
"range",
"pathParams",
"{",
"paramP... |
5,407 | all-5408 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"AlertSpec",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"AlertSpecLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"return",
"api"... |
5,408 | all-5409 | [
"Auto",
"figures",
"out",
"how",
"to",
"render",
"the",
"model",
"based",
"information",
"about",
"the",
"request",
"and",
"the",
"name",
"of",
"the",
"model",
".",
"Auto",
"supports",
"automatic",
"rendering",
"of",
"HTML",
"JSON",
"and",
"XML",
".",
"Any... | [
"func",
"Auto",
"(",
"ctx",
"context",
".",
"Context",
",",
"i",
"<mask>",
"{",
"}",
")",
"Renderer",
"{",
"e",
":=",
"New",
"(",
"Options",
"{",
"}",
")",
"\n",
"return",
"e",
".",
"Auto",
"(",
"ctx",
",",
"i",
")",
"\n",
"}"
] |
5,409 | all-5410 | [
"handleAcquire",
":",
"Handler",
"for",
"/",
"acquire",
"Method",
":",
"POST",
"URLParams",
":",
"Required",
":",
"type",
"=",
"[",
"string",
"]",
":",
"type",
"of",
"requested",
"resource",
"Required",
":",
"state",
"=",
"[",
"string",
"]",
":",
"curren... | [
"func",
"handleAcquire",
"(",
"r",
"*",
"ranch",
".",
"Ranch",
")",
"http",
".",
"HandlerFunc",
"{",
"return",
"func",
"(",
"res",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"logrus",
".",
"WithField",
"(",
"\"",
... |
5,410 | all-5411 | [
"GetLayoutTypeOk",
"returns",
"a",
"tuple",
"with",
"the",
"LayoutType",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"b",
"*",
"Board",
")",
"GetLayoutTypeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"b",
"==",
"nil",
"||",
"b",
".",
"LayoutType",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
... |
5,411 | all-5412 | [
"AsType",
"specifies",
"that",
"the",
"content",
"sent",
"through",
"to",
"the",
"consumer",
"handler",
"should",
"be",
"sent",
"as",
"the",
"given",
"type"
] | [
"func",
"(",
"p",
"*",
"Message",
")",
"AsType",
"(",
"t",
"interface",
"{",
"}",
")",
"*",
"Message",
"{",
"fmt",
".",
"Println",
"(",
"\"",
"\"",
",",
"reflect",
".",
"TypeOf",
"(",
"t",
")",
")",
"\n",
"p",
".",
"<mask>",
"=",
"t",
"\n\n",
... |
5,412 | all-5413 | [
"synchronizeState",
"explicitly",
"goes",
"through",
"each",
"docker",
"container",
"stored",
"in",
"state",
"and",
"updates",
"its",
"KnownStatus",
"appropriately",
"as",
"well",
"as",
"queueing",
"up",
"events",
"to",
"push",
"upstream",
"."
] | [
"func",
"(",
"<mask>",
"*",
"DockerTaskEngine",
")",
"synchronizeState",
"(",
")",
"{",
"engine",
".",
"tasksLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"engine",
".",
"tasksLock",
".",
"Unlock",
"(",
")",
"\n",
"imageStates",
":=",
"engine",
".",
"stat... |
5,413 | all-5414 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"PushNodeByPathToFrontendParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26",
"(",... |
5,414 | all-5415 | [
"Capabilities",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockCNIClient",
")",
"Capabilities",
"(",
"arg0",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
","... |
5,415 | all-5416 | [
"SplitPath",
"splits",
"the",
"url",
"pattern",
"."
] | [
"func",
"SplitPath",
"(",
"pat",
"string",
")",
"(",
"routes",
"[",
"]",
"string",
",",
"err",
"error",
")",
"{",
"scanner",
":=",
"bufio",
".",
"NewScanner",
"(",
"strings",
".",
"NewReader",
"(",
"pat",
")",
")",
"\n",
"scanner",
".",
"Split",
"(",... |
5,416 | all-5417 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetWindowForTargetReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser5",
"(",
"&",
"w",
",",
"v"... |
5,417 | all-5418 | [
"AmazonSecret",
"creates",
"an",
"amazon",
"secret",
"with",
"the",
"following",
"parameters",
":",
"region",
"-",
"AWS",
"region",
"bucket",
"-",
"S3",
"bucket",
"name",
"id",
"-",
"AWS",
"access",
"key",
"id",
"secret",
"-",
"AWS",
"secret",
"access",
"k... | [
"func",
"AmazonSecret",
"(",
"region",
",",
"bucket",
",",
"<mask>",
",",
"secret",
",",
"token",
",",
"distribution",
"string",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"byte",
"{",
"return",
"map",
"[",
"string",
"]",
"[",
"]",
"byte",
"{",
"\"",
... |
5,418 | all-5419 | [
"NewClient",
"returns",
"a",
"new",
"datadog",
".",
"Client",
"which",
"can",
"be",
"used",
"to",
"access",
"the",
"API",
"methods",
".",
"The",
"expected",
"argument",
"is",
"the",
"API",
"key",
"."
] | [
"func",
"NewClient",
"(",
"apiKey",
",",
"appKey",
"string",
")",
"*",
"Client",
"{",
"baseUrl",
":=",
"<mask>",
".",
"Getenv",
"(",
"\"",
"\"",
")",
"\n",
"if",
"baseUrl",
"==",
"\"",
"\"",
"{",
"baseUrl",
"=",
"\"",
"\"",
"\n",
"}",
"\n\n",
"retu... |
5,419 | all-5420 | [
"Return",
"the",
"name",
"of",
"the",
"Post",
"struct",
"for",
"the",
"given",
"entity",
"."
] | [
"func",
"entityPost",
"(",
"<mask>",
"string",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"lex",
".",
"Capital",
"(",
"lex",
".",
"Plural",
"(",
"entity",
")",
")",
")",
"\n",
"}"
] |
5,420 | all-5421 | [
"OnGossipBroadcast",
"implements",
"mesh",
".",
"Gossiper",
".",
"The",
"buf",
"is",
"a",
"single",
"pkt"
] | [
"func",
"(",
"p",
"*",
"Peer",
")",
"OnGossipBroadcast",
"(",
"_",
"mesh",
".",
"PeerName",
",",
"buf",
"[",
"]",
"<mask>",
")",
"(",
"received",
"mesh",
".",
"GossipData",
",",
"err",
"error",
")",
"{",
"pkt",
":=",
"makePkt",
"(",
"buf",
")",
"\n... |
5,421 | all-5422 | [
"notify",
"notifies",
"the",
"fact",
"that",
"given",
"event",
"at",
"the",
"given",
"rev",
"just",
"happened",
"to",
"watchers",
"that",
"watch",
"on",
"the",
"key",
"of",
"the",
"event",
"."
] | [
"func",
"(",
"s",
"*",
"watchableStore",
")",
"notify",
"(",
"rev",
"int64",
",",
"evs",
"[",
"]",
"mvccpb",
".",
"Event",
")",
"{",
"var",
"victim",
"watcherBatch",
"\n",
"for",
"w",
",",
"eb",
":=",
"range",
"newWatcherBatch",
"(",
"&",
"s",
".",
... |
5,422 | all-5423 | [
"RotatePieceRight",
"tries",
"to",
"rotate",
"the",
"piece",
"to",
"the",
"right",
"and",
"returns",
"the",
"piece",
"s",
"next",
"angle",
"."
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"RotatePieceRight",
"(",
"piece",
"*",
"Piece",
",",
"x",
",",
"y",
"int",
",",
"angle",
"Angle",
")",
"Angle",
"{",
"if",
"piece",
".",
"collides",
"(",
"f",
",",
"x",
",",
"y",
",",
"angle",
".",
"RotateRigh... |
5,423 | all-5424 | [
"insert",
"inserts",
"a",
"sequence",
"of",
"field",
"accesses",
"into",
"the",
"tree",
"."
] | [
"func",
"(",
"ft",
"*",
"fieldTree",
")",
"insert",
"(",
"cname",
"[",
"]",
"string",
")",
"{",
"if",
"ft",
".",
"sub",
"==",
"nil",
"{",
"ft",
".",
"sub",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"fieldTree",
")",
"\n",
"}",
"\n",
"if",
... |
5,424 | all-5425 | [
"MustNoIssuer",
"retrieves",
"the",
"NoIssuer",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"PathPaymentResult",
")",
"MustNoIssuer",
"(",
")",
"<mask>",
"{",
"val",
",",
"ok",
":=",
"u",
".",
"GetNoIssuer",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"val",
"\n",
... |
5,425 | all-5426 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"MonitoringMetric",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"MonitoringMetricLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"re... |
5,426 | all-5427 | [
"SetFlags",
"is",
"a",
"wrapper",
"around",
"g_application_set_flags",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Application",
")",
"SetFlags",
"(",
"<mask>",
"ApplicationFlags",
")",
"{",
"C",
".",
"g_application_set_flags",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GApplicationFlags",
"(",
"flags",
")",
")",
"\n",
"}"
] |
5,427 | all-5428 | [
"Begin",
"sets",
"the",
"last",
"index",
"to",
"the",
"given",
"value",
"."
] | [
"func",
"(",
"w",
"*",
"WaterMark",
")",
"Begin",
"(",
"index",
"uint64",
")",
"{",
"atomic",
".",
"StoreUint64",
"(",
"&",
"w",
".",
"lastIndex",
",",
"<mask>",
")",
"\n",
"w",
".",
"markCh",
"<-",
"mark",
"{",
"index",
":",
"index",
",",
"done",
... |
5,428 | all-5429 | [
"Equals",
"fulfils",
"PrivKey",
"Interface",
"-",
"makes",
"sure",
"both",
"keys",
"refer",
"to",
"the",
"same"
] | [
"func",
"(",
"pk",
"PrivKeyLedgerSecp256k1",
")",
"Equals",
"(",
"other",
"PrivKey",
")",
"bool",
"{",
"if",
"ledger",
",",
"ok",
":=",
"other",
".",
"(",
"*",
"PrivKeyLedgerSecp256k1",
")",
";",
"<mask>",
"{",
"return",
"pk",
".",
"CachedPubKey",
".",
"... |
5,429 | all-5430 | [
"GetColor",
"returns",
"the",
"Color",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"r",
"*",
"Rule",
")",
"GetColor",
"(",
")",
"string",
"{",
"if",
"r",
"==",
"nil",
"||",
"r",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"r",
".",
"Color",
"\n",
"}"
] |
5,430 | all-5431 | [
"/",
"*",
"A",
"truly",
"special",
"precedence",
"function",
"this",
"handles",
"all",
"the",
"lowest",
"-",
"case",
"errata",
"of",
"the",
"process",
"including",
"literals",
"parmeters",
"clauses",
"and",
"prefixes",
"."
] | [
"func",
"planValue",
"(",
"stream",
"*",
"tokenStream",
")",
"(",
"*",
"evaluationStage",
",",
"error",
")",
"{",
"var",
"token",
"ExpressionToken",
"\n",
"var",
"symbol",
"OperatorSymbol",
"\n",
"var",
"ret",
"*",
"evaluationStage",
"\n",
"var",
"operator",
... |
5,431 | all-5432 | [
"factory",
"function",
"for",
"the",
"designateClientInterface"
] | [
"func",
"newDesignateClient",
"(",
")",
"(",
"designateClientInterface",
",",
"error",
")",
"{",
"serviceClient",
",",
"err",
":=",
"createDesignateServiceClient",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"<mask>",
"\n",
"}",
"\n"... |
5,432 | all-5433 | [
"Dir",
"returns",
"a",
"currently",
"pressed",
"direction",
".",
"Dir",
"returns",
"false",
"if",
"no",
"direction",
"key",
"is",
"pressed",
"."
] | [
"func",
"(",
"i",
"*",
"Input",
")",
"Dir",
"(",
")",
"(",
"Dir",
",",
"bool",
")",
"{",
"if",
"inpututil",
".",
"IsKeyJustPressed",
"(",
"ebiten",
".",
"KeyUp",
")",
"{",
"return",
"DirUp",
",",
"true",
"\n",
"}",
"\n",
"if",
"inpututil",
".",
"... |
5,433 | all-5434 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventCompilationCacheProduced",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage69",
"(",
"&",
"w",
",",
"... |
5,434 | all-5435 | [
"Marhals",
"the",
"type",
"into",
"a",
"[]",
"byte",
".",
"If",
"key",
"isn",
"t",
"valid",
"KeyNotFound",
"is",
"returned",
".",
"If",
"the",
"typed",
"doesn",
"t",
"represent",
"valid",
"JSON",
"a",
"relevant",
"JSON",
"error",
"is",
"returned"
] | [
"func",
"(",
"t",
"Typed",
")",
"ToBytes",
"(",
"key",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"var",
"o",
"<mask>",
"{",
"}",
"\n",
"if",
"len",
"(",
"key",
")",
"==",
"0",
"{",
"o",
"=",
"t",
"\n",
"}",
"else",
"{",
... |
5,435 | all-5436 | [
"ByNames",
"returns",
"multiple",
"Sources",
"given",
"multiple",
"names",
"."
] | [
"func",
"ByNames",
"(",
"p",
"ClientGenerator",
",",
"names",
"[",
"]",
"string",
",",
"cfg",
"*",
"Config",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"sources",
":=",
"[",
"]",
"Source",
"{",
"}",
"\n",
"for",
"_",
",",
"name",
":=",... |
5,436 | all-5437 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHar8",
"(",
"&",
"r",
",",
"v"... |
5,437 | all-5438 | [
"GetProgressReportInterval",
"returns",
"the",
"current",
"progress",
"report",
"interval",
"(",
"for",
"testing",
")",
"."
] | [
"func",
"GetProgressReportInterval",
"(",
")",
"time",
".",
"Duration",
"{",
"progressReportIntervalMu",
".",
"RLock",
"(",
")",
"\n",
"interval",
":=",
"progressReportInterval",
"\n",
"progressReportIntervalMu",
".",
"RUnlock",
"(",
")",
"\n\n",
"// add rand(1/10*pro... |
5,438 | all-5439 | [
"ValidateLevelFilter",
"verifies",
"that",
"the",
"log",
"levels",
"within",
"the",
"filter",
"are",
"valid",
"."
] | [
"func",
"ValidateLevelFilter",
"(",
"min",
"logutils",
".",
"LogLevel",
",",
"filter",
"*",
"logutils",
".",
"LevelFilter",
")",
"bool",
"{",
"for",
"_",
",",
"level",
":=",
"range",
"filter",
".",
"Levels",
"{",
"if",
"<mask>",
"==",
"min",
"{",
"return... |
5,439 | all-5440 | [
"optionsForRepo",
"gets",
"the",
"plugins",
".",
"Approve",
"struct",
"that",
"is",
"applicable",
"to",
"the",
"indicated",
"repo",
"."
] | [
"func",
"optionsForRepo",
"(",
"config",
"*",
"plugins",
".",
"Configuration",
",",
"org",
",",
"repo",
"string",
")",
"*",
"plugins",
".",
"Approve",
"{",
"fullName",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
")",
"\n\n",
... |
5,440 | all-5441 | [
"isConfigTransportTLS",
"is",
"a",
"modified",
"copy",
"of",
"k8s",
".",
"io",
"/",
"kubernets",
"/",
"pkg",
"/",
"client",
"/",
"restclient",
".",
"IsConfigTransportTLS",
".",
"IsConfigTransportTLS",
"returns",
"true",
"if",
"and",
"only",
"if",
"the",
"provi... | [
"func",
"isConfigTransportTLS",
"(",
"config",
"restConfig",
")",
"bool",
"{",
"baseURL",
",",
"err",
":=",
"defaultServerURLFor",
"(",
"&",
"config",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"baseURL",
".",
... |
5,441 | all-5442 | [
"Dump",
"a",
"single",
"table",
"returning",
"a",
"SQL",
"text",
"containing",
"statements",
"for",
"its",
"schema",
"and",
"data",
"."
] | [
"func",
"dumpTable",
"(",
"tx",
"*",
"sql",
".",
"Tx",
",",
"table",
",",
"schema",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"statements",
":=",
"[",
"]",
"string",
"{",
"schema",
"}",
"\n\n",
"// Query all rows.",
"rows",
",",
"err",
":... |
5,442 | all-5443 | [
"NetworkGetInterface",
"returns",
"the",
"network",
"associated",
"with",
"the",
"interface",
"with",
"the",
"given",
"name",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"NetworkGetInterface",
"(",
"devName",
"string",
")",
"(",
"int64",
",",
"*",
"api",
".",
"Network",
",",
"error",
")",
"{",
"id",
":=",
"int64",
"(",
"-",
"1",
")",
"\n",
"name",
":=",
"\"",
"\"",
"\n",
"va... |
5,443 | all-5444 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Entry",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog4",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"re... |
5,444 | all-5445 | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"get",
"tasks",
"params"
] | [
"func",
"(",
"o",
"*",
"GetTasksParams",
")",
"WithContext",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"*",
"GetTasksParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
5,445 | all-5446 | [
"WithGeneratePreview",
"whether",
"preview",
"should",
"be",
"generated",
"for",
"the",
"result",
"."
] | [
"func",
"(",
"p",
"RunScriptParams",
")",
"WithGeneratePreview",
"(",
"generatePreview",
"bool",
")",
"*",
"RunScriptParams",
"{",
"p",
".",
"GeneratePreview",
"=",
"generatePreview",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
5,446 | all-5447 | [
"ListReviews",
"returns",
"all",
"reviews",
"on",
"a",
"pull",
"request",
".",
"Multiple",
"-",
"pages",
"of",
"results",
"consumes",
"multiple",
"API",
"tokens",
".",
"See",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"pu... | [
"func",
"(",
"c",
"*",
"Client",
")",
"ListReviews",
"(",
"org",
",",
"repo",
"string",
",",
"number",
"int",
")",
"(",
"[",
"]",
"Review",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
",",
"repo",
",",
"number",
")",
... |
5,447 | all-5448 | [
"genericRPC",
"handles",
"a",
"simple",
"request",
"/",
"response",
"RPC",
"."
] | [
"func",
"(",
"n",
"*",
"NetworkTransport",
")",
"genericRPC",
"(",
"id",
"ServerID",
",",
"target",
"ServerAddress",
",",
"rpcType",
"uint8",
",",
"args",
"interface",
"{",
"}",
",",
"resp",
"interface",
"{",
"}",
")",
"error",
"{",
"// Get a conn",
"conn"... |
5,448 | all-5449 | [
"byTag",
"is",
"a",
"template",
"func",
"that",
"takes",
"the",
"provided",
"services",
"and",
"produces",
"a",
"map",
"based",
"on",
"Service",
"tags",
".",
"The",
"map",
"key",
"is",
"a",
"string",
"representing",
"the",
"service",
"tag",
".",
"The",
"... | [
"func",
"byTag",
"(",
"in",
"interface",
"{",
"}",
")",
"(",
"map",
"[",
"string",
"]",
"[",
"]",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"m",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"[",
"]",
"interface",
"{",
"}",
")",
"\n\n",
... |
5,449 | all-5450 | [
"**************************************************************************************",
"\\",
"Matrix",
"operations",
"*",
"\\",
"***************************************************************************************",
"*******************************************************************************... | [
"func",
"(",
"src",
"*",
"IplImage",
")",
"Avg",
"(",
"<mask>",
"*",
"IplImage",
")",
"Scalar",
"{",
"return",
"(",
"Scalar",
")",
"(",
"C",
".",
"cvAvg",
"(",
"unsafe",
".",
"Pointer",
"(",
"src",
")",
",",
"unsafe",
".",
"Pointer",
"(",
"mask",
... |
5,450 | all-5451 | [
"GetAggregatorOk",
"returns",
"a",
"tuple",
"with",
"the",
"Aggregator",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequest",
")",
"GetAggregatorOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"Aggregator",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"r... |
5,451 | all-5452 | [
"TODO",
":",
"deprecate",
"/",
"config",
"/",
"local",
"/",
"log",
"in",
"v3",
".",
"5"
] | [
"func",
"logHandleFunc",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"if",
"!",
"allowMethod",
"(",
"w",
",",
"r",
",",
"\"",
"\"",
")",
"{",
"return",
"\n",
"}",
"\n\n",
"in",
":=",
"struct",
"{",
"L... |
5,452 | all-5453 | [
"NetworkInterfaceLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"NetworkInterfaceLocator",
"(",
"href",
"<mask>",
")",
"*",
"NetworkInterfaceLocator",
"{",
"return",
"&",
"NetworkInterfaceLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
5,453 | all-5454 | [
"AddHandlerBuilder",
"adds",
"a",
"builder",
"to",
"construct",
"handlers"
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"AddHandlerBuilder",
"(",
"<mask>",
"func",
"(",
"interface",
"{",
"}",
")",
"(",
"Handler",
",",
"error",
")",
")",
"{",
"r",
".",
"builders",
"=",
"append",
"(",
"r",
".",
"builders",
",",
"&",
"builder",
")"... |
5,454 | all-5455 | [
"Appender",
"implements",
"the",
"Storage",
"interface",
"."
] | [
"func",
"(",
"s",
"*",
"ReadyStorage",
")",
"Appender",
"(",
")",
"(",
"<mask>",
".",
"Appender",
",",
"error",
")",
"{",
"if",
"x",
":=",
"s",
".",
"get",
"(",
")",
";",
"x",
"!=",
"nil",
"{",
"return",
"x",
".",
"Appender",
"(",
")",
"\n",
... |
5,455 | all-5456 | [
"Ensure",
"makes",
"sure",
"that",
"the",
"actual",
"schema",
"in",
"the",
"given",
"database",
"matches",
"the",
"one",
"defined",
"by",
"our",
"updates",
".",
"All",
"updates",
"are",
"applied",
"transactionally",
".",
"In",
"case",
"any",
"error",
"occurs... | [
"func",
"(",
"s",
"*",
"Schema",
")",
"Ensure",
"(",
"db",
"*",
"sql",
".",
"DB",
")",
"(",
"int",
",",
"error",
")",
"{",
"var",
"current",
"int",
"\n",
"aborted",
":=",
"false",
"\n",
"err",
":=",
"query",
".",
"Transaction",
"(",
"db",
",",
... |
5,456 | all-5457 | [
"generateEmpty",
"generates",
"a",
"list",
"of",
"proto_library",
"rules",
"that",
"may",
"be",
"deleted",
".",
"This",
"is",
"generated",
"from",
"existing",
"proto_library",
"rules",
"with",
"srcs",
"lists",
"that",
"don",
"t",
"match",
"any",
"static",
"or"... | [
"func",
"generateEmpty",
"(",
"f",
"*",
"rule",
".",
"File",
",",
"regularFiles",
",",
"genFiles",
"[",
"]",
"string",
")",
"[",
"]",
"*",
"rule",
".",
"Rule",
"{",
"if",
"f",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"knownFiles",
":=",
... |
5,457 | all-5458 | [
"copy",
"a",
"three",
"-",
"dimensional",
"texture",
"subimage"
] | [
"func",
"CopyTexSubImage3D",
"(",
"target",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"zoffset",
"int32",
",",
"x",
"int32",
",",
"y",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
")",
"{",
"syscal... |
5,458 | all-5459 | [
"ForcePseudoState",
"ensures",
"that",
"the",
"given",
"node",
"will",
"have",
"specified",
"pseudo",
"-",
"classes",
"whenever",
"its",
"style",
"is",
"computed",
"by",
"the",
"browser",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
... | [
"func",
"ForcePseudoState",
"(",
"nodeID",
"cdp",
".",
"NodeID",
",",
"forcedPseudoClasses",
"[",
"]",
"<mask>",
")",
"*",
"ForcePseudoStateParams",
"{",
"return",
"&",
"ForcePseudoStateParams",
"{",
"NodeID",
":",
"nodeID",
",",
"ForcedPseudoClasses",
":",
"force... |
5,459 | all-5460 | [
"PushNote",
"pushes",
"a",
"note",
"with",
"title",
"and",
"body",
"to",
"a",
"specific",
"PushBullet",
"device",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"PushNote",
"(",
"iden",
"string",
",",
"title",
",",
"body",
"string",
")",
"error",
"{",
"data",
":=",
"Note",
"{",
"Iden",
":",
"iden",
",",
"Type",
":",
"\"",
"\"",
",",
"Title",
":",
"title",
",",
"Body"... |
5,460 | all-5461 | [
"Add",
"..."
] | [
"func",
"(",
"n",
"*",
"KNode",
")",
"Add",
"(",
"rs",
"[",
"]",
"rune",
")",
"{",
"cur",
":=",
"n",
"\n\n",
"for",
"k",
",",
"v",
":=",
"range",
"rs",
"{",
"link",
":=",
"cur",
".",
"linkByVal",
"(",
"v",
")",
"\n\n",
"if",
"link",
"==",
"... |
5,461 | all-5462 | [
"Open",
"wraps",
"an",
"io",
".",
"ReadCloser",
"around",
"the",
"snapshot",
"contents"
] | [
"func",
"(",
"m",
"*",
"InmemSnapshotStore",
")",
"Open",
"(",
"id",
"string",
")",
"(",
"*",
"SnapshotMeta",
",",
"io",
".",
"ReadCloser",
",",
"error",
")",
"{",
"m",
".",
"RLock",
"(",
")",
"\n",
"defer",
"m",
".",
"RUnlock",
"(",
")",
"\n\n",
... |
5,462 | all-5463 | [
"getKeys",
"reads",
"kdfcount",
"and",
"salt",
"from",
"b",
"and",
"returns",
"the",
"corresponding",
"encryption",
"keys",
"."
] | [
"func",
"(",
"a",
"*",
"archive50",
")",
"getKeys",
"(",
"b",
"*",
"readBuf",
")",
"(",
"keys",
"[",
"]",
"[",
"]",
"byte",
",",
"err",
"error",
")",
"{",
"if",
"len",
"(",
"*",
"b",
")",
"<",
"17",
"{",
"return",
"nil",
",",
"errCorruptEncrypt... |
5,463 | all-5464 | [
"Log",
"implements",
"the",
"Log",
"function",
"required",
"by",
"the",
"Backend",
"interface",
"."
] | [
"func",
"(",
"bf",
"*",
"backendFormatter",
")",
"Log",
"(",
"level",
"Level",
",",
"calldepth",
"int",
",",
"r",
"*",
"Record",
")",
"error",
"{",
"// Make a shallow copy of the record and replace any formatter",
"r2",
":=",
"*",
"r",
"\n",
"r2",
".",
"format... |
5,464 | all-5465 | [
"NetworkIDsNotPending",
"returns",
"a",
"map",
"associating",
"each",
"network",
"name",
"to",
"its",
"ID",
".",
"Pending",
"networks",
"are",
"skipped",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"NetworkIDsNotPending",
"(",
")",
"(",
"map",
"[",
"string",
"]",
"int64",
",",
"error",
")",
"{",
"networks",
":=",
"[",
"]",
"struct",
"{",
"id",
"int64",
"\n",
"name",
"string",
"\n",
"}",
"{",
"}",
"\n",... |
5,465 | all-5466 | [
"Query",
"the",
"db",
"for",
"information",
"about",
"containers",
"associated",
"with",
"the",
"given",
"profile",
"."
] | [
"func",
"getProfileContainersInfo",
"(",
"cluster",
"*",
"db",
".",
"Cluster",
",",
"project",
",",
"profile",
"string",
")",
"(",
"[",
"]",
"db",
".",
"ContainerArgs",
",",
"error",
")",
"{",
"// Query the db for information about containers associated with the",
"... |
5,466 | all-5467 | [
"AttachCdrom",
"attaches",
"a",
"CD",
"rom"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"AttachCdrom",
"(",
"dcid",
"string",
",",
"srvid",
"string",
",",
"cdid",
"string",
")",
"(",
"*",
"Image",
",",
"error",
")",
"{",
"data",
":=",
"struct",
"{",
"<mask>",
"string",
"`json:\"id,omitempty\"`",
"\n",
... |
5,467 | all-5468 | [
"GetFocusVAdjustment",
"is",
"a",
"wrapper",
"around",
"gtk_container_get_focus_vadjustment",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetFocusVAdjustment",
"(",
")",
"*",
"Adjustment",
"{",
"c",
":=",
"C",
".",
"gtk_container_get_focus_vadjustment",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",... |
5,468 | all-5469 | [
"title",
":",
"grant",
"access",
"to",
"app",
"path",
":",
"/",
"apps",
"/",
"{",
"app",
"}",
"/",
"teams",
"/",
"{",
"team",
"}",
"method",
":",
"PUT",
"responses",
":",
"200",
":",
"Access",
"granted",
"401",
":",
"Unauthorized",
"404",
":",
"App... | [
"func",
"grantAppAccess",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"appName",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
"(... |
5,469 | all-5470 | [
"GetNextPage",
"fetches",
"the",
"Page",
"at",
"fullUri",
"and",
"decodes",
"it",
"into",
"v",
".",
"fullUri",
"should",
"be",
"a",
"next_page_uri",
"returned",
"in",
"the",
"response",
"to",
"a",
"paging",
"request",
"and",
"should",
"be",
"the",
"full",
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetNextPage",
"(",
"ctx",
"context",
".",
"Context",
",",
"fullUri",
"string",
",",
"v",
"interface",
"{",
"}",
")",
"error",
"{",
"// for monitor etc.",
"if",
"strings",
".",
"HasPrefix",
"(",
"fullUri",
",",
"c",
... |
5,470 | all-5471 | [
"Render",
"writes",
"HTML",
"representing",
"this",
"Prefix",
"to",
"the",
"provided",
"output",
"."
] | [
"func",
"(",
"pfx",
"*",
"Prefix",
")",
"Render",
"(",
"out",
"http",
".",
"ResponseWriter",
",",
"inPath",
"string",
")",
"{",
"url",
":=",
"gcsPath",
"+",
"inPath",
"+",
"pfx",
".",
"Prefix",
"\n",
"htmlGridItem",
"(",
"out",
",",
"iconDir",
",",
"... |
5,471 | all-5472 | [
"newEncoding",
"constructs",
"a",
"new",
"encoding",
"defined",
"by",
"the",
"given",
"alphabet",
"which",
"must",
"be",
"a",
"32",
"-",
"byte",
"string",
"."
] | [
"func",
"newEncoding",
"(",
"encoder",
"string",
")",
"*",
"encoding",
"{",
"e",
":=",
"<mask>",
"(",
"encoding",
")",
"\n",
"e",
".",
"encode",
"=",
"encoder",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"e",
".",
"decode",
")",
";",... |
5,472 | all-5473 | [
"Split",
"a",
"string",
"in",
"two",
"parts",
"cleaning",
"any",
"whitespace",
"."
] | [
"func",
"split",
"(",
"str",
",",
"sep",
"string",
")",
"(",
"string",
",",
"string",
")",
"{",
"var",
"a",
",",
"b",
"string",
"\n",
"<mask>",
"parts",
"=",
"strings",
".",
"SplitN",
"(",
"str",
",",
"sep",
",",
"2",
")",
"\n",
"a",
"=",
"stri... |
5,473 | all-5474 | [
"HasTitle",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"ToplistDefinition",
")",
"HasTitle",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"Title",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
5,474 | all-5475 | [
"Sprintf",
"returns",
"formatted",
"string",
".",
"This",
"is",
"same",
"as",
"fmt",
".",
"Sprintf",
"but",
"uses",
"gstring",
"formatting",
"."
] | [
"func",
"Sprintm",
"(",
"format",
"string",
",",
"args",
"<mask>",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"string",
"{",
"f",
",",
"a",
":=",
"gformat",
"(",
"format",
",",
"args",
")",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"f",
",",... |
5,475 | all-5476 | [
"GetDontHave",
"retrieves",
"the",
"DontHave",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"StellarMessage",
")",
"GetDontHave",
"(",
")",
"(",
"result",
"DontHave",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"<mask>",
")",
")",
"\n\n",
"if",
"armName",
... |
5,476 | all-5477 | [
"GetCreateFlags",
"returns",
"the",
"mcnflag",
".",
"Flag",
"slice",
"representing",
"the",
"flags",
"that",
"can",
"be",
"set",
"their",
"descriptions",
"and",
"defaults",
"."
] | [
"func",
"(",
"d",
"*",
"SerialDriver",
")",
"GetCreateFlags",
"(",
")",
"[",
"]",
"mcnflag",
".",
"Flag",
"{",
"d",
".",
"Lock",
"(",
")",
"\n",
"defer",
"d",
".",
"Unlock",
"(",
")",
"\n",
"<mask>",
"d",
".",
"Driver",
".",
"GetCreateFlags",
"(",
... |
5,477 | all-5478 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetAllTimeSamplingProfileReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory14",
... |
5,478 | all-5479 | [
"refresh",
"refresh",
"store",
"to",
"redis"
] | [
"func",
"(",
"rp",
"*",
"redisProvider",
")",
"refresh",
"(",
"rs",
"*",
"redisStore",
")",
"error",
"{",
"var",
"err",
"error",
"\n",
"redisPool",
".",
"Exec",
"(",
"func",
"(",
"c",
"*",
"redis",
".",
"Client",
")",
"{",
"err",
"=",
"c",
".",
"... |
5,479 | all-5480 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetStackTraceReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger31",
"(",
"&",... |
5,480 | all-5481 | [
"ElementAt",
"retreives",
"an",
"item",
"at",
"a",
"particular",
"position",
"in",
"an",
"Enumerator",
"."
] | [
"func",
"(",
"iter",
"Enumerator",
")",
"ElementAt",
"(",
"n",
"uint",
")",
"<mask>",
"{",
"}",
"{",
"for",
"i",
":=",
"uint",
"(",
"0",
")",
";",
"i",
"<",
"n",
";",
"i",
"++",
"{",
"<-",
"iter",
"\n",
"}",
"\n",
"return",
"<-",
"iter",
"\n"... |
5,481 | all-5482 | [
"IsTerminal",
"returns",
"true",
"if",
"the",
"given",
"file",
"descriptor",
"is",
"a",
"terminal",
"."
] | [
"func",
"IsTerminal",
"(",
"fd",
"int",
")",
"bool",
"{",
"_",
",",
"err",
":=",
"GetState",
"(",
"fd",
")",
"\n",
"return",
"<mask>",
"==",
"nil",
"\n",
"}"
] |
5,482 | all-5483 | [
"handleBackup",
"handles",
"a",
"request",
"that",
"intends",
"to",
"do",
"a",
"backup",
"."
] | [
"func",
"handleBackup",
"(",
"c",
"*",
"cli",
".",
"Context",
")",
"error",
"{",
"var",
"srcWAL",
"string",
"\n",
"var",
"destWAL",
"string",
"\n\n",
"withV3",
":=",
"c",
".",
"Bool",
"(",
"\"",
"\"",
")",
"\n",
"srcSnap",
":=",
"filepath",
".",
"Joi... |
5,483 | all-5484 | [
"CreateContainerFromImage",
"is",
"a",
"convenience",
"function",
"to",
"make",
"it",
"easier",
"to",
"create",
"a",
"container",
"from",
"an",
"existing",
"image"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"CreateContainerFromImage",
"(",
"source",
"ImageServer",
",",
"image",
"api",
".",
"Image",
",",
"req",
"api",
".",
"ContainersPost",
")",
"(",
"RemoteOperation",
",",
"error",
")",
"{",
"// Set the minimal source fiel... |
5,484 | all-5485 | [
"IsGlob",
"checks",
"if",
"the",
"pattern",
"contains",
"a",
"glob",
"character"
] | [
"func",
"IsGlob",
"(",
"pattern",
"string",
")",
"bool",
"{",
"<mask>",
"=",
"clean",
"(",
"pattern",
")",
"\n",
"return",
"globRegex",
".",
"Match",
"(",
"[",
"]",
"byte",
"(",
"pattern",
")",
")",
"\n",
"}"
] |
5,485 | all-5486 | [
"GetDashboardListItems",
"fetches",
"the",
"dashboard",
"list",
"s",
"dashboard",
"definitions",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"GetDashboardListItems",
"(",
"<mask>",
"int",
")",
"(",
"[",
"]",
"DashboardListItem",
",",
"error",
")",
"{",
"var",
"out",
"reqDashboardListItems",
"\n",
"if",
"err",
":=",
"client",
".",
"doJsonRequest",
"(",
... |
5,486 | all-5487 | [
"determine",
"if",
"textures",
"are",
"loaded",
"in",
"texture",
"memory"
] | [
"func",
"AreTexturesResident",
"(",
"n",
"int32",
",",
"textures",
"*",
"uint32",
",",
"residences",
"*",
"bool",
")",
"bool",
"{",
"ret",
":=",
"C",
".",
"glowAreTexturesResident",
"(",
"gpAreTexturesResident",
",",
"(",
"C",
".",
"GLsizei",
")",
"(",
"n"... |
5,487 | all-5488 | [
"export",
"FileSequence_PaddingStyle"
] | [
"func",
"FileSequence_PaddingStyle",
"(",
"id",
"FileSeqId",
")",
"C",
".",
"int",
"{",
"<mask>",
",",
"ok",
":=",
"sFileSeqs",
".",
"Get",
"(",
"id",
")",
"\n",
"// caller must free string",
"if",
"!",
"ok",
"{",
"return",
"C",
".",
"int",
"(",
"fileseq... |
5,488 | all-5489 | [
"Derive",
"fetches",
"an",
"instrument",
"from",
"the",
"registry",
"or",
"creates",
"a",
"new",
"one",
".",
"If",
"another",
"instrument",
"type",
"is",
"already",
"registered",
"with",
"the",
"same",
"name",
"/",
"tags",
"a",
"blank",
"one",
"will",
"be"... | [
"func",
"(",
"r",
"*",
"Registry",
")",
"Derive",
"(",
"name",
"string",
",",
"tags",
"[",
"]",
"string",
",",
"v",
"float64",
")",
"*",
"Derive",
"{",
"factory",
":=",
"func",
"(",
")",
"<mask>",
"{",
"}",
"{",
"return",
"NewDerive",
"(",
"v",
"... |
5,489 | all-5490 | [
"cumulativeSubqueryOffset",
"returns",
"the",
"sum",
"of",
"range",
"and",
"offset",
"of",
"all",
"subqueries",
"in",
"the",
"path",
"."
] | [
"func",
"(",
"ng",
"*",
"Engine",
")",
"cumulativeSubqueryOffset",
"(",
"path",
"[",
"]",
"Node",
")",
"time",
".",
"Duration",
"{",
"var",
"subqOffset",
"time",
".",
"Duration",
"\n",
"for",
"_",
",",
"<mask>",
":=",
"range",
"path",
"{",
"switch",
"n... |
5,490 | all-5491 | [
"UnselectPath",
"is",
"a",
"wrapper",
"around",
"gtk_tree_selection_unselect_path",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TreeSelection",
")",
"UnselectPath",
"(",
"path",
"*",
"TreePath",
")",
"{",
"C",
".",
"gtk_tree_selection_unselect_path",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"native",
"(",
")",
")",
"\n",
"}"
] |
5,491 | all-5492 | [
"Delete",
"an",
"IP",
"address",
"from",
"an",
"interface",
".",
"This",
"is",
"identical",
"to",
":",
"ip",
"addr",
"del",
"$ip",
"/",
"$ipNet",
"dev",
"$iface"
] | [
"func",
"NetworkLinkDelIp",
"(",
"iface",
"*",
"<mask>",
".",
"Interface",
",",
"ip",
"net",
".",
"IP",
",",
"ipNet",
"*",
"net",
".",
"IPNet",
")",
"error",
"{",
"return",
"networkLinkIpAction",
"(",
"syscall",
".",
"RTM_DELADDR",
",",
"syscall",
".",
"... |
5,492 | all-5493 | [
"GetTask",
"-",
"wrapper",
"to",
"rest",
"call",
"to",
"GET",
"task",
"from",
"dispenser"
] | [
"func",
"(",
"s",
"*",
"PDClient",
")",
"GetTask",
"(",
"taskID",
"string",
")",
"(",
"task",
"TaskResponse",
",",
"res",
"*",
"http",
".",
"Response",
",",
"err",
"error",
")",
"{",
"req",
",",
"_",
":=",
"s",
".",
"createRequest",
"(",
"\"",
"\""... |
5,493 | all-5494 | [
"newVimSession",
"connects",
"the",
"VIM",
"SOAP",
"API",
"client",
"connection",
"."
] | [
"func",
"newVimSession",
"(",
"ctx",
"context",
".",
"Context",
",",
"u",
"*",
"url",
".",
"<mask>",
",",
"insecure",
"bool",
")",
"(",
"*",
"govmomi",
".",
"Client",
",",
"error",
")",
"{",
"logger",
".",
"Printf",
"(",
"\"",
"\"",
",",
"u",
".",
... |
5,494 | all-5495 | [
"Header",
"executes",
"the",
"header",
"section",
"of",
"the",
"template",
"."
] | [
"func",
"(",
"lens",
"Lens",
")",
"<mask>",
"(",
"artifacts",
"[",
"]",
"lenses",
".",
"Artifact",
",",
"resourceDir",
"string",
")",
"string",
"{",
"return",
"executeTemplate",
"(",
"resourceDir",
",",
"\"",
"\"",
",",
"BuildLogsView",
"{",
"}",
")",
"\... |
5,495 | all-5496 | [
"See",
"bcd",
".",
"Tracer",
".",
"AddClassifier",
"()",
"."
] | [
"func",
"(",
"t",
"*",
"BTTracer",
")",
"AddClassifier",
"(",
"options",
"[",
"]",
"string",
",",
"classifier",
"string",
")",
"[",
"]",
"string",
"{",
"return",
"t",
".",
"AddOptions",
"(",
"<mask>",
",",
"\"",
"\"",
",",
"classifier",
")",
"\n",
"}... |
5,496 | all-5497 | [
"writeServiceToCache",
"locks",
"specifically",
"to",
"alleviate",
"load",
"on",
"consul",
"some",
"additional",
"lock",
"time",
"is",
"preferable",
"to",
"extra",
"consul",
"calls"
] | [
"func",
"(",
"r",
"*",
"randomBalancer",
")",
"writeServiceToCache",
"(",
"serviceName",
"string",
")",
"(",
"[",
"]",
"*",
"balancer",
".",
"ServiceLocation",
",",
"error",
")",
"{",
"//acquire a write lock",
"r",
".",
"cacheLock",
".",
"Lock",
"(",
")",
... |
5,497 | all-5498 | [
"chooseDigestFromManifestList",
"parses",
"blob",
"as",
"a",
"schema2",
"manifest",
"list",
"and",
"returns",
"the",
"digest",
"of",
"the",
"image",
"appropriate",
"for",
"the",
"current",
"environment",
"."
] | [
"func",
"chooseDigestFromManifestList",
"(",
"sys",
"*",
"types",
".",
"SystemContext",
",",
"blob",
"[",
"]",
"<mask>",
")",
"(",
"digest",
".",
"Digest",
",",
"error",
")",
"{",
"wantedArch",
":=",
"runtime",
".",
"GOARCH",
"\n",
"if",
"sys",
"!=",
"ni... |
5,498 | all-5499 | [
"Create",
"creates",
"a",
"vsphere_virtual_machine",
"cdrom",
"sub",
"-",
"resource",
"."
] | [
"func",
"(",
"r",
"*",
"CdromSubresource",
")",
"Create",
"(",
"l",
"object",
".",
"VirtualDeviceList",
")",
"(",
"[",
"]",
"types",
".",
"BaseVirtualDeviceConfigSpec",
",",
"error",
")",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"r",
")",
"\n",... |
5,499 | all-5500 | [
"SetVertexBuffer",
"sets",
"a",
"buffer",
"for",
"the",
"vertex",
"shader",
"function",
"at",
"an",
"index",
"in",
"the",
"buffer",
"argument",
"table",
"with",
"an",
"offset",
"that",
"specifies",
"the",
"start",
"of",
"the",
"data",
".",
"Reference",
":",
... | [
"func",
"(",
"rce",
"RenderCommandEncoder",
")",
"SetVertexBuffer",
"(",
"buf",
"Buffer",
",",
"<mask>",
",",
"index",
"int",
")",
"{",
"C",
".",
"RenderCommandEncoder_SetVertexBuffer",
"(",
"rce",
".",
"commandEncoder",
",",
"buf",
".",
"buffer",
",",
"C",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.