id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
7,300 | all-7301 | [
"RestoreSecretRequest",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockSecretsManagerAPI",
")",
"RestoreSecretRequest",
"(",
"arg0",
"*",
"secretsmanager",
".",
"RestoreSecretInput",
")",
"(",
"*",
"<mask>",
".",
"Request",
",",
"*",
"secretsmanager",
".",
"RestoreSecretOutput",
")",
"{",
"ret",
":=",
... |
7,301 | all-7302 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ResolveBlobReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo",
"(",
"&",
"r",
... |
7,302 | all-7303 | [
"ConvertWidgetToBinWindowCoords",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_convert_widget_to_bin_window_coords",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"ConvertWidgetToBinWindowCoords",
"(",
"x",
",",
"y",
"int",
")",
"(",
"int",
",",
"int",
")",
"{",
"<mask>",
"bx",
",",
"by",
"C",
".",
"gint",
"\n\n",
"C",
".",
"gtk_icon_view_convert_widget_to_bin_window_coords",
... |
7,303 | all-7304 | [
"DeregisterInstance",
"removes",
"an",
"instance",
"from",
"given",
"service",
"."
] | [
"func",
"(",
"p",
"*",
"AWSSDProvider",
")",
"DeregisterInstance",
"(",
"service",
"*",
"sd",
".",
"Service",
",",
"ep",
"*",
"endpoint",
".",
"Endpoint",
")",
"error",
"{",
"for",
"_",
",",
"target",
":=",
"<mask>",
"ep",
".",
"Targets",
"{",
"log",
... |
7,304 | all-7305 | [
"Add",
"adds",
"a",
"point",
"to",
"the",
"index",
".",
"If",
"a",
"point",
"with",
"the",
"same",
"Id",
"already",
"exists",
"it",
"gets",
"replaced",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PointsIndex",
")",
"Add",
"(",
"point",
"Point",
")",
"{",
"points",
".",
"Remove",
"(",
"point",
".",
"Id",
"(",
")",
")",
"\n",
"newSet",
":=",
"points",
".",
"index",
".",
"AddEntryAt",
"(",
"point",
")",
".",
"(",
... |
7,305 | all-7306 | [
"ID",
"gets",
"information",
"about",
"a",
"given",
"peer",
".",
"Arguments",
":",
"peer",
":",
"peer",
".",
"ID",
"of",
"the",
"node",
"to",
"look",
"up",
".",
"If",
"no",
"peer",
"is",
"specified",
"return",
"information",
"about",
"the",
"local",
"p... | [
"func",
"(",
"s",
"*",
"Shell",
")",
"ID",
"(",
"peer",
"...",
"string",
")",
"(",
"*",
"IdOutput",
",",
"error",
")",
"{",
"if",
"len",
"(",
"peer",
")",
">",
"1",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
... |
7,306 | all-7307 | [
"ProfileConfigRef",
"returns",
"entities",
"used",
"by",
"profiles",
"."
] | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"ProfileConfigRef",
"(",
"filter",
"ProfileFilter",
")",
"(",
"map",
"[",
"string",
"]",
"map",
"[",
"string",
"]",
"map",
"[",
"string",
"]",
"string",
",",
"error",
")",
"{",
"// Result slice.",
"objects",
":=",... |
7,307 | all-7308 | [
"Returns",
"whether",
"or",
"not",
"the",
"image",
"is",
"fully",
"opaque",
"."
] | [
"func",
"opaque",
"(",
"m",
"image",
".",
"<mask>",
")",
"bool",
"{",
"if",
"o",
",",
"ok",
":=",
"m",
".",
"(",
"opaquer",
")",
";",
"ok",
"{",
"return",
"o",
".",
"Opaque",
"(",
")",
"\n",
"}",
"\n",
"b",
":=",
"m",
".",
"Bounds",
"(",
")... |
7,308 | all-7309 | [
"Do",
"executes",
"Memory",
".",
"getDOMCounters",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"documents",
"nodes",
"jsEventListeners"
] | [
"func",
"(",
"p",
"*",
"GetDOMCountersParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"documents",
"int64",
",",
"nodes",
"int64",
",",
"jsEventListeners",
"int64",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetDOMCount... |
7,309 | all-7310 | [
"/",
"*",
"Errorm",
"uses",
"msg",
"as",
"a",
"format",
"string",
"with",
"subsequent",
"parameters",
"as",
"values",
"and",
"logs",
"the",
"resulting",
"message",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelError",
".",
"It",
"will",
"al... | [
"func",
"(",
"b",
"*",
"Base",
")",
"Errorm",
"(",
"m",
"*",
"Attrs",
",",
"msg",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"b",
".",
"Log",
"(",
"LevelError",
",",
"m",
",",
"msg",
",",
"a",
"...",
")",
"\n"... |
7,310 | all-7311 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"PushNodeByPathToFrontendReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25",
"(",
"&",
"w",
",",
... |
7,311 | all-7312 | [
"MoveIntoResourcePool",
"moves",
"a",
"virtual",
"machine",
"resource",
"pool",
"or",
"vApp",
"into",
"the",
"specified",
"ResourcePool",
"."
] | [
"func",
"MoveIntoResourcePool",
"(",
"p",
"*",
"object",
".",
"ResourcePool",
",",
"c",
"types",
".",
"ManagedObjectReference",
")",
"error",
"{",
"req",
":=",
"types",
".",
"MoveIntoResourcePool",
"{",
"This",
":",
"p",
".",
"Reference",
"(",
")",
",",
"L... |
7,312 | all-7313 | [
"SetASMDockerAuthConfig",
"add",
"the",
"docker",
"auth",
"config",
"data",
"to",
"the",
"RegistryAuthentication",
"struct",
"held",
"by",
"the",
"container",
"this",
"is",
"then",
"passed",
"down",
"to",
"the",
"docker",
"client",
"to",
"pull",
"the",
"image"
] | [
"func",
"(",
"c",
"*",
"Container",
")",
"SetASMDockerAuthConfig",
"(",
"dac",
"<mask>",
".",
"AuthConfig",
")",
"{",
"c",
".",
"RegistryAuthentication",
".",
"ASMAuthData",
".",
"SetDockerAuthConfig",
"(",
"dac",
")",
"\n",
"}"
] |
7,313 | all-7314 | [
"GetManageStatusTitleSize",
"returns",
"the",
"ManageStatusTitleSize",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetManageStatusTitleSize",
"(",
")",
"<mask>",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"ManageStatusTitleSize",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"ManageStatusT... |
7,314 | all-7315 | [
"Forward",
"to",
"the",
"local",
"events",
"dispatcher",
"an",
"event",
"received",
"from",
"another",
"node",
"."
] | [
"func",
"eventForward",
"(",
"id",
"int64",
",",
"<mask>",
"api",
".",
"Event",
")",
"{",
"if",
"event",
".",
"Type",
"==",
"\"",
"\"",
"{",
"// Parse the message",
"logEntry",
":=",
"api",
".",
"EventLogging",
"{",
"}",
"\n",
"err",
":=",
"json",
".",... |
7,315 | all-7316 | [
"Seek",
"moves",
"iterator",
"to",
"a",
"provided",
"item"
] | [
"func",
"(",
"it",
"*",
"Iterator",
")",
"Seek",
"(",
"itm",
"unsafe",
".",
"Pointer",
")",
"bool",
"{",
"<mask>",
".",
"valid",
"=",
"true",
"\n",
"found",
":=",
"it",
".",
"s",
".",
"findPath",
"(",
"itm",
",",
"it",
".",
"cmp",
",",
"it",
".... |
7,316 | all-7317 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StopObservingParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice",
"(",
"&",
"w",
",",
... |
7,317 | all-7318 | [
"ImageAliasesGet",
"returns",
"the",
"names",
"of",
"the",
"aliases",
"of",
"all",
"images",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"ImageAliasesGet",
"(",
"<mask>",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"err",
":=",
"c",
".",
"Transaction",
"(",
"func",
"(",
"tx",
"*",
"ClusterTx",
")",
"error",
"{",
"enabled",
"... |
7,318 | all-7319 | [
"SetAccelPath",
"is",
"a",
"wrapper",
"around",
"gtk_menu_item_set_accel_path",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"MenuItem",
")",
"SetAccelPath",
"(",
"path",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"path",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n\n",
"C",
".... |
7,319 | all-7320 | [
"SetString",
"records",
"IP",
"v4",
"host",
"address",
"of",
"the",
"peer",
"as",
"a",
".",
"-",
"separated",
"tuple",
"to",
"the",
"span",
".",
"E",
".",
"g",
".",
"127",
".",
"0",
".",
"0",
".",
"1"
] | [
"func",
"(",
"tag",
"ipv4Tag",
")",
"SetString",
"(",
"span",
"opentracing",
".",
"Span",
",",
"value",
"string",
")",
"{",
"span",
".",
"SetTag",
"(",
"string",
"(",
"tag",
")",
",",
"<mask>",
")",
"\n",
"}"
] |
7,320 | all-7321 | [
"Shutdown",
"calls",
"all",
"registered",
"shutdown",
"funcs",
"."
] | [
"func",
"(",
"s",
"*",
"Sentinel",
")",
"Shutdown",
"(",
")",
"error",
"{",
"<mask>",
"firstErr",
"error",
"\n",
"for",
"i",
",",
"f",
":=",
"range",
"s",
".",
"shutdownFuncs",
"{",
"ctxt",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"co... |
7,321 | all-7322 | [
"/",
"*",
"DeleteAppsAppRoutesRoute",
"deletes",
"the",
"route"
] | [
"func",
"(",
"a",
"*",
"Client",
")",
"DeleteAppsAppRoutesRoute",
"(",
"params",
"*",
"DeleteAppsAppRoutesRouteParams",
")",
"(",
"*",
"DeleteAppsAppRoutesRouteOK",
",",
"error",
")",
"{",
"// TODO: Validate the params before sending",
"if",
"params",
"==",
"nil",
"{"... |
7,322 | all-7323 | [
"New",
"generator",
"for",
"creating",
"webpack",
"asset",
"files"
] | [
"func",
"New",
"(",
"opts",
"*",
"Options",
")",
"(",
"*",
"genny",
".",
"Generator",
",",
"error",
")",
"{",
"g",
":=",
"genny",
".",
"New",
"(",
")",
"\n\n",
"if",
"err",
":=",
"opts",
".",
"Validate",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
... |
7,323 | all-7324 | [
"StoragePoolVolumeGetTypeID",
"returns",
"the",
"ID",
"of",
"a",
"storage",
"volume",
"on",
"a",
"given",
"storage",
"pool",
"of",
"a",
"given",
"storage",
"volume",
"type",
"on",
"the",
"given",
"node",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"StoragePoolVolumeGetTypeID",
"(",
"project",
"string",
",",
"volumeName",
"string",
",",
"volumeType",
"int",
",",
"poolID",
",",
"nodeID",
"int64",
")",
"(",
"int64",
",",
"error",
")",
"{",
"volumeID",
":=",
"int64... |
7,324 | all-7325 | [
"Signatures",
"is",
"like",
"ImageSource",
".",
"GetSignatures",
"but",
"the",
"result",
"is",
"cached",
";",
"it",
"is",
"OK",
"to",
"call",
"this",
"however",
"often",
"you",
"need",
"."
] | [
"func",
"(",
"i",
"*",
"UnparsedImage",
")",
"Signatures",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"[",
"]",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"if",
"i",
".",
"cachedSignatures",
"==",
"nil",
"{",
"sigs",
",",
"err",
":=",
"i",
".... |
7,325 | all-7326 | [
"saveDB",
"copies",
"the",
"database",
"snapshot",
"to",
"the",
"snapshot",
"directory"
] | [
"func",
"(",
"s",
"*",
"v3Manager",
")",
"saveDB",
"(",
")",
"error",
"{",
"f",
",",
"ferr",
":=",
"os",
".",
"OpenFile",
"(",
"s",
".",
"dbPath",
",",
"os",
".",
"O_RDONLY",
",",
"0600",
")",
"\n",
"if",
"ferr",
"!=",
"nil",
"{",
"return",
"fe... |
7,326 | all-7327 | [
"bytes",
"encodes",
"PeerName",
"as",
"a",
"byte",
"slice",
"."
] | [
"func",
"(",
"name",
"PeerName",
")",
"bytes",
"(",
")",
"[",
"]",
"byte",
"{",
"res",
",",
"err",
":=",
"hex",
".",
"DecodeString",
"(",
"string",
"(",
"<mask>",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
"+",
"na... |
7,327 | all-7328 | [
"ComputeBTCAddressForPrivKey",
"returns",
"the",
"Bitcoin",
"address",
"for",
"the",
"given",
"privKey",
"."
] | [
"func",
"ComputeBTCAddressForPrivKey",
"(",
"privKey",
"string",
")",
"string",
"{",
"pubKeyBytes",
":=",
"PubKeyBytesFromPrivKeyBytes",
"(",
"HexDecode",
"(",
"privKey",
")",
",",
"<mask>",
")",
"\n",
"return",
"BTCAddrFromPubKeyBytes",
"(",
"pubKeyBytes",
")",
"\n... |
7,328 | all-7329 | [
"DecodeTime",
"decodes",
"seconds",
"(",
"int64",
")",
"and",
"nanoseconds",
"(",
"int32",
")",
"since",
"January",
"1",
"1970",
"UTC",
"and",
"returns",
"the",
"corresponding",
"time",
".",
"If",
"nanoseconds",
"is",
"not",
"in",
"the",
"range",
"[",
"0",... | [
"func",
"DecodeTime",
"(",
"bz",
"[",
"]",
"byte",
")",
"(",
"t",
"<mask>",
".",
"Time",
",",
"n",
"int",
",",
"err",
"error",
")",
"{",
"// Defensively set default to to zeroTime (1970, not 0001)",
"t",
"=",
"zeroTime",
"\n\n",
"// Read sec and nanosec.",
"var"... |
7,329 | all-7330 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform1iv",
"(",
"program",
"uint32",
",",
"location",
"int32",
",",
"count",
"int32",
",",
"<mask>",
"*",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpProgramUniform1iv",
",",
"4",
",",
"uintptr",
"(",
"program",
")",
",",
"uint... |
7,330 | all-7331 | [
"buildInfoHandler",
"-",
"This",
"is",
"a",
"stop",
"gap",
"and",
"will",
"be",
"added",
"to",
"when",
"we",
"can",
"define",
"what",
"we",
"should",
"display",
"here"
] | [
"func",
"buildInfoHandler",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"<mask>",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"w",
",",
"\"",
"\"",
")",
"\n",
"}"
] |
7,331 | all-7332 | [
"SetBoolPolicy",
"sets",
"a",
"ResourceData",
"field",
"depending",
"on",
"if",
"a",
"BoolPolicy",
"exists",
"or",
"not",
".",
"The",
"field",
"is",
"not",
"set",
"if",
"it",
"s",
"nil",
"."
] | [
"func",
"SetBoolPolicy",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"key",
"string",
",",
"val",
"*",
"types",
".",
"BoolPolicy",
")",
"error",
"{",
"if",
"val",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"err",
":=",
"d",
".",
"Se... |
7,332 | all-7333 | [
"ArmForSwitch",
"returns",
"which",
"field",
"name",
"should",
"be",
"used",
"for",
"storing",
"the",
"value",
"for",
"an",
"instance",
"of",
"PublicKey"
] | [
"func",
"(",
"u",
"PublicKey",
")",
"ArmForSwitch",
"(",
"sw",
"int32",
")",
"(",
"string",
",",
"bool",
")",
"{",
"switch",
"CryptoKeyType",
"(",
"sw",
")",
"{",
"case",
"CryptoKeyTypeKeyTypeEd25519",
":",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",... |
7,333 | all-7334 | [
"Returns",
"false",
"if",
"file",
"does",
"not",
"exist",
".",
"Panics",
"if",
"file",
"is",
"corrupt",
"."
] | [
"func",
"(",
"a",
"*",
"AddrBook",
")",
"loadFromFile",
"(",
"filePath",
"string",
")",
"bool",
"{",
"// If doesn't exist, do nothing.",
"_",
",",
"err",
":=",
"os",
".",
"Stat",
"(",
"filePath",
")",
"\n",
"if",
"os",
".",
"IsNotExist",
"(",
"err",
")",... |
7,334 | all-7335 | [
"GetStatus",
"computes",
"and",
"returns",
"a",
"Status",
"object",
"based",
"on",
"the",
"request",
"informations",
"accumulated",
"since",
"the",
"start",
"of",
"the",
"process",
"."
] | [
"func",
"(",
"mw",
"*",
"StatusMiddleware",
")",
"GetStatus",
"(",
")",
"*",
"Status",
"{",
"mw",
".",
"lock",
".",
"RLock",
"(",
")",
"\n\n",
"now",
":=",
"time",
".",
"Now",
"(",
")",
"\n\n",
"uptime",
":=",
"now",
".",
"Sub",
"(",
"mw",
".",
... |
7,335 | all-7336 | [
"WriteTo",
"sends",
"the",
"binary",
"representation",
"of",
"the",
"Tuple",
"to",
"the",
"given",
"io",
".",
"Writer",
"."
] | [
"func",
"(",
"t",
"Tuple",
")",
"WriteTo",
"(",
"w",
"io",
".",
"<mask>",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"// write header",
"wrote",
",",
"err",
":=",
"t",
".",
"Header",
".",
"WriteTo",
"(",
"w",
")",
"\n",
"if",
"err",
"... |
7,336 | all-7337 | [
"Text",
"implements",
"the",
"driver",
".",
"Error",
"interface",
"."
] | [
"func",
"(",
"e",
"*",
"hdbErrors",
")",
"Text",
"(",
")",
"string",
"{",
"return",
"string",
"(",
"e",
".",
"<mask>",
"[",
"e",
".",
"idx",
"]",
".",
"errorText",
")",
"\n",
"}"
] |
7,337 | all-7338 | [
"GetExtraCol",
"returns",
"the",
"ExtraCol",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequest",
")",
"GetExtraCol",
"(",
")",
"string",
"{",
"if",
"g",
"==",
"nil",
"||",
"g",
".",
"ExtraCol",
"==",
"nil",
"{",
"<mask>",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"g",
".",
"ExtraCol",
"\n",
"}... |
7,338 | all-7339 | [
"Read",
"is",
"implementation",
"of",
"io",
".",
"Reader",
"s",
"Read",
"."
] | [
"func",
"(",
"s",
"*",
"Stream",
")",
"Read",
"(",
"buf",
"[",
"]",
"<mask>",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"s",
".",
"resampling",
"!=",
"nil",
"{",
"return",
"s",
".",
"resampling",
".",
"Read",
"(",
"buf",
")",
"\n",
"}",
... |
7,339 | all-7340 | [
"Status",
"returns",
"the",
"snapshot",
"file",
"information",
"."
] | [
"func",
"(",
"s",
"*",
"v3Manager",
")",
"Status",
"(",
"dbPath",
"string",
")",
"(",
"ds",
"Status",
",",
"err",
"error",
")",
"{",
"if",
"_",
",",
"err",
"=",
"os",
".",
"Stat",
"(",
"dbPath",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"ds"... |
7,340 | all-7341 | [
"New",
"returns",
"a",
"memcache",
"client",
"using",
"the",
"provided",
"server",
"(",
"s",
")",
"with",
"equal",
"weight",
".",
"If",
"a",
"server",
"is",
"listed",
"multiple",
"times",
"it",
"gets",
"a",
"proportional",
"amount",
"of",
"weight",
"."
] | [
"func",
"New",
"(",
"server",
"...",
"string",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"servers",
",",
"err",
":=",
"NewServerList",
"(",
"server",
"...",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
... |
7,341 | all-7342 | [
"SetWantsLayer",
"sets",
"v",
".",
"wantsLayer",
"to",
"wantsLayer",
".",
"Reference",
":",
"https",
":",
"//",
"developer",
".",
"apple",
".",
"com",
"/",
"documentation",
"/",
"appkit",
"/",
"nsview",
"/",
"1483695",
"-",
"wantslayer",
"."
] | [
"func",
"(",
"v",
"View",
")",
"SetWantsLayer",
"(",
"wantsLayer",
"bool",
")",
"{",
"if",
"wantsLayer",
"{",
"C",
".",
"View_SetWantsLayer",
"(",
"v",
".",
"view",
",",
"1",
")",
"\n",
"}",
"else",
"{",
"C",
".",
"View_SetWantsLayer",
"(",
"v",
".",... |
7,342 | all-7343 | [
"getScale",
"must",
"be",
"called",
"from",
"the",
"main",
"thread",
"."
] | [
"func",
"(",
"u",
"*",
"UserInterface",
")",
"getScale",
"(",
")",
"float64",
"{",
"if",
"!",
"u",
".",
"isFullscreen",
"(",
")",
"{",
"return",
"u",
".",
"<mask>",
"\n",
"}",
"\n",
"if",
"u",
".",
"fullscreenScale",
"==",
"0",
"{",
"v",
":=",
"u... |
7,343 | all-7344 | [
"GetRequestIPs",
"returns",
"all",
"possible",
"IPs",
"found",
"in",
"HTTP",
"request",
"."
] | [
"func",
"GetRequestIPs",
"(",
"r",
"*",
"http",
".",
"Request",
")",
"string",
"{",
"ip",
",",
"_",
",",
"err",
":=",
"net",
".",
"SplitHostPort",
"(",
"r",
".",
"RemoteAddr",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"ip",
"=",
"r",
".",
"Remote... |
7,344 | all-7345 | [
"TODO",
":",
"server",
"NOSPACE",
"etcdserver",
".",
"ErrNoLeader",
"in",
"health",
"API"
] | [
"func",
"checkHealth",
"(",
"srv",
"etcdserver",
".",
"ServerV2",
")",
"Health",
"{",
"h",
":=",
"Health",
"{",
"Health",
":",
"\"",
"\"",
"}",
"\n\n",
"as",
":=",
"srv",
".",
"Alarms",
"(",
")",
"\n",
"if",
"len",
"(",
"as",
")",
">",
"0",
"{",
... |
7,345 | all-7346 | [
"HasUrl",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsRequest",
")",
"HasUrl",
"(",
")",
"bool",
"{",
"if",
"s",
"!=",
"nil",
"&&",
"s",
".",
"Url",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
7,346 | all-7347 | [
"SSM",
"Client",
"will",
"automatically",
"retry",
"3",
"times",
"when",
"has",
"throttling",
"error"
] | [
"func",
"(",
"*",
"ssmClientCreator",
")",
"NewSSMClient",
"(",
"region",
"string",
",",
"creds",
"credentials",
".",
"IAMRoleCredentials",
")",
"ssmclient",
".",
"SSMClient",
"{",
"cfg",
":=",
"aws",
".",
"NewConfig",
"(",
")",
".",
"WithHTTPClient",
"(",
"... |
7,347 | all-7348 | [
"ProcessTimed",
"will",
"use",
"the",
"Pool",
"to",
"process",
"a",
"payload",
"and",
"synchronously",
"return",
"the",
"result",
".",
"If",
"the",
"timeout",
"occurs",
"before",
"the",
"job",
"has",
"finished",
"the",
"worker",
"will",
"be",
"interrupted",
... | [
"func",
"(",
"p",
"*",
"Pool",
")",
"ProcessTimed",
"(",
"payload",
"interface",
"{",
"}",
",",
"timeout",
"time",
".",
"Duration",
",",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"atomic",
".",
"AddInt64",
"(",
"&",
"p",
".",
"queued... |
7,348 | all-7349 | [
"WithQuality",
"compression",
"quality",
"from",
"range",
"[",
"0",
"..",
"100",
"]",
"(",
"jpeg",
"only",
")",
"."
] | [
"func",
"(",
"p",
"CaptureScreenshotParams",
")",
"WithQuality",
"(",
"<mask>",
"int64",
")",
"*",
"CaptureScreenshotParams",
"{",
"p",
".",
"Quality",
"=",
"quality",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
7,349 | all-7350 | [
"addWarning",
"builds",
"a",
"severe",
"Error",
"and",
"appends",
"to",
"the",
"Part",
"error",
"slice",
"."
] | [
"func",
"(",
"p",
"*",
"Part",
")",
"addError",
"(",
"name",
"string",
",",
"detailFmt",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"p",
".",
"Errors",
"=",
"append",
"(",
"p",
".",
"Errors",
",",
"&",
"Error",
"{",
"<mask>",
... |
7,350 | all-7351 | [
"Menu",
"returns",
"menu",
"information",
"for",
"a",
"venue",
".",
"https",
":",
"//",
"developer",
".",
"foursquare",
".",
"com",
"/",
"docs",
"/",
"api",
"/",
"venues",
"/",
"menu"
] | [
"func",
"(",
"s",
"*",
"VenueService",
")",
"Menu",
"(",
"id",
"string",
")",
"(",
"*",
"MenuResp",
",",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"menuResp",
":=",
"new",
"(",
"venueMenuResp",
")",
"\n",
"<mask>",
":=",
"new",
"(",
"Re... |
7,351 | all-7352 | [
"This",
"method",
"takes",
"map",
"[",
"string",
"]",
"map",
"[",
"string",
"]",
"string",
"==",
">",
"map",
"[",
"metric",
"/",
"table",
"name",
"]",
"map",
"[",
"timestamp",
"]",
"value"
] | [
"func",
"(",
"tsdbm",
"GraphiteManager",
")",
"PushToDb",
"(",
"metrics",
"map",
"[",
"string",
"]",
"map",
"[",
"string",
"]",
"string",
",",
"hostName",
"string",
",",
"port",
"int",
")",
"error",
"{",
"data",
":=",
"make",
"(",
"[",
"]",
"graphite",... |
7,352 | all-7353 | [
"ListArtifacts",
"gets",
"the",
"names",
"of",
"all",
"artifacts",
"available",
"from",
"the",
"given",
"source"
] | [
"func",
"(",
"s",
"*",
"Spyglass",
")",
"ListArtifacts",
"(",
"src",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"keyType",
",",
"key",
",",
"err",
":=",
"splitSrc",
"(",
"src",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"retur... |
7,353 | all-7354 | [
"Run",
"calls",
"f",
"on",
"the",
"main",
"thread",
".",
"Do",
"not",
"call",
"this",
"from",
"the",
"main",
"thread",
".",
"This",
"would",
"block",
"forever",
"."
] | [
"func",
"Run",
"(",
"f",
"func",
"(",
")",
"error",
")",
"error",
"{",
"if",
"atomic",
".",
"LoadInt32",
"(",
"&",
"started",
")",
"==",
"0",
"{",
"// TODO: This can reach from other goroutine before Loop is called (#809).",
"// panic(\"mainthread: the mainthread loop i... |
7,354 | all-7355 | [
"WithPresentationURL",
"[",
"no",
"description",
"]",
"."
] | [
"func",
"(",
"p",
"EnableParams",
")",
"WithPresentationURL",
"(",
"presentationURL",
"<mask>",
")",
"*",
"EnableParams",
"{",
"p",
".",
"PresentationURL",
"=",
"presentationURL",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
7,355 | all-7356 | [
"MetadataFromIncomingContext",
"gets",
"the",
"metadata",
"from",
"the",
"given",
"context"
] | [
"func",
"MetadataFromIncomingContext",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"metadata",
".",
"MD",
"{",
"md",
",",
"_",
":=",
"metadata",
".",
"FromIncomingContext",
"(",
"ctx",
")",
"\n",
"return",
"md",
"\n",
"}"
] |
7,356 | all-7357 | [
"firstGoFile",
"returns",
"the",
"name",
"of",
"a",
".",
"go",
"file",
"if",
"the",
"package",
"contains",
"at",
"least",
"one",
".",
"go",
"file",
"or",
"otherwise",
"."
] | [
"func",
"(",
"pkg",
"*",
"goPackage",
")",
"firstGoFile",
"(",
")",
"string",
"{",
"goSrcs",
":=",
"[",
"]",
"platformStringsBuilder",
"{",
"pkg",
".",
"<mask>",
".",
"sources",
",",
"pkg",
".",
"binary",
".",
"sources",
",",
"pkg",
".",
"test",
".",
... |
7,357 | all-7358 | [
"NewEncoder",
"returns",
"a",
"new",
"encoder",
"that",
"outputs",
"values",
"to",
"e",
".",
"Encoders",
"created",
"by",
"this",
"function",
"use",
"the",
"default",
"encoder",
"configuration",
"which",
"is",
"equivalent",
"to",
"using",
"a",
"zero",
"-",
"... | [
"func",
"NewEncoder",
"(",
"e",
"Emitter",
")",
"*",
"Encoder",
"{",
"if",
"e",
"==",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"<mask>",
"&",
"Encoder",
"{",
"Emitter",
":",
"e",
"}",
"\n",
"}"
] |
7,358 | all-7359 | [
"AddBytesKNoValue",
"adds",
"only",
"key",
"as",
"argument",
"without",
"the",
"=",
".",
"Multiple",
"values",
"for",
"the",
"same",
"key",
"may",
"be",
"added",
"."
] | [
"func",
"(",
"a",
"*",
"Args",
")",
"AddBytesKNoValue",
"(",
"key",
"[",
"]",
"byte",
")",
"{",
"a",
".",
"args",
"=",
"appendArg",
"(",
"a",
".",
"args",
",",
"b2s",
"(",
"<mask>",
")",
",",
"\"",
"\"",
",",
"argsNoValue",
")",
"\n",
"}"
] |
7,359 | all-7360 | [
"Merge",
"the",
"set",
"into",
"our",
"state",
"abiding",
"increment",
"-",
"only",
"semantics",
".",
"Return",
"a",
"non",
"-",
"nil",
"mesh",
".",
"GossipData",
"representation",
"of",
"the",
"received",
"set",
"."
] | [
"func",
"(",
"st",
"*",
"state",
")",
"mergeReceived",
"(",
"set",
"map",
"[",
"mesh",
".",
"PeerName",
"]",
"int",
")",
"(",
"received",
"mesh",
".",
"GossipData",
")",
"{",
"st",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"st",
".",
"mtx... |
7,360 | all-7361 | [
"Random",
"creates",
"a",
"random",
"full",
"keypair"
] | [
"func",
"Random",
"(",
")",
"(",
"*",
"Full",
",",
"error",
")",
"{",
"var",
"rawSeed",
"[",
"32",
"]",
"byte",
"\n\n",
"_",
",",
"err",
":=",
"<mask>",
".",
"ReadFull",
"(",
"rand",
".",
"Reader",
",",
"rawSeed",
"[",
":",
"]",
")",
"\n",
"if"... |
7,361 | all-7362 | [
"WithIgnoreCache",
"if",
"true",
"browser",
"cache",
"is",
"ignored",
"(",
"as",
"if",
"the",
"user",
"pressed",
"Shift",
"+",
"refresh",
")",
"."
] | [
"func",
"(",
"p",
"ReloadParams",
")",
"WithIgnoreCache",
"(",
"ignoreCache",
"bool",
")",
"*",
"ReloadParams",
"{",
"p",
".",
"IgnoreCache",
"=",
"ignoreCache",
"\n",
"<mask>",
"&",
"p",
"\n",
"}"
] |
7,362 | all-7363 | [
"Write",
"sends",
"a",
"batch",
"of",
"samples",
"to",
"InfluxDB",
"via",
"its",
"HTTP",
"API",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Write",
"(",
"samples",
"model",
".",
"Samples",
")",
"error",
"{",
"points",
":=",
"make",
"(",
"[",
"]",
"*",
"influx",
".",
"<mask>",
",",
"0",
",",
"len",
"(",
"samples",
")",
")",
"\n",
"for",
"_",
",... |
7,363 | all-7364 | [
"title",
":",
"list",
"nodes",
"path",
":",
"/",
"{",
"provisioner",
"}",
"/",
"node",
"method",
":",
"GET",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"Ok",
"204",
":",
"No",
"content"
] | [
"func",
"listNodesHandler",
"(",
"w",
"<mask>",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"error",
"{",
"pools",
",",
"err",
":=",
"permission",
".",
"ListContextValues",
"(",
"t",
",",
"permission... |
7,364 | all-7365 | [
"GetMaxLength",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_entry_buffer_get_max_length",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"EntryBuffer",
")",
"GetMaxLength",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_entry_buffer_get_max_length",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"int",
"(",
"c",
")",
"\n",
"}"
] |
7,365 | all-7366 | [
"PathPrefix",
"-----------------------------------------------------------------",
"NewPathPrefix",
"returns",
"a",
"static",
"URL",
"path",
"prefix",
"matcher",
"."
] | [
"func",
"NewPathPrefix",
"(",
"prefix",
"string",
")",
"PathPrefix",
"{",
"if",
"!",
"strings",
".",
"HasPrefix",
"(",
"prefix",
",",
"\"",
"\"",
")",
"{",
"prefix",
"=",
"\"",
"\"",
"+",
"<mask>",
"\n",
"}",
"\n",
"return",
"PathPrefix",
"(",
"prefix"... |
7,366 | all-7367 | [
"New",
"creates",
"a",
"new",
"error",
"based",
"on",
"the",
"error",
"descriptor"
] | [
"func",
"(",
"err",
"*",
"ErrDescriptor",
")",
"New",
"(",
"attributes",
"Attributes",
")",
"Error",
"{",
"if",
"err",
".",
"Code",
"!=",
"NoCode",
"&&",
"!",
"err",
".",
"registered",
"{",
"panic",
"(",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
... |
7,367 | all-7368 | [
"NewMockPlugins",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockPlugins",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockPlugins",
"{",
"mock",
":=",
"&",
"MockPlugins",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockPluginsMockRecorder",
"{",
"mock",
"}",
"\n"... |
7,368 | all-7369 | [
"Set",
"creates",
"and",
"sets",
"a",
"new",
"LexItem",
"to",
"name"
] | [
"func",
"(",
"l",
"*",
"LexSymbolSet",
")",
"Set",
"(",
"name",
"string",
",",
"typ",
"lex",
".",
"ItemType",
",",
"prio",
"...",
"float32",
")",
"{",
"var",
"x",
"float32",
"\n",
"if",
"len",
"(",
"prio",
")",
"<",
"1",
"{",
"x",
"=",
"1.0",
"... |
7,369 | all-7370 | [
"createStatsTags",
"creates",
"the",
"common",
"stats",
"tags",
"if",
"they",
"are",
"not",
"already",
"created",
"."
] | [
"func",
"(",
"call",
"*",
"OutboundCall",
")",
"createStatsTags",
"(",
"connectionTags",
"map",
"[",
"string",
"]",
"string",
",",
"callOptions",
"*",
"CallOptions",
",",
"method",
"string",
")",
"{",
"call",
".",
"commonStatsTags",
"=",
"<mask>",
"[",
"stri... |
7,370 | all-7371 | [
"NewCronInput",
"returns",
"an",
"input",
"which",
"will",
"trigger",
"based",
"on",
"a",
"timed",
"schedule",
".",
"It",
"uses",
"cron",
"syntax",
"to",
"specify",
"the",
"schedule",
".",
"The",
"input",
"will",
"be",
"exposed",
"to",
"jobs",
"as",
"/",
... | [
"func",
"NewCronInput",
"(",
"name",
"string",
",",
"spec",
"string",
")",
"*",
"pps",
".",
"<mask>",
"{",
"return",
"&",
"pps",
".",
"Input",
"{",
"Cron",
":",
"&",
"pps",
".",
"CronInput",
"{",
"Name",
":",
"name",
",",
"Spec",
":",
"spec",
",",
... |
7,371 | all-7372 | [
"Do",
"executes",
"Debugger",
".",
"continueToLocation",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"ContinueToLocationParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandContinueToLocation",
",",
"p",
",",
"nil",
")",
"\n",
"}"
... |
7,372 | all-7373 | [
"----------------------------------------",
"Unsigned"
] | [
"func",
"DecodeByte",
"(",
"bz",
"[",
"]",
"<mask>",
")",
"(",
"b",
"byte",
",",
"n",
"int",
",",
"err",
"error",
")",
"{",
"return",
"DecodeUint8",
"(",
"bz",
")",
"\n",
"}"
] |
7,373 | all-7374 | [
"GetEndpoint",
"returns",
"an",
"endpoint",
"for",
"a",
"given",
"client",
"key",
"."
] | [
"func",
"(",
"h",
"*",
"Handler",
")",
"GetEndpoint",
"(",
"product",
",",
"productPassword",
",",
"clientKey",
"string",
")",
"(",
"*",
"data",
".",
"Endpoint",
",",
"error",
")",
"{",
"logger",
":=",
"h",
".",
"logger",
".",
"Add",
"(",
"\"",
"\"",... |
7,374 | all-7375 | [
"GetSnapshot",
"gets",
"a",
"specific",
"snapshot"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"GetSnapshot",
"(",
"snapshotID",
"string",
")",
"(",
"*",
"Snapshot",
",",
"error",
")",
"{",
"url",
":=",
"snapshotColPath",
"(",
")",
"+",
"slash",
"(",
"snapshotID",
")",
"+",
"`?depth=`",
"+",
"c",
".",
"cli... |
7,375 | all-7376 | [
"PreCreateCheck",
"checks",
"that",
"VBoxManage",
"exists",
"and",
"works"
] | [
"func",
"(",
"d",
"*",
"Driver",
")",
"PreCreateCheck",
"(",
")",
"error",
"{",
"// Check that VBoxManage exists and works",
"version",
",",
"err",
":=",
"d",
".",
"vbmOut",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n"... |
7,376 | all-7377 | [
"stringTableDash",
"-",
"output",
"table",
"dash",
".",
"Markdown",
"or",
"not",
"depending",
"on",
"settings",
"."
] | [
"func",
"(",
"t",
"*",
"<mask>",
")",
"stringTableDash",
"(",
")",
"string",
"{",
"if",
"t",
".",
"Markdown",
"{",
"return",
"t",
".",
"stringMarkdownDash",
"(",
")",
"\n",
"}",
"\n",
"return",
"t",
".",
"stringDash",
"(",
")",
"\n",
"}"
] |
7,377 | all-7378 | [
"Check",
"the",
"virtual",
"server",
"instance",
"is",
"ready",
"for",
"use"
] | [
"func",
"(",
"c",
"*",
"ClientManager",
")",
"WaitInstanceUntilReady",
"(",
"id",
"int",
",",
"until",
"time",
".",
"Time",
")",
"error",
"{",
"for",
"{",
"virtualGuest",
",",
"found",
",",
"err",
":=",
"c",
".",
"GetInstance",
"(",
"id",
",",
"\"",
... |
7,378 | all-7379 | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"Endpoint",
"."
] | [
"func",
"(",
"in",
"*",
"Endpoint",
")",
"DeepCopy",
"(",
")",
"*",
"Endpoint",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"<mask>",
"(",
"Endpoint",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
"out",
")",
"\... |
7,379 | all-7380 | [
"IDFromString",
"attempts",
"to",
"create",
"an",
"ID",
"from",
"a",
"base",
"-",
"16",
"string",
"."
] | [
"func",
"IDFromString",
"(",
"s",
"string",
")",
"(",
"ID",
",",
"error",
")",
"{",
"i",
",",
"err",
":=",
"strconv",
".",
"ParseUint",
"(",
"s",
",",
"16",
",",
"64",
")",
"\n",
"return",
"<mask>",
"(",
"i",
")",
",",
"err",
"\n",
"}"
] |
7,380 | all-7381 | [
"ataRead",
"performs",
"an",
"ATA",
"28",
"-",
"bit",
"or",
"48",
"-",
"bit",
"read",
"request",
"on",
"rs",
"using",
"the",
"argument",
"values",
"in",
"r",
"."
] | [
"func",
"ataRead",
"(",
"r",
"*",
"ATAArg",
",",
"<mask>",
"io",
".",
"ReadSeeker",
")",
"(",
"*",
"ATAArg",
",",
"error",
")",
"{",
"// Only ATA reads allowed here",
"if",
"r",
".",
"CmdStatus",
"!=",
"ATACmdStatusRead28Bit",
"&&",
"r",
".",
"CmdStatus",
... |
7,381 | all-7382 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetTimingParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation",
"(",
"&",
"r"... |
7,382 | all-7383 | [
"AppChooserButtonNew",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_app_chooser_button_new",
"()",
"."
] | [
"func",
"AppChooserButtonNew",
"(",
"content_type",
"string",
")",
"(",
"*",
"AppChooserButton",
",",
"error",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"content_type",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"... |
7,383 | all-7384 | [
"RenderString",
"takes",
"a",
"string",
"argument",
"and",
"treats",
"it",
"as",
"the",
"template",
"content",
".",
"Like",
"Render",
"()",
"this",
"template",
"is",
"parsed",
"and",
"compiled",
".",
"Because",
"there",
"s",
"no",
"way",
"to",
"establish",
... | [
"func",
"(",
"tx",
"*",
"Xslate",
")",
"RenderString",
"(",
"template",
"string",
",",
"vars",
"Vars",
")",
"(",
"string",
",",
"error",
")",
"{",
"_",
",",
"file",
",",
"line",
",",
"_",
":=",
"runtime",
".",
"Caller",
"(",
"1",
")",
"\n",
"bc",... |
7,384 | all-7385 | [
"Original",
"will",
"return",
"the",
"stored",
"version",
"of",
"the",
"model",
".",
"This",
"method",
"is",
"intended",
"to",
"be",
"used",
"to",
"calculate",
"the",
"changed",
"fields",
"during",
"an",
"Update",
"operation",
".",
"Any",
"returned",
"error"... | [
"func",
"(",
"c",
"*",
"Context",
")",
"Original",
"(",
")",
"(",
"coal",
".",
"Model",
",",
"error",
")",
"{",
"// begin trace",
"c",
".",
"Tracer",
".",
"Push",
"(",
"\"",
"\"",
")",
"\n\n",
"// check operation",
"if",
"c",
".",
"Operation",
"!=",
... |
7,385 | all-7386 | [
"ErrUnsupportedRequestType",
"indicates",
"the",
"processor",
"cannot",
"fullfil",
"a",
"request",
"for",
"the",
"given",
"RequestType",
"."
] | [
"func",
"ErrUnsupportedRequestType",
"(",
"st",
"SubjectType",
")",
"error",
"{",
"return",
"ErrorResponse",
"{",
"Code",
":",
"<mask>",
".",
"StatusNotImplemented",
",",
"Message",
":",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"st",
")",
",",
"}",
"\n... |
7,386 | all-7387 | [
"SetDoubleClickDistance",
"()",
"is",
"a",
"wrapper",
"around",
"gdk_display_set_double_click_distance",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Display",
")",
"SetDoubleClickDistance",
"(",
"distance",
"uint",
")",
"{",
"C",
".",
"gdk_display_set_double_click_distance",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"guint",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
7,387 | all-7388 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetFileInfoParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom45",
"(",
"&",
"r"... |
7,388 | all-7389 | [
"GetName",
"returns",
"the",
"Name",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsUser",
")",
"GetName",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Name",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"<mask>",
"\n",
"}"
] |
7,389 | all-7390 | [
"WriteTo",
"implements",
"io",
".",
"WriterTo",
".",
"It",
"dumps",
"the",
"whole",
"message",
"into",
"w",
"."
] | [
"func",
"(",
"m",
"*",
"Message",
")",
"WriteTo",
"(",
"w",
"<mask>",
".",
"Writer",
")",
"(",
"int64",
",",
"error",
")",
"{",
"mw",
":=",
"&",
"messageWriter",
"{",
"w",
":",
"w",
"}",
"\n",
"mw",
".",
"writeMessage",
"(",
"m",
")",
"\n",
"re... |
7,390 | all-7391 | [
"GoTemplateValidator",
"validates",
"the",
"file",
"is",
"a",
"valid",
"Go",
"text",
"/",
"template",
"file",
"if",
"the",
"extension",
"is",
".",
"tmpl"
] | [
"func",
"GoTemplateValidator",
"(",
"f",
"genny",
".",
"<mask>",
")",
"error",
"{",
"if",
"!",
"genny",
".",
"HasExt",
"(",
"f",
",",
"\"",
"\"",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"t",
":=",
"template",
".",
"New",
"(",
"f",
".",
"Name"... |
7,391 | all-7392 | [
"List",
"default",
"implementation",
".",
"Returns",
"a",
"404"
] | [
"func",
"(",
"v",
"BaseResource",
")",
"<mask>",
"(",
"c",
"Context",
")",
"error",
"{",
"return",
"c",
".",
"Error",
"(",
"404",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
")",
"\n",
"}"
] |
7,392 | all-7393 | [
"Success",
"outputs",
"Success",
"level",
"log"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"Success",
"(",
"val",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"g",
".",
"<mask>",
"(",
"OK",
",",
"blankFormat",
"(",
"len",
"(",
"val",
")",
")",
",",
"val",
"...",
")",
"\n",
"}"
] |
7,393 | all-7394 | [
"Try",
"to",
"abort",
"multipart",
"upload",
".",
"Do",
"not",
"error",
"on",
"failure",
"."
] | [
"func",
"(",
"p",
"*",
"putter",
")",
"abort",
"(",
")",
"{",
"v",
":=",
"url",
".",
"Values",
"{",
"}",
"\n",
"v",
".",
"Set",
"(",
"\"",
"\"",
",",
"p",
".",
"UploadID",
")",
"\n",
"s",
":=",
"p",
".",
"<mask>",
".",
"String",
"(",
")",
... |
7,394 | all-7395 | [
"NewPublicKey",
"creates",
"a",
"new",
"PublicKey",
"."
] | [
"func",
"NewPublicKey",
"(",
"aType",
"CryptoKeyType",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"PublicKey",
",",
"err",
"error",
")",
"{",
"<mask>",
".",
"Type",
"=",
"aType",
"\n",
"switch",
"CryptoKeyType",
"(",
"aType",
")",
"{",
"cas... |
7,395 | all-7396 | [
"NewTaskHandler",
"returns",
"a",
"pointer",
"to",
"TaskHandler"
] | [
"func",
"NewTaskHandler",
"(",
"ctx",
"context",
".",
"Context",
",",
"stateManager",
"statemanager",
".",
"Saver",
",",
"state",
"dockerstate",
".",
"TaskEngineState",
",",
"client",
"api",
".",
"ECSClient",
")",
"*",
"TaskHandler",
"{",
"// Create a handler and ... |
7,396 | all-7397 | [
"NewMapErrorRegistry",
"creates",
"a",
"new",
"instance",
"of",
"MapErrorRegistry",
"."
] | [
"func",
"NewMapErrorRegistry",
"(",
"<mask>",
"map",
"[",
"int",
"]",
"error",
",",
"handlers",
"map",
"[",
"int",
"]",
"func",
"(",
"body",
"[",
"]",
"byte",
")",
"error",
")",
"*",
"MapErrorRegistry",
"{",
"if",
"errors",
"==",
"nil",
"{",
"errors",
... |
7,397 | all-7398 | [
"InitPath",
"returns",
"an",
"options",
"func",
"to",
"configure",
"a",
"LinuxFactory",
"with",
"the",
"provided",
"absolute",
"path",
"to",
"the",
"init",
"binary",
"and",
"arguements",
"."
] | [
"func",
"InitPath",
"(",
"<mask>",
"string",
",",
"args",
"...",
"string",
")",
"func",
"(",
"*",
"LinuxFactory",
")",
"error",
"{",
"return",
"func",
"(",
"l",
"*",
"LinuxFactory",
")",
"error",
"{",
"l",
".",
"InitPath",
"=",
"path",
"\n",
"l",
"."... |
7,398 | all-7399 | [
"CurrentCall",
"returns",
"the",
"current",
"incoming",
"call",
"or",
"nil",
"if",
"this",
"is",
"not",
"an",
"incoming",
"call",
"context",
"."
] | [
"func",
"CurrentCall",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"IncomingCall",
"{",
"if",
"params",
":=",
"getTChannelParams",
"(",
"ctx",
")",
";",
"params",
"!=",
"nil",
"{",
"return",
"params",
".",
"call",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
... |
7,399 | all-7400 | [
"handleSingleMessage",
"processes",
"a",
"single",
"payload",
"message",
".",
"It",
"adds",
"tasks",
"in",
"the",
"message",
"to",
"the",
"task",
"engine",
"An",
"error",
"is",
"returned",
"if",
"the",
"message",
"was",
"not",
"handled",
"correctly",
".",
"T... | [
"func",
"(",
"payloadHandler",
"*",
"payloadRequestHandler",
")",
"handleSingleMessage",
"(",
"payload",
"*",
"ecsacs",
".",
"PayloadMessage",
")",
"error",
"{",
"if",
"aws",
".",
"StringValue",
"(",
"payload",
".",
"MessageId",
")",
"==",
"\"",
"\"",
"{",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.