id
int32 0
25.3k
| idx
stringlengths 5
9
| nl_tokens
listlengths 1
418
| pl_tokens
listlengths 22
4.98k
|
---|---|---|---|
15,200 | all-15201 | [
"Fetches",
"rants"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Rants",
"(",
"sort",
"string",
",",
"limit",
"int",
",",
"skip",
"int",
")",
"(",
"[",
"]",
"RantModel",
",",
"error",
")",
"{",
"if",
"sort",
"==",
"\"",
"\"",
"{",
"sort",
"=",
"\"",
"\"",
"\n",
"}",
"else",
"if",
"(",
"sort",
"!=",
"\"",
"\"",
")",
"&&",
"(",
"sort",
"!=",
"\"",
"\"",
")",
"&&",
"(",
"sort",
"!=",
"\"",
"\"",
")",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"if",
"limit",
"<=",
"0",
"{",
"limit",
"=",
"50",
"\n",
"}",
"\n\n",
"url",
":=",
"fmt",
".",
"Sprintf",
"(",
"RANTS_PATH",
",",
"API",
",",
"sort",
",",
"limit",
",",
"skip",
",",
"APP_VERSION",
")",
"\n",
"res",
",",
"err",
":=",
"http",
".",
"Get",
"(",
"url",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"var",
"data",
"RantsResponse",
"\n",
"json",
".",
"NewDecoder",
"(",
"<mask>",
".",
"Body",
")",
".",
"Decode",
"(",
"&",
"data",
")",
"\n",
"if",
"!",
"data",
".",
"Success",
"&&",
"data",
".",
"Error",
"!=",
"\"",
"\"",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"data",
".",
"Error",
")",
"\n",
"}",
"\n",
"return",
"data",
".",
"Rants",
",",
"nil",
"\n",
"}"
] |
15,201 | all-15202 | [
"SetLineWrapMode",
"is",
"a",
"wrapper",
"around",
"gtk_label_set_line_wrap_mode",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetLineWrapMode",
"(",
"wrapMode",
"pango",
".",
"WrapMode",
")",
"{",
"C",
".",
"gtk_label_set_line_wrap_mode",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"PangoWrapMode",
"(",
"wrapMode",
")",
")",
"\n",
"}"
] |
15,202 | all-15203 | [
"FillStringAt",
"draws",
"a",
"string",
"at",
"x",
"y"
] | [
"func",
"(",
"gc",
"*",
"GraphicContext",
")",
"FillStringAt",
"(",
"text",
"string",
",",
"x",
",",
"y",
"float64",
")",
"(",
"cursor",
"float64",
")",
"{",
"return",
"gc",
".",
"CreateStringPath",
"(",
"<mask>",
",",
"x",
",",
"y",
")",
"\n",
"}"
] |
15,203 | all-15204 | [
"validateAndWrapHandler",
"makes",
"sure",
"a",
"handler",
"is",
"a",
"callable",
"function",
"it",
"panics",
"if",
"not",
".",
"When",
"the",
"handler",
"is",
"also",
"potential",
"to",
"be",
"any",
"built",
"-",
"in",
"inject",
".",
"FastInvoker",
"it",
"wraps",
"the",
"handler",
"automatically",
"to",
"have",
"some",
"performance",
"gain",
"."
] | [
"func",
"validateAndWrapHandler",
"(",
"h",
"Handler",
")",
"Handler",
"{",
"if",
"reflect",
".",
"TypeOf",
"(",
"h",
")",
".",
"Kind",
"(",
")",
"!=",
"reflect",
".",
"Func",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"!",
"inject",
".",
"IsFastInvoker",
"(",
"h",
")",
"{",
"switch",
"v",
":=",
"h",
".",
"(",
"type",
")",
"{",
"case",
"func",
"(",
"*",
"Context",
")",
":",
"return",
"ContextInvoker",
"(",
"v",
")",
"\n",
"case",
"func",
"(",
"*",
"Context",
",",
"*",
"log",
".",
"Logger",
")",
":",
"return",
"LoggerInvoker",
"(",
"v",
")",
"\n",
"<mask>",
"func",
"(",
"http",
".",
"ResponseWriter",
",",
"*",
"http",
".",
"Request",
")",
":",
"return",
"handlerFuncInvoker",
"(",
"v",
")",
"\n",
"case",
"func",
"(",
"http",
".",
"ResponseWriter",
",",
"error",
")",
":",
"return",
"internalServerErrorInvoker",
"(",
"v",
")",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"h",
"\n",
"}"
] |
15,204 | all-15205 | [
"export",
"FileSequence_Padding"
] | [
"func",
"FileSequence_Padding",
"(",
"id",
"FileSeqId",
")",
"*",
"C",
".",
"char",
"{",
"fs",
",",
"ok",
":=",
"sFileSeqs",
".",
"Get",
"(",
"id",
")",
"\n",
"// caller must free string",
"if",
"!",
"<mask>",
"{",
"return",
"C",
".",
"CString",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"return",
"C",
".",
"CString",
"(",
"fs",
".",
"Padding",
"(",
")",
")",
"\n",
"}"
] |
15,205 | all-15206 | [
"ContainerGetBackups",
"returns",
"the",
"names",
"of",
"all",
"backups",
"of",
"the",
"container",
"with",
"the",
"given",
"name",
"."
] | [
"func",
"(",
"c",
"*",
"Cluster",
")",
"ContainerGetBackups",
"(",
"project",
",",
"name",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"var",
"result",
"[",
"]",
"string",
"\n\n",
"q",
":=",
"`SELECT containers_backups.name FROM containers_backups\nJOIN containers ON containers_backups.container_id=containers.id\nJOIN projects ON projects.id=containers.project_id\nWHERE projects.name=? AND containers.name=?`",
"\n",
"inargs",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"project",
",",
"name",
"}",
"\n",
"outfmt",
":=",
"[",
"]",
"interface",
"{",
"}",
"{",
"name",
"}",
"\n",
"dbResults",
",",
"err",
":=",
"queryScan",
"(",
"c",
".",
"db",
",",
"q",
",",
"inargs",
",",
"outfmt",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"r",
":=",
"range",
"dbResults",
"{",
"<mask>",
"=",
"append",
"(",
"result",
",",
"r",
"[",
"0",
"]",
".",
"(",
"string",
")",
")",
"\n",
"}",
"\n\n",
"return",
"result",
",",
"nil",
"\n",
"}"
] |
15,206 | all-15207 | [
"Put",
"registers",
"handlers",
"with",
"the",
"given",
"pattern",
"for",
"PUT",
"method"
] | [
"func",
"(",
"r",
"*",
"<mask>",
")",
"Put",
"(",
"pat",
"string",
",",
"f",
"...",
"HandlerFunc",
")",
"{",
"r",
".",
"HandleMethod",
"(",
"pat",
",",
"\"",
"\"",
",",
"f",
"...",
")",
"\n",
"}"
] |
15,207 | all-15208 | [
"Diff",
"returns",
"changes",
"between",
"a",
"snapshot",
"and",
"the",
"given",
"ZFS",
"dataset",
".",
"The",
"snapshot",
"name",
"must",
"include",
"the",
"filesystem",
"part",
"as",
"it",
"is",
"possible",
"to",
"compare",
"clones",
"with",
"their",
"origin",
"snapshots",
"."
] | [
"func",
"(",
"d",
"*",
"Dataset",
")",
"Diff",
"(",
"snapshot",
"string",
")",
"(",
"[",
"]",
"*",
"InodeChange",
",",
"error",
")",
"{",
"args",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"\"",
"\"",
",",
"snapshot",
",",
"d",
".",
"Name",
"}",
"[",
":",
"]",
"\n",
"<mask>",
",",
"err",
":=",
"zfs",
"(",
"args",
"...",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"inodeChanges",
",",
"err",
":=",
"parseInodeChanges",
"(",
"out",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"return",
"inodeChanges",
",",
"nil",
"\n",
"}"
] |
15,208 | all-15209 | [
"Required",
"gets",
"a",
"type",
"for",
"a",
"Schema",
"reference",
"if",
"it",
"exists"
] | [
"func",
"(",
"r",
"Ref",
")",
"Required",
"(",
")",
"[",
"]",
"string",
"{",
"if",
"refIF",
",",
"<mask>",
":=",
"r",
"[",
"\"",
"\"",
"]",
";",
"ok",
"{",
"return",
"refIF",
".",
"(",
"[",
"]",
"string",
")",
"\n",
"}",
"\n",
"return",
"[",
"]",
"string",
"{",
"}",
"\n",
"}"
] |
15,209 | all-15210 | [
"RemoveTask",
"removes",
"a",
"task",
"from",
"this",
"state",
".",
"It",
"removes",
"all",
"containers",
"and",
"other",
"associated",
"metadata",
".",
"It",
"does",
"acquire",
"the",
"write",
"lock",
"."
] | [
"func",
"(",
"state",
"*",
"DockerTaskEngineState",
")",
"RemoveTask",
"(",
"task",
"*",
"apitask",
".",
"Task",
")",
"{",
"state",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"state",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n\n",
"task",
",",
"ok",
":=",
"state",
".",
"tasks",
"[",
"task",
".",
"Arn",
"]",
"\n",
"if",
"!",
"ok",
"{",
"seelog",
".",
"Warnf",
"(",
"\"",
"\"",
",",
"task",
".",
"Arn",
")",
"\n",
"return",
"\n",
"}",
"\n",
"delete",
"(",
"state",
".",
"tasks",
",",
"task",
".",
"Arn",
")",
"\n",
"if",
"ip",
",",
"ok",
":=",
"state",
".",
"taskToIPUnsafe",
"(",
"task",
".",
"Arn",
")",
";",
"ok",
"{",
"delete",
"(",
"state",
".",
"ipToTask",
",",
"ip",
")",
"\n",
"}",
"\n\n",
"containerMap",
",",
"ok",
":=",
"state",
".",
"taskToID",
"[",
"<mask>",
".",
"Arn",
"]",
"\n",
"if",
"!",
"ok",
"{",
"seelog",
".",
"Warnf",
"(",
"\"",
"\"",
",",
"task",
".",
"Arn",
")",
"\n",
"return",
"\n",
"}",
"\n",
"delete",
"(",
"state",
".",
"taskToID",
",",
"task",
".",
"Arn",
")",
"\n\n",
"for",
"_",
",",
"dockerContainer",
":=",
"range",
"containerMap",
"{",
"state",
".",
"removeIDToContainerTaskUnsafe",
"(",
"dockerContainer",
")",
"\n",
"// remove v3 endpoint mappings",
"state",
".",
"removeV3EndpointIDToTaskContainerUnsafe",
"(",
"dockerContainer",
".",
"Container",
".",
"V3EndpointID",
")",
"\n",
"}",
"\n",
"}"
] |
15,210 | all-15211 | [
"DeprecrationsCheck",
"will",
"either",
"log",
"or",
"fix",
"deprecated",
"items",
"in",
"the",
"application"
] | [
"func",
"DeprecrationsCheck",
"(",
"r",
"*",
"Runner",
")",
"error",
"{",
"fmt",
".",
"Println",
"(",
"\"",
"\"",
")",
"\n",
"b",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"{",
"r",
".",
"Warnings",
"=",
"append",
"(",
"r",
".",
"Warnings",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"filepath",
".",
"Walk",
"(",
"filepath",
".",
"Join",
"(",
"r",
".",
"App",
".",
"Root",
",",
"\"",
"\"",
")",
",",
"func",
"(",
"path",
"string",
",",
"info",
"os",
".",
"FileInfo",
",",
"_",
"error",
")",
"error",
"{",
"if",
"info",
".",
"IsDir",
"(",
")",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"if",
"filepath",
".",
"Ext",
"(",
"path",
")",
"!=",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"b",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"path",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"{",
"r",
".",
"Warnings",
"=",
"append",
"(",
"r",
".",
"Warnings",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"path",
")",
")",
"\n",
"}",
"\n",
"if",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"{",
"r",
".",
"Warnings",
"=",
"append",
"(",
"r",
".",
"Warnings",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"path",
")",
")",
"\n",
"}",
"\n",
"if",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"{",
"r",
".",
"Warnings",
"=",
"append",
"(",
"r",
".",
"Warnings",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"path",
")",
")",
"\n",
"}",
"\n",
"// i18n middleware changes in v0.11.1",
"if",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"{",
"b",
"=",
"bytes",
".",
"Replace",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
",",
"[",
"]",
"byte",
"(",
"\"",
"\\\"",
"\\\"",
"\"",
")",
",",
"-",
"1",
")",
"\n",
"}",
"\n",
"if",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"<mask>",
"(",
"\"",
"\"",
")",
")",
"{",
"b",
"=",
"bytes",
".",
"Replace",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
",",
"[",
"]",
"byte",
"(",
"\"",
"\\\"",
"\\\"",
"\"",
")",
",",
"-",
"1",
")",
"\n",
"}",
"\n",
"if",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"||",
"bytes",
".",
"Contains",
"(",
"b",
",",
"[",
"]",
"byte",
"(",
"\"",
"\"",
")",
")",
"{",
"r",
".",
"Warnings",
"=",
"append",
"(",
"r",
".",
"Warnings",
",",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"path",
")",
")",
"\n",
"}",
"\n",
"ioutil",
".",
"WriteFile",
"(",
"path",
",",
"b",
",",
"0664",
")",
"\n\n",
"return",
"nil",
"\n",
"}",
")",
"\n",
"}"
] |
15,211 | all-15212 | [
"Sign",
"signs",
"the",
"http",
".",
"Request"
] | [
"func",
"(",
"b",
"*",
"Bucket",
")",
"Sign",
"(",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"if",
"req",
".",
"<mask>",
"==",
"nil",
"{",
"req",
".",
"Header",
"=",
"http",
".",
"Header",
"{",
"}",
"\n",
"}",
"\n",
"if",
"b",
".",
"S3",
".",
"Keys",
".",
"SecurityToken",
"!=",
"\"",
"\"",
"{",
"req",
".",
"Header",
".",
"Set",
"(",
"\"",
"\"",
",",
"b",
".",
"S3",
".",
"Keys",
".",
"SecurityToken",
")",
"\n",
"}",
"\n",
"req",
".",
"Header",
".",
"Set",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"s",
":=",
"&",
"signer",
"{",
"Time",
":",
"time",
".",
"Now",
"(",
")",
",",
"Request",
":",
"req",
",",
"Region",
":",
"b",
".",
"S3",
".",
"Region",
"(",
")",
",",
"Keys",
":",
"b",
".",
"S3",
".",
"Keys",
",",
"}",
"\n",
"s",
".",
"sign",
"(",
")",
"\n",
"}"
] |
15,212 | all-15213 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"UpdateRegistrationParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker1",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"<mask>",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
15,213 | all-15214 | [
"ReadDir",
"calls",
"ioutil",
".",
"ReadDir",
"."
] | [
"func",
"(",
"g",
"GitOS",
")",
"ReadDir",
"(",
"dirname",
"string",
")",
"(",
"[",
"]",
"<mask>",
".",
"FileInfo",
",",
"error",
")",
"{",
"return",
"ioutil",
".",
"ReadDir",
"(",
"dirname",
")",
"\n",
"}"
] |
15,214 | all-15215 | [
"resourceVSphereStorageDrsVMOverrideFlattenID",
"makes",
"an",
"ID",
"for",
"the",
"vsphere_storage_drs_vm_override",
"resource",
"."
] | [
"func",
"resourceVSphereStorageDrsVMOverrideFlattenID",
"(",
"pod",
"*",
"object",
".",
"StoragePod",
",",
"vm",
"*",
"object",
".",
"VirtualMachine",
")",
"(",
"string",
",",
"error",
")",
"{",
"podID",
":=",
"pod",
".",
"Reference",
"(",
")",
".",
"<mask>",
"\n",
"props",
",",
"err",
":=",
"virtualmachine",
".",
"Properties",
"(",
"vm",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"vmID",
":=",
"props",
".",
"Config",
".",
"Uuid",
"\n",
"return",
"strings",
".",
"Join",
"(",
"[",
"]",
"string",
"{",
"podID",
",",
"vmID",
"}",
",",
"\"",
"\"",
")",
",",
"nil",
"\n",
"}"
] |
15,215 | all-15216 | [
"DoubleClick",
"double",
"-",
"clicks",
"on",
"all",
"of",
"the",
"elements",
"that",
"the",
"selection",
"refers",
"to",
"."
] | [
"func",
"(",
"s",
"*",
"Selection",
")",
"DoubleClick",
"(",
")",
"error",
"{",
"return",
"s",
".",
"forEachElement",
"(",
"func",
"(",
"selectedElement",
"element",
".",
"Element",
")",
"error",
"{",
"if",
"err",
":=",
"s",
".",
"session",
".",
"MoveTo",
"(",
"selectedElement",
".",
"(",
"*",
"api",
".",
"Element",
")",
",",
"nil",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"s",
",",
"err",
")",
"\n",
"}",
"\n",
"if",
"err",
":=",
"s",
".",
"<mask>",
".",
"DoubleClick",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"s",
",",
"err",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}",
")",
"\n",
"}"
] |
15,216 | all-15217 | [
"GetNetworkNames",
"returns",
"a",
"list",
"of",
"network",
"names"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"GetNetworkNames",
"(",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\\\"",
"\\\"",
"\"",
")",
"\n",
"}",
"\n\n",
"urls",
":=",
"[",
"]",
"string",
"{",
"}",
"\n\n",
"// Fetch the raw value",
"_",
",",
"err",
":=",
"r",
".",
"queryStruct",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"nil",
",",
"\"",
"\"",
",",
"&",
"urls",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"// Parse it",
"names",
":=",
"[",
"]",
"string",
"{",
"}",
"\n",
"for",
"_",
",",
"url",
":=",
"range",
"urls",
"{",
"fields",
":=",
"strings",
".",
"Split",
"(",
"url",
",",
"\"",
"\"",
")",
"\n",
"names",
"=",
"append",
"(",
"<mask>",
",",
"fields",
"[",
"len",
"(",
"fields",
")",
"-",
"1",
"]",
")",
"\n",
"}",
"\n\n",
"return",
"names",
",",
"nil",
"\n",
"}"
] |
15,217 | all-15218 | [
"HasOk",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"ThresholdCount",
")",
"HasOk",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"Ok",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
15,218 | all-15219 | [
"GetLogsetOk",
"returns",
"a",
"tuple",
"with",
"the",
"Logset",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetLogsetOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"Logset",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"Logset",
",",
"<mask>",
"\n",
"}"
] |
15,219 | all-15220 | [
"Value",
".",
"String",
"()",
"This",
"method",
"is",
"provided",
"only",
"for",
"debugging",
".",
"It",
"never",
"appears",
"in",
"disassembly",
"which",
"uses",
"Value",
".",
"Name",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Parameter",
")",
"<mask>",
"(",
")",
"string",
"{",
"from",
":=",
"v",
".",
"Parent",
"(",
")",
".",
"pkg",
"(",
")",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"v",
".",
"Name",
"(",
")",
",",
"relType",
"(",
"v",
".",
"Type",
"(",
")",
",",
"from",
")",
")",
"\n",
"}"
] |
15,220 | all-15221 | [
"GetTitleOk",
"returns",
"a",
"tuple",
"with",
"the",
"Title",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"d",
"*",
"DashboardLite",
")",
"GetTitleOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"d",
"==",
"nil",
"||",
"d",
".",
"Title",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"d",
".",
"Title",
",",
"<mask>",
"\n",
"}"
] |
15,221 | all-15222 | [
"dispatch",
"creates",
"a",
"new",
"request",
"using",
"the",
"provided",
"payload",
"and",
"headers",
"and",
"dispatches",
"the",
"request",
"to",
"the",
"provided",
"endpoint",
"."
] | [
"func",
"(",
"s",
"*",
"<mask>",
")",
"dispatch",
"(",
"endpoint",
"string",
",",
"payload",
"[",
"]",
"byte",
",",
"h",
"http",
".",
"Header",
")",
"error",
"{",
"req",
",",
"err",
":=",
"http",
".",
"NewRequest",
"(",
"http",
".",
"MethodPost",
",",
"endpoint",
",",
"bytes",
".",
"NewBuffer",
"(",
"payload",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"req",
".",
"Header",
"=",
"h",
"\n",
"resp",
",",
"err",
":=",
"s",
".",
"do",
"(",
"req",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"defer",
"resp",
".",
"Body",
".",
"Close",
"(",
")",
"\n",
"rb",
",",
"err",
":=",
"ioutil",
".",
"ReadAll",
"(",
"resp",
".",
"Body",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"if",
"resp",
".",
"StatusCode",
"<",
"200",
"||",
"resp",
".",
"StatusCode",
">",
"299",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"resp",
".",
"Status",
",",
"string",
"(",
"rb",
")",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,222 | all-15223 | [
"ValidEnum",
"validates",
"a",
"proposed",
"value",
"for",
"this",
"enum",
".",
"Implements",
"the",
"Enum",
"interface",
"for",
"ScpStatementType"
] | [
"func",
"(",
"e",
"ScpStatementType",
")",
"ValidEnum",
"(",
"v",
"int32",
")",
"bool",
"{",
"_",
",",
"<mask>",
":=",
"scpStatementTypeMap",
"[",
"v",
"]",
"\n",
"return",
"ok",
"\n",
"}"
] |
15,223 | all-15224 | [
"Version",
"returns",
"the",
"version",
"of",
"pachd",
"as",
"a",
"string",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"Version",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"v",
",",
"err",
":=",
"c",
".",
"VersionAPIClient",
".",
"GetVersion",
"(",
"c",
".",
"Ctx",
"(",
")",
",",
"&",
"<mask>",
".",
"Empty",
"{",
"}",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"grpcutil",
".",
"ScrubGRPC",
"(",
"err",
")",
"\n",
"}",
"\n",
"return",
"version",
".",
"PrettyPrintVersion",
"(",
"v",
")",
",",
"nil",
"\n",
"}"
] |
15,224 | all-15225 | [
"Start",
"launches",
"the",
"internal",
"goroutine",
"which",
"starts",
"processing",
"data",
"from",
"the",
"input",
"channel",
"."
] | [
"func",
"(",
"b",
"*",
"ChannelMemoryBackend",
")",
"Start",
"(",
")",
"{",
"b",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"// Launch the goroutine unless it's already running.",
"if",
"b",
".",
"running",
"!=",
"true",
"{",
"b",
".",
"running",
"=",
"true",
"\n",
"b",
".",
"stopWg",
".",
"Add",
"(",
"1",
")",
"\n",
"<mask>",
"b",
".",
"process",
"(",
")",
"\n",
"}",
"\n",
"}"
] |
15,225 | all-15226 | [
"SetInt64",
"is",
"a",
"wrapper",
"around",
"g_value_set_int64",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetInt64",
"(",
"val",
"int64",
")",
"{",
"C",
".",
"g_value_set_int64",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint64",
"(",
"val",
")",
")",
"\n",
"}"
] |
15,226 | all-15227 | [
"TrackHTTPLatency",
"wraps",
"Handler",
"functions",
"registered",
"with",
"an",
"http",
".",
"ServerMux",
"tracking",
"latencies",
".",
"Metrics",
"are",
"of",
"the",
"for",
"go",
"HTTP",
"<method",
">",
"<name",
">",
"latency",
"and",
"are",
"tracked",
"in",
"a",
"histogram",
"in",
"units",
"of",
"seconds",
"(",
"as",
"a",
"float64",
")",
"providing",
"nanosecond",
"ganularity",
"."
] | [
"func",
"(",
"m",
"*",
"CirconusMetrics",
")",
"TrackHTTPLatency",
"(",
"name",
"string",
",",
"handler",
"func",
"(",
"http",
".",
"ResponseWriter",
",",
"*",
"http",
".",
"Request",
")",
")",
"func",
"(",
"http",
".",
"ResponseWriter",
",",
"*",
"http",
".",
"Request",
")",
"{",
"return",
"func",
"(",
"rw",
"http",
".",
"ResponseWriter",
",",
"req",
"*",
"http",
".",
"Request",
")",
"{",
"start",
":=",
"time",
".",
"Now",
"(",
")",
".",
"UnixNano",
"(",
")",
"\n",
"handler",
"(",
"rw",
",",
"req",
")",
"\n",
"elapsed",
":=",
"time",
".",
"Now",
"(",
")",
".",
"UnixNano",
"(",
")",
"-",
"start",
"\n",
"m",
".",
"RecordValue",
"(",
"\"",
"\"",
"+",
"req",
".",
"Method",
"+",
"\"",
"\"",
"+",
"<mask>",
"+",
"\"",
"\"",
",",
"float64",
"(",
"elapsed",
")",
"/",
"float64",
"(",
"time",
".",
"Second",
")",
")",
"\n",
"}",
"\n",
"}"
] |
15,227 | all-15228 | [
"The",
"node",
"struct",
"holds",
"a",
"slice",
"of",
"NodeRef",
".",
"We",
"assume",
"that",
"the",
"most",
"-",
"significant",
"-",
"byte",
"of",
"the",
"golang",
"pointer",
"is",
"always",
"unused",
".",
"In",
"NodeRef",
"struct",
"deleted",
"flag",
"and",
"*",
"Node",
"are",
"packed",
"one",
"after",
"the",
"other",
".",
"If",
"we",
"shift",
"the",
"node",
"address",
"1",
"byte",
"to",
"the",
"left",
".",
"The",
"shifted",
"8",
"byte",
"word",
"will",
"have",
"a",
"byte",
"from",
"the",
"deleted",
"flag",
"and",
"7",
"bytes",
"from",
"the",
"address",
"(",
"8th",
"byte",
"of",
"the",
"address",
"is",
"always",
"0x00",
")",
".",
"CAS",
"operation",
"can",
"be",
"performed",
"at",
"this",
"location",
"to",
"set",
"least",
"-",
"significant",
"to",
"0xff",
"(",
"denotes",
"deleted",
")",
".",
"Same",
"applies",
"for",
"loading",
"delete",
"flag",
"and",
"the",
"address",
"atomically",
"."
] | [
"func",
"(",
"n",
"*",
"Node",
")",
"dcasNext",
"(",
"<mask>",
"int",
",",
"prevPtr",
",",
"newPtr",
"*",
"Node",
",",
"prevIsdeleted",
",",
"newIsdeleted",
"bool",
")",
"bool",
"{",
"nodeRefAddr",
":=",
"uintptr",
"(",
"unsafe",
".",
"Pointer",
"(",
"n",
")",
")",
"+",
"nodeHdrSize",
"+",
"nodeRefSize",
"*",
"uintptr",
"(",
"level",
")",
"\n",
"wordAddr",
":=",
"(",
"*",
"uint64",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"nodeRefAddr",
"+",
"uintptr",
"(",
"7",
")",
")",
")",
"\n",
"prevVal",
":=",
"uint64",
"(",
"uintptr",
"(",
"unsafe",
".",
"Pointer",
"(",
"prevPtr",
")",
")",
"<<",
"8",
")",
"\n",
"newVal",
":=",
"uint64",
"(",
"uintptr",
"(",
"unsafe",
".",
"Pointer",
"(",
"newPtr",
")",
")",
"<<",
"8",
")",
"\n\n",
"if",
"newIsdeleted",
"{",
"newVal",
"|=",
"deletedFlag",
"\n",
"}",
"\n\n",
"swapped",
":=",
"atomic",
".",
"CompareAndSwapUint64",
"(",
"wordAddr",
",",
"prevVal",
",",
"newVal",
")",
"\n\n",
"// This is required to make go1.5+ concurrent garbage collector happy",
"// It makes writebarrier to mark newPtr as reachable",
"if",
"swapped",
"{",
"atomic",
".",
"CompareAndSwapPointer",
"(",
"(",
"*",
"unsafe",
".",
"Pointer",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"nodeRefAddr",
"+",
"nodeRefFlagSize",
")",
")",
",",
"unsafe",
".",
"Pointer",
"(",
"newPtr",
")",
",",
"unsafe",
".",
"Pointer",
"(",
"newPtr",
")",
")",
"\n",
"}",
"\n\n",
"return",
"swapped",
"\n",
"}"
] |
15,228 | all-15229 | [
"CtxServeHTTP",
"implements",
"Handler",
".",
"CtxServeHTTP"
] | [
"func",
"(",
"h",
"HandlerList",
")",
"CtxServeHTTP",
"(",
"ctx",
"context",
".",
"Context",
",",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
")",
"{",
"for",
"_",
",",
"handler",
":=",
"range",
"h",
"{",
"<mask>",
".",
"CtxServeHTTP",
"(",
"ctx",
",",
"w",
",",
"r",
")",
"\n",
"}",
"\n",
"}"
] |
15,229 | all-15230 | [
"NewClient",
"creates",
"a",
"new",
"fully",
"operational",
"GitHub",
"client",
"."
] | [
"func",
"NewClient",
"(",
"getToken",
"func",
"(",
")",
"[",
"]",
"byte",
",",
"graphqlEndpoint",
"string",
",",
"bases",
"...",
"string",
")",
"*",
"<mask>",
"{",
"return",
"NewClientWithFields",
"(",
"logrus",
".",
"Fields",
"{",
"}",
",",
"getToken",
",",
"graphqlEndpoint",
",",
"bases",
"...",
")",
"\n",
"}"
] |
15,230 | all-15231 | [
"resolveLocalPaths",
"is",
"a",
"modified",
"copy",
"of",
"k8s",
".",
"io",
"/",
"kubernetes",
"/",
"pkg",
"/",
"client",
"/",
"unversioned",
"/",
"clientcmd",
".",
"ClientConfigLoadingRules",
".",
"resolveLocalPaths",
".",
"ResolveLocalPaths",
"resolves",
"all",
"relative",
"paths",
"in",
"the",
"config",
"object",
"with",
"respect",
"to",
"the",
"stanza",
"s",
"LocationOfOrigin",
"this",
"cannot",
"be",
"done",
"directly",
"inside",
"of",
"LoadFromFile",
"because",
"doing",
"so",
"there",
"would",
"make",
"it",
"impossible",
"to",
"load",
"a",
"file",
"without",
"modification",
"of",
"its",
"contents",
"."
] | [
"func",
"resolveLocalPaths",
"(",
"config",
"*",
"clientcmdConfig",
")",
"error",
"{",
"for",
"_",
",",
"cluster",
":=",
"range",
"config",
".",
"Clusters",
"{",
"if",
"len",
"(",
"cluster",
".",
"LocationOfOrigin",
")",
"==",
"0",
"{",
"<mask>",
"\n",
"}",
"\n",
"base",
",",
"err",
":=",
"filepath",
".",
"Abs",
"(",
"filepath",
".",
"Dir",
"(",
"cluster",
".",
"LocationOfOrigin",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"errors",
".",
"Wrapf",
"(",
"err",
",",
"\"",
"\"",
",",
"cluster",
".",
"LocationOfOrigin",
")",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"resolvePaths",
"(",
"getClusterFileReferences",
"(",
"cluster",
")",
",",
"base",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"for",
"_",
",",
"authInfo",
":=",
"range",
"config",
".",
"AuthInfos",
"{",
"if",
"len",
"(",
"authInfo",
".",
"LocationOfOrigin",
")",
"==",
"0",
"{",
"continue",
"\n",
"}",
"\n",
"base",
",",
"err",
":=",
"filepath",
".",
"Abs",
"(",
"filepath",
".",
"Dir",
"(",
"authInfo",
".",
"LocationOfOrigin",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"errors",
".",
"Wrapf",
"(",
"err",
",",
"\"",
"\"",
",",
"authInfo",
".",
"LocationOfOrigin",
")",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"resolvePaths",
"(",
"getAuthInfoFileReferences",
"(",
"authInfo",
")",
",",
"base",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] |
15,231 | all-15232 | [
"flattenSliceOfDvsHostInfrastructureTrafficResource",
"reads",
"in",
"the",
"supplied",
"network",
"I",
"/",
"O",
"control",
"allocation",
"entries",
"supplied",
"via",
"a",
"respective",
"DVSConfigInfo",
"field",
"and",
"sets",
"the",
"appropriate",
"keys",
"in",
"the",
"supplied",
"ResourceData",
"."
] | [
"func",
"flattenSliceOfDvsHostInfrastructureTrafficResource",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"s",
"[",
"]",
"types",
".",
"DvsHostInfrastructureTrafficResource",
")",
"error",
"{",
"for",
"_",
",",
"v",
":=",
"<mask>",
"s",
"{",
"if",
"err",
":=",
"flattenDvsHostInfrastructureTrafficResource",
"(",
"d",
",",
"v",
",",
"v",
".",
"Key",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,232 | all-15233 | [
"return",
"a",
"compressed",
"texture",
"image"
] | [
"func",
"GetCompressedTextureImage",
"(",
"texture",
"uint32",
",",
"<mask>",
"int32",
",",
"bufSize",
"int32",
",",
"pixels",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
".",
"glowGetCompressedTextureImage",
"(",
"gpGetCompressedTextureImage",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
"texture",
")",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"level",
")",
",",
"(",
"C",
".",
"GLsizei",
")",
"(",
"bufSize",
")",
",",
"pixels",
")",
"\n",
"}"
] |
15,233 | all-15234 | [
"ShowHelp",
"displays",
"help",
"for",
"the",
"given",
"command",
"and",
"flags",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"ShowHelp",
"(",
"cmd",
",",
"hrefPrefix",
"string",
",",
"values",
"ActionCommands",
")",
"error",
"{",
"target",
",",
"_",
",",
"err",
":=",
"a",
".",
"ParseCommandAndFlags",
"(",
"cmd",
",",
"hrefPrefix",
",",
"values",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"_",
",",
"action",
",",
"href",
":=",
"target",
".",
"Resource",
",",
"target",
".",
"Action",
",",
"target",
".",
"Href",
"\n",
"if",
"len",
"(",
"action",
".",
"CommandFlags",
")",
"==",
"0",
"{",
"fmt",
".",
"Printf",
"(",
"\"",
"\\n",
"\\n",
"\\n",
"\"",
",",
"strings",
".",
"Split",
"(",
"cmd",
",",
"\"",
"\"",
")",
"[",
"0",
"]",
",",
"action",
".",
"Name",
",",
"href",
",",
"action",
".",
"Description",
")",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"flagHelp",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"len",
"(",
"<mask>",
".",
"CommandFlags",
")",
")",
"\n",
"for",
"i",
",",
"f",
":=",
"range",
"action",
".",
"CommandFlags",
"{",
"var",
"attrs",
"string",
"\n",
"if",
"f",
".",
"Mandatory",
"{",
"attrs",
"=",
"\"",
"\"",
"\n",
"}",
"else",
"{",
"attrs",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"if",
"len",
"(",
"f",
".",
"ValidValues",
")",
">",
"0",
"{",
"attrs",
"+=",
"\"",
"\"",
"+",
"strings",
".",
"Join",
"(",
"f",
".",
"ValidValues",
",",
"\"",
"\"",
")",
"+",
"\"",
"\"",
"\n",
"}",
"\n",
"if",
"f",
".",
"Regexp",
"!=",
"nil",
"{",
"attrs",
"+=",
"\"",
"\"",
"+",
"f",
".",
"Regexp",
".",
"String",
"(",
")",
"+",
"\"",
"\"",
"\n",
"}",
"\n",
"flagHelp",
"[",
"i",
"]",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"f",
".",
"Name",
",",
"f",
".",
"Type",
",",
"attrs",
",",
"f",
".",
"Description",
")",
"\n",
"}",
"\n",
"fmt",
".",
"Printf",
"(",
"\"",
"\\n",
"\\n",
"\\n",
"\\n",
"\"",
",",
"strings",
".",
"Split",
"(",
"cmd",
",",
"\"",
"\"",
")",
"[",
"0",
"]",
",",
"action",
".",
"Name",
",",
"href",
",",
"action",
".",
"Description",
")",
"\n",
"fmt",
".",
"Printf",
"(",
"\"",
"\\n",
"\\n",
"\"",
",",
"strings",
".",
"Join",
"(",
"flagHelp",
",",
"\"",
"\\n",
"\\n",
"\"",
")",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,234 | all-15235 | [
"GetTypeOk",
"returns",
"a",
"tuple",
"with",
"the",
"Type",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HeatmapDefinition",
")",
"GetTypeOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"h",
"==",
"nil",
"||",
"h",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"h",
".",
"Type",
",",
"true",
"\n",
"}"
] |
15,235 | all-15236 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetMediaTextParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss18",
"(",
"&",
"r",
",",
"v",
")",
"\n",
"return",
"r",
".",
"Error",
"(",
")",
"\n",
"}"
] |
15,236 | all-15237 | [
"NewClient",
"returns",
"a",
"new",
"gerrit",
"client"
] | [
"func",
"NewClient",
"(",
"instances",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"c",
":=",
"&",
"Client",
"{",
"handlers",
":",
"map",
"[",
"string",
"]",
"*",
"gerritInstanceHandler",
"{",
"}",
",",
"}",
"\n",
"for",
"instance",
":=",
"range",
"instances",
"{",
"gc",
",",
"err",
":=",
"gerrit",
".",
"NewClient",
"(",
"instance",
",",
"nil",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"c",
".",
"handlers",
"[",
"instance",
"]",
"=",
"&",
"gerritInstanceHandler",
"{",
"instance",
":",
"instance",
",",
"projects",
":",
"instances",
"[",
"instance",
"]",
",",
"authService",
":",
"gc",
".",
"Authentication",
",",
"accountService",
":",
"gc",
".",
"Accounts",
",",
"changeService",
":",
"gc",
".",
"Changes",
",",
"projectService",
":",
"gc",
".",
"Projects",
",",
"}",
"\n",
"}",
"\n\n",
"return",
"c",
",",
"nil",
"\n",
"}"
] |
15,237 | all-15238 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetDOMStorageItemParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage1",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
15,238 | all-15239 | [
"Say",
"accepts",
"a",
"room",
"id",
"the",
"name",
"of",
"the",
"client",
"in",
"the",
"room",
"and",
"the",
"message",
"body",
"and",
"sends",
"the",
"message",
"to",
"the",
"HipChat",
"room",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Say",
"(",
"roomId",
",",
"name",
",",
"body",
"string",
")",
"{",
"c",
".",
"connection",
".",
"MUCSend",
"(",
"\"",
"\"",
",",
"roomId",
",",
"c",
".",
"<mask>",
"+",
"\"",
"\"",
"+",
"name",
",",
"body",
")",
"\n",
"}"
] |
15,239 | all-15240 | [
"Do",
"executes",
"DOM",
".",
"getBoxModel",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"model",
"-",
"Box",
"model",
"for",
"the",
"node",
"."
] | [
"func",
"(",
"p",
"*",
"GetBoxModelParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"model",
"*",
"BoxModel",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetBoxModelReturns",
"\n",
"err",
"=",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandGetBoxModel",
",",
"p",
",",
"&",
"res",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"<mask>",
".",
"Model",
",",
"nil",
"\n",
"}"
] |
15,240 | all-15241 | [
"MatchRegexp",
"succeeds",
"if",
"actual",
"is",
"a",
"string",
"or",
"stringer",
"that",
"matches",
"the",
"passed",
"-",
"in",
"regexp",
".",
"Optional",
"arguments",
"can",
"be",
"provided",
"to",
"construct",
"a",
"regexp",
"via",
"fmt",
".",
"Sprintf",
"()",
"."
] | [
"func",
"MatchRegexp",
"(",
"regexp",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"<mask>",
".",
"GomegaMatcher",
"{",
"return",
"&",
"matchers",
".",
"MatchRegexpMatcher",
"{",
"Regexp",
":",
"regexp",
",",
"Args",
":",
"args",
",",
"}",
"\n",
"}"
] |
15,241 | all-15242 | [
"WaitRecord",
"blocks",
"until",
"a",
"log",
".",
"Record",
"is",
"received",
"on",
"the",
"given",
"channel",
".",
"It",
"returns",
"the",
"emitted",
"record",
"or",
"nil",
"if",
"no",
"record",
"was",
"received",
"within",
"the",
"given",
"timeout",
".",
"Useful",
"in",
"conjunction",
"with",
"log",
".",
"ChannelHandler",
"for",
"asynchronous",
"testing",
"."
] | [
"func",
"WaitRecord",
"(",
"ch",
"chan",
"*",
"log",
".",
"Record",
",",
"timeout",
"time",
".",
"Duration",
")",
"*",
"log",
".",
"Record",
"{",
"select",
"{",
"case",
"record",
":=",
"<-",
"ch",
":",
"return",
"record",
"\n",
"<mask>",
"<-",
"time",
".",
"After",
"(",
"timeout",
")",
":",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
15,242 | all-15243 | [
"Backspace",
"removes",
"the",
"rune",
"that",
"precedes",
"the",
"cursor",
"It",
"handles",
"being",
"at",
"the",
"beginning",
"or",
"end",
"of",
"the",
"row",
"and",
"moves",
"the",
"cursor",
"to",
"the",
"appropriate",
"position",
"."
] | [
"func",
"(",
"c",
"*",
"Cursor",
")",
"Backspace",
"(",
")",
"{",
"a",
":=",
"c",
".",
"input",
"\n",
"i",
":=",
"c",
".",
"Position",
"\n",
"if",
"i",
"==",
"0",
"{",
"// Shrug",
"return",
"\n",
"}",
"\n",
"if",
"i",
"==",
"len",
"(",
"a",
")",
"{",
"c",
".",
"input",
"=",
"a",
"[",
":",
"i",
"-",
"1",
"]",
"\n",
"}",
"else",
"{",
"c",
".",
"input",
"=",
"<mask>",
"(",
"a",
"[",
":",
"i",
"-",
"1",
"]",
",",
"a",
"[",
"i",
":",
"]",
"...",
")",
"\n",
"}",
"\n",
"// now it's pointing to the i+1th element",
"c",
".",
"Move",
"(",
"-",
"1",
")",
"\n",
"}"
] |
15,243 | all-15244 | [
"writeResponse",
"gets",
"the",
"response",
"from",
"onlyUpdateStatus",
"and",
"writes",
"it",
"to",
"w",
"."
] | [
"func",
"writeResponse",
"(",
"ar",
"admissionapi",
".",
"AdmissionRequest",
",",
"w",
"io",
".",
"Writer",
",",
"decide",
"decider",
")",
"error",
"{",
"response",
",",
"err",
":=",
"decide",
"(",
"ar",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"logrus",
".",
"WithError",
"(",
"err",
")",
".",
"Error",
"(",
"\"",
"\"",
")",
"\n",
"response",
"=",
"&",
"admissionapi",
".",
"AdmissionResponse",
"{",
"<mask>",
":",
"&",
"meta",
".",
"Status",
"{",
"Message",
":",
"err",
".",
"Error",
"(",
")",
",",
"}",
",",
"}",
"\n",
"}",
"\n",
"var",
"result",
"admissionapi",
".",
"AdmissionReview",
"\n",
"result",
".",
"Response",
"=",
"response",
"\n",
"result",
".",
"Response",
".",
"UID",
"=",
"ar",
".",
"UID",
"\n",
"out",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"result",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"if",
"_",
",",
"err",
":=",
"w",
".",
"Write",
"(",
"out",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,244 | all-15245 | [
"GetShowLatency",
"returns",
"the",
"ShowLatency",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"TraceServiceDefinition",
")",
"GetShowLatency",
"(",
")",
"bool",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"ShowLatency",
"==",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"ShowLatency",
"\n",
"}"
] |
15,245 | all-15246 | [
"Tell",
"the",
"CollectorClient",
"to",
"shutdown",
"and",
"stop",
"reporting",
"application",
"performance",
"data",
"to",
"New",
"Relic",
"."
] | [
"func",
"RequestShutdown",
"(",
"<mask>",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"creason",
":=",
"C",
".",
"CString",
"(",
"reason",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"creason",
")",
")",
"\n",
"return",
"errNo",
"(",
"C",
".",
"newrelic_request_shutdown",
"(",
"creason",
")",
")",
"\n",
"}"
] |
15,246 | all-15247 | [
"Using",
"the",
"classic",
"API",
"posts",
"a",
"value",
"to",
"a",
"stat",
"at",
"a",
"specific",
"time",
"."
] | [
"func",
"(",
"r",
"*",
"BasicReporter",
")",
"PostValueTime",
"(",
"statKey",
",",
"userKey",
"string",
",",
"value",
"float64",
",",
"timestamp",
"int64",
")",
"error",
"{",
"x",
":=",
"newClassicStatValue",
"(",
"statKey",
",",
"userKey",
",",
"<mask>",
")",
"\n",
"x",
".",
"Timestamp",
"=",
"timestamp",
"\n",
"r",
".",
"add",
"(",
"x",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,247 | all-15248 | [
"HasUrl",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"IframeDefinition",
")",
"HasUrl",
"(",
")",
"bool",
"{",
"if",
"i",
"!=",
"nil",
"&&",
"i",
".",
"Url",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
15,248 | all-15249 | [
"Step",
"2",
":",
"Search",
"for",
"one",
"of",
"the",
"following",
"suffixes",
"in",
"R1",
"and",
"if",
"found",
"delete",
"the",
"last",
"letter",
"."
] | [
"func",
"step2",
"(",
"w",
"*",
"snowballword",
".",
"SnowballWord",
")",
"bool",
"{",
"suffix",
",",
"suffixRunes",
":=",
"w",
".",
"FirstSuffix",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
")",
"\n\n",
"// If it is not in R1, do nothing",
"if",
"suffix",
"==",
"\"",
"\"",
"||",
"len",
"(",
"suffixRunes",
")",
">",
"len",
"(",
"w",
".",
"RS",
")",
"-",
"w",
".",
"R1start",
"{",
"return",
"false",
"\n",
"}",
"\n",
"w",
".",
"RemoveLastNRunes",
"(",
"1",
")",
"\n",
"return",
"<mask>",
"\n",
"}"
] |
15,249 | all-15250 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetXHRBreakpointParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
15,250 | all-15251 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"DispatchMouseEventPointerType",
")",
"MarshalEasyJSON",
"(",
"<mask>",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"out",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
15,251 | all-15252 | [
"String",
"returns",
"a",
"debug",
"text",
"view",
"of",
"the",
"path"
] | [
"func",
"(",
"p",
"*",
"Path",
")",
"String",
"(",
")",
"string",
"{",
"s",
":=",
"\"",
"\"",
"\n",
"j",
":=",
"0",
"\n",
"for",
"_",
",",
"cmd",
":=",
"range",
"p",
".",
"Components",
"{",
"switch",
"cmd",
"{",
"case",
"MoveToCmp",
":",
"s",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"p",
".",
"Points",
"[",
"j",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"1",
"]",
")",
"\n",
"j",
"=",
"j",
"+",
"2",
"\n",
"case",
"LineToCmp",
":",
"s",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"p",
".",
"Points",
"[",
"j",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"1",
"]",
")",
"\n",
"j",
"=",
"j",
"+",
"2",
"\n",
"case",
"QuadCurveToCmp",
":",
"s",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"p",
".",
"Points",
"[",
"j",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"1",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"2",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"3",
"]",
")",
"\n",
"j",
"=",
"j",
"+",
"4",
"\n",
"<mask>",
"CubicCurveToCmp",
":",
"s",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"p",
".",
"Points",
"[",
"j",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"1",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"2",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"3",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"4",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"5",
"]",
")",
"\n",
"j",
"=",
"j",
"+",
"6",
"\n",
"case",
"ArcToCmp",
":",
"s",
"+=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\\n",
"\"",
",",
"p",
".",
"Points",
"[",
"j",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"1",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"2",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"3",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"4",
"]",
",",
"p",
".",
"Points",
"[",
"j",
"+",
"5",
"]",
")",
"\n",
"j",
"=",
"j",
"+",
"6",
"\n",
"case",
"CloseCmp",
":",
"s",
"+=",
"\"",
"\\n",
"\"",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"s",
"\n",
"}"
] |
15,252 | all-15253 | [
"GetIdOk",
"returns",
"a",
"tuple",
"with",
"the",
"Id",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"b",
"*",
"Board",
")",
"GetIdOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"b",
"==",
"nil",
"||",
"b",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"b",
".",
"Id",
",",
"true",
"\n",
"}"
] |
15,253 | all-15254 | [
"AddAccelerator",
"is",
"a",
"wrapper",
"around",
"gtk_widget_add_accelerator",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"AddAccelerator",
"(",
"signal",
"string",
",",
"group",
"*",
"AccelGroup",
",",
"key",
"uint",
",",
"mods",
"gdk",
".",
"ModifierType",
",",
"<mask>",
"AccelFlags",
")",
"{",
"csignal",
":=",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"C",
".",
"CString",
"(",
"signal",
")",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"csignal",
")",
")",
"\n\n",
"C",
".",
"gtk_widget_add_accelerator",
"(",
"v",
".",
"native",
"(",
")",
",",
"csignal",
",",
"group",
".",
"native",
"(",
")",
",",
"C",
".",
"guint",
"(",
"key",
")",
",",
"C",
".",
"GdkModifierType",
"(",
"mods",
")",
",",
"C",
".",
"GtkAccelFlags",
"(",
"flags",
")",
")",
"\n",
"}"
] |
15,254 | all-15255 | [
"Range",
"returns",
"the",
"index",
"entries",
"within",
"lat",
"lng",
"range",
"."
] | [
"func",
"(",
"geoIndex",
"*",
"geoIndex",
")",
"Range",
"(",
"topLeft",
"Point",
",",
"bottomRight",
"Point",
")",
"[",
"]",
"interface",
"{",
"}",
"{",
"topLeftIndex",
":=",
"cellOf",
"(",
"topLeft",
",",
"geoIndex",
".",
"resolution",
")",
"\n",
"bottomRightIndex",
":=",
"cellOf",
"(",
"bottomRight",
",",
"geoIndex",
".",
"resolution",
")",
"\n\n",
"return",
"geoIndex",
".",
"<mask>",
"(",
"bottomRightIndex",
".",
"x",
",",
"topLeftIndex",
".",
"x",
",",
"topLeftIndex",
".",
"y",
",",
"bottomRightIndex",
".",
"y",
")",
"\n",
"}"
] |
15,255 | all-15256 | [
"FormatSecondaryText",
"is",
"a",
"wrapper",
"around",
"gtk_message_dialog_format_secondary_text",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"MessageDialog",
")",
"FormatSecondaryText",
"(",
"format",
"string",
",",
"a",
"...",
"<mask>",
"{",
"}",
")",
"{",
"s",
":=",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"a",
"...",
")",
"\n",
"cstr",
":=",
"C",
".",
"CString",
"(",
"s",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n",
"C",
".",
"_gtk_message_dialog_format_secondary_text",
"(",
"v",
".",
"native",
"(",
")",
",",
"(",
"*",
"C",
".",
"gchar",
")",
"(",
"cstr",
")",
")",
"\n",
"}"
] |
15,256 | all-15257 | [
"NewRealRelay",
"creates",
"a",
"TChannel",
"relay",
"."
] | [
"func",
"NewRealRelay",
"(",
"<mask>",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
")",
"(",
"Relay",
",",
"error",
")",
"{",
"hosts",
":=",
"&",
"fixedHosts",
"{",
"hosts",
":",
"services",
"}",
"\n",
"ch",
",",
"err",
":=",
"tchannel",
".",
"NewChannel",
"(",
"\"",
"\"",
",",
"&",
"tchannel",
".",
"ChannelOptions",
"{",
"RelayHost",
":",
"relaytest",
".",
"HostFunc",
"(",
"hosts",
".",
"Get",
")",
",",
"Logger",
":",
"tchannel",
".",
"NewLevelLogger",
"(",
"tchannel",
".",
"NewLogger",
"(",
"os",
".",
"Stderr",
")",
",",
"tchannel",
".",
"LogLevelWarn",
")",
",",
"}",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"err",
":=",
"ch",
".",
"ListenAndServe",
"(",
"\"",
"\"",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"return",
"&",
"realRelay",
"{",
"ch",
":",
"ch",
",",
"hosts",
":",
"hosts",
",",
"}",
",",
"nil",
"\n",
"}"
] |
15,257 | all-15258 | [
"LocatorFunc",
"returns",
"the",
"source",
"code",
"for",
"building",
"a",
"locator",
"instance",
"from",
"a",
"resource",
"."
] | [
"func",
"LocatorFunc",
"(",
"attributes",
"[",
"]",
"*",
"gen",
".",
"Attribute",
",",
"name",
"string",
")",
"string",
"{",
"hasLinks",
":=",
"false",
"\n",
"for",
"_",
",",
"a",
":=",
"range",
"attributes",
"{",
"if",
"a",
".",
"FieldName",
"==",
"\"",
"\"",
"{",
"hasLinks",
"=",
"<mask>",
"\n",
"break",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"!",
"hasLinks",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"`for _, l := range r.Links {\n\t\t\tif l[\"rel\"] == \"self\" {\n\t\t\t\treturn api.`",
"+",
"name",
"+",
"`Locator(l[\"href\"])\n\t\t\t}\n\t\t}\n\t\treturn nil`",
"\n",
"}"
] |
15,258 | all-15259 | [
"maybeLastIndex",
"returns",
"the",
"last",
"index",
"if",
"it",
"has",
"at",
"least",
"one",
"unstable",
"entry",
"or",
"snapshot",
"."
] | [
"func",
"(",
"u",
"*",
"unstable",
")",
"maybeLastIndex",
"(",
")",
"(",
"uint64",
",",
"bool",
")",
"{",
"if",
"l",
":=",
"len",
"(",
"u",
".",
"entries",
")",
";",
"l",
"!=",
"0",
"{",
"return",
"u",
".",
"offset",
"+",
"uint64",
"(",
"l",
")",
"-",
"1",
",",
"true",
"\n",
"}",
"\n",
"if",
"u",
".",
"snapshot",
"!=",
"nil",
"{",
"return",
"u",
".",
"snapshot",
".",
"Metadata",
".",
"Index",
",",
"true",
"\n",
"}",
"\n",
"return",
"0",
",",
"<mask>",
"\n",
"}"
] |
15,259 | all-15260 | [
"SuccessFunc",
"outputs",
"Success",
"level",
"log",
"returned",
"from",
"the",
"function"
] | [
"func",
"(",
"g",
"*",
"Glg",
")",
"SuccessFunc",
"(",
"f",
"func",
"(",
")",
"string",
")",
"error",
"{",
"if",
"g",
".",
"isModeEnable",
"(",
"OK",
")",
"{",
"return",
"g",
".",
"out",
"(",
"<mask>",
",",
"\"",
"\"",
",",
"f",
"(",
")",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,260 | all-15261 | [
"nthDataRaw",
"is",
"a",
"wrapper",
"around",
"g_list_nth_data",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"nthDataRaw",
"(",
"n",
"uint",
")",
"unsafe",
".",
"Pointer",
"{",
"return",
"unsafe",
".",
"Pointer",
"(",
"C",
".",
"g_list_nth_data",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"guint",
"(",
"n",
")",
")",
")",
"\n",
"}"
] |
15,261 | all-15262 | [
"GetSubdomainOk",
"returns",
"a",
"tuple",
"with",
"the",
"Subdomain",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"i",
"*",
"integrationPD",
")",
"GetSubdomainOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"i",
"==",
"nil",
"||",
"i",
".",
"Subdomain",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
"i",
".",
"Subdomain",
",",
"true",
"\n",
"}"
] |
15,262 | all-15263 | [
"Flush",
"writes",
"any",
"buffered",
"data",
"to",
"the",
"underlying",
"io",
".",
"Writer",
"ensuring",
"that",
"any",
"pending",
"data",
"is",
"displayed",
"."
] | [
"func",
"(",
"s",
"*",
"ScreenBuf",
")",
"Flush",
"(",
")",
"error",
"{",
"for",
"i",
":=",
"s",
".",
"cursor",
";",
"i",
"<",
"s",
".",
"height",
";",
"i",
"++",
"{",
"if",
"i",
"<",
"s",
".",
"<mask>",
"{",
"_",
",",
"err",
":=",
"s",
".",
"buf",
".",
"Write",
"(",
"clearLine",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"_",
",",
"err",
":=",
"s",
".",
"buf",
".",
"Write",
"(",
"moveDown",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"_",
",",
"err",
":=",
"s",
".",
"buf",
".",
"WriteTo",
"(",
"s",
".",
"w",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"s",
".",
"buf",
".",
"Reset",
"(",
")",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"s",
".",
"height",
";",
"i",
"++",
"{",
"_",
",",
"err",
":=",
"s",
".",
"buf",
".",
"Write",
"(",
"moveUp",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"}",
"\n\n",
"s",
".",
"cursor",
"=",
"0",
"\n\n",
"return",
"nil",
"\n",
"}"
] |
15,263 | all-15264 | [
"Step",
"3",
"is",
"the",
"stemming",
"of",
"various",
"longer",
"sufficies",
"found",
"in",
"R1",
"."
] | [
"func",
"step3",
"(",
"w",
"*",
"snowballword",
".",
"SnowballWord",
")",
"bool",
"{",
"suffix",
",",
"suffixRunes",
":=",
"w",
".",
"FirstSuffix",
"(",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
")",
"\n\n",
"// If it is not in R1, do nothing",
"if",
"suffix",
"==",
"\"",
"\"",
"||",
"len",
"(",
"suffixRunes",
")",
">",
"len",
"(",
"w",
".",
"RS",
")",
"-",
"w",
".",
"R1start",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"// Handle special cases where we're not just going to",
"// replace the suffix with another suffix: there are",
"// other things we need to do.",
"//",
"if",
"suffix",
"==",
"\"",
"\"",
"{",
"// If in R2, delete.",
"//",
"if",
"len",
"(",
"w",
".",
"RS",
")",
"-",
"w",
".",
"R2start",
">=",
"5",
"{",
"w",
".",
"RemoveLastNRunes",
"(",
"len",
"(",
"suffixRunes",
")",
")",
"\n",
"return",
"<mask>",
"\n",
"}",
"\n",
"return",
"false",
"\n",
"}",
"\n\n",
"// Handle a suffix that was found, which is going",
"// to be replaced with a different suffix.",
"//",
"var",
"repl",
"string",
"\n",
"switch",
"suffix",
"{",
"case",
"\"",
"\"",
":",
"repl",
"=",
"\"",
"\"",
"\n",
"case",
"\"",
"\"",
":",
"repl",
"=",
"\"",
"\"",
"\n",
"case",
"\"",
"\"",
":",
"repl",
"=",
"\"",
"\"",
"\n",
"case",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
":",
"repl",
"=",
"\"",
"\"",
"\n",
"case",
"\"",
"\"",
",",
"\"",
"\"",
":",
"repl",
"=",
"\"",
"\"",
"\n",
"}",
"\n",
"w",
".",
"ReplaceSuffixRunes",
"(",
"suffixRunes",
",",
"[",
"]",
"rune",
"(",
"repl",
")",
",",
"true",
")",
"\n",
"return",
"true",
"\n\n",
"}"
] |
15,264 | all-15265 | [
"Next",
"advances",
"to",
"the",
"next",
"position",
"."
] | [
"func",
"(",
"s",
"*",
"Iterator",
")",
"Next",
"(",
")",
"{",
"y",
".",
"AssertTrue",
"(",
"s",
".",
"Valid",
"(",
")",
")",
"\n",
"s",
".",
"n",
"=",
"s",
".",
"<mask>",
".",
"getNext",
"(",
"s",
".",
"n",
",",
"0",
")",
"\n",
"}"
] |
15,265 | all-15266 | [
"NewEndpointWithTTL",
"initialization",
"method",
"to",
"be",
"used",
"to",
"create",
"an",
"endpoint",
"with",
"a",
"TTL",
"struct"
] | [
"func",
"NewEndpointWithTTL",
"(",
"dnsName",
",",
"recordType",
"string",
",",
"ttl",
"TTL",
",",
"targets",
"...",
"string",
")",
"*",
"Endpoint",
"{",
"cleanTargets",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"len",
"(",
"targets",
")",
")",
"\n",
"for",
"idx",
",",
"<mask>",
":=",
"range",
"targets",
"{",
"cleanTargets",
"[",
"idx",
"]",
"=",
"strings",
".",
"TrimSuffix",
"(",
"target",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
"&",
"Endpoint",
"{",
"DNSName",
":",
"strings",
".",
"TrimSuffix",
"(",
"dnsName",
",",
"\"",
"\"",
")",
",",
"Targets",
":",
"cleanTargets",
",",
"RecordType",
":",
"recordType",
",",
"Labels",
":",
"NewLabels",
"(",
")",
",",
"RecordTTL",
":",
"ttl",
",",
"}",
"\n",
"}"
] |
15,266 | all-15267 | [
"PutUint16",
"sets",
"a",
"16",
"-",
"bit",
"unsigned",
"value",
"for",
"the",
"given",
"field",
"name",
".",
"The",
"field",
"name",
"must",
"be",
"a",
"Uint16Field",
"otherwise",
"an",
"error",
"will",
"be",
"returned",
".",
"If",
"the",
"type",
"buffer",
"no",
"longer",
"has",
"enough",
"space",
"to",
"write",
"the",
"value",
"an",
"xbinary",
".",
"ErrOutOfRange",
"error",
"will",
"be",
"returned",
".",
"Upon",
"success",
"the",
"number",
"of",
"bytes",
"written",
"as",
"well",
"as",
"a",
"nil",
"error",
"will",
"be",
"returned",
".",
"The",
"type",
"code",
"will",
"be",
"writtn",
"first",
".",
"If",
"the",
"value",
"is",
"<",
"math",
".",
"MaxUint8",
"only",
"1",
"byte",
"will",
"be",
"written",
".",
"Otherwise",
"the",
"entire",
"16",
"-",
"bit",
"value",
"will",
"be",
"written",
"."
] | [
"func",
"(",
"b",
"*",
"TupleBuilder",
")",
"PutUint16",
"(",
"field",
"string",
",",
"value",
"uint16",
")",
"(",
"wrote",
"uint64",
",",
"err",
"error",
")",
"{",
"// field type should be",
"if",
"err",
"=",
"b",
".",
"typeCheck",
"(",
"field",
",",
"Uint16Field",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n\n",
"if",
"value",
"<",
"math",
".",
"MaxUint8",
"{",
"// minimum bytes is 2 (type code + value)",
"if",
"b",
".",
"available",
"(",
")",
"<",
"2",
"{",
"return",
"0",
",",
"xbinary",
".",
"ErrOutOfRange",
"\n",
"}",
"\n\n",
"// write type code",
"b",
".",
"buffer",
"[",
"b",
".",
"pos",
"]",
"=",
"byte",
"(",
"UnsignedShort8Code",
".",
"OpCode",
")",
"\n\n",
"// write value",
"b",
".",
"buffer",
"[",
"b",
".",
"pos",
"+",
"1",
"]",
"=",
"<mask>",
"(",
"value",
")",
"\n\n",
"// set field offset",
"b",
".",
"offsets",
"[",
"field",
"]",
"=",
"b",
".",
"pos",
"\n\n",
"// incr pos",
"b",
".",
"pos",
"+=",
"2",
"\n\n",
"return",
"2",
",",
"nil",
"\n",
"}",
"\n\n",
"// write value",
"// length check performed by xbinary",
"wrote",
",",
"err",
"=",
"xbinary",
".",
"LittleEndian",
".",
"PutUint16",
"(",
"b",
".",
"buffer",
",",
"b",
".",
"pos",
"+",
"1",
",",
"value",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n\n",
"// write type code",
"b",
".",
"buffer",
"[",
"b",
".",
"pos",
"]",
"=",
"byte",
"(",
"UnsignedShort16Code",
".",
"OpCode",
")",
"\n\n",
"// set field offset",
"b",
".",
"offsets",
"[",
"field",
"]",
"=",
"b",
".",
"pos",
"\n\n",
"// incr pos",
"b",
".",
"pos",
"+=",
"3",
"\n\n",
"// wrote 3 bytes",
"return",
"3",
",",
"nil",
"\n\n",
"}"
] |
15,267 | all-15268 | [
"StandardRegistration",
"performsa",
"a",
"basic",
"set",
"of",
"registration",
"commands"
] | [
"func",
"(",
"bot",
"*",
"Bot",
")",
"StandardRegistration",
"(",
")",
"{",
"//Server registration",
"if",
"bot",
".",
"Password",
"!=",
"\"",
"\"",
"{",
"bot",
".",
"Send",
"(",
"\"",
"\"",
"+",
"bot",
".",
"Password",
")",
"\n",
"}",
"\n",
"bot",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"bot",
".",
"sendUserCommand",
"(",
"<mask>",
".",
"Nick",
",",
"bot",
".",
"Nick",
",",
"\"",
"\"",
")",
"\n",
"bot",
".",
"SetNick",
"(",
"bot",
".",
"Nick",
")",
"\n",
"}"
] |
15,268 | all-15269 | [
"FindExternalRepo",
"attempts",
"to",
"locate",
"the",
"directory",
"where",
"Bazel",
"has",
"fetched",
"the",
"external",
"repository",
"with",
"the",
"given",
"name",
".",
"An",
"error",
"is",
"returned",
"if",
"the",
"repository",
"directory",
"cannot",
"be",
"located",
"."
] | [
"func",
"FindExternalRepo",
"(",
"repoRoot",
",",
"<mask>",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"// See https://docs.bazel.build/versions/master/output_directories.html",
"// for documentation on Bazel directory layout.",
"// We expect the bazel-out symlink in the workspace root directory to point to",
"// <output-base>/execroot/<workspace-name>/bazel-out",
"// We expect the external repository to be checked out at",
"// <output-base>/external/<name>",
"// Note that users can change the prefix for most of the Bazel symlinks with",
"// --symlink_prefix, but this does not include bazel-out.",
"externalPath",
":=",
"strings",
".",
"Join",
"(",
"[",
"]",
"string",
"{",
"repoRoot",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"name",
"}",
",",
"string",
"(",
"os",
".",
"PathSeparator",
")",
")",
"\n",
"cleanPath",
",",
"err",
":=",
"filepath",
".",
"EvalSymlinks",
"(",
"externalPath",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err",
"\n",
"}",
"\n",
"st",
",",
"err",
":=",
"os",
".",
"Stat",
"(",
"cleanPath",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err",
"\n",
"}",
"\n",
"if",
"!",
"st",
".",
"IsDir",
"(",
")",
"{",
"return",
"\"",
"\"",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"externalPath",
")",
"\n",
"}",
"\n",
"return",
"cleanPath",
",",
"nil",
"\n",
"}"
] |
15,269 | all-15270 | [
"GetDpiY",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_context_get_dpi_y",
"()",
"."
] | [
"func",
"(",
"pc",
"*",
"PrintContext",
")",
"GetDpiY",
"(",
")",
"float64",
"{",
"c",
":=",
"C",
".",
"gtk_print_context_get_dpi_y",
"(",
"<mask>",
".",
"native",
"(",
")",
")",
"\n",
"return",
"float64",
"(",
"c",
")",
"\n",
"}"
] |
15,270 | all-15271 | [
"OnClosingContext",
"derives",
"a",
"context",
"from",
"a",
"given",
"goprocess",
"that",
"will",
"be",
"Done",
"when",
"the",
"process",
"is",
"closing"
] | [
"func",
"OnClosingContext",
"(",
"p",
"goprocess",
".",
"<mask>",
")",
"context",
".",
"Context",
"{",
"return",
"&",
"procContext",
"{",
"done",
":",
"p",
".",
"Closing",
"(",
")",
",",
"which",
":",
"closing",
",",
"}",
"\n",
"}"
] |
15,271 | all-15272 | [
"drop",
"drops",
"all",
"capabilities",
"for",
"the",
"current",
"process",
"except",
"those",
"specified",
"in",
"the",
"whitelist",
"."
] | [
"func",
"(",
"w",
"*",
"whitelist",
")",
"<mask>",
"(",
")",
"error",
"{",
"w",
".",
"pid",
".",
"Clear",
"(",
"allCapabilityTypes",
")",
"\n",
"w",
".",
"pid",
".",
"Set",
"(",
"allCapabilityTypes",
",",
"w",
".",
"keep",
"...",
")",
"\n",
"return",
"w",
".",
"pid",
".",
"Apply",
"(",
"allCapabilityTypes",
")",
"\n",
"}"
] |
15,272 | all-15273 | [
"BatchUpdate",
"updates",
"multiple",
"rows",
"by",
"id"
] | [
"func",
"(",
"s",
"BoltStore",
")",
"BatchUpdate",
"(",
"ids",
"[",
"]",
"interface",
"{",
"}",
",",
"data",
"[",
"]",
"<mask>",
"{",
"}",
",",
"store",
"string",
",",
"opts",
"ObjectStoreOptions",
")",
"(",
"err",
"error",
")",
"{",
"return",
"ErrNotImplemented",
"\n",
"}"
] |
15,273 | all-15274 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RequestDatabaseNamesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"<mask>",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
15,274 | all-15275 | [
"StartSpan",
"belongs",
"to",
"the",
"Tracer",
"interface",
"."
] | [
"func",
"(",
"t",
"*",
"MockTracer",
")",
"StartSpan",
"(",
"operationName",
"string",
",",
"opts",
"...",
"opentracing",
".",
"StartSpanOption",
")",
"opentracing",
".",
"Span",
"{",
"sso",
":=",
"opentracing",
".",
"StartSpanOptions",
"{",
"}",
"\n",
"for",
"_",
",",
"o",
":=",
"<mask>",
"opts",
"{",
"o",
".",
"Apply",
"(",
"&",
"sso",
")",
"\n",
"}",
"\n",
"return",
"newMockSpan",
"(",
"t",
",",
"operationName",
",",
"sso",
")",
"\n",
"}"
] |
15,275 | all-15276 | [
"/",
"*",
"create",
"window"
] | [
"func",
"NewWindow",
"(",
"name",
"string",
",",
"flags",
"...",
"int",
")",
"*",
"Window",
"{",
"win_flags",
":=",
"C",
".",
"int",
"(",
"CV_WINDOW_AUTOSIZE",
")",
"\n",
"if",
"len",
"(",
"flags",
")",
">",
"0",
"{",
"win_flags",
"=",
"C",
".",
"int",
"(",
"flags",
"[",
"0",
"]",
")",
"\n",
"}",
"\n\n",
"win",
":=",
"&",
"Window",
"{",
"name",
":",
"name",
",",
"name_c",
":",
"C",
".",
"CString",
"(",
"name",
")",
",",
"flags",
":",
"win_flags",
",",
"trackbarHandle",
":",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"TrackbarFunc",
",",
"50",
")",
",",
"trackbarMax",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"int",
",",
"50",
")",
",",
"trackbarVal",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"int",
",",
"50",
")",
",",
"trackbarName",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"(",
"*",
"C",
".",
"char",
")",
",",
"50",
")",
",",
"trackbarParam",
":",
"make",
"(",
"map",
"[",
"string",
"]",
"(",
"[",
"]",
"interface",
"{",
"}",
")",
",",
"50",
")",
",",
"}",
"\n",
"C",
".",
"cvNamedWindow",
"(",
"win",
".",
"name_c",
",",
"win",
".",
"flags",
")",
"\n",
"C",
".",
"GoOpenCV_SetMouseCallback",
"(",
"win",
".",
"name_c",
")",
"\n\n",
"allWindows",
"[",
"win",
".",
"name",
"]",
"=",
"win",
"\n",
"return",
"win",
"\n",
"}"
] |
15,276 | all-15277 | [
"PutInt32",
"sets",
"a",
"32",
"-",
"bit",
"signed",
"value",
"for",
"the",
"given",
"field",
"name",
".",
"The",
"field",
"name",
"must",
"be",
"a",
"Int32Field",
".",
"Otherwise",
"an",
"error",
"will",
"be",
"returned",
".",
"If",
"the",
"type",
"buffer",
"no",
"longer",
"has",
"enough",
"space",
"to",
"write",
"the",
"value",
"an",
"xbinary",
".",
"ErrOutOfRange",
"error",
"will",
"be",
"returned",
".",
"Upon",
"success",
"the",
"number",
"of",
"bytes",
"written",
"as",
"well",
"as",
"a",
"nil",
"error",
"will",
"be",
"returned",
".",
"The",
"type",
"code",
"will",
"be",
"written",
"first",
".",
"If",
"the",
"absolute",
"value",
"is",
"<",
"math",
".",
"MaxUint8",
"only",
"1",
"byte",
"will",
"be",
"written",
".",
"If",
"the",
"absolute",
"value",
"is",
"<",
"math",
".",
"MaxUint16",
"only",
"2",
"bytes",
"will",
"be",
"written",
".",
"Otherwise",
"the",
"entire",
"32",
"-",
"bit",
"value",
"will",
"be",
"written",
"."
] | [
"func",
"(",
"b",
"*",
"TupleBuilder",
")",
"PutInt32",
"(",
"field",
"string",
",",
"value",
"int32",
")",
"(",
"wrote",
"uint64",
",",
"err",
"error",
")",
"{",
"// field type should be",
"if",
"err",
"=",
"b",
".",
"typeCheck",
"(",
"field",
",",
"Int32Field",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n\n",
"unsigned",
":=",
"uint32",
"(",
"value",
")",
"\n",
"if",
"unsigned",
"<",
"math",
".",
"MaxUint8",
"{",
"// minimum bytes is 2 (type code + value)",
"if",
"b",
".",
"available",
"(",
")",
"<",
"2",
"{",
"return",
"0",
",",
"xbinary",
".",
"ErrOutOfRange",
"\n",
"}",
"\n\n",
"// write type code",
"b",
".",
"buffer",
"[",
"b",
".",
"pos",
"]",
"=",
"byte",
"(",
"Int8Code",
".",
"OpCode",
")",
"\n\n",
"// write value",
"b",
".",
"buffer",
"[",
"b",
".",
"pos",
"+",
"1",
"]",
"=",
"byte",
"(",
"value",
")",
"\n\n",
"// set field offset",
"b",
".",
"offsets",
"[",
"field",
"]",
"=",
"b",
".",
"pos",
"\n\n",
"// incr pos",
"b",
".",
"pos",
"+=",
"2",
"\n\n",
"return",
"2",
",",
"nil",
"\n",
"}",
"else",
"if",
"unsigned",
"<",
"math",
".",
"MaxUint16",
"{",
"// write value",
"// length check performed by xbinary",
"wrote",
",",
"err",
"=",
"xbinary",
".",
"LittleEndian",
".",
"PutInt16",
"(",
"b",
".",
"buffer",
",",
"b",
".",
"pos",
"+",
"1",
",",
"int16",
"(",
"value",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n\n",
"// write type code",
"b",
".",
"buffer",
"[",
"b",
".",
"pos",
"]",
"=",
"byte",
"(",
"Int16Code",
".",
"OpCode",
")",
"\n\n",
"// set field offset",
"b",
".",
"offsets",
"[",
"field",
"]",
"=",
"b",
".",
"pos",
"\n\n",
"// incr pos",
"b",
".",
"pos",
"+=",
"3",
"\n\n",
"// wrote 3 bytes",
"return",
"3",
",",
"nil",
"\n",
"}",
"\n\n",
"// write value",
"// length check performed by xbinary",
"wrote",
",",
"err",
"=",
"xbinary",
".",
"LittleEndian",
".",
"PutInt32",
"(",
"b",
".",
"buffer",
",",
"b",
".",
"<mask>",
"+",
"1",
",",
"value",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n\n",
"// write type code",
"b",
".",
"buffer",
"[",
"b",
".",
"pos",
"]",
"=",
"byte",
"(",
"Int32Code",
".",
"OpCode",
")",
"\n\n",
"// set field offset",
"b",
".",
"offsets",
"[",
"field",
"]",
"=",
"b",
".",
"pos",
"\n\n",
"// incr pos",
"b",
".",
"pos",
"+=",
"5",
"\n\n",
"// wrote 5 bytes",
"return",
"5",
",",
"nil",
"\n",
"}"
] |
15,277 | all-15278 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"RequestChildNodesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom14",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
15,278 | all-15279 | [
"Debug",
"logs",
"msg",
"to",
"all",
"added",
"loggers",
"at",
"LogLevel",
".",
"LevelDebug"
] | [
"func",
"(",
"b",
"*",
"Base",
")",
"Debug",
"(",
"<mask>",
"string",
")",
"error",
"{",
"return",
"b",
".",
"Log",
"(",
"LevelDebug",
",",
"nil",
",",
"msg",
")",
"\n",
"}"
] |
15,279 | all-15280 | [
"delete",
"named",
"sampler",
"objects"
] | [
"func",
"DeleteSamplers",
"(",
"<mask>",
"int32",
",",
"samplers",
"*",
"uint32",
")",
"{",
"C",
".",
"glowDeleteSamplers",
"(",
"gpDeleteSamplers",
",",
"(",
"C",
".",
"GLsizei",
")",
"(",
"count",
")",
",",
"(",
"*",
"C",
".",
"GLuint",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"samplers",
")",
")",
")",
"\n",
"}"
] |
15,280 | all-15281 | [
"String",
"returns",
"the",
"name",
"of",
"e"
] | [
"func",
"(",
"e",
"SetOptionsResultCode",
")",
"String",
"(",
")",
"string",
"{",
"<mask>",
",",
"_",
":=",
"setOptionsResultCodeMap",
"[",
"int32",
"(",
"e",
")",
"]",
"\n",
"return",
"name",
"\n",
"}"
] |
15,281 | all-15282 | [
"validateAuthInfo",
"is",
"a",
"modified",
"copy",
"of",
"k8s",
".",
"io",
"/",
"kubernetes",
"/",
"pkg",
"/",
"client",
"/",
"unversioned",
"/",
"clientcmd",
".",
"DirectClientConfig",
".",
"validateAuthInfo",
".",
"validateAuthInfo",
"looks",
"for",
"conflicts",
"and",
"errors",
"in",
"the",
"auth",
"info"
] | [
"func",
"validateAuthInfo",
"(",
"authInfoName",
"string",
",",
"authInfo",
"clientcmdAuthInfo",
")",
"[",
"]",
"error",
"{",
"var",
"validationErrors",
"[",
"]",
"error",
"\n\n",
"usingAuthPath",
":=",
"false",
"\n",
"methods",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"0",
",",
"3",
")",
"\n",
"if",
"len",
"(",
"authInfo",
".",
"Token",
")",
"!=",
"0",
"{",
"methods",
"=",
"<mask>",
"(",
"methods",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"if",
"len",
"(",
"authInfo",
".",
"Username",
")",
"!=",
"0",
"||",
"len",
"(",
"authInfo",
".",
"Password",
")",
"!=",
"0",
"{",
"methods",
"=",
"append",
"(",
"methods",
",",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"authInfo",
".",
"ClientCertificate",
")",
"!=",
"0",
"||",
"len",
"(",
"authInfo",
".",
"ClientCertificateData",
")",
"!=",
"0",
"{",
"// Make sure cert data and file aren't both specified",
"if",
"len",
"(",
"authInfo",
".",
"ClientCertificate",
")",
"!=",
"0",
"&&",
"len",
"(",
"authInfo",
".",
"ClientCertificateData",
")",
"!=",
"0",
"{",
"validationErrors",
"=",
"append",
"(",
"validationErrors",
",",
"errors",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"authInfoName",
")",
")",
"\n",
"}",
"\n",
"// Make sure key data and file aren't both specified",
"if",
"len",
"(",
"authInfo",
".",
"ClientKey",
")",
"!=",
"0",
"&&",
"len",
"(",
"authInfo",
".",
"ClientKeyData",
")",
"!=",
"0",
"{",
"validationErrors",
"=",
"append",
"(",
"validationErrors",
",",
"errors",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"authInfoName",
")",
")",
"\n",
"}",
"\n",
"// Make sure a key is specified",
"if",
"len",
"(",
"authInfo",
".",
"ClientKey",
")",
"==",
"0",
"&&",
"len",
"(",
"authInfo",
".",
"ClientKeyData",
")",
"==",
"0",
"{",
"validationErrors",
"=",
"append",
"(",
"validationErrors",
",",
"errors",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"authInfoName",
")",
")",
"\n",
"}",
"\n\n",
"if",
"len",
"(",
"authInfo",
".",
"ClientCertificate",
")",
"!=",
"0",
"{",
"clientCertFile",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"authInfo",
".",
"ClientCertificate",
")",
"\n",
"defer",
"clientCertFile",
".",
"Close",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"validationErrors",
"=",
"append",
"(",
"validationErrors",
",",
"errors",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"authInfo",
".",
"ClientCertificate",
",",
"authInfoName",
",",
"err",
")",
")",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"len",
"(",
"authInfo",
".",
"ClientKey",
")",
"!=",
"0",
"{",
"clientKeyFile",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"authInfo",
".",
"ClientKey",
")",
"\n",
"defer",
"clientKeyFile",
".",
"Close",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"validationErrors",
"=",
"append",
"(",
"validationErrors",
",",
"errors",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"authInfo",
".",
"ClientKey",
",",
"authInfoName",
",",
"err",
")",
")",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n\n",
"// authPath also provides information for the client to identify the server, so allow multiple auth methods in that case",
"if",
"(",
"len",
"(",
"methods",
")",
">",
"1",
")",
"&&",
"(",
"!",
"usingAuthPath",
")",
"{",
"validationErrors",
"=",
"append",
"(",
"validationErrors",
",",
"errors",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"authInfoName",
",",
"methods",
")",
")",
"\n",
"}",
"\n\n",
"return",
"validationErrors",
"\n",
"}"
] |
15,282 | all-15283 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StopParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler9",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"return",
"w",
".",
"Buffer",
".",
"BuildBytes",
"(",
")",
",",
"w",
".",
"Error",
"\n",
"}"
] |
15,283 | all-15284 | [
"NewVaultTokenQuery",
"creates",
"a",
"new",
"dependency",
"."
] | [
"func",
"NewVaultTokenQuery",
"(",
"token",
"string",
")",
"(",
"*",
"VaultTokenQuery",
",",
"error",
")",
"{",
"vaultSecret",
":=",
"&",
"api",
".",
"Secret",
"{",
"Auth",
":",
"&",
"api",
".",
"SecretAuth",
"{",
"ClientToken",
":",
"token",
",",
"Renewable",
":",
"<mask>",
",",
"LeaseDuration",
":",
"1",
",",
"}",
",",
"}",
"\n",
"return",
"&",
"VaultTokenQuery",
"{",
"stopCh",
":",
"make",
"(",
"chan",
"struct",
"{",
"}",
",",
"1",
")",
",",
"vaultSecret",
":",
"vaultSecret",
",",
"secret",
":",
"transformSecret",
"(",
"vaultSecret",
")",
",",
"}",
",",
"nil",
"\n",
"}"
] |
15,284 | all-15285 | [
"HandleInterrupts",
"calls",
"the",
"handler",
"functions",
"on",
"receiving",
"a",
"SIGINT",
"or",
"SIGTERM",
"."
] | [
"func",
"HandleInterrupts",
"(",
"lg",
"*",
"zap",
".",
"Logger",
")",
"{",
"notifier",
":=",
"make",
"(",
"chan",
"os",
".",
"Signal",
",",
"1",
")",
"\n",
"signal",
".",
"Notify",
"(",
"notifier",
",",
"syscall",
".",
"SIGINT",
",",
"syscall",
".",
"SIGTERM",
")",
"\n\n",
"go",
"func",
"(",
")",
"{",
"sig",
":=",
"<-",
"notifier",
"\n\n",
"interruptRegisterMu",
".",
"Lock",
"(",
")",
"\n",
"ihs",
":=",
"make",
"(",
"[",
"]",
"InterruptHandler",
",",
"len",
"(",
"interruptHandlers",
")",
")",
"\n",
"copy",
"(",
"ihs",
",",
"interruptHandlers",
")",
"\n",
"interruptRegisterMu",
".",
"Unlock",
"(",
")",
"\n\n",
"interruptExitMu",
".",
"Lock",
"(",
")",
"\n\n",
"if",
"lg",
"!=",
"nil",
"{",
"lg",
".",
"Info",
"(",
"\"",
"\"",
",",
"zap",
".",
"String",
"(",
"\"",
"\"",
",",
"sig",
".",
"String",
"(",
")",
")",
")",
"\n",
"}",
"else",
"{",
"plog",
".",
"Noticef",
"(",
"\"",
"\"",
",",
"sig",
")",
"\n",
"}",
"\n\n",
"for",
"_",
",",
"h",
":=",
"range",
"ihs",
"{",
"h",
"(",
")",
"\n",
"}",
"\n",
"signal",
".",
"Stop",
"(",
"notifier",
")",
"\n",
"<mask>",
":=",
"syscall",
".",
"Getpid",
"(",
")",
"\n",
"// exit directly if it is the \"init\" process, since the kernel will not help to kill pid 1.",
"if",
"pid",
"==",
"1",
"{",
"os",
".",
"Exit",
"(",
"0",
")",
"\n",
"}",
"\n",
"setDflSignal",
"(",
"sig",
".",
"(",
"syscall",
".",
"Signal",
")",
")",
"\n",
"syscall",
".",
"Kill",
"(",
"pid",
",",
"sig",
".",
"(",
"syscall",
".",
"Signal",
")",
")",
"\n",
"}",
"(",
")",
"\n",
"}"
] |
15,285 | all-15286 | [
"ContainsAll",
"checks",
"if",
"all",
"values",
"exist",
"in",
"the",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"Set",
")",
"ContainsAll",
"(",
"values",
"...",
"interface",
"{",
"}",
")",
"bool",
"{",
"s",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"RUnlock",
"(",
")",
"\n",
"for",
"_",
",",
"value",
":=",
"range",
"values",
"{",
"_",
",",
"ok",
":=",
"s",
".",
"m",
"[",
"<mask>",
"]",
"\n",
"if",
"!",
"ok",
"{",
"return",
"false",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"true",
"\n",
"}"
] |
15,286 | all-15287 | [
"resourceVSphereDatastoreClusterVMAntiAffinityRuleValidateRuleVMCount",
"ensures",
"that",
"the",
"VM",
"count",
"in",
"the",
"anti",
"-",
"affinity",
"rule",
"at",
"any",
"point",
"in",
"time",
"before",
"it",
"s",
"created",
"or",
"updated",
"is",
"a",
"length",
"of",
"at",
"least",
"2",
".",
"This",
"validation",
"is",
"necessary",
"as",
"a",
"rule",
"of",
"only",
"1",
"VM",
"here",
"is",
"a",
"no",
"-",
"op",
"and",
"ultimately",
"will",
"result",
"in",
"a",
"broken",
"resource",
"(",
"the",
"rule",
"will",
"not",
"exist",
"after",
"creation",
"or",
"example",
")",
".",
"Unfortunately",
"this",
"needs",
"to",
"happen",
"at",
"apply",
"time",
"right",
"now",
"due",
"to",
"issues",
"with",
"TF",
"core",
"and",
"how",
"it",
"processes",
"lists",
"when",
"values",
"are",
"computed",
".",
"Once",
"these",
"issues",
"are",
"fixed",
"with",
"TF",
"core",
"the",
"validation",
"here",
"should",
"be",
"removed",
"and",
"moved",
"to",
"schema",
"."
] | [
"func",
"resourceVSphereDatastoreClusterVMAntiAffinityRuleValidateRuleVMCount",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
")",
"error",
"{",
"if",
"d",
".",
"Get",
"(",
"\"",
"\"",
")",
".",
"(",
"*",
"schema",
".",
"<mask>",
")",
".",
"Len",
"(",
")",
"<",
"2",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,287 | all-15288 | [
"Print",
"throw",
"logstr",
"to",
"channel",
"to",
"print",
"to",
"the",
"logger",
".",
"Arguments",
"are",
"handled",
"in",
"the",
"manner",
"of",
"fmt",
".",
"Print",
"."
] | [
"func",
"(",
"f",
"*",
"FileLogger",
")",
"Print",
"(",
"v",
"...",
"interface",
"{",
"}",
")",
"{",
"_",
",",
"file",
",",
"line",
",",
"_",
":=",
"runtime",
".",
"Caller",
"(",
"1",
")",
"//calldepth=2",
"\n",
"f",
".",
"logChan",
"<-",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"shortFileName",
"(",
"<mask>",
")",
",",
"line",
")",
"+",
"fmt",
".",
"Sprint",
"(",
"v",
"...",
")",
"\n",
"}"
] |
15,288 | all-15289 | [
"Flush",
"deletes",
"any",
"cached",
"value",
"into",
"current",
"instance",
"."
] | [
"func",
"(",
"s",
"*",
"Cache",
")",
"Flush",
"(",
")",
"{",
"s",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"Unlock",
"(",
")",
"\n\n",
"s",
".",
"values",
"=",
"make",
"(",
"<mask>",
"[",
"string",
"]",
"*",
"cacheItem",
")",
"\n",
"}"
] |
15,289 | all-15290 | [
"NewOperationResult",
"creates",
"a",
"new",
"OperationResult",
"."
] | [
"func",
"NewOperationResult",
"(",
"code",
"OperationResultCode",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"OperationResult",
",",
"err",
"error",
")",
"{",
"result",
".",
"Code",
"=",
"<mask>",
"\n",
"switch",
"OperationResultCode",
"(",
"code",
")",
"{",
"case",
"OperationResultCodeOpInner",
":",
"tv",
",",
"ok",
":=",
"value",
".",
"(",
"OperationResultTr",
")",
"\n",
"if",
"!",
"ok",
"{",
"err",
"=",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"return",
"\n",
"}",
"\n",
"result",
".",
"Tr",
"=",
"&",
"tv",
"\n",
"default",
":",
"// void",
"}",
"\n",
"return",
"\n",
"}"
] |
15,290 | all-15291 | [
"Index",
"returns",
"the",
"ith",
"step",
"in",
"the",
"Path",
"and",
"supports",
"negative",
"indexing",
".",
"A",
"negative",
"index",
"starts",
"counting",
"from",
"the",
"tail",
"of",
"the",
"Path",
"such",
"that",
"-",
"1",
"refers",
"to",
"the",
"last",
"step",
"-",
"2",
"refers",
"to",
"the",
"second",
"-",
"to",
"-",
"last",
"step",
"and",
"so",
"on",
".",
"If",
"index",
"is",
"invalid",
"this",
"returns",
"a",
"non",
"-",
"nil",
"PathStep",
"that",
"reports",
"a",
"nil",
"Type",
"."
] | [
"func",
"(",
"<mask>",
"Path",
")",
"Index",
"(",
"i",
"int",
")",
"PathStep",
"{",
"if",
"i",
"<",
"0",
"{",
"i",
"=",
"len",
"(",
"pa",
")",
"+",
"i",
"\n",
"}",
"\n",
"if",
"i",
"<",
"0",
"||",
"i",
">=",
"len",
"(",
"pa",
")",
"{",
"return",
"pathStep",
"{",
"}",
"\n",
"}",
"\n",
"return",
"pa",
"[",
"i",
"]",
"\n",
"}"
] |
15,291 | all-15292 | [
"Addr",
"returns",
"binded",
"socket",
"address",
".",
"For",
"bind",
"port",
"0",
"in",
"tests"
] | [
"func",
"(",
"listener",
"*",
"CarbonlinkListener",
")",
"Addr",
"(",
")",
"<mask>",
".",
"Addr",
"{",
"if",
"listener",
".",
"tcpListener",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"listener",
".",
"tcpListener",
".",
"Addr",
"(",
")",
"\n",
"}"
] |
15,292 | all-15293 | [
"Accept",
"connections",
"and",
"pass",
"on",
"the",
"channel"
] | [
"func",
"(",
"l",
"*",
"DefaultListener",
")",
"listenRoutine",
"(",
")",
"{",
"for",
"{",
"conn",
",",
"err",
":=",
"l",
".",
"listener",
".",
"Accept",
"(",
")",
"\n\n",
"if",
"!",
"l",
".",
"IsRunning",
"(",
")",
"{",
"break",
"// Go to cleanup",
"\n",
"}",
"\n\n",
"// listener wasn't stopped,",
"// yet we encountered an error.",
"if",
"err",
"!=",
"nil",
"{",
"PanicCrisis",
"(",
"err",
")",
"\n",
"}",
"\n\n",
"l",
".",
"connections",
"<-",
"<mask>",
"\n",
"}",
"\n\n",
"// Cleanup",
"close",
"(",
"l",
".",
"connections",
")",
"\n",
"for",
"_",
"=",
"range",
"l",
".",
"connections",
"{",
"// Drain",
"}",
"\n",
"}"
] |
15,293 | all-15294 | [
"NewServiceContainer",
"returns",
"a",
"new",
"ServiceContainer"
] | [
"func",
"NewServiceContainer",
"(",
")",
"ServiceContainer",
"{",
"return",
"&",
"dependencyInjector",
"{",
"registry",
":",
"make",
"(",
"map",
"[",
"reflect",
".",
"Type",
"]",
"interface",
"{",
"}",
")",
",",
"instances",
":",
"<mask>",
"(",
"map",
"[",
"reflect",
".",
"Type",
"]",
"reflect",
".",
"Value",
")",
",",
"caching",
":",
"true",
",",
"}",
"\n",
"}"
] |
15,294 | all-15295 | [
"GetEvaluationTimestamp",
"returns",
"the",
"time",
"the",
"evaluation",
"took",
"place",
"."
] | [
"func",
"(",
"rule",
"*",
"RecordingRule",
")",
"GetEvaluationTimestamp",
"(",
")",
"<mask>",
".",
"Time",
"{",
"rule",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"rule",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n",
"return",
"rule",
".",
"evaluationTimestamp",
"\n",
"}"
] |
15,295 | all-15296 | [
"RecordContainerReference",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockImageManager",
")",
"RecordContainerReference",
"(",
"arg0",
"*",
"container",
".",
"<mask>",
")",
"error",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
",",
"_",
":=",
"ret",
"[",
"0",
"]",
".",
"(",
"error",
")",
"\n",
"return",
"ret0",
"\n",
"}"
] |
15,296 | all-15297 | [
"resourceVSphereComputeClusterValidateEmptyCluster",
"validates",
"that",
"the",
"cluster",
"is",
"empty",
".",
"This",
"is",
"used",
"to",
"ensure",
"a",
"safe",
"deletion",
"of",
"the",
"cluster",
"-",
"we",
"do",
"not",
"allow",
"deletion",
"of",
"clusters",
"that",
"still",
"virtual",
"machines",
"or",
"hosts",
"in",
"them",
"."
] | [
"func",
"resourceVSphereComputeClusterValidateEmptyCluster",
"(",
"d",
"structure",
".",
"ResourceIDStringer",
",",
"cluster",
"*",
"object",
".",
"ClusterComputeResource",
",",
")",
"error",
"{",
"<mask>",
".",
"Printf",
"(",
"\"",
"\"",
",",
"resourceVSphereComputeClusterIDString",
"(",
"d",
")",
")",
"\n",
"ne",
",",
"err",
":=",
"clustercomputeresource",
".",
"HasChildren",
"(",
"cluster",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"if",
"ne",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"cluster",
".",
"InventoryPath",
",",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] |
15,297 | all-15298 | [
"Slice",
"converts",
"the",
"comparable",
"parts",
"of",
"the",
"semver",
"into",
"a",
"slice",
"of",
"integers",
"."
] | [
"func",
"(",
"v",
"<mask>",
")",
"Slice",
"(",
")",
"[",
"]",
"int64",
"{",
"return",
"[",
"]",
"int64",
"{",
"v",
".",
"Major",
",",
"v",
".",
"Minor",
",",
"v",
".",
"Patch",
"}",
"\n",
"}"
] |
15,298 | all-15299 | [
"string",
"converts",
"a",
"given",
"stack",
"frame",
"to",
"a",
"formated",
"string",
"."
] | [
"func",
"(",
"s",
"*",
"stackFrame",
")",
"string",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"s",
".",
"function",
",",
"s",
".",
"<mask>",
",",
"s",
".",
"line",
")",
"\n",
"}"
] |
15,299 | all-15300 | [
"WindowToBufferCoords",
"is",
"a",
"wrapper",
"around",
"gtk_text_view_window_to_buffer_coords",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextView",
")",
"WindowToBufferCoords",
"(",
"win",
"TextWindowType",
",",
"window_x",
",",
"window_y",
"int",
")",
"(",
"buffer_x",
",",
"buffer_y",
"int",
")",
"{",
"<mask>",
"bx",
",",
"by",
"C",
".",
"gint",
"\n",
"C",
".",
"gtk_text_view_window_to_buffer_coords",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkTextWindowType",
"(",
"win",
")",
",",
"C",
".",
"gint",
"(",
"window_x",
")",
",",
"C",
".",
"gint",
"(",
"window_y",
")",
",",
"&",
"bx",
",",
"&",
"by",
")",
"\n",
"return",
"int",
"(",
"bx",
")",
",",
"int",
"(",
"by",
")",
"\n",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.