id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
25,100 | all-25101 | [
"Do",
"executes",
"Target",
".",
"attachToBrowserTarget",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"sessionID",
"-",
"Id",
"assigned",
"to",
"the",
"session",
"."
] | [
"func",
"(",
"p",
"*",
"AttachToBrowserTargetParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"sessionID",
"SessionID",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"AttachToBrowserTargetReturns",
"\n",
"err",
"=",
"cdp",
"."... |
25,101 | all-25102 | [
"GetTextAlignOk",
"returns",
"a",
"tuple",
"with",
"the",
"TextAlign",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueDefinition",
")",
"GetTextAlignOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"q",
"==",
"nil",
"||",
"q",
".",
"TextAlign",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"retur... |
25,102 | all-25103 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SignedExchangeInfo",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork6",
"(",
"&",
"w",
",",
"v",
")"... |
25,103 | all-25104 | [
"MustAssetCode4",
"retrieves",
"the",
"AssetCode4",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"AllowTrustOpAsset",
")",
"MustAssetCode4",
"(",
")",
"[",
"4",
"]",
"byte",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetAssetCode4",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"... |
25,104 | all-25105 | [
"CacheRemoteFasthttpFunc",
"receives",
"a",
"fasthttp",
"handler",
"its",
"cache",
"expiration",
"and",
"the",
"remote",
"address",
"of",
"the",
"remote",
"cache",
"server",
"(",
"look",
"ListenAndServe",
")",
"returns",
"a",
"remote",
"-",
"cached",
"handler",
... | [
"func",
"CacheRemoteFasthttpFunc",
"(",
"bodyHandler",
"fasthttp",
".",
"RequestHandler",
",",
"expiration",
"<mask>",
".",
"Duration",
",",
"remoteServerAddr",
"string",
")",
"fasthttp",
".",
"RequestHandler",
"{",
"return",
"CacheRemoteFasthttp",
"(",
"bodyHandler",
... |
25,105 | all-25106 | [
"GetInvertOk",
"returns",
"a",
"tuple",
"with",
"the",
"Invert",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"ConditionalFormat",
")",
"GetInvertOk",
"(",
")",
"(",
"bool",
",",
"bool",
")",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"Invert",
"==",
"nil",
"{",
"return",
"false",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"c... |
25,106 | all-25107 | [
"UnmarshalXML",
"unmarshal",
"SOAPHeader"
] | [
"func",
"(",
"h",
"*",
"Header",
")",
"UnmarshalXML",
"(",
"d",
"*",
"xml",
".",
"Decoder",
",",
"start",
"xml",
".",
"StartElement",
")",
"error",
"{",
"var",
"(",
"token",
"xml",
".",
"Token",
"\n",
"err",
"error",
"\n",
")",
"\n",
"Loop",
":",
... |
25,107 | all-25108 | [
"Add",
"text",
"element",
"to",
"svg",
"and",
"returns",
"its",
"expected",
"width"
] | [
"func",
"(",
"gc",
"*",
"GraphicContext",
")",
"drawString",
"(",
"text",
"string",
",",
"drawType",
"drawType",
",",
"x",
",",
"y",
"float64",
")",
"float64",
"{",
"switch",
"gc",
".",
"svg",
".",
"FontMode",
"{",
"case",
"PathFontMode",
":",
"w",
":=... |
25,108 | all-25109 | [
"Self",
"-",
"Service",
"authenticator",
"first",
"creates",
"a",
"global",
"session",
"with",
"the",
"core",
"then",
"creates",
"a",
"local",
"session",
"with",
"self",
"-",
"service",
"."
] | [
"func",
"(",
"a",
"*",
"ssAuthenticator",
")",
"Sign",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"error",
"{",
"if",
"time",
".",
"Now",
"(",
")",
".",
"After",
"(",
"a",
".",
"refreshAt",
")",
"{",
"u",
":=",
"buildURL",
"(",
"a",
".",
"host... |
25,109 | all-25110 | [
"SetResponseHeaders",
"sets",
"the",
"response",
"headers",
"."
] | [
"func",
"(",
"c",
"headerCtx",
")",
"SetResponseHeaders",
"(",
"headers",
"map",
"[",
"string",
"]",
"string",
")",
"{",
"if",
"h",
":=",
"c",
".",
"<mask>",
"(",
")",
";",
"h",
"!=",
"nil",
"{",
"h",
".",
"respHeaders",
"=",
"headers",
"\n",
"retu... |
25,110 | all-25111 | [
"native",
"()",
"returns",
"a",
"pointer",
"to",
"the",
"underlying",
"GtkPrintContext",
"."
] | [
"func",
"(",
"pc",
"*",
"PrintContext",
")",
"native",
"(",
")",
"*",
"C",
".",
"GtkPrintContext",
"{",
"if",
"pc",
"==",
"nil",
"||",
"pc",
".",
"GObject",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"p",
":=",
"unsafe",
".",
"Pointer",
... |
25,111 | all-25112 | [
"controls",
"feedback",
"mode"
] | [
"func",
"FeedbackBuffer",
"(",
"size",
"int32",
",",
"xtype",
"uint32",
",",
"<mask>",
"*",
"float32",
")",
"{",
"C",
".",
"glowFeedbackBuffer",
"(",
"gpFeedbackBuffer",
",",
"(",
"C",
".",
"GLsizei",
")",
"(",
"size",
")",
",",
"(",
"C",
".",
"GLenum"... |
25,112 | all-25113 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StackTraceID",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1",
"(",
"&",
"w",
",",
"v",
")",
"\... |
25,113 | all-25114 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"ListInt16Option",
")",
"<mask>",
"(",
"value",
"string",
")",
"error",
"{",
"val",
":=",
"Int16Option",
"{",
"}",
"\n",
"val",
".",
"Set",
"(",
"value",
")",
"\n",
"*",
"o",
"=",
"append",
"(",
"*",
"o",
",",
"val",
")",
... |
25,114 | all-25115 | [
"newDockerContainerMetadataResolver",
"returns",
"a",
"new",
"instance",
"of",
"DockerContainerMetadataResolver",
"."
] | [
"func",
"newDockerContainerMetadataResolver",
"(",
"taskEngine",
"ecsengine",
".",
"TaskEngine",
")",
"(",
"*",
"DockerContainerMetadataResolver",
",",
"error",
")",
"{",
"dockerTaskEngine",
",",
"<mask>",
":=",
"taskEngine",
".",
"(",
"*",
"ecsengine",
".",
"Docker... |
25,115 | all-25116 | [
"SinceStart",
"returns",
"the",
"time",
"since",
"the",
"start",
"of",
"the",
"request",
".",
"If",
"there",
"is",
"no",
"request",
"state",
"then",
"the",
"fallback",
"is",
"returned",
"."
] | [
"func",
"(",
"<mask>",
"*",
"RequestState",
")",
"SinceStart",
"(",
"now",
"time",
".",
"Time",
",",
"fallback",
"time",
".",
"Duration",
")",
"time",
".",
"Duration",
"{",
"if",
"rs",
"==",
"nil",
"{",
"return",
"fallback",
"\n",
"}",
"\n",
"return",
... |
25,116 | all-25117 | [
"Applies",
"various",
"transformations",
"necessary",
"for",
"the",
"other",
"subsequent",
"stemming",
"steps",
".",
"Most",
"important",
"of",
"which",
"is",
"defining",
"the",
"two",
"regions",
"R1",
"&",
"R2",
"."
] | [
"func",
"preprocess",
"(",
"word",
"*",
"snowballword",
".",
"SnowballWord",
")",
"{",
"// Clean up apostrophes",
"normalizeApostrophes",
"(",
"word",
")",
"\n",
"trimLeftApostrophes",
"(",
"word",
")",
"\n\n",
"// Capitalize Y's that are not behaving",
"// as vowels.",
... |
25,117 | all-25118 | [
"Parameter",
"callback",
"has",
"type",
"C",
".",
"GLDEBUGPROCARB",
"."
] | [
"func",
"DebugMessageCallbackARB",
"(",
"<mask>",
"unsafe",
".",
"Pointer",
",",
"userParam",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpDebugMessageCallbackARB",
",",
"2",
",",
"syscall",
".",
"NewCallback",
"(",
"callback",
")",
"... |
25,118 | all-25119 | [
"UInt64ToBytes",
"unwrap",
"uint64",
"value",
"to",
"byte",
"array",
"of",
"length",
"8",
"using",
"big",
"endian"
] | [
"func",
"UInt64ToBytes",
"(",
"value",
"uint64",
")",
"[",
"]",
"byte",
"{",
"result",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"8",
")",
"\n",
"binary",
".",
"BigEndian",
".",
"PutUint64",
"(",
"<mask>",
",",
"value",
")",
"\n\n",
"return",
"result... |
25,119 | all-25120 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ScriptPosition",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger22",
"(",
"&",
"w",
",",
"v",
")",
... |
25,120 | all-25121 | [
"Reservoir",
"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",
"... | [
"func",
"(",
"r",
"*",
"Registry",
")",
"Reservoir",
"(",
"name",
"string",
",",
"tags",
"[",
"]",
"string",
")",
"*",
"Reservoir",
"{",
"factory",
":=",
"func",
"(",
")",
"interface",
"{",
"}",
"{",
"return",
"NewReservoir",
"(",
")",
"}",
"\n",
"... |
25,121 | all-25122 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetObjectByHeapObjectIDReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler11... |
25,122 | all-25123 | [
"Copied",
"from",
"go",
"/",
"build",
".",
"safeCgoName"
] | [
"func",
"safeCgoName",
"(",
"s",
"string",
",",
"spaces",
"bool",
")",
"bool",
"{",
"if",
"s",
"==",
"\"",
"\"",
"{",
"return",
"false",
"\n",
"}",
"\n",
"safe",
":=",
"safeBytes",
"\n",
"if",
"!",
"spaces",
"{",
"<mask>",
"=",
"safe",
"[",
"len",
... |
25,123 | all-25124 | [
"Do",
"executes",
"Page",
".",
"navigateToHistoryEntry",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"NavigateToHistoryEntryParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandNavigateToHistoryEntry",
",",
"p",
",",
"nil",
")",
"\n"... |
25,124 | all-25125 | [
"CreateIndex",
"creates",
"an",
"index",
"on",
"the",
"server",
"using",
"the",
"given",
"Index",
"struct",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"CreateIndex",
"(",
"index",
"*",
"Index",
")",
"error",
"{",
"span",
":=",
"c",
".",
"tracer",
".",
"StartSpan",
"(",
"\"",
"\"",
")",
"\n",
"defer",
"span",
".",
"Finish",
"(",
")",
"\n\n",
"data",
":=",
"[... |
25,125 | all-25126 | [
"Executes",
"what",
"s",
"in",
"st",
".",
"sa"
] | [
"func",
"txFunCallOmni",
"(",
"st",
"*",
"State",
")",
"{",
"t",
":=",
"reflect",
".",
"ValueOf",
"(",
"st",
".",
"sa",
")",
"\n",
"<mask>",
"t",
".",
"Kind",
"(",
")",
"{",
"case",
"reflect",
".",
"Int",
":",
"// If it's an int, assume that it's a MACRO... |
25,126 | all-25127 | [
"/",
"*"
] | [
"func",
"ComputeBTCAddress",
"(",
"pubKeyHex",
"string",
",",
"chainCodeHex",
"string",
",",
"path",
"string",
",",
"index",
"int32",
")",
"string",
"{",
"pubKeyBytes",
":=",
"DerivePublicKeyForPath",
"(",
"HexDecode",
"(",
"pubKeyHex",
")",
",",
"HexDecode",
"(... |
25,127 | all-25128 | [
"Get",
"a",
"value",
"from",
"the",
"ENV",
".",
"If",
"it",
"doesn",
"t",
"exist",
"an",
"error",
"will",
"be",
"returned"
] | [
"func",
"MustGet",
"(",
"key",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"gil",
".",
"RLock",
"(",
")",
"\n",
"defer",
"gil",
".",
"RUnlock",
"(",
")",
"\n",
"if",
"v",
",",
"ok",
":=",
"env",
"[",
"<mask>",
"]",
";",
"ok",
"{",
"... |
25,128 | all-25129 | [
"IsUnexportedField",
"returns",
"whether",
"the",
"field",
"is",
"unexported",
".",
"This",
"function",
"is",
"to",
"avoid",
"the",
"bug",
"in",
"versions",
"older",
"than",
"Go1",
".",
"3",
".",
"See",
"following",
"links",
":",
"https",
":",
"//",
"code"... | [
"func",
"IsUnexportedField",
"(",
"field",
"reflect",
".",
"StructField",
")",
"bool",
"{",
"return",
"!",
"(",
"field",
".",
"PkgPath",
"==",
"\"",
"\"",
"&&",
"unicode",
".",
"IsUpper",
"(",
"rune",
"(",
"field",
".",
"<mask>",
"[",
"0",
"]",
")",
... |
25,129 | all-25130 | [
"Requires",
"an",
"*",
"apicontainer",
".",
"Container",
"and",
"returns",
"the",
"Resources",
"for",
"the",
"HostConfig",
"struct"
] | [
"func",
"(",
"task",
"*",
"<mask>",
")",
"getDockerResources",
"(",
"container",
"*",
"apicontainer",
".",
"Container",
")",
"dockercontainer",
".",
"Resources",
"{",
"// Convert MB to B and set Memory",
"dockerMem",
":=",
"int64",
"(",
"container",
".",
"Memory",
... |
25,130 | all-25131 | [
"modulo",
"returns",
"the",
"modulo",
"of",
"b",
"from",
"a",
"."
] | [
"func",
"modulo",
"(",
"b",
",",
"a",
"interface",
"{",
"}",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"av",
":=",
"reflect",
".",
"ValueOf",
"(",
"a",
")",
"\n",
"bv",
":=",
"reflect",
".",
"ValueOf",
"(",
"b",
")",
"\n\n",
"swi... |
25,131 | all-25132 | [
"On",
"enables",
"maintenance",
"."
] | [
"func",
"(",
"s",
"*",
"MemoryStore",
")",
"On",
"(",
")",
"(",
"changed",
"bool",
",",
"err",
"error",
")",
"{",
"s",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"s",
".",
"<mask>",... |
25,132 | all-25133 | [
"RawQuery",
"creates",
"a",
"query",
"with",
"the",
"given",
"string",
".",
"Note",
"that",
"the",
"query",
"is",
"not",
"validated",
"before",
"sending",
"to",
"the",
"server",
"."
] | [
"func",
"(",
"idx",
"*",
"<mask>",
")",
"RawQuery",
"(",
"query",
"string",
")",
"*",
"PQLBaseQuery",
"{",
"q",
":=",
"NewPQLBaseQuery",
"(",
"query",
",",
"idx",
",",
"nil",
")",
"\n",
"// NOTE: raw queries always assumed to have keys set",
"q",
".",
"hasKeys... |
25,133 | all-25134 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"InflationResultCode"
] | [
"func",
"(",
"e",
"InflationResultCode",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"<mask>",
":=",
"inflationResultCodeMap",
"[",
"v",
"]",
"\n",
"return",
"ok",
"\n",
"}"
] |
25,134 | all-25135 | [
"New",
"creates",
"a",
"new",
"TupleType",
"with",
"the",
"given",
"namespace",
"and",
"type",
"name"
] | [
"func",
"New",
"(",
"namespace",
"string",
",",
"name",
"string",
")",
"(",
"t",
"TupleType",
")",
"{",
"hash",
":=",
"syncHash",
".",
"Hash",
"(",
"[",
"]",
"byte",
"(",
"name",
")",
")",
"\n",
"ns_hash",
":=",
"syncHash",
".",
"Hash",
"(",
"[",
... |
25,135 | all-25136 | [
"PublicationLineageLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"PublicationLineageLocator",
"(",
"href",
"string",
")",
"*",
"PublicationLineageLocator",
"{",
"<mask>",
"&",
"PublicationLineageLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"
] |
25,136 | all-25137 | [
"Group",
"takes",
"a",
"path",
"which",
"typically",
"a",
"prefix",
"for",
"an",
"endpoint",
"It",
"will",
"call",
"callback",
"function",
"with",
"a",
"group",
"router",
"which",
"you",
"can",
"add",
"handler",
"for",
"different",
"request",
"methods"
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"Group",
"(",
"path",
"string",
",",
"fn",
"func",
"(",
"r",
"*",
"GroupRouter",
")",
")",
"{",
"gr",
":=",
"NewGroupRouter",
"(",
"r",
",",
"<mask>",
")",
"\n",
"fn",
"(",
"gr",
")",
"\n",
"}"
] |
25,137 | all-25138 | [
"export",
"FileSequence_End"
] | [
"func",
"FileSequence_End",
"(",
"id",
"FileSeqId",
")",
"C",
".",
"int",
"{",
"fs",
",",
"ok",
":=",
"sFileSeqs",
".",
"Get",
"(",
"id",
")",
"\n",
"if",
"!",
"<mask>",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"C",
".",
"int",
"(",
"fs",
... |
25,138 | all-25139 | [
"RestoreFrom",
"restores",
"state",
"from",
"another",
"cluster",
"which",
"can",
"be",
"access",
"through",
"otherC",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"RestoreFrom",
"(",
"<mask>",
"bool",
",",
"otherC",
"*",
"APIClient",
")",
"(",
"retErr",
"error",
")",
"{",
"restoreClient",
",",
"err",
":=",
"c",
".",
"AdminAPIClient",
".",
"Restore",
"(",
"c",
".",
"Ctx",
"(",
... |
25,139 | all-25140 | [
"GetStatusOk",
"returns",
"a",
"tuple",
"with",
"the",
"Status",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GroupData",
")",
"GetStatusOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"Status",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"g",... |
25,140 | all-25141 | [
"/",
"*",
"CreateCheckBox",
"creates",
"a",
"new",
"CheckBox",
"control",
".",
"parent",
"-",
"is",
"container",
"that",
"keeps",
"the",
"control",
".",
"The",
"same",
"View",
"can",
"be",
"a",
"view",
"and",
"a",
"parent",
"at",
"the",
"same",
"time",
... | [
"func",
"CreateCheckBox",
"(",
"parent",
"Control",
",",
"width",
"int",
",",
"<mask>",
"string",
",",
"scale",
"int",
")",
"*",
"CheckBox",
"{",
"c",
":=",
"new",
"(",
"CheckBox",
")",
"\n",
"c",
".",
"BaseControl",
"=",
"NewBaseControl",
"(",
")",
"\... |
25,141 | all-25142 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StopSamplingParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler3",
"(",
"... |
25,142 | all-25143 | [
"Add",
"will",
"block",
"until",
"the",
"number",
"of",
"goroutines",
"being",
"throttled",
"has",
"fallen",
"below",
"the",
"throttle",
"."
] | [
"func",
"(",
"w",
"*",
"WaitGroup",
")",
"Add",
"(",
")",
"{",
"w",
".",
"outstanding",
"++",
"\n",
"if",
"w",
".",
"outstanding",
">",
"w",
".",
"throttle",
"{",
"select",
"{",
"<mask>",
"<-",
"w",
".",
"completed",
":",
"w",
".",
"outstanding",
... |
25,143 | all-25144 | [
"Based",
"on",
"https",
":",
"//",
"developers",
".",
"google",
".",
"com",
"/",
"protocol",
"-",
"buffers",
"/",
"docs",
"/",
"reference",
"/",
"proto3",
"-",
"spec"
] | [
"func",
"buildProtoRegexp",
"(",
")",
"*",
"regexp",
".",
"Regexp",
"{",
"hexEscape",
":=",
"`\\\\[xX][0-9a-fA-f]{2}`",
"\n",
"octEscape",
":=",
"`\\\\[0-7]{3}`",
"\n",
"charEscape",
":=",
"`\\\\[abfnrtv'\"\\\\]`",
"\n",
"charValue",
":=",
"strings",
".",
"Join",
... |
25,144 | all-25145 | [
"FindBaseProfile",
"finds",
"the",
"coverage",
"profile",
"file",
"from",
"the",
"latest",
"healthy",
"build",
"stored",
"in",
"given",
"gcs",
"directory"
] | [
"func",
"FindBaseProfile",
"(",
"ctx",
"context",
".",
"Context",
",",
"<mask>",
"*",
"storage",
".",
"Client",
",",
"bucket",
",",
"prowJobName",
",",
"artifactsDirName",
",",
"covProfileName",
"string",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",... |
25,145 | all-25146 | [
"Do",
"executes",
"DOM",
".",
"undo",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"UndoParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandUndo",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
25,146 | all-25147 | [
"Create",
"creates",
"an",
"instance",
"of",
"the",
"type",
"of",
"the",
"given",
"parameter"
] | [
"func",
"(",
"di",
"*",
"dependencyInjector",
")",
"Create",
"(",
"avar",
"<mask>",
"{",
"}",
")",
"interface",
"{",
"}",
"{",
"varType",
":=",
"reflect",
".",
"TypeOf",
"(",
"avar",
")",
"\n\n",
"if",
"di",
".",
"caching",
"{",
"return",
"di",
".",
... |
25,147 | all-25148 | [
"PrettyPrintAsJSON",
"marshalles",
"input",
"as",
"indented",
"JSON",
"and",
"calles",
"fmt",
".",
"Println",
"with",
"the",
"result",
".",
"If",
"indent",
"arguments",
"are",
"given",
"they",
"are",
"joined",
"into",
"a",
"string",
"and",
"used",
"as",
"JSO... | [
"func",
"PrettyPrintAsJSON",
"(",
"input",
"interface",
"{",
"}",
",",
"indent",
"...",
"string",
")",
"error",
"{",
"<mask>",
"indentStr",
"string",
"\n",
"if",
"len",
"(",
"indent",
")",
"==",
"0",
"{",
"indentStr",
"=",
"\"",
"\"",
"\n",
"}",
"else"... |
25,148 | all-25149 | [
"GetMax",
"returns",
"the",
"Max",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetAxis",
")",
"GetMax",
"(",
")",
"<mask>",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Max",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"Max",
"\n",
"}"
] |
25,149 | all-25150 | [
"Fetch",
"returns",
"an",
"instrument",
"from",
"the",
"Registry",
"or",
"creates",
"a",
"new",
"one",
"using",
"the",
"provided",
"factory",
"."
] | [
"func",
"(",
"r",
"*",
"Registry",
")",
"Fetch",
"(",
"name",
"string",
",",
"tags",
"[",
"]",
"string",
",",
"factory",
"func",
"(",
")",
"interface",
"{",
"}",
")",
"interface",
"{",
"}",
"{",
"key",
":=",
"MetricID",
"(",
"name",
",",
"tags",
... |
25,150 | all-25151 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RedoParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom17",
"(",
"&",
"w",
",",
"v",
")",
"\n",
... |
25,151 | all-25152 | [
"Used",
"to",
"print",
"tokens"
] | [
"func",
"(",
"t",
"Token",
")",
"String",
"(",
")",
"string",
"{",
"switch",
"t",
".",
"Type",
"{",
"case",
"TokenEOF",
":",
"return",
"\"",
"\"",
"\n",
"case",
"TokenError",
":",
"return",
"t",
".",
"Value",
"\n",
"}",
"\n",
"if",
"len",
"(",
"t... |
25,152 | all-25153 | [
"NewTCPCryptoState",
"returns",
"a",
"valid",
"TCPCryptoState",
"."
] | [
"func",
"newTCPCryptoState",
"(",
"sessionKey",
"*",
"[",
"32",
"]",
"<mask>",
",",
"outbound",
"bool",
")",
"*",
"tcpCryptoState",
"{",
"s",
":=",
"&",
"tcpCryptoState",
"{",
"sessionKey",
":",
"sessionKey",
"}",
"\n",
"if",
"outbound",
"{",
"s",
".",
"... |
25,153 | all-25154 | [
"render",
"multiple",
"instances",
"of",
"primitives",
"using",
"a",
"count",
"derived",
"from",
"a",
"specifed",
"stream",
"of",
"a",
"transform",
"feedback",
"object"
] | [
"func",
"DrawTransformFeedbackStreamInstanced",
"(",
"mode",
"uint32",
",",
"id",
"uint32",
",",
"stream",
"uint32",
",",
"instancecount",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpDrawTransformFeedbackStreamInstanced",
",",
"4",
",",
"uintptr",
"(",
... |
25,154 | all-25155 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"RightScript",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"RightScriptLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
"return",
"... |
25,155 | all-25156 | [
"GetTitle",
"returns",
"the",
"Title",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"m",
"*",
"ManageStatusDefinition",
")",
"GetTitle",
"(",
")",
"<mask>",
"{",
"if",
"m",
"==",
"nil",
"||",
"m",
".",
"Title",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"m",
".",
"Title",
"\n",
"}"
] |
25,156 | all-25157 | [
"Load",
"loads",
"the",
"ByteCode",
"for",
"template",
"specified",
"by",
"key",
"which",
"for",
"this",
"ByteCodeLoader",
"is",
"the",
"path",
"to",
"the",
"template",
"we",
"want",
".",
"If",
"cached",
"vm",
".",
"ByteCode",
"struct",
"is",
"found",
"it"... | [
"func",
"(",
"l",
"*",
"CachedByteCodeLoader",
")",
"Load",
"(",
"key",
"string",
")",
"(",
"bc",
"*",
"vm",
".",
"ByteCode",
",",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"bc",
"!=",
"nil",
"&&",
"err",
"==",
"nil",
"&&",
... |
25,157 | all-25158 | [
"isConnectedSince",
"checks",
"whether",
"the",
"local",
"member",
"is",
"connected",
"to",
"the",
"remote",
"member",
"since",
"the",
"given",
"time",
"."
] | [
"func",
"isConnectedSince",
"(",
"transport",
"rafthttp",
".",
"Transporter",
",",
"since",
"time",
".",
"Time",
",",
"remote",
"types",
".",
"<mask>",
")",
"bool",
"{",
"t",
":=",
"transport",
".",
"ActiveSince",
"(",
"remote",
")",
"\n",
"return",
"!",
... |
25,158 | all-25159 | [
"HasPrecision",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TileDef",
")",
"HasPrecision",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"Precision",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
25,159 | all-25160 | [
"DrawImage",
"draws",
"the",
"raster",
"image",
"in",
"the",
"current",
"canvas"
] | [
"func",
"(",
"gc",
"*",
"GraphicContext",
")",
"DrawImage",
"(",
"img",
"image",
".",
"Image",
")",
"{",
"DrawImage",
"(",
"img",
",",
"gc",
".",
"img",
",",
"gc",
".",
"Current",
".",
"Tr",
",",
"<mask>",
".",
"Over",
",",
"BilinearFilter",
")",
"... |
25,160 | all-25161 | [
"MustCreateStore",
"will",
"dial",
"the",
"passed",
"database",
"and",
"return",
"a",
"new",
"store",
".",
"It",
"will",
"panic",
"if",
"the",
"initial",
"connection",
"failed",
"."
] | [
"func",
"MustCreateStore",
"(",
"uri",
"string",
")",
"*",
"Store",
"{",
"<mask>",
",",
"err",
":=",
"CreateStore",
"(",
"uri",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"err",
")",
"\n",
"}",
"\n\n",
"return",
"store",
"\n",
"}"
] |
25,161 | all-25162 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SamplingProfileNode",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory4",
"(",
"&",
... |
25,162 | all-25163 | [
"Do",
"executes",
"ServiceWorker",
".",
"stopWorker",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"StopWorkerParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStopWorker",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
25,163 | all-25164 | [
"False",
"checks",
"a",
"value",
"is",
"false",
"."
] | [
"func",
"False",
"(",
"tb",
"testing",
".",
"TB",
",",
"value",
"bool",
",",
"msgAndArgs",
"...",
"interface",
"{",
"}",
")",
"{",
"tb",
".",
"Helper",
"(",
")",
"\n",
"if",
"<mask>",
"{",
"fatal",
"(",
"tb",
",",
"msgAndArgs",
",",
"\"",
"\"",
"... |
25,164 | all-25165 | [
"AddFlags",
"adds",
"kube",
"client",
"flags",
"to",
"existing",
"FlagSet",
"."
] | [
"func",
"(",
"o",
"*",
"KubernetesClientOptions",
")",
"AddFlags",
"(",
"fs",
"*",
"flag",
".",
"FlagSet",
")",
"{",
"fs",
".",
"StringVar",
"(",
"&",
"o",
".",
"namespace",
",",
"\"",
"\"",
",",
"v1",
".",
"NamespaceDefault",
",",
"\"",
"\"",
")",
... |
25,165 | all-25166 | [
"HasResource",
"tells",
"if",
"current",
"client",
"holds",
"any",
"resources"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"HasResource",
"(",
")",
"bool",
"{",
"<mask>",
",",
"_",
":=",
"c",
".",
"storage",
".",
"List",
"(",
")",
"\n",
"return",
"len",
"(",
"resources",
")",
">",
"0",
"\n",
"}"
] |
25,166 | all-25167 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetDocumentCookieDisabledParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation11",
... |
25,167 | all-25168 | [
"NewCentosCluster",
"creates",
"a",
"simple",
"CentOS",
"Amazon",
"cluster"
] | [
"func",
"NewCentosCluster",
"(",
"name",
"string",
")",
"*",
"cluster",
".",
"Cluster",
"{",
"controlPlaneProviderConfig",
":=",
"&",
"cluster",
".",
"ControlPlaneProviderConfig",
"{",
"Cloud",
":",
"cluster",
".",
"CloudAmazon",
",",
"Location",
":",
"\"",
"\""... |
25,168 | all-25169 | [
"NewMockDockerClient",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockDockerClient",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockDockerClient",
"{",
"mock",
":=",
"&",
"MockDockerClient",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockDockerClientMockRecorder",
"{",
"... |
25,169 | all-25170 | [
"Get",
"an",
"item",
"from",
"the",
"cache",
".",
"Returns",
"the",
"item",
"or",
"nil",
"and",
"a",
"bool",
"indicating",
"whether",
"the",
"key",
"was",
"found",
"."
] | [
"func",
"(",
"c",
"*",
"cache",
")",
"Get",
"(",
"k",
"string",
")",
"(",
"interface",
"{",
"}",
",",
"bool",
")",
"{",
"c",
".",
"mu",
".",
"RLock",
"(",
")",
"\n",
"// \"Inlining\" of get and Expired",
"item",
",",
"found",
":=",
"c",
".",
"items... |
25,170 | all-25171 | [
"HasUnit",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"HasUnit",
"(",
")",
"bool",
"{",
"if",
"w",
"!=",
"nil",
"&&",
"w",
".",
"Unit",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
25,171 | all-25172 | [
"Save",
"mail",
"notifier",
"adds",
"a",
"new",
"mail",
"notifier",
"it",
"replaces",
"the",
"existing",
"one",
"if",
"there",
"is",
"already",
"a",
"notifier",
"available",
"."
] | [
"func",
"(",
"m",
"MongoDb",
")",
"SaveMailNotifier",
"(",
"ctxt",
"string",
",",
"notifier",
"<mask>",
".",
"MailNotifier",
")",
"error",
"{",
"c",
":=",
"m",
".",
"Connect",
"(",
"models",
".",
"COLL_NAME_MAIL_NOTIFIER",
")",
"\n",
"defer",
"m",
".",
"... |
25,172 | all-25173 | [
"title",
":",
"get",
"autoscale",
"config",
"path",
":",
"/",
"autoscale",
"/",
"config",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"Ok",
"401",
":",
"Unauthorized"
] | [
"func",
"autoScaleGetConfig",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"allowedGetConfig",
":=",
"permission",
".",
"Check",
"(",
"t",
",",
"permission",
".",
"Perm... |
25,173 | all-25174 | [
"IsSuppressed",
"reports",
"true",
"if",
"level",
"should",
"be",
"suppressed",
"."
] | [
"func",
"(",
"w",
"*",
"Writer",
")",
"IsSuppressed",
"(",
"level",
"string",
")",
"bool",
"{",
"_",
",",
"<mask>",
":=",
"w",
".",
"suppressMap",
"[",
"level",
"]",
"\n",
"return",
"ok",
"\n",
"}"
] |
25,174 | all-25175 | [
"NewGroup",
"creates",
"a",
"new",
"broadcast",
"group",
"."
] | [
"func",
"NewGroup",
"(",
")",
"*",
"Group",
"{",
"in",
":=",
"make",
"(",
"chan",
"Message",
")",
"\n",
"<mask>",
":=",
"make",
"(",
"chan",
"bool",
")",
"\n",
"return",
"&",
"Group",
"{",
"in",
":",
"in",
",",
"close",
":",
"close",
",",
"clock"... |
25,175 | all-25176 | [
"NetworkOptionGroupAttachmentLocator",
"builds",
"a",
"locator",
"from",
"the",
"given",
"href",
"."
] | [
"func",
"(",
"api",
"*",
"API",
")",
"NetworkOptionGroupAttachmentLocator",
"(",
"href",
"string",
")",
"*",
"NetworkOptionGroupAttachmentLocator",
"{",
"<mask>",
"&",
"NetworkOptionGroupAttachmentLocator",
"{",
"Href",
"(",
"href",
")",
",",
"api",
"}",
"\n",
"}"... |
25,176 | all-25177 | [
"AddDashboardListItems",
"adds",
"dashboards",
"to",
"an",
"existing",
"dashboard",
"list",
".",
"Any",
"items",
"already",
"in",
"the",
"list",
"are",
"ignored",
"(",
"not",
"added",
"twice",
")",
"."
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"AddDashboardListItems",
"(",
"dashboardListId",
"int",
",",
"items",
"[",
"]",
"DashboardListItem",
")",
"(",
"[",
"]",
"DashboardListItem",
",",
"error",
")",
"{",
"req",
":=",
"reqDashboardListItems",
"{",
"items",... |
25,177 | all-25178 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"TakeCoverageDeltaReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss1",
"(",
"&",
"w",
",",
"v",
"... |
25,178 | all-25179 | [
"GetEd25519",
"retrieves",
"the",
"Ed25519",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"PublicKey",
")",
"GetEd25519",
"(",
")",
"(",
"result",
"Uint256",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",
"armName",
"==",
... |
25,179 | all-25180 | [
"DecodeMap",
"provides",
"the",
"implementation",
"of",
"the",
"algorithm",
"for",
"decoding",
"maps",
"where",
"f",
"is",
"called",
"to",
"decode",
"each",
"pair",
"of",
"key",
"and",
"value",
".",
"The",
"function",
"f",
"is",
"expected",
"to",
"decode",
... | [
"func",
"(",
"d",
"Decoder",
")",
"DecodeMap",
"(",
"f",
"func",
"(",
"Decoder",
",",
"Decoder",
")",
"error",
")",
"(",
"err",
"error",
")",
"{",
"var",
"typ",
"Type",
"\n\n",
"if",
"d",
".",
"off",
"!=",
"0",
"{",
"if",
"d",
".",
"off",
",",
... |
25,180 | all-25181 | [
"Returns",
"the",
"value",
"of",
"a",
"uniform",
"variable"
] | [
"func",
"GetUniformfv",
"(",
"program",
"uint32",
",",
"location",
"int32",
",",
"params",
"*",
"float32",
")",
"{",
"C",
".",
"glowGetUniformfv",
"(",
"gpGetUniformfv",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"program",
")",
",",
"(",
"C",
".",
"GLint... |
25,181 | all-25182 | [
"EncodeValue",
"signs",
"and",
"encodes",
"a",
"cookie",
"value"
] | [
"func",
"(",
"c",
"CookieSigner",
")",
"EncodeValue",
"(",
"<mask>",
"string",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"base64",
".",
"URLEncoding",
".",
"EncodeToString",
"(",
"c",
".",
"mac",
"(",
"value",
")",
")",... |
25,182 | all-25183 | [
"HasTimestamp",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"Check",
")",
"HasTimestamp",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"Timestamp",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
25,183 | all-25184 | [
"/",
"*",
"Routine",
"which",
"helps",
"us",
"to",
"create",
"global",
"dict",
"of",
"msg",
"types"
] | [
"func",
"CreateMsgType",
"(",
"alist",
"[",
"]",
"AttrListTuple",
",",
"familyId",
"uint16",
")",
"MessageType",
"{",
"if",
"v",
",",
"exists",
":=",
"Family2MT",
"[",
"familyId",
"]",
";",
"exists",
"{",
"return",
"*",
"v",
"\n",
"}",
"\n",
"<mask>",
... |
25,184 | all-25185 | [
"GetPaperWidth",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_paper_width",
"()",
"."
] | [
"func",
"(",
"ps",
"*",
"PrintSettings",
")",
"GetPaperWidth",
"(",
"unit",
"Unit",
")",
"float64",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_paper_width",
"(",
"<mask>",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkUnit",
"(",
"unit",
")",
")",
... |
25,185 | all-25186 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"CaptureScreenshotParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage80",
"(",
"&"... |
25,186 | all-25187 | [
"SetCanonical",
"sets",
"the",
"given",
"key",
":",
"value",
"header",
"assuming",
"that",
"key",
"is",
"in",
"canonical",
"form",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"SetCanonical",
"(",
"key",
",",
"value",
"[",
"]",
"byte",
")",
"{",
"h",
".",
"parseRawHeaders",
"(",
")",
"\n",
"switch",
"string",
"(",
"key",
")",
"{",
"case",
"\"",
"\"",
":",
"h",
".",
"SetHostByt... |
25,187 | all-25188 | [
"NewFuncDepot",
"creates",
"a",
"new",
"FuncDepot",
"under",
"the",
"given",
"namespace"
] | [
"func",
"NewFuncDepot",
"(",
"namespace",
"string",
")",
"*",
"FuncDepot",
"{",
"return",
"&",
"FuncDepot",
"{",
"namespace",
",",
"make",
"(",
"<mask>",
"[",
"string",
"]",
"reflect",
".",
"Value",
")",
"}",
"\n",
"}"
] |
25,188 | all-25189 | [
"HaveTitle",
"passes",
"when",
"the",
"expected",
"title",
"is",
"equivalent",
"to",
"the",
"title",
"of",
"the",
"provided",
"page",
"."
] | [
"func",
"HaveTitle",
"(",
"title",
"string",
")",
"types",
".",
"GomegaMatcher",
"{",
"return",
"&",
"<mask>",
".",
"ValueMatcher",
"{",
"Method",
":",
"\"",
"\"",
",",
"Property",
":",
"\"",
"\"",
",",
"Expected",
":",
"title",
"}",
"\n",
"}"
] |
25,189 | all-25190 | [
"Read",
"Read"
] | [
"func",
"(",
"ms",
"*",
"MongoStore",
")",
"Read",
"(",
")",
"<-",
"chan",
"string",
"{",
"chResult",
":=",
"make",
"(",
"chan",
"string",
")",
"\n",
"go",
"func",
"(",
")",
"{",
"ms",
".",
"c",
"(",
"func",
"(",
"c",
"*",
"mgo",
".",
"<mask>",... |
25,190 | all-25191 | [
"GetBody",
"returns",
"the",
"Body",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsRequest",
")",
"GetBody",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Body",
"\n",
"}"
] |
25,191 | all-25192 | [
"NewInlineQueryResultGif",
"returns",
"a",
"new",
"InlineQueryResultGif",
"with",
"all",
"mandatory",
"fields",
"set",
"."
] | [
"func",
"NewInlineQueryResultGif",
"(",
"id",
",",
"gifURL",
",",
"thumbURL",
"string",
")",
"*",
"InlineQueryResultGif",
"{",
"return",
"&",
"InlineQueryResultGif",
"{",
"InlineQueryResultBase",
":",
"InlineQueryResultBase",
"{",
"Type",
":",
"GifResult",
",",
"ID"... |
25,192 | all-25193 | [
"Copy",
"returns",
"a",
"copy",
"of",
"the",
"labels",
"."
] | [
"func",
"(",
"ls",
"Labels",
")",
"Copy",
"(",
")",
"Labels",
"{",
"res",
":=",
"make",
"(",
"Labels",
",",
"len",
"(",
"ls",
")",
")",
"\n",
"copy",
"(",
"res",
",",
"ls",
")",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
25,193 | all-25194 | [
"DefaultDialOptions",
"is",
"a",
"helper",
"returning",
"a",
"slice",
"of",
"grpc",
".",
"Dial",
"options",
"such",
"that",
"grpc",
".",
"Dial",
"()",
"is",
"synchronous",
":",
"the",
"call",
"doesn",
"t",
"return",
"until",
"the",
"connection",
"has",
"be... | [
"func",
"DefaultDialOptions",
"(",
")",
"[",
"]",
"grpc",
".",
"DialOption",
"{",
"return",
"[",
"]",
"grpc",
".",
"DialOption",
"{",
"// Don't return from Dial() until the connection has been established",
"grpc",
".",
"WithBlock",
"(",
")",
",",
"// If no connection... |
25,194 | all-25195 | [
"Do",
"executes",
"Page",
".",
"setFontSizes",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetFontSizesParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetFontSizes",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
25,195 | all-25196 | [
"GetOrgProjects",
"returns",
"the",
"list",
"of",
"projects",
"in",
"this",
"org",
".",
"See",
"https",
":",
"//",
"developer",
".",
"github",
".",
"com",
"/",
"v3",
"/",
"projects",
"/",
"#list",
"-",
"organization",
"-",
"projects"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetOrgProjects",
"(",
"org",
"string",
")",
"(",
"[",
"]",
"Project",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"org",
")",
"\n",
"path",
":=",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
... |
25,196 | all-25197 | [
"SetMeta",
"updates",
"the",
"meta",
"value",
"of",
"the",
"current",
"iteration",
"record",
"if",
"it",
"has",
"not",
"been",
"updated",
"or",
"deleted",
"since",
"iterating",
"or",
"seeking",
"to",
"it",
".",
"If",
"the",
"record",
"has",
"been",
"update... | [
"func",
"(",
"it",
"*",
"Iterator",
")",
"SetMeta",
"(",
"meta",
"uint16",
")",
"error",
"{",
"// Try to reuse the same value bytes. Do this only in the case where meta",
"// is increasing, in order to avoid cases where the meta is changed, then",
"// changed back to the original value... |
25,197 | all-25198 | [
"GetExpectedNumHashtrees",
"computes",
"the",
"expected",
"number",
"of",
"hashtrees",
"that",
"Pachyderm",
"will",
"create",
"given",
"the",
"HashtreeSpec",
"spec",
"."
] | [
"func",
"GetExpectedNumHashtrees",
"(",
"<mask>",
"*",
"ppsclient",
".",
"HashtreeSpec",
")",
"(",
"int64",
",",
"error",
")",
"{",
"if",
"spec",
"==",
"nil",
"||",
"spec",
".",
"Constant",
"==",
"0",
"{",
"return",
"1",
",",
"nil",
"\n",
"}",
"else",
... |
25,198 | all-25199 | [
"resourceVSphereComputeClusterHasClusterConfigChange",
"checks",
"all",
"resource",
"keys",
"associated",
"with",
"cluster",
"configuration",
"(",
"and",
"not",
"for",
"example",
"member",
"hosts",
"folder",
"tags",
"etc",
")",
"to",
"see",
"if",
"there",
"has",
"be... | [
"func",
"resourceVSphereComputeClusterHasClusterConfigChange",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"bool",
"{",
"for",
"k",
":=",
"range",
"resourceVSphereComputeCluster",
"(",
")",
".",
"Schema",
"{",
"switch",
"{",
"case",
"resourceVSphereComputeClust... |
25,199 | all-25200 | [
"New",
"returns",
"a",
"generator",
"that",
"performs",
"buffalo",
"related",
"rx",
"checks"
] | [
"func",
"New",
"(",
"opts",
"*",
"Options",
")",
"(",
"*",
"genny",
".",
"Generator",
",",
"error",
")",
"{",
"g",
":=",
"genny",
".",
"New",
"(",
")",
"\n\n",
"if",
"err",
":=",
"opts",
".",
"Validate",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.