id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
3,400 | all-3401 | [
"simultaneously",
"specify",
"storage",
"for",
"all",
"levels",
"of",
"a",
"two",
"-",
"dimensional",
"or",
"one",
"-",
"dimensional",
"array",
"texture"
] | [
"func",
"TextureStorage2D",
"(",
"texture",
"uint32",
",",
"levels",
"int32",
",",
"internalformat",
"uint32",
",",
"<mask>",
"int32",
",",
"height",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpTextureStorage2D",
",",
"5",
",",
"uintptr",
"(",
"te... |
3,401 | all-3402 | [
"HasQuery",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"Alert",
")",
"HasQuery",
"(",
")",
"bool",
"{",
"if",
"a",
"!=",
"nil",
"&&",
"a",
".",
"Query",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
3,402 | all-3403 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventDetachedFromTarget",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget18",
"(",
"&",
"w",
",",
"v",
... |
3,403 | all-3404 | [
"UnmarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"PausedReason",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"switch",
"PausedReason",
"(",
"in",
".",
"String",
"(",
")",
")",
"{",
"case",
"PausedReasonXHR",
":",
"*",
"t",
"=",
"PausedReasonXHR",
... |
3,404 | all-3405 | [
"NewColorParser",
"creates",
"a",
"new",
"string",
"parser",
".",
"str",
"is",
"a",
"string",
"to",
"parse",
".",
"defText",
"is",
"a",
"default",
"text",
"color",
".",
"defBack",
"is",
"a",
"default",
"background",
"color",
".",
"Default",
"colors",
"are"... | [
"func",
"NewColorParser",
"(",
"str",
"string",
",",
"defText",
",",
"defBack",
"term",
".",
"Attribute",
")",
"*",
"ColorParser",
"{",
"p",
":=",
"new",
"(",
"ColorParser",
")",
"\n",
"p",
".",
"<mask>",
"=",
"[",
"]",
"rune",
"(",
"str",
")",
"\n",... |
3,405 | all-3406 | [
"Receive",
"implements",
"TCPReceiver",
"by",
"making",
"a",
"length",
"-",
"limited",
"read",
"into",
"a",
"byte",
"buffer",
"."
] | [
"func",
"(",
"receiver",
"*",
"lengthPrefixTCPReceiver",
")",
"Receive",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"lenPrefix",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"4",
")",
"\n",
"if",
"_",
",",
"err",
":=",
"io",
".",
"Read... |
3,406 | all-3407 | [
"query",
"the",
"bindings",
"of",
"color",
"indices",
"to",
"user",
"-",
"defined",
"varying",
"out",
"variables"
] | [
"func",
"GetFragDataIndex",
"(",
"program",
"uint32",
",",
"name",
"*",
"uint8",
")",
"int32",
"{",
"ret",
",",
"_",
",",
"_",
":=",
"syscall",
".",
"Syscall",
"(",
"gpGetFragDataIndex",
",",
"2",
",",
"uintptr",
"(",
"program",
")",
",",
"uintptr",
"(... |
3,407 | all-3408 | [
"uncompressedDigestLocked",
"implements",
"types",
".",
"BlobInfoCache",
".",
"UncompressedDigest",
"but",
"must",
"be",
"called",
"only",
"with",
"mem",
".",
"mutex",
"held",
"."
] | [
"func",
"(",
"mem",
"*",
"<mask>",
")",
"uncompressedDigestLocked",
"(",
"anyDigest",
"digest",
".",
"Digest",
")",
"digest",
".",
"Digest",
"{",
"if",
"d",
",",
"ok",
":=",
"mem",
".",
"uncompressedDigests",
"[",
"anyDigest",
"]",
";",
"ok",
"{",
"retur... |
3,408 | all-3409 | [
"NewSyslogBackend",
"connects",
"to",
"the",
"syslog",
"daemon",
"using",
"UNIX",
"sockets",
"with",
"the",
"given",
"prefix",
".",
"If",
"prefix",
"is",
"not",
"given",
"the",
"prefix",
"will",
"be",
"derived",
"from",
"the",
"launched",
"command",
"."
] | [
"func",
"NewSyslogBackend",
"(",
"<mask>",
"string",
")",
"(",
"b",
"*",
"SyslogBackend",
",",
"err",
"error",
")",
"{",
"var",
"w",
"*",
"syslog",
".",
"Writer",
"\n",
"w",
",",
"err",
"=",
"syslog",
".",
"New",
"(",
"syslog",
".",
"LOG_CRIT",
",",
... |
3,409 | all-3410 | [
"Set",
"is",
"required",
"for",
"kingpin",
"interfaces",
"to",
"allow",
"command",
"line",
"params",
"to",
"be",
"set",
"to",
"our",
"map",
"datatype"
] | [
"func",
"(",
"o",
"*",
"MapFloat64Option",
")",
"Set",
"(",
"value",
"string",
")",
"error",
"{",
"parts",
":=",
"stringMapRegex",
".",
"Split",
"(",
"value",
",",
"2",
")",
"\n",
"if",
"len",
"(",
"parts",
")",
"!=",
"2",
"{",
"return",
"fmt",
"."... |
3,410 | all-3411 | [
"partialFeeder",
"returns",
"template",
"string",
"for",
"the",
"name",
"from",
"TemplateBox",
".",
"It",
"should",
"be",
"registered",
"as",
"helper",
"named",
"partialFeeder",
"so",
"plush",
"can",
"find",
"it",
"with",
"the",
"name",
"."
] | [
"func",
"(",
"s",
"templateRenderer",
")",
"partialFeeder",
"(",
"name",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"<mask>",
":=",
"strings",
".",
"ToLower",
"(",
"s",
".",
"contentType",
")",
"\n\n",
"d",
",",
"f",
":=",
"filepath",
".",
... |
3,411 | all-3412 | [
"NewECRAuthProvider",
"returns",
"a",
"DockerAuthProvider",
"that",
"can",
"handle",
"retrieve",
"credentials",
"for",
"pulling",
"from",
"Amazon",
"EC2",
"Container",
"Registry"
] | [
"func",
"NewECRAuthProvider",
"(",
"ecrFactory",
"ecr",
".",
"ECRFactory",
",",
"cache",
"async",
".",
"Cache",
")",
"DockerAuthProvider",
"{",
"return",
"&",
"ecrAuthProvider",
"{",
"tokenCache",
":",
"<mask>",
",",
"factory",
":",
"ecrFactory",
",",
"}",
"\n... |
3,412 | all-3413 | [
"GetSortOk",
"returns",
"a",
"tuple",
"with",
"the",
"Sort",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"ApmOrLogQueryGroupBy",
")",
"GetSortOk",
"(",
")",
"(",
"ApmOrLogQueryGroupBySort",
",",
"bool",
")",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Sort",
"==",
"nil",
"{",
"return",
"ApmOrLogQueryGroupBySort",
"{",
"}",
",",
"fal... |
3,413 | all-3414 | [
"Remove",
"removes",
"a",
"point",
"from",
"the",
"index",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PointsIndex",
")",
"Remove",
"(",
"id",
"string",
")",
"{",
"if",
"prevPoint",
",",
"ok",
":=",
"points",
".",
"currentPosition",
"[",
"id",
"]",
";",
"ok",
"{",
"set",
":=",
"points",
".",
"index",
".",
"GetEntryAt",
"("... |
3,414 | all-3415 | [
"GetName",
"is",
"a",
"wrapper",
"around",
"g_action_get_name"
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetName",
"(",
")",
"string",
"{",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"char",
")",
"(",
"C",
".",
"g_action_get_name",
"(",
"v",
".",
"native",
"(",
")",
")",
")",
")",
"\n",
"}"
] |
3,415 | all-3416 | [
"zeroValueOf",
"and",
"the",
"related",
"cache",
"is",
"used",
"to",
"keep",
"the",
"zero",
"values",
"so",
"they",
"don",
"t",
"need",
"to",
"be",
"reallocated",
"every",
"time",
"they",
"re",
"used",
"."
] | [
"func",
"zeroValueOf",
"(",
"t",
"reflect",
".",
"<mask>",
")",
"reflect",
".",
"Value",
"{",
"zeroMutex",
".",
"RLock",
"(",
")",
"\n",
"v",
",",
"ok",
":=",
"zeroCache",
"[",
"t",
"]",
"\n",
"zeroMutex",
".",
"RUnlock",
"(",
")",
"\n\n",
"if",
"!... |
3,416 | all-3417 | [
"Finalize",
"ensures",
"there",
"no",
"nil",
"pointers",
"."
] | [
"func",
"(",
"c",
"*",
"ConsulConfig",
")",
"Finalize",
"(",
")",
"{",
"if",
"c",
".",
"<mask>",
"==",
"nil",
"{",
"c",
".",
"Address",
"=",
"stringFromEnv",
"(",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"}",
",",
"\"",
"\"",
")",
"\n",
"}",
... |
3,417 | all-3418 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SelectorList",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss22",
"(",
"&",
"r",
"... |
3,418 | all-3419 | [
"SetStr",
"sets",
"environment",
"variable",
"from",
"key",
"=",
"val",
"string",
"format",
"."
] | [
"func",
"(",
"e",
"*",
"EnvVar",
")",
"SetStr",
"(",
"keyVal",
"string",
")",
"{",
"s",
":=",
"strings",
".",
"SplitN",
"(",
"keyVal",
",",
"\"",
"\"",
",",
"2",
")",
"\n",
"if",
"len",
"(",
"s",
")",
"==",
"2",
"{",
"e",
".",
"<mask>",
"(",
... |
3,419 | all-3420 | [
"Create",
"a",
"container",
"struct",
"without",
"initializing",
"it",
"."
] | [
"func",
"containerLXCInstantiate",
"(",
"s",
"*",
"state",
".",
"State",
",",
"args",
"db",
".",
"ContainerArgs",
")",
"*",
"containerLXC",
"{",
"return",
"&",
"containerLXC",
"{",
"state",
":",
"s",
",",
"id",
":",
"args",
".",
"ID",
",",
"<mask>",
":... |
3,420 | all-3421 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetBlackboxPatternsParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger17",
"(",... |
3,421 | all-3422 | [
"Marshal",
"serializes",
"the",
"sitemap",
"URLSet",
"to",
"XML",
"with",
"the",
"<urlset",
">",
"xmlns",
"added",
"and",
"the",
"XML",
"preamble",
"prepended",
"."
] | [
"func",
"Marshal",
"(",
"urlset",
"*",
"URLSet",
")",
"(",
"sitemapXML",
"[",
"]",
"byte",
",",
"err",
"error",
")",
"{",
"if",
"len",
"(",
"urlset",
".",
"URLs",
")",
">",
"MaxURLs",
"{",
"err",
"=",
"ErrExceededMaxURLs",
"\n",
"return",
"\n",
"}",
... |
3,422 | all-3423 | [
"RemoveLabel",
"removes",
"a",
"label"
] | [
"func",
"(",
"f",
"*",
"FakeClient",
")",
"RemoveLabel",
"(",
"owner",
",",
"repo",
"string",
",",
"number",
"int",
",",
"<mask>",
"string",
")",
"error",
"{",
"labelString",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"owner",
",",
"repo",
",... |
3,423 | all-3424 | [
"NewWindow",
"creates",
"a",
"new",
"window",
"type",
"."
] | [
"func",
"NewWindow",
"(",
"manager",
"Windower",
")",
"*",
"Window",
"{",
"wc",
":=",
"make",
"(",
"chan",
"*",
"Window",
")",
"\n",
"Queue",
"(",
"func",
"(",
")",
"{",
"w",
":=",
"&",
"Window",
"{",
"id",
":",
"lastWindowID",
",",
"mgr",
":",
"... |
3,424 | all-3425 | [
"configureOrgMeta",
"will",
"update",
"github",
"to",
"have",
"the",
"non",
"-",
"nil",
"wanted",
"metadata",
"values",
"."
] | [
"func",
"configureOrgMeta",
"(",
"client",
"orgMetadataClient",
",",
"orgName",
"string",
",",
"want",
"org",
".",
"Metadata",
")",
"error",
"{",
"cur",
",",
"err",
":=",
"client",
".",
"GetOrg",
"(",
"orgName",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
3,425 | all-3426 | [
"NewRegistryResolver",
"returns",
"a",
"resolver",
"that",
"looks",
"up",
"a",
"docker",
"registry",
"to",
"resolve",
"digests"
] | [
"func",
"NewRegistryResolver",
"(",
"opt",
"registry",
".",
"Opt",
")",
"Resolver",
"{",
"return",
"&",
"registryResolver",
"{",
"opt",
":",
"<mask>",
",",
"cache",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"string",
")",
",",
"}",
"\n",
"}"
] |
3,426 | all-3427 | [
"ResponseWriter",
"returns",
"a",
"http",
".",
"ResponseWriter",
"that",
"will",
"write",
"to",
"an",
"underlying",
"writer",
".",
"It",
"also",
"returns",
"a",
"function",
"that",
"should",
"be",
"called",
"once",
"the",
"handler",
"has",
"completed",
"."
] | [
"func",
"ResponseWriter",
"(",
"response",
"tchannel",
".",
"ArgWritable",
")",
"(",
"http",
".",
"ResponseWriter",
",",
"func",
"(",
")",
"error",
")",
"{",
"responseWriter",
":=",
"newTChanResponseWriter",
"(",
"<mask>",
")",
"\n",
"return",
"responseWriter",
... |
3,427 | all-3428 | [
"Stop",
"the",
"announce",
"."
] | [
"func",
"(",
"a",
"*",
"Announce",
")",
"Close",
"(",
")",
"{",
"a",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"a",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"a",
".",
"<mask>",
"(",
")",
"\n",
"}"
] |
3,428 | all-3429 | [
"MarshalLogObject",
"implements",
"zapcore",
"ObjectMarshaler",
"."
] | [
"func",
"(",
"sc",
"ServiceContext",
")",
"MarshalLogObject",
"(",
"enc",
"zapcore",
".",
"ObjectEncoder",
")",
"error",
"{",
"if",
"sc",
".",
"<mask>",
"==",
"\"",
"\"",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"en... |
3,429 | all-3430 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"NetworkOptionGroup",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"NetworkOptionGroupLocator",
"{",
"for",
"_",
",",
"l",
":=",
"<mask>",
"r",
".",
"Links",
"{",
"if",
"l",
"[",
"\"",
"\"",
"]",
"==",
"\"",
"\"",
"{",
... |
3,430 | all-3431 | [
"fill",
"a",
"buffer",
"object",
"s",
"data",
"store",
"with",
"a",
"fixed",
"value"
] | [
"func",
"ClearNamedBufferData",
"(",
"buffer",
"uint32",
",",
"internalformat",
"uint32",
",",
"format",
"uint32",
",",
"xtype",
"uint32",
",",
"data",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpClearNamedBufferData",
",",
"5",
","... |
3,431 | all-3432 | [
"Retrieves",
"the",
"name",
"of",
"the",
"property",
"of",
"“target”",
"used",
"as",
"the",
"target",
"of",
"the",
"binding",
"."
] | [
"func",
"(",
"v",
"*",
"Binding",
")",
"GetTargetProperty",
"(",
")",
"string",
"{",
"s",
":=",
"C",
".",
"g_binding_get_target_property",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>"... |
3,432 | all-3433 | [
"TaskByID",
"retrieves",
"the",
"task",
"of",
"a",
"given",
"docker",
"container",
"id"
] | [
"func",
"(",
"<mask>",
"*",
"DockerTaskEngineState",
")",
"TaskByID",
"(",
"cid",
"string",
")",
"(",
"*",
"apitask",
".",
"Task",
",",
"bool",
")",
"{",
"state",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"state",
".",
"lock",
".",
"RUnlock... |
3,433 | all-3434 | [
"Fire",
"writes",
"the",
"message",
"to",
"the",
"Stackdriver",
"entry",
"service",
"."
] | [
"func",
"(",
"sh",
"*",
"StackdriverHook",
")",
"Fire",
"(",
"entry",
"*",
"logrus",
".",
"Entry",
")",
"error",
"{",
"sh",
".",
"waitGroup",
".",
"Add",
"(",
"1",
")",
"\n",
"go",
"func",
"(",
"entry",
"*",
"logrus",
".",
"Entry",
")",
"{",
"def... |
3,434 | all-3435 | [
"Running",
"calls",
"UI",
".",
"Running",
"to",
"write",
".",
"Useful",
"when",
"you",
"want",
"separate",
"colors",
"or",
"prefixes",
".",
"RunningFGColor",
"and",
"RunningBGColor",
"are",
"used",
"for",
"color",
"."
] | [
"func",
"(",
"ui",
"*",
"ColorUI",
")",
"Running",
"(",
"<mask>",
"string",
")",
"{",
"ct",
".",
"ChangeColor",
"(",
"ui",
".",
"RunningFGColor",
".",
"Code",
",",
"ui",
".",
"RunningFGColor",
".",
"Bright",
",",
"ui",
".",
"RunningBGColor",
".",
"Code... |
3,435 | all-3436 | [
"SetColumnInfo",
"replaces",
"the",
"existing",
"column",
"info"
] | [
"func",
"(",
"l",
"*",
"TableView",
")",
"SetColumnInfo",
"(",
"id",
"int",
",",
"col",
"<mask>",
")",
"{",
"if",
"id",
"<",
"len",
"(",
"l",
".",
"columns",
")",
"{",
"l",
".",
"columns",
"[",
"id",
"]",
"=",
"col",
"\n",
"}",
"\n",
"}"
] |
3,436 | all-3437 | [
"/",
"*",
"Returns",
"a",
"Seq",
"of",
"countours",
"in",
"an",
"image",
"detected",
"according",
"to",
"the",
"parameters",
".",
"Caller",
"must",
"Release",
"()",
"the",
"Seq",
"returned"
] | [
"func",
"(",
"<mask>",
"*",
"IplImage",
")",
"FindContours",
"(",
"mode",
",",
"method",
"int",
",",
"offset",
"Point",
")",
"*",
"Seq",
"{",
"storage",
":=",
"C",
".",
"cvCreateMemStorage",
"(",
"0",
")",
"\n",
"header_size",
":=",
"(",
"C",
".",
"s... |
3,437 | all-3438 | [
"SwitchToFrame",
"focuses",
"on",
"the",
"frame",
"specified",
"by",
"the",
"selection",
".",
"All",
"new",
"and",
"existing",
"selections",
"will",
"refer",
"to",
"the",
"new",
"frame",
".",
"All",
"further",
"Page",
"methods",
"will",
"apply",
"to",
"this"... | [
"func",
"(",
"s",
"*",
"Selection",
")",
"SwitchToFrame",
"(",
")",
"error",
"{",
"selectedElement",
",",
"err",
":=",
"s",
".",
"elements",
".",
"GetExactlyOne",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"... |
3,438 | all-3439 | [
"ValidateCN",
"checks",
"the",
"CN",
"of",
"a",
"verified",
"peer",
"cert",
"and",
"raises",
"a",
"403",
"if",
"the",
"CN",
"doesn",
"t",
"match",
"any",
"CN",
"in",
"the",
"AllowedCNs",
"list",
"."
] | [
"func",
"(",
"a",
"*",
"Auth",
")",
"ValidateCN",
"(",
"verifiedCert",
"*",
"x509",
".",
"Certificate",
")",
"error",
"{",
"var",
"failed",
"[",
"]",
"string",
"\n\n",
"for",
"_",
",",
"cn",
":=",
"range",
"a",
".",
"opt",
".",
"AllowedCNs",
"{",
"... |
3,439 | all-3440 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetStyleSheetTextParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss36",
"(",
"&",
"w",
",",
"v",
"... |
3,440 | all-3441 | [
"NewEndpoints",
"returns",
"a",
"new",
"endpoints",
"discovery",
"."
] | [
"func",
"NewEndpoints",
"(",
"l",
"log",
".",
"Logger",
",",
"svc",
",",
"eps",
",",
"pod",
"cache",
".",
"SharedInformer",
")",
"*",
"Endpoints",
"{",
"if",
"l",
"==",
"nil",
"{",
"l",
"=",
"log",
".",
"NewNopLogger",
"(",
")",
"\n",
"}",
"\n",
... |
3,441 | all-3442 | [
"Deprecated",
":",
"Do",
"not",
"use",
"."
] | [
"func",
"(",
"m",
"*",
"AppOverride",
")",
"GetMemcachePoolHint",
"(",
")",
"<mask>",
"{",
"if",
"m",
"!=",
"nil",
"&&",
"m",
".",
"MemcachePoolHint",
"!=",
"nil",
"{",
"return",
"*",
"m",
".",
"MemcachePoolHint",
"\n",
"}",
"\n",
"return",
"\"",
"\"",... |
3,442 | all-3443 | [
"NotificationStatus",
"returns",
"status",
"of",
"a",
"particular",
"notification"
] | [
"func",
"(",
"p",
"*",
"Pushy",
")",
"NotificationStatus",
"(",
"pushID",
"string",
")",
"(",
"*",
"NotificationStatus",
",",
"*",
"<mask>",
",",
"error",
")",
"{",
"url",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"p",
".",
"APIEndpoint",
",... |
3,443 | all-3444 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventDataReceived",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork56",
"(",
"&",
"w",
",",
"v",
")"... |
3,444 | all-3445 | [
"NewWithConfig",
"creates",
"a",
"new",
"Nitro",
"instance",
"based",
"on",
"provided",
"configuration",
"."
] | [
"func",
"NewWithConfig",
"(",
"cfg",
"Config",
")",
"*",
"Nitro",
"{",
"m",
":=",
"&",
"Nitro",
"{",
"snapshots",
":",
"skiplist",
".",
"New",
"(",
")",
",",
"gcsnapshots",
":",
"skiplist",
".",
"New",
"(",
")",
",",
"currSn",
":",
"1",
",",
"Confi... |
3,445 | all-3446 | [
"UpdateIssueEvents",
"fetches",
"all",
"events",
"until",
"we",
"find",
"the",
"most",
"recent",
"we",
"have",
"in",
"db",
"and",
"saves",
"everything",
"in",
"database"
] | [
"func",
"UpdateIssueEvents",
"(",
"issueID",
"int",
",",
"<mask>",
"*",
"gorm",
".",
"DB",
",",
"client",
"ClientInterface",
")",
"{",
"latest",
",",
"err",
":=",
"findLatestEvent",
"(",
"issueID",
",",
"db",
",",
"client",
".",
"RepositoryName",
"(",
")",... |
3,446 | all-3447 | [
"PixbufLoaderNew",
"()",
"is",
"a",
"wrapper",
"around",
"gdk_pixbuf_loader_new",
"()",
"."
] | [
"func",
"PixbufLoaderNew",
"(",
")",
"(",
"*",
"PixbufLoader",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gdk_pixbuf_loader_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n\n",
"obj",
":=",
"&",
... |
3,447 | all-3448 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"AddCompilationCacheParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage85",
"(",
"&",
"w",
",",
"v",
... |
3,448 | all-3449 | [
"DecodeConfig",
"returns",
"the",
"color",
"model",
"and",
"dimensions",
"of",
"a",
"PNG",
"image",
"without",
"decoding",
"the",
"entire",
"image",
"."
] | [
"func",
"DecodeConfig",
"(",
"r",
"io",
".",
"Reader",
")",
"(",
"image",
".",
"Config",
",",
"error",
")",
"{",
"d",
":=",
"&",
"decoder",
"{",
"r",
":",
"r",
",",
"crc",
":",
"crc32",
".",
"NewIEEE",
"(",
")",
",",
"}",
"\n",
"if",
"err",
"... |
3,449 | all-3450 | [
"NewClientFromFile",
"reads",
"a",
"Cluster",
"object",
"at",
"clusterPath",
"and",
"returns",
"an",
"authenticated",
"client",
"using",
"the",
"keys",
"within",
"."
] | [
"func",
"NewClientFromFile",
"(",
"clusterPath",
",",
"namespace",
"string",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"data",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"clusterPath",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"... |
3,450 | all-3451 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventDownloadWillBegin",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage67",
"(",
"&",
"w",
",",
"v",
"... |
3,451 | all-3452 | [
"getValidators",
"returns",
"all",
"validators",
"that",
"apply",
"to",
"a",
"given",
"message"
] | [
"func",
"(",
"p",
"*",
"PubSub",
")",
"getValidators",
"(",
"msg",
"*",
"Message",
")",
"[",
"]",
"*",
"topicVal",
"{",
"var",
"vals",
"[",
"]",
"*",
"topicVal",
"\n\n",
"for",
"_",
",",
"topic",
":=",
"range",
"msg",
".",
"GetTopicIDs",
"(",
")",
... |
3,452 | all-3453 | [
"blobInfoCacheDir",
"returns",
"a",
"path",
"to",
"a",
"blob",
"info",
"cache",
"appropripate",
"for",
"sys",
"and",
"euid",
".",
"euid",
"is",
"used",
"so",
"that",
"(",
"sudo",
"…",
")",
"does",
"not",
"write",
"root",
"-",
"owned",
"files",
"into",
... | [
"func",
"blobInfoCacheDir",
"(",
"sys",
"*",
"types",
".",
"SystemContext",
",",
"euid",
"int",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"sys",
"!=",
"nil",
"&&",
"sys",
".",
"BlobInfoCacheDir",
"!=",
"\"",
"\"",
"{",
"return",
"sys",
".",
"... |
3,453 | all-3454 | [
"LogLevel",
"returns",
"the",
"log",
"level",
"from",
"a",
"string",
"representation",
"."
] | [
"func",
"LogLevel",
"(",
"level",
"string",
")",
"(",
"Level",
",",
"error",
")",
"{",
"for",
"i",
",",
"name",
":=",
"range",
"levelNames",
"{",
"if",
"strings",
".",
"EqualFold",
"(",
"name",
",",
"<mask>",
")",
"{",
"return",
"Level",
"(",
"i",
... |
3,454 | all-3455 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"Node",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp1",
"(",
"&",
"r",
",",
"v"... |
3,455 | all-3456 | [
"New",
"returns",
"a",
"sorted",
"Labels",
"from",
"the",
"given",
"labels",
".",
"The",
"caller",
"has",
"to",
"guarantee",
"that",
"all",
"label",
"names",
"are",
"unique",
"."
] | [
"func",
"New",
"(",
"ls",
"...",
"Label",
")",
"Labels",
"{",
"set",
":=",
"make",
"(",
"Labels",
",",
"0",
",",
"len",
"(",
"ls",
")",
")",
"\n",
"for",
"_",
",",
"l",
":=",
"range",
"ls",
"{",
"set",
"=",
"append",
"(",
"set",
",",
"l",
"... |
3,456 | all-3457 | [
"Get",
"the",
"local",
"datacenter",
"if",
"not",
"specified",
"."
] | [
"func",
"(",
"d",
"*",
"Discovery",
")",
"getDatacenter",
"(",
")",
"error",
"{",
"// If the datacenter was not set from clientConf, let's get it from the local Consul agent",
"// (Consul default is to use local node's datacenter if one isn't given for a query).",
"if",
"d",
".",
"cl... |
3,457 | all-3458 | [
"ByUsername",
"finds",
"a",
"user",
"by",
"their",
"username",
"."
] | [
"func",
"(",
"u",
"*",
"UserRepository",
")",
"ByUsername",
"(",
"username",
"string",
")",
"(",
"*",
"User",
",",
"error",
")",
"{",
"if",
"<mask>",
",",
"ok",
":=",
"u",
".",
"Users",
"[",
"username",
"]",
";",
"ok",
"{",
"return",
"user",
",",
... |
3,458 | all-3459 | [
"The",
"delay",
"at",
"the",
"nth",
"retry",
"is",
"a",
"random",
"value",
"in",
"the",
"range",
"[",
"i",
"-",
"i",
"/",
"2",
"i",
"+",
"i",
"/",
"2",
"]",
"where",
"i",
"=",
"InitialInterval",
"*",
"1",
".",
"5^",
"(",
"n",
"-",
"1",
")",
... | [
"func",
"(",
"t",
"*",
"target",
")",
"nextTryLater",
"(",
")",
"{",
"t",
".",
"tryAfter",
"=",
"time",
".",
"Now",
"(",
")",
".",
"Add",
"(",
"t",
".",
"tryInterval",
"/",
"2",
"+",
"time",
".",
"Duration",
"(",
"<mask>",
".",
"Int63n",
"(",
"... |
3,459 | all-3460 | [
"NewImage",
"returns",
"a",
"types",
".",
"ImageCloser",
"for",
"this",
"reference",
"possibly",
"specialized",
"for",
"this",
"ImageTransport",
".",
"The",
"caller",
"must",
"call",
".",
"Close",
"()",
"on",
"the",
"returned",
"ImageCloser",
".",
"NOTE",
":",... | [
"func",
"(",
"s",
"storageReference",
")",
"NewImage",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"sys",
"*",
"types",
".",
"SystemContext",
")",
"(",
"types",
".",
"ImageCloser",
",",
"error",
")",
"{",
"return",
"newImage",
"(",
"ctx",
",",
"sys",
",... |
3,460 | all-3461 | [
"Remove",
"removes",
"a",
"peer",
"from",
"the",
"peer",
"list",
".",
"It",
"returns",
"an",
"error",
"if",
"the",
"peer",
"cannot",
"be",
"found",
".",
"Remove",
"does",
"not",
"affect",
"connections",
"to",
"the",
"peer",
"in",
"any",
"way",
"."
] | [
"func",
"(",
"l",
"*",
"PeerList",
")",
"Remove",
"(",
"hostPort",
"string",
")",
"error",
"{",
"l",
".",
"Lock",
"(",
")",
"\n",
"defer",
"l",
".",
"Unlock",
"(",
")",
"\n\n",
"p",
",",
"<mask>",
":=",
"l",
".",
"peersByHostPort",
"[",
"hostPort",... |
3,461 | all-3462 | [
"connectionStateChanged",
"is",
"called",
"when",
"one",
"of",
"the",
"peers",
"connections",
"states",
"changes",
".",
"All",
"non",
"-",
"active",
"connections",
"are",
"removed",
"from",
"the",
"peer",
".",
"The",
"connection",
"will",
"still",
"be",
"track... | [
"func",
"(",
"p",
"*",
"Peer",
")",
"connectionCloseStateChange",
"(",
"changed",
"*",
"Connection",
")",
"{",
"if",
"changed",
".",
"IsActive",
"(",
")",
"{",
"return",
"\n",
"}",
"\n\n",
"p",
".",
"Lock",
"(",
")",
"\n",
"found",
":=",
"p",
".",
... |
3,462 | all-3463 | [
"newConn",
"constructs",
"a",
"new",
"connection"
] | [
"func",
"newSingleConn",
"(",
"ctx",
"context",
".",
"Context",
",",
"local",
",",
"remote",
"peer",
".",
"<mask>",
",",
"maconn",
"tpt",
".",
"Conn",
")",
"iconn",
".",
"Conn",
"{",
"ml",
":=",
"lgbl",
".",
"Dial",
"(",
"\"",
"\"",
",",
"local",
"... |
3,463 | all-3464 | [
"expandBaseClusterDasAdmissionControlPolicy",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"BaseClusterDasAdmissionControlPolicy",
"."
] | [
"func",
"expandBaseClusterDasAdmissionControlPolicy",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"policy",
"string",
",",
"version",
"viapi",
".",
"VSphereVersion",
",",
")",
"types",
".",
"BaseClusterDasAdmissionControlPolicy",
"{",
"var",
"obj",
"types",
"... |
3,464 | all-3465 | [
"MustResults",
"retrieves",
"the",
"Results",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"TransactionResultResult",
")",
"MustResults",
"(",
")",
"[",
"]",
"OperationResult",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetResults",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",... |
3,465 | all-3466 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"TakeCoverageDeltaParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss2",
"(",
"&",
... |
3,466 | all-3467 | [
"HasType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TraceServiceDefinition",
")",
"HasType",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
3,467 | all-3468 | [
"rangeChan",
"emits",
"to",
"fn",
"the",
"header",
"for",
"a",
"loop",
"that",
"receives",
"from",
"channel",
"x",
"until",
"it",
"fails",
".",
"tk",
"is",
"the",
"channel",
"s",
"element",
"type",
"or",
"nil",
"if",
"the",
"k",
"result",
"is",
"not",
... | [
"func",
"(",
"b",
"*",
"builder",
")",
"rangeChan",
"(",
"fn",
"*",
"Function",
",",
"x",
"Value",
",",
"tk",
"types",
".",
"Type",
",",
"pos",
"token",
".",
"Pos",
")",
"(",
"k",
"Value",
",",
"loop",
",",
"done",
"*",
"BasicBlock",
")",
"{",
... |
3,468 | all-3469 | [
"The",
"For",
"method",
"is",
"obsolete",
"and",
"will",
"be",
"removed",
"in",
"a",
"future",
"release",
".",
"See",
"Iter",
"as",
"an",
"elegant",
"replacement",
"."
] | [
"func",
"(",
"q",
"*",
"Query",
")",
"For",
"(",
"result",
"interface",
"{",
"}",
",",
"f",
"func",
"(",
")",
"error",
")",
"error",
"{",
"return",
"q",
".",
"Iter",
"(",
")",
".",
"For",
"(",
"<mask>",
",",
"f",
")",
"\n",
"}"
] |
3,469 | all-3470 | [
"validate",
"checks",
"app",
"pool",
"and",
"plan"
] | [
"func",
"(",
"app",
"*",
"App",
")",
"validate",
"(",
")",
"error",
"{",
"err",
":=",
"app",
".",
"validatePool",
"(",
")",
"\n",
"if",
"<mask>",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"return",
"app",
".",
"validatePlan",
"(",
")",
... |
3,470 | all-3471 | [
"Get",
"a",
"session",
"using",
"a",
"request",
"and",
"response",
"."
] | [
"func",
"(",
"a",
"*",
"App",
")",
"getSession",
"(",
"r",
"*",
"http",
".",
"Request",
",",
"w",
"http",
".",
"ResponseWriter",
")",
"*",
"Session",
"{",
"if",
"a",
".",
"root",
"!=",
"nil",
"{",
"return",
"a",
".",
"root",
".",
"getSession",
"(... |
3,471 | all-3472 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"LoadSnapshotReturns",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree12",
"(",
"&... |
3,472 | all-3473 | [
"Close",
"closes",
"the",
"network",
"listener",
"and",
"the",
"active",
"connections",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"Close",
"(",
")",
"error",
"{",
"if",
"!",
"s",
".",
"running",
".",
"Load",
"(",
")",
".",
"(",
"bool",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"s",
".",
"running",
".",
"Store",
"(",
"false",
")",
... |
3,473 | all-3474 | [
"MarshalEasyJSON",
"writes",
"the",
"Date",
"to",
"a",
"easyjson",
".",
"Writer"
] | [
"func",
"(",
"d",
"Date",
")",
"MarshalEasyJSON",
"(",
"w",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"w",
".",
"<mask>",
"(",
"time",
".",
"Time",
"(",
"d",
")",
".",
"Format",
"(",
"RFC3339FullDate",
")",
")",
"\n",
"}"
] |
3,474 | all-3475 | [
"Put",
"saves",
"the",
"entity",
"src",
"into",
"the",
"datastore",
"with",
"key",
"k",
".",
"src",
"must",
"be",
"a",
"struct",
"pointer",
"or",
"implement",
"PropertyLoadSaver",
";",
"if",
"a",
"struct",
"pointer",
"then",
"any",
"unexported",
"fields",
... | [
"func",
"Put",
"(",
"c",
"context",
".",
"Context",
",",
"key",
"*",
"Key",
",",
"src",
"interface",
"{",
"}",
")",
"(",
"*",
"Key",
",",
"error",
")",
"{",
"k",
",",
"err",
":=",
"PutMulti",
"(",
"c",
",",
"[",
"]",
"*",
"Key",
"{",
"key",
... |
3,475 | all-3476 | [
"Depth",
"is",
"a",
"wrapper",
"around",
"g_type_depth",
"()",
"."
] | [
"func",
"(",
"t",
"<mask>",
")",
"Depth",
"(",
")",
"uint",
"{",
"return",
"uint",
"(",
"C",
".",
"g_type_depth",
"(",
"C",
".",
"GType",
"(",
"t",
")",
")",
")",
"\n",
"}"
] |
3,476 | all-3477 | [
"NewDecoder",
"returns",
"a",
"new",
"JSON",
"decoder",
"that",
"parses",
"values",
"from",
"r",
"."
] | [
"func",
"NewDecoder",
"(",
"r",
"<mask>",
".",
"Reader",
")",
"*",
"objconv",
".",
"Decoder",
"{",
"return",
"objconv",
".",
"NewDecoder",
"(",
"NewParser",
"(",
"r",
")",
")",
"\n",
"}"
] |
3,477 | all-3478 | [
"NewPriorityQueue",
"creates",
"an",
"etcd",
"priority",
"queue",
"."
] | [
"func",
"NewPriorityQueue",
"(",
"client",
"*",
"v3",
".",
"Client",
",",
"<mask>",
"string",
")",
"*",
"PriorityQueue",
"{",
"return",
"&",
"PriorityQueue",
"{",
"client",
",",
"context",
".",
"TODO",
"(",
")",
",",
"key",
"+",
"\"",
"\"",
"}",
"\n",
... |
3,478 | all-3479 | [
"UserToDevice",
"is",
"a",
"wrapper",
"around",
"cairo_user_to_device",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"UserToDevice",
"(",
"x",
",",
"y",
"float64",
")",
"(",
"float64",
",",
"float64",
")",
"{",
"C",
".",
"cairo_user_to_device",
"(",
"v",
".",
"native",
"(",
")",
",",
"(",
"*",
"C",
".",
"double",
")",
"(",
... |
3,479 | all-3480 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsAssertion",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"Type",
"\n",
"}"
] |
3,480 | all-3481 | [
"Insert",
"the",
"route",
"in",
"the",
"Trie",
"following",
"or",
"creating",
"the",
"nodes",
"corresponding",
"to",
"the",
"path",
"."
] | [
"func",
"(",
"t",
"*",
"Trie",
")",
"AddRoute",
"(",
"httpMethod",
",",
"pathExp",
"string",
",",
"route",
"<mask>",
"{",
"}",
")",
"error",
"{",
"return",
"t",
".",
"root",
".",
"addRoute",
"(",
"httpMethod",
",",
"pathExp",
",",
"route",
",",
"[",
... |
3,481 | all-3482 | [
"addJob",
"adds",
"a",
"cron",
"entry",
"for",
"a",
"job",
"to",
"cronAgent"
] | [
"func",
"(",
"c",
"*",
"Cron",
")",
"addJob",
"(",
"name",
",",
"cron",
"string",
")",
"error",
"{",
"id",
",",
"err",
":=",
"c",
".",
"cronAgent",
".",
"AddFunc",
"(",
"\"",
"\"",
"+",
"cron",
",",
"func",
"(",
")",
"{",
"c",
".",
"lock",
".... |
3,482 | all-3483 | [
"GetRemoteFile",
"-",
"get",
"a",
"file",
"from",
"a",
"remote",
"system",
"and",
"return",
"a",
"writecloser",
"to",
"it"
] | [
"func",
"(",
"s",
"*",
"RemoteOperations",
")",
"GetRemoteFile",
"(",
")",
"(",
"rfile",
"io",
".",
"WriteCloser",
",",
"err",
"error",
")",
"{",
"<mask>",
"sftpclient",
"SFTPClient",
"\n",
"sftpclient",
",",
"err",
"=",
"s",
".",
"getClient",
"(",
")",
... |
3,483 | all-3484 | [
"Registers",
"a",
"handler"
] | [
"func",
"(",
"hmap",
"*",
"handlerMap",
")",
"register",
"(",
"h",
"Handler",
",",
"method",
"string",
")",
"{",
"hmap",
".",
"Lock",
"(",
")",
"\n",
"defer",
"hmap",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"hmap",
".",
"handlers",
"==",
"nil",
"{",... |
3,484 | all-3485 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetBreakpointByURLParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger15",
"(",
"&",
"w",
",",
"v... |
3,485 | all-3486 | [
"GetId",
"returns",
"the",
"Id",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"a",
"*",
"Alert",
")",
"GetId",
"(",
")",
"int",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Id",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"return",
"*",
"a",
".",
"<mask>",
"\n",
"}"
] |
3,486 | all-3487 | [
"Read",
"reads",
"a",
"vsphere_virtual_machine",
"cdrom",
"sub",
"-",
"resource",
"."
] | [
"func",
"(",
"r",
"*",
"CdromSubresource",
")",
"Read",
"(",
"l",
"object",
".",
"VirtualDeviceList",
")",
"error",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
",",
"r",
")",
"\n",
"d",
",",
"err",
":=",
"r",
".",
"FindVirtualDevice",
"(",
"l",
")"... |
3,487 | all-3488 | [
"Register",
"registers",
"the",
"given",
"TChanServer",
"to",
"be",
"called",
"on",
"any",
"incoming",
"call",
"for",
"its",
"services",
".",
"TODO",
"(",
"prashant",
")",
":",
"Replace",
"Register",
"call",
"with",
"this",
"call",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"Register",
"(",
"svr",
"TChanServer",
",",
"opts",
"...",
"RegisterOption",
")",
"{",
"service",
":=",
"svr",
".",
"<mask>",
"(",
")",
"\n",
"handler",
":=",
"&",
"handler",
"{",
"server",
":",
"svr",
"}",
"\n",... |
3,488 | all-3489 | [
"GetRunCheck",
"returns",
"the",
"RunCheck",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"i",
"*",
"IntegrationPDRequest",
")",
"GetRunCheck",
"(",
")",
"bool",
"{",
"if",
"i",
"==",
"nil",
"||",
"i",
".",
"RunCheck",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"i",
".",
"RunCheck",
"\n",
"}"
] |
3,489 | all-3490 | [
"Reset",
"removes",
"all",
"existing",
"counters",
"and",
"gauges",
"."
] | [
"func",
"(",
"m",
"*",
"CirconusMetrics",
")",
"Reset",
"(",
")",
"{",
"m",
".",
"cm",
".",
"Lock",
"(",
")",
"\n",
"defer",
"m",
".",
"cm",
".",
"Unlock",
"(",
")",
"\n\n",
"m",
".",
"cfm",
".",
"Lock",
"(",
")",
"\n",
"defer",
"m",
".",
"... |
3,490 | all-3491 | [
"InsertItem",
"is",
"a",
"wrapper",
"around",
"g_menu_insert_item",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"InsertItem",
"(",
"position",
"int",
",",
"item",
"*",
"MenuItem",
")",
"{",
"C",
".",
"g_menu_insert_item",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"position",
")",
",",
"item",
".",
... |
3,491 | all-3492 | [
"GetType",
"returns",
"the",
"Type",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"i",
"*",
"IframeDefinition",
")",
"GetType",
"(",
")",
"string",
"{",
"if",
"i",
"==",
"nil",
"||",
"i",
".",
"Type",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"i",
".",
"<mask>",
"\n",
"}"
] |
3,492 | all-3493 | [
"RelBaseName",
"returns",
"the",
"base",
"name",
"for",
"rel",
"a",
"slash",
"-",
"separated",
"path",
"relative",
"to",
"the",
"repository",
"root",
".",
"If",
"rel",
"is",
"empty",
"RelBaseName",
"returns",
"the",
"base",
"name",
"of",
"prefix",
".",
"If... | [
"func",
"RelBaseName",
"(",
"rel",
",",
"prefix",
",",
"root",
"string",
")",
"string",
"{",
"base",
":=",
"path",
".",
"Base",
"(",
"rel",
")",
"\n",
"if",
"base",
"==",
"\"",
"\"",
"||",
"base",
"==",
"\"",
"\"",
"{",
"base",
"=",
"path",
".",
... |
3,493 | all-3494 | [
"SetTooltipText",
"is",
"a",
"wrapper",
"around",
"gtk_status_icon_set_tooltip_text",
"()"
] | [
"func",
"(",
"v",
"*",
"StatusIcon",
")",
"SetTooltipText",
"(",
"text",
"string",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"text",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
... |
3,494 | all-3495 | [
"recursiveWalk",
"is",
"used",
"to",
"do",
"a",
"pre",
"-",
"order",
"walk",
"of",
"a",
"node",
"recursively",
".",
"Returns",
"true",
"if",
"the",
"walk",
"should",
"be",
"aborted"
] | [
"func",
"recursiveWalk",
"(",
"n",
"*",
"node",
",",
"fn",
"WalkFn",
")",
"bool",
"{",
"// Visit the leaf values if any",
"if",
"n",
".",
"leaf",
"!=",
"nil",
"&&",
"fn",
"(",
"n",
".",
"leaf",
".",
"key",
",",
"n",
".",
"leaf",
".",
"val",
")",
"{... |
3,495 | all-3496 | [
"Given",
"the",
"path",
"to",
"a",
"device",
"and",
"it",
"s",
"cgroup_permissions",
"(",
"which",
"cannot",
"be",
"easily",
"queried",
")",
"look",
"up",
"the",
"information",
"about",
"a",
"linux",
"device",
"and",
"return",
"that",
"information",
"as",
... | [
"func",
"DeviceFromPath",
"(",
"path",
",",
"permissions",
"string",
")",
"(",
"*",
"configs",
".",
"Device",
",",
"error",
")",
"{",
"fileInfo",
",",
"err",
":=",
"osLstat",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
","... |
3,496 | all-3497 | [
"UpdateLayerInfos",
"replaces",
"the",
"original",
"layers",
"with",
"the",
"specified",
"BlobInfos",
"(",
"size",
"+",
"digest",
"+",
"urls",
")",
"in",
"order",
"(",
"the",
"root",
"layer",
"first",
"and",
"then",
"successive",
"layered",
"layers",
")"
] | [
"func",
"(",
"m",
"*",
"Schema1",
")",
"UpdateLayerInfos",
"(",
"layerInfos",
"[",
"]",
"types",
".",
"BlobInfo",
")",
"error",
"{",
"// Our LayerInfos includes empty layers (where m.ExtractedV1Compatibility[].ThrowAway), so expect them to be included here as well.",
"if",
"len... |
3,497 | all-3498 | [
"isFile",
"returns",
"true",
"if",
"the",
"path",
"is",
"a",
"valid",
"file",
"."
] | [
"func",
"isFile",
"(",
"p",
"string",
")",
"bool",
"{",
"// TODO(maruel): Is it faster to open the file or to stat it? Worth a perf",
"// test on Windows.",
"i",
",",
"err",
":=",
"<mask>",
".",
"Stat",
"(",
"p",
")",
"\n",
"return",
"err",
"==",
"nil",
"&&",
"!",... |
3,498 | all-3499 | [
"title",
":",
"regenerate",
"token",
"path",
":",
"/",
"users",
"/",
"api",
"-",
"key",
"method",
":",
"POST",
"produce",
":",
"application",
"/",
"json",
"responses",
":",
"200",
":",
"OK",
"401",
":",
"Unauthorized",
"404",
":",
"User",
"not",
"found... | [
"func",
"regenerateAPIToken",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"t",
"auth",
".",
"Token",
")",
"(",
"err",
"error",
")",
"{",
"email",
":=",
"r",
".",
"URL",
".",
"Query",
"(",
")",
".",
"Get",
... |
3,499 | all-3500 | [
"WriteCert",
"writes",
"the",
"given",
"material",
"to",
"the",
"appropriate",
"certificate",
"files",
"in",
"the",
"given",
"LXD",
"var",
"directory",
"."
] | [
"func",
"WriteCert",
"(",
"dir",
",",
"prefix",
"string",
",",
"cert",
",",
"key",
",",
"ca",
"[",
"]",
"byte",
")",
"error",
"{",
"err",
":=",
"ioutil",
".",
"WriteFile",
"(",
"filepath",
".",
"Join",
"(",
"dir",
",",
"prefix",
"+",
"\"",
"\"",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.