id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
21,800 | all-21801 | [
"constructor"
] | [
"func",
"newInputs",
"(",
"d",
"string",
")",
"*",
"inputs",
"{",
"in",
":=",
"new",
"(",
"inputs",
")",
"\n",
"in",
".",
"<mask>",
"=",
"d",
"+",
"\"",
"\"",
"\n",
"return",
"in",
"\n",
"}"
] |
21,801 | all-21802 | [
"New",
"returns",
"a",
"client",
"/",
"server",
"to",
"bidirectionally",
"communicate",
"with",
"the",
"backend",
".",
"The",
"returned",
"struct",
"should",
"have",
"both",
"Connect",
"and",
"Serve",
"called",
"upon",
"it",
"before",
"being",
"used",
"."
] | [
"func",
"New",
"(",
"url",
"string",
",",
"cfg",
"*",
"config",
".",
"Config",
",",
"credentialProvider",
"*",
"credentials",
".",
"Credentials",
",",
"statsEngine",
"stats",
".",
"Engine",
",",
"publishMetricsInterval",
"<mask>",
".",
"Duration",
",",
"rwTime... |
21,802 | all-21803 | [
"expandStates",
"expands",
"the",
"states",
"list",
"by",
"one"
] | [
"func",
"(",
"c",
"*",
"context",
")",
"expandStates",
"(",
")",
"[",
"]",
"<mask>",
"{",
"states",
":=",
"c",
".",
"states",
"(",
")",
"\n",
"ns",
":=",
"len",
"(",
"states",
")",
"\n",
"if",
"ns",
"==",
"1",
"{",
"s",
":=",
"states",
"[",
"... |
21,803 | all-21804 | [
"ClearCache",
"clears",
"the",
"cache",
"of",
"the",
"specified",
"project",
"Returns",
"the",
"status",
"returned",
"by",
"CircleCI"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"ClearCache",
"(",
"account",
",",
"repo",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"status",
":=",
"&",
"struct",
"{",
"Status",
"string",
"`json:\"status\"`",
"\n",
"}",
"{",
"}",
"\n\n",
"err",
":... |
21,804 | all-21805 | [
"UpdateProgress",
"is",
"a",
"helper",
"to",
"update",
"the",
"status",
"using",
"an",
"iopgress",
"instance"
] | [
"func",
"(",
"p",
"*",
"ProgressRenderer",
")",
"UpdateProgress",
"(",
"<mask>",
"ioprogress",
".",
"ProgressData",
")",
"{",
"p",
".",
"Update",
"(",
"progress",
".",
"Text",
")",
"\n",
"}"
] |
21,805 | all-21806 | [
"SaveConfigFile",
"writes",
"configuration",
"file",
"to",
"local",
"file",
"system"
] | [
"func",
"SaveConfigFile",
"(",
"c",
"*",
"ConfigFile",
",",
"filename",
"string",
")",
"(",
"err",
"error",
")",
"{",
"// Write configuration file by filename.",
"var",
"f",
"*",
"<mask>",
".",
"File",
"\n",
"if",
"f",
",",
"err",
"=",
"os",
".",
"Create",... |
21,806 | all-21807 | [
"CreateRuleSet",
"creates",
"a",
"new",
"rule",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"CreateRuleSet",
"(",
"cfg",
"*",
"RuleSet",
")",
"(",
"*",
"RuleSet",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n"... |
21,807 | all-21808 | [
"WithEnd",
"end",
"of",
"range",
"to",
"search",
"possible",
"breakpoint",
"locations",
"in",
"(",
"excluding",
")",
".",
"When",
"not",
"specified",
"end",
"of",
"scripts",
"is",
"used",
"as",
"end",
"of",
"range",
"."
] | [
"func",
"(",
"p",
"GetPossibleBreakpointsParams",
")",
"WithEnd",
"(",
"end",
"*",
"<mask>",
")",
"*",
"GetPossibleBreakpointsParams",
"{",
"p",
".",
"End",
"=",
"end",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
21,808 | all-21809 | [
"set",
"front",
"and",
"back",
"function",
"and",
"reference",
"value",
"for",
"stencil",
"testing"
] | [
"func",
"StencilFunc",
"(",
"xfunc",
"uint32",
",",
"ref",
"int32",
",",
"mask",
"uint32",
")",
"{",
"C",
".",
"glowStencilFunc",
"(",
"gpStencilFunc",
",",
"(",
"C",
".",
"GLenum",
")",
"(",
"xfunc",
")",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"<m... |
21,809 | all-21810 | [
"InitArgs",
"returns",
"an",
"options",
"func",
"to",
"configure",
"a",
"LinuxFactory",
"with",
"the",
"provided",
"init",
"arguments",
"."
] | [
"func",
"InitArgs",
"(",
"args",
"...",
"string",
")",
"func",
"(",
"*",
"LinuxFactory",
")",
"error",
"{",
"return",
"func",
"(",
"l",
"*",
"LinuxFactory",
")",
"error",
"{",
"name",
":=",
"args",
"[",
"0",
"]",
"\n",
"if",
"filepath",
".",
"Base",
... |
21,810 | all-21811 | [
"GetInflationResult",
"retrieves",
"the",
"InflationResult",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"OperationResultTr",
")",
"GetInflationResult",
"(",
")",
"(",
"result",
"InflationResult",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Type",
")",
")",
"\n\n",
"if",... |
21,811 | all-21812 | [
"Do",
"executes",
"the",
"function",
"in",
"a",
"transaction",
"."
] | [
"func",
"Do",
"(",
"d",
"<mask>",
",",
"f",
"func",
"(",
"t",
"Tx",
")",
"error",
")",
"error",
"{",
"t",
",",
"err",
":=",
"d",
".",
"TxBegin",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"defer",
"t",
... |
21,812 | all-21813 | [
"NewBodyLimiter",
"returns",
"a",
"new",
"body",
"limiter",
"for",
"the",
"specified",
"request",
"."
] | [
"func",
"NewBodyLimiter",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"<mask>",
",",
"n",
"int64",
")",
"*",
"BodyLimiter",
"{",
"return",
"&",
"BodyLimiter",
"{",
"Original",
":",
"r",
".",
"Body",
",",
"ReadCloser",
":",
"htt... |
21,813 | all-21814 | [
"SetEvaluationTimestamp",
"updates",
"evaluationTimestamp",
"to",
"the",
"timestamp",
"of",
"when",
"the",
"rule",
"was",
"last",
"evaluated",
"."
] | [
"func",
"(",
"rule",
"*",
"RecordingRule",
")",
"SetEvaluationTimestamp",
"(",
"<mask>",
"time",
".",
"Time",
")",
"{",
"rule",
".",
"mtx",
".",
"Lock",
"(",
")",
"\n",
"defer",
"rule",
".",
"mtx",
".",
"Unlock",
"(",
")",
"\n",
"rule",
".",
"evaluat... |
21,814 | all-21815 | [
"NewRemoteMysqlDump",
"-",
"will",
"initialize",
"a",
"mysqldmp",
"for",
"remote",
"execution"
] | [
"func",
"NewRemoteMysqlDump",
"(",
"username",
",",
"password",
"string",
",",
"sshCfg",
"command",
".",
"SshConfig",
")",
"(",
"*",
"MysqlDump",
",",
"error",
")",
"{",
"return",
"NewRemoteMysqlDumpWithPath",
"(",
"username",
",",
"<mask>",
",",
"sshCfg",
","... |
21,815 | all-21816 | [
"GetQueryOk",
"returns",
"a",
"tuple",
"with",
"the",
"Query",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TileDefEvent",
")",
"GetQueryOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"t... |
21,816 | all-21817 | [
"ContainerDockerStats",
"indicates",
"an",
"expected",
"call",
"of",
"ContainerDockerStats"
] | [
"func",
"(",
"mr",
"*",
"MockEngineMockRecorder",
")",
"ContainerDockerStats",
"(",
"arg0",
",",
"arg1",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
... |
21,817 | all-21818 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"FrameResourceTree",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage46",
"(",
"&",
"r... |
21,818 | all-21819 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetMetadataParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12",
"(",
"&",... |
21,819 | all-21820 | [
"===",
"day_of_week",
"(",
"v",
"Vector",
")",
"Scalar",
"==="
] | [
"func",
"funcDayOfWeek",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"return",
"dateWrapper",
"(",
"vals",
",",
"enh",
",",
"func",
"(",
"t",
"<mask>",
".",
"Time",
")",
"float64",
... |
21,820 | all-21821 | [
"dedupEnvCase",
"is",
"dedupEnv",
"with",
"a",
"case",
"option",
"for",
"testing",
".",
"If",
"caseInsensitive",
"is",
"true",
"the",
"case",
"of",
"keys",
"is",
"ignored",
"."
] | [
"func",
"dedupEnvCase",
"(",
"caseInsensitive",
"bool",
",",
"env",
"[",
"]",
"string",
")",
"[",
"]",
"string",
"{",
"out",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"0",
",",
"len",
"(",
"env",
")",
")",
"\n",
"saw",
":=",
"map",
"[",
"string... |
21,821 | all-21822 | [
"diffNewOld",
"returns",
"any",
"elements",
"of",
"new",
"that",
"were",
"missing",
"in",
"old",
"."
] | [
"func",
"(",
"p",
"*",
"tagDiffProcessor",
")",
"diffNewOld",
"(",
")",
"[",
"]",
"<mask>",
"{",
"return",
"p",
".",
"diff",
"(",
"p",
".",
"newTagIDs",
",",
"p",
".",
"oldTagIDs",
")",
"\n",
"}"
] |
21,822 | all-21823 | [
"IsInstanceTypeChangedError",
"returns",
"true",
"if",
"the",
"error",
"when",
"registering",
"the",
"container",
"instance",
"is",
"because",
"of",
"instance",
"type",
"being",
"changed"
] | [
"func",
"IsInstanceTypeChangedError",
"(",
"err",
"error",
")",
"bool",
"{",
"if",
"awserr",
",",
"ok",
":=",
"err",
".",
"(",
"awserr",
".",
"Error",
")",
";",
"ok",
"{",
"return",
"strings",
".",
"Contains",
"(",
"awserr",
".",
"Message",
"(",
")",
... |
21,823 | all-21824 | [
"UnmarshalJSON",
"satisfies",
"json",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"OrientationType",
")",
"UnmarshalJSON",
"(",
"buf",
"[",
"]",
"<mask>",
")",
"error",
"{",
"return",
"easyjson",
".",
"Unmarshal",
"(",
"buf",
",",
"t",
")",
"\n",
"}"
] |
21,824 | all-21825 | [
"GetDisplayType",
"returns",
"the",
"DisplayType",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"w",
"*",
"WidgetMarker",
")",
"GetDisplayType",
"(",
")",
"<mask>",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"DisplayType",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
"DisplayType",
"\n",
"}"... |
21,825 | all-21826 | [
"LaunchContainers",
"launches",
"a",
"set",
"of",
"containers",
"."
] | [
"func",
"LaunchContainers",
"(",
"c",
"lxd",
".",
"ContainerServer",
",",
"count",
"int",
",",
"parallel",
"int",
",",
"image",
"string",
",",
"privileged",
"bool",
",",
"start",
"bool",
",",
"freeze",
"bool",
")",
"(",
"time",
".",
"Duration",
",",
"err... |
21,826 | all-21827 | [
"NewProwJobWithAnnotation",
"initializes",
"a",
"ProwJob",
"out",
"of",
"a",
"ProwJobSpec",
"with",
"annotations",
"."
] | [
"func",
"NewProwJobWithAnnotation",
"(",
"spec",
"prowapi",
".",
"ProwJobSpec",
",",
"labels",
",",
"annotations",
"map",
"[",
"string",
"]",
"string",
")",
"prowapi",
".",
"ProwJob",
"{",
"return",
"newProwJob",
"(",
"<mask>",
",",
"labels",
",",
"annotations... |
21,827 | all-21828 | [
"bind",
"ranges",
"of",
"one",
"or",
"more",
"buffer",
"objects",
"to",
"a",
"sequence",
"of",
"indexed",
"buffer",
"targets"
] | [
"func",
"BindBuffersRange",
"(",
"target",
"uint32",
",",
"first",
"uint32",
",",
"count",
"int32",
",",
"buffers",
"*",
"uint32",
",",
"offsets",
"*",
"int",
",",
"sizes",
"*",
"int",
")",
"{",
"C",
".",
"glowBindBuffersRange",
"(",
"gpBindBuffersRange",
... |
21,828 | all-21829 | [
"Retrieves",
"the",
"flags",
"passed",
"when",
"constructing",
"the",
"GBinding",
"."
] | [
"func",
"(",
"v",
"*",
"Binding",
")",
"GetFlags",
"(",
")",
"BindingFlags",
"{",
"flags",
":=",
"C",
".",
"g_binding_get_flags",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"return",
"BindingFlags",
"(",
"<mask>",
")",
"\n",
"}"
] |
21,829 | all-21830 | [
"PerformIn",
"performs",
"a",
"job",
"after",
"waiting",
"for",
"a",
"specified",
"amount",
"using",
"a",
"goroutine",
"."
] | [
"func",
"(",
"w",
"Simple",
")",
"PerformIn",
"(",
"job",
"Job",
",",
"d",
"time",
".",
"Duration",
")",
"error",
"{",
"go",
"func",
"(",
")",
"{",
"select",
"{",
"case",
"<-",
"time",
".",
"After",
"(",
"d",
")",
":",
"w",
".",
"Perform",
"(",... |
21,830 | all-21831 | [
"UnmarshalJSON",
"satisfies",
"json",
".",
"Unmarshaler",
"."
] | [
"func",
"(",
"t",
"*",
"Timestamp",
")",
"UnmarshalJSON",
"(",
"buf",
"[",
"]",
"<mask>",
")",
"error",
"{",
"return",
"easyjson",
".",
"Unmarshal",
"(",
"buf",
",",
"t",
")",
"\n",
"}"
] |
21,831 | all-21832 | [
"CreateContainerTemplateFile",
"creates",
"an",
"a",
"template",
"for",
"a",
"container",
"."
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"CreateContainerTemplateFile",
"(",
"containerName",
"string",
",",
"templateName",
"string",
",",
"content",
"io",
".",
"ReadSeeker",
")",
"error",
"{",
"return",
"r",
".",
"setContainerTemplateFile",
"(",
"containerName... |
21,832 | all-21833 | [
"Get",
"gets",
"the",
"value",
"associated",
"with",
"the",
"key",
".",
"It",
"returns",
"a",
"valid",
"value",
"if",
"it",
"finds",
"equal",
"or",
"earlier",
"version",
"of",
"the",
"same",
"key",
"."
] | [
"func",
"(",
"s",
"*",
"Skiplist",
")",
"Get",
"(",
"key",
"[",
"]",
"byte",
")",
"y",
".",
"ValueStruct",
"{",
"n",
",",
"_",
":=",
"s",
".",
"findNear",
"(",
"key",
",",
"false",
",",
"true",
")",
"// findGreaterOrEqual.",
"\n",
"if",
"n",
"=="... |
21,833 | all-21834 | [
"PublishTask",
"submits",
"the",
"task",
"taskID",
"with",
"definition",
"tdr",
"using",
"queue",
".",
"The",
"task",
"is",
"claimed",
"using",
"workerGroup",
"and",
"workerID",
"and",
"then",
"artifacts",
"are",
"uploaded",
"in",
"sequence",
"using",
"taskclust... | [
"func",
"PublishTask",
"(",
"<mask>",
"*",
"tcqueue",
".",
"Queue",
",",
"taskID",
"string",
",",
"tdr",
"tcqueue",
".",
"TaskDefinitionRequest",
",",
"workerGroup",
",",
"workerID",
"string",
",",
"artifacts",
"[",
"]",
"ArtifactSource",
")",
"error",
"{",
... |
21,834 | all-21835 | [
"New",
"()",
"creates",
"a",
"new",
"Pool",
"."
] | [
"func",
"New",
"(",
"workers",
"int",
")",
"(",
"pool",
"*",
"Pool",
")",
"{",
"pool",
"=",
"new",
"(",
"Pool",
")",
"\n",
"pool",
".",
"num_workers",
"=",
"workers",
"\n",
"pool",
".",
"job_wanted_pipe",
"=",
"make",
"(",
"chan",
"chan",
"*",
"Job... |
21,835 | all-21836 | [
"GRPCCodeToType",
"converts",
"the",
"gRPC",
"error",
"code",
"to",
"an",
"error",
"type",
"or",
"returns",
"the",
"Unknown",
"type",
"if",
"not",
"possible",
"."
] | [
"func",
"GRPCCodeToType",
"(",
"code",
"codes",
".",
"Code",
")",
"Type",
"{",
"switch",
"code",
"{",
"case",
"codes",
".",
"InvalidArgument",
":",
"return",
"InvalidArgument",
"\n",
"case",
"codes",
".",
"OutOfRange",
":",
"return",
"OutOfRange",
"\n",
"cas... |
21,836 | all-21837 | [
"OpGet",
"returns",
"get",
"operation",
"based",
"on",
"given",
"key",
"and",
"operation",
"options",
"."
] | [
"func",
"OpGet",
"(",
"key",
"string",
",",
"opts",
"...",
"OpOption",
")",
"Op",
"{",
"// WithPrefix and WithFromKey are not supported together",
"if",
"isWithPrefix",
"(",
"opts",
")",
"&&",
"isWithFromKey",
"(",
"opts",
")",
"{",
"panic",
"(",
"\"",
"\"",
"... |
21,837 | all-21838 | [
"RsyncRecv",
"sets",
"up",
"the",
"receiving",
"half",
"of",
"the",
"websocket",
"to",
"rsync",
"(",
"the",
"other",
"half",
"set",
"up",
"by",
"RsyncSend",
")",
"putting",
"the",
"contents",
"in",
"the",
"directory",
"specified",
"by",
"path",
"."
] | [
"func",
"RsyncRecv",
"(",
"path",
"string",
",",
"conn",
"*",
"websocket",
".",
"Conn",
",",
"writeWrapper",
"func",
"(",
"io",
".",
"WriteCloser",
")",
"io",
".",
"WriteCloser",
",",
"features",
"[",
"]",
"string",
")",
"error",
"{",
"args",
":=",
"["... |
21,838 | all-21839 | [
"ActivePeers",
"returns",
"a",
"channel",
"that",
"closes",
"when",
"an",
"initial",
"peer",
"connection",
"has",
"been",
"established",
".",
"Use",
"this",
"to",
"wait",
"until",
"the",
"first",
"peer",
"connection",
"becomes",
"active",
"."
] | [
"func",
"(",
"t",
"*",
"Transport",
")",
"ActivePeers",
"(",
")",
"(",
"cnt",
"int",
")",
"{",
"t",
".",
"mu",
".",
"RLock",
"(",
")",
"\n",
"defer",
"t",
".",
"mu",
".",
"RUnlock",
"(",
")",
"\n",
"for",
"_",
",",
"p",
":=",
"<mask>",
"t",
... |
21,839 | all-21840 | [
"Mark",
"value",
"on",
"top",
"of",
"the",
"stack",
"as",
"visited",
"using",
"the",
"registry",
"index",
"."
] | [
"func",
"(",
"v",
"*",
"visitor",
")",
"mark",
"(",
"val",
"reflect",
".",
"<mask>",
")",
"{",
"ptr",
":=",
"val",
".",
"Pointer",
"(",
")",
"\n",
"if",
"ptr",
"==",
"0",
"{",
"// We do not mark uninitialized 'val' as this is meaningless and this would",
"// b... |
21,840 | all-21841 | [
"Panic",
"is",
"equivalent",
"to",
"l",
".",
"Critical",
"(",
"fmt",
".",
"Sprint",
"()",
")",
"followed",
"by",
"a",
"call",
"to",
"panic",
"()",
"."
] | [
"func",
"(",
"l",
"*",
"Logger",
")",
"Panic",
"(",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"l",
".",
"<mask>",
"(",
"CRITICAL",
",",
"nil",
",",
"args",
"...",
")",
"\n",
"panic",
"(",
"fmt",
".",
"Sprint",
"(",
"args",
"...",
")",
")"... |
21,841 | all-21842 | [
"WriteInt8",
"writes",
"an",
"int8",
"."
] | [
"func",
"(",
"w",
"*",
"<mask>",
")",
"WriteInt8",
"(",
"i",
"int8",
")",
"{",
"if",
"w",
".",
"err",
"!=",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"w",
".",
"wr",
".",
"WriteByte",
"(",
"byte",
"(",
"i",
")",
")",
"\n",
"}"
] |
21,842 | all-21843 | [
"GetKnownStatus",
"safely",
"returns",
"the",
"currently",
"known",
"status",
"of",
"the",
"task"
] | [
"func",
"(",
"cgroup",
"*",
"CgroupResource",
")",
"GetKnownStatus",
"(",
")",
"resourcestatus",
".",
"ResourceStatus",
"{",
"cgroup",
".",
"<mask>",
".",
"RLock",
"(",
")",
"\n",
"defer",
"cgroup",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n\n",
"return",
... |
21,843 | all-21844 | [
"SplitMetricID",
"takes",
"a",
"metric",
"ID",
"ans",
"splits",
"it",
"into",
"name",
"and",
"tags"
] | [
"func",
"SplitMetricID",
"(",
"metricID",
"string",
")",
"(",
"name",
"string",
",",
"tags",
"[",
"]",
"string",
")",
"{",
"if",
"metricID",
"==",
"\"",
"\"",
"{",
"return",
"\"",
"\"",
",",
"nil",
"\n",
"}",
"\n\n",
"pos",
":=",
"strings",
".",
"L... |
21,844 | all-21845 | [
"RequestURI",
"returns",
"RequestURI",
"from",
"the",
"first",
"HTTP",
"request",
"line",
"."
] | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"RequestURI",
"(",
")",
"[",
"]",
"<mask>",
"{",
"requestURI",
":=",
"h",
".",
"requestURI",
"\n",
"if",
"len",
"(",
"requestURI",
")",
"==",
"0",
"{",
"requestURI",
"=",
"strSlash",
"\n",
"}",
"\n",
"retu... |
21,845 | all-21846 | [
"Tags",
"returns",
"a",
"copy",
"of",
"tags",
"accumulated",
"by",
"the",
"span",
"so",
"far"
] | [
"func",
"(",
"s",
"*",
"MockSpan",
")",
"Tags",
"(",
")",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"{",
"s",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"RUnlock",
"(",
")",
"\n",
"tags",
":=",
"make",
"(",
"map",
"[",
"string",
... |
21,846 | all-21847 | [
"AddLabel",
"adds",
"a",
"label"
] | [
"func",
"(",
"f",
"*",
"FakeClient",
")",
"AddLabel",
"(",
"owner",
",",
"repo",
"string",
",",
"<mask>",
"int",
",",
"label",
"string",
")",
"error",
"{",
"labelString",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"owner",
",",
"repo",
",",
... |
21,847 | all-21848 | [
"successive",
"Fibonacci",
"numbers",
"."
] | [
"func",
"Fib",
"(",
")",
"func",
"(",
")",
"time",
".",
"Duration",
"{",
"a",
",",
"b",
":=",
"0",
",",
"1",
"\n",
"return",
"func",
"(",
")",
"time",
".",
"Duration",
"{",
"a",
",",
"b",
"=",
"b",
",",
"a",
"+",
"b",
"\n",
"return",
"<mask... |
21,848 | all-21849 | [
"ReadFloat32",
"reads",
"and",
"returns",
"a",
"float32",
"."
] | [
"func",
"(",
"r",
"*",
"Reader",
")",
"ReadFloat32",
"(",
")",
"float32",
"{",
"if",
"r",
".",
"err",
"!=",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"var",
"n",
"int",
"\n",
"n",
",",
"r",
".",
"err",
"=",
"io",
".",
"ReadFull",
"(",
"r",
... |
21,849 | all-21850 | [
"RunWithoutMainLoop",
"runs",
"the",
"game",
"but",
"don",
"t",
"call",
"the",
"loop",
"on",
"the",
"main",
"(",
"UI",
")",
"thread",
".",
"Different",
"from",
"Run",
"RunWithoutMainLoop",
"returns",
"immediately",
".",
"Ebiten",
"users",
"should",
"NOT",
"c... | [
"func",
"RunWithoutMainLoop",
"(",
"f",
"func",
"(",
"*",
"Image",
")",
"error",
",",
"width",
",",
"<mask>",
"int",
",",
"scale",
"float64",
",",
"title",
"string",
")",
"<-",
"chan",
"error",
"{",
"f",
"=",
"(",
"&",
"imageDumper",
"{",
"f",
":",
... |
21,850 | all-21851 | [
"MustManageOfferOp",
"retrieves",
"the",
"ManageOfferOp",
"value",
"from",
"the",
"union",
"panicing",
"if",
"the",
"value",
"is",
"not",
"set",
"."
] | [
"func",
"(",
"u",
"OperationBody",
")",
"MustManageOfferOp",
"(",
")",
"ManageOfferOp",
"{",
"val",
",",
"<mask>",
":=",
"u",
".",
"GetManageOfferOp",
"(",
")",
"\n\n",
"if",
"!",
"ok",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"return",
... |
21,851 | all-21852 | [
"UnmarshalEasyJSON",
"sets",
"the",
"Email",
"from",
"a",
"easyjson",
".",
"Lexer"
] | [
"func",
"(",
"e",
"*",
"Email",
")",
"UnmarshalEasyJSON",
"(",
"in",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"if",
"data",
":=",
"in",
".",
"String",
"(",
")",
";",
"in",
".",
"Ok",
"(",
")",
"{",
"*",
"e",
"=",
"Email",
"(",
"<mask>",
")",
"\... |
21,852 | all-21853 | [
"NotNull",
"creates",
"a",
"not",
"equal",
"to",
"null",
"query",
"."
] | [
"func",
"(",
"f",
"*",
"Field",
")",
"NotNull",
"(",
")",
"*",
"PQLRowQuery",
"{",
"<mask>",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"f",
".",
"name",
")",
"\n",
"q",
":=",
"NewPQLRowQuery",
"(",
"text",
",",
"f",
".",
"index",
",",
... |
21,853 | all-21854 | [
"NotFound",
"specifys",
"a",
"not",
"found",
"handler",
"for",
"a",
"route"
] | [
"func",
"(",
"r",
"*",
"Router",
")",
"NotFound",
"(",
"i",
"interface",
"{",
"}",
")",
"{",
"<mask>",
":=",
"r",
".",
"buildHandler",
"(",
"i",
")",
"\n",
"r",
".",
"dispatcher",
".",
"NotFoundHandler",
"(",
"r",
".",
"route",
",",
"handler",
")",... |
21,854 | all-21855 | [
"RevealerNew",
"is",
"a",
"wrapper",
"around",
"gtk_revealer_new",
"()"
] | [
"func",
"RevealerNew",
"(",
")",
"(",
"*",
"Revealer",
",",
"<mask>",
")",
"{",
"c",
":=",
"C",
".",
"gtk_revealer_new",
"(",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
",",
"nilPtrErr",
"\n",
"}",
"\n",
"return",
"wrapRevealer",
"(",
... |
21,855 | all-21856 | [
"digitalOceanchangesByZone",
"separates",
"a",
"multi",
"-",
"zone",
"change",
"into",
"a",
"single",
"change",
"per",
"zone",
"."
] | [
"func",
"digitalOceanChangesByZone",
"(",
"zones",
"[",
"]",
"godo",
".",
"Domain",
",",
"changeSet",
"[",
"]",
"*",
"DigitalOceanChange",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"*",
"DigitalOceanChange",
"{",
"changes",
":=",
"make",
"(",
"map",
"[",
... |
21,856 | all-21857 | [
"NewLedgerEntryData",
"creates",
"a",
"new",
"LedgerEntryData",
"."
] | [
"func",
"NewLedgerEntryData",
"(",
"aType",
"LedgerEntryType",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"LedgerEntryData",
",",
"err",
"error",
")",
"{",
"result",
".",
"Type",
"=",
"aType",
"\n",
"switch",
"LedgerEntryType",
"(",
"aType",
")... |
21,857 | all-21858 | [
"/",
"*",
"InitLoggers",
"will",
"run",
"InitLogger",
"on",
"each",
"Logger",
"that",
"has",
"been",
"added",
"to",
"the",
"Base",
".",
"If",
"an",
"error",
"occurs",
"in",
"initializing",
"a",
"logger",
"the",
"loggers",
"that",
"have",
"already",
"been",... | [
"func",
"(",
"b",
"*",
"Base",
")",
"InitLoggers",
"(",
")",
"error",
"{",
"if",
"b",
".",
"queue",
"==",
"nil",
"{",
"b",
".",
"queue",
"=",
"newQueue",
"(",
"b",
",",
"b",
".",
"config",
".",
"MaxQueueSize",
")",
"\n",
"}",
"\n\n",
"for",
"_"... |
21,858 | all-21859 | [
"Find",
"gets",
"the",
"IntervalValue",
"for",
"the",
"node",
"matching",
"the",
"given",
"interval"
] | [
"func",
"(",
"ivt",
"*",
"IntervalTree",
")",
"Find",
"(",
"ivl",
"Interval",
")",
"(",
"ret",
"*",
"IntervalValue",
")",
"{",
"n",
":=",
"ivt",
".",
"<mask>",
"(",
"ivl",
")",
"\n",
"if",
"n",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
... |
21,859 | all-21860 | [
"walkDepth",
"walks",
"the",
"trie",
"in",
"depth",
"order",
"for",
"unit",
"testing",
"."
] | [
"func",
"(",
"p",
"*",
"prefixTrie",
")",
"walkDepth",
"(",
")",
"<-",
"chan",
"RangerEntry",
"{",
"entries",
":=",
"make",
"(",
"chan",
"RangerEntry",
")",
"\n",
"<mask>",
"func",
"(",
")",
"{",
"if",
"p",
".",
"hasEntry",
"(",
")",
"{",
"entries",
... |
21,860 | all-21861 | [
"HasApmQuery",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"ChangeRequest",
")",
"HasApmQuery",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"ApmQuery",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
21,861 | all-21862 | [
"write",
"a",
"block",
"of",
"pixels",
"to",
"the",
"frame",
"buffer"
] | [
"func",
"DrawPixels",
"(",
"<mask>",
"int32",
",",
"height",
"int32",
",",
"format",
"uint32",
",",
"xtype",
"uint32",
",",
"pixels",
"unsafe",
".",
"Pointer",
")",
"{",
"C",
".",
"glowDrawPixels",
"(",
"gpDrawPixels",
",",
"(",
"C",
".",
"GLsizei",
")",... |
21,862 | all-21863 | [
"HasAccessRole",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"u",
"*",
"User",
")",
"HasAccessRole",
"(",
")",
"bool",
"{",
"if",
"u",
"!=",
"nil",
"&&",
"u",
".",
"AccessRole",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
21,863 | all-21864 | [
"query",
"the",
"properties",
"of",
"a",
"sync",
"object"
] | [
"func",
"GetSynciv",
"(",
"sync",
"uintptr",
",",
"pname",
"uint32",
",",
"bufSize",
"int32",
",",
"length",
"*",
"int32",
",",
"values",
"*",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpGetSynciv",
",",
"5",
",",
"uintptr",
"(",
"sync",
")"... |
21,864 | all-21865 | [
"ForwardedResponseIfContainerIsRemote",
"redirects",
"a",
"request",
"to",
"the",
"node",
"running",
"the",
"container",
"with",
"the",
"given",
"name",
".",
"If",
"the",
"container",
"is",
"local",
"nothing",
"gets",
"done",
"and",
"nil",
"is",
"returned",
"."
... | [
"func",
"ForwardedResponseIfContainerIsRemote",
"(",
"d",
"*",
"Daemon",
",",
"r",
"*",
"http",
".",
"Request",
",",
"<mask>",
",",
"name",
"string",
")",
"(",
"Response",
",",
"error",
")",
"{",
"cert",
":=",
"d",
".",
"endpoints",
".",
"NetworkCert",
"... |
21,865 | all-21866 | [
"GetDisplayName",
"returns",
"the",
"DisplayName",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"s",
"*",
"Series",
")",
"GetDisplayName",
"(",
")",
"<mask>",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"DisplayName",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"s",
".",
"DisplayName",
"\n",
"}"
] |
21,866 | all-21867 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"InitiatorType",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"<mask>",
")",
"{",
"out",
".",
"String",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
21,867 | all-21868 | [
"HasDescription",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"b",
"*",
"Board",
")",
"HasDescription",
"(",
")",
"bool",
"{",
"if",
"b",
"!=",
"nil",
"&&",
"b",
".",
"Description",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
21,868 | all-21869 | [
"CheckType",
"checks",
"to",
"make",
"sure",
"val",
"has",
"the",
"same",
"type",
"as",
"template",
"unless",
"template",
"is",
"nil",
"in",
"which",
"case",
"it",
"always",
"returns",
"nil",
"."
] | [
"func",
"CheckType",
"(",
"template",
"proto",
".",
"Message",
",",
"val",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"template",
"!=",
"nil",
"{",
"valType",
",",
"templateType",
":=",
"reflect",
".",
"TypeOf",
"(",
"val",
")",
",",
"reflect",
".... |
21,869 | all-21870 | [
"targetURL",
"determines",
"the",
"URL",
"used",
"for",
"more",
"details",
"in",
"the",
"status",
"context",
"on",
"GitHub",
".",
"If",
"no",
"PR",
"dashboard",
"is",
"configured",
"we",
"will",
"use",
"the",
"administrative",
"Prow",
"overview",
"."
] | [
"func",
"targetURL",
"(",
"c",
"config",
".",
"Getter",
",",
"pr",
"*",
"PullRequest",
",",
"log",
"*",
"logrus",
".",
"Entry",
")",
"string",
"{",
"var",
"link",
"string",
"\n",
"if",
"tideURL",
":=",
"c",
"(",
")",
".",
"Tide",
".",
"TargetURL",
... |
21,870 | all-21871 | [
"flushMemtable",
"must",
"keep",
"running",
"until",
"we",
"send",
"it",
"an",
"empty",
"flushTask",
".",
"If",
"there",
"are",
"errors",
"during",
"handling",
"the",
"flush",
"task",
"we",
"ll",
"retry",
"indefinitely",
"."
] | [
"func",
"(",
"db",
"*",
"DB",
")",
"flushMemtable",
"(",
"lc",
"*",
"y",
".",
"Closer",
")",
"error",
"{",
"defer",
"lc",
".",
"Done",
"(",
")",
"\n\n",
"for",
"ft",
":=",
"range",
"db",
".",
"flushChan",
"{",
"if",
"ft",
".",
"mt",
"==",
"nil"... |
21,871 | all-21872 | [
"GetBlob",
"returns",
"a",
"stream",
"for",
"the",
"specified",
"blob",
"and",
"the",
"blob’s",
"size",
"(",
"or",
"-",
"1",
"if",
"unknown",
")",
".",
"The",
"Digest",
"field",
"in",
"BlobInfo",
"is",
"guaranteed",
"to",
"be",
"provided",
"Size",
"may",... | [
"func",
"(",
"s",
"*",
"storageImageSource",
")",
"GetBlob",
"(",
"ctx",
"context",
".",
"Context",
",",
"info",
"<mask>",
".",
"BlobInfo",
",",
"cache",
"types",
".",
"BlobInfoCache",
")",
"(",
"rc",
"io",
".",
"ReadCloser",
",",
"n",
"int64",
",",
"e... |
21,872 | all-21873 | [
"SetPflagsFromEnv",
"is",
"similar",
"to",
"SetFlagsFromEnv",
".",
"However",
"the",
"accepted",
"flagset",
"type",
"is",
"pflag",
".",
"FlagSet",
"and",
"it",
"does",
"not",
"do",
"any",
"logging",
"."
] | [
"func",
"SetPflagsFromEnv",
"(",
"prefix",
"string",
",",
"fs",
"*",
"pflag",
".",
"FlagSet",
")",
"error",
"{",
"var",
"err",
"error",
"\n",
"alreadySet",
":=",
"<mask>",
"(",
"map",
"[",
"string",
"]",
"bool",
")",
"\n",
"usedEnvKey",
":=",
"make",
"... |
21,873 | all-21874 | [
"BeginMany",
"works",
"like",
"Begin",
"but",
"accepts",
"multiple",
"indices",
"."
] | [
"func",
"(",
"w",
"*",
"WaterMark",
")",
"BeginMany",
"(",
"indices",
"[",
"]",
"uint64",
")",
"{",
"atomic",
".",
"StoreUint64",
"(",
"&",
"w",
".",
"lastIndex",
",",
"indices",
"[",
"len",
"(",
"indices",
")",
"-",
"1",
"]",
")",
"\n",
"w",
"."... |
21,874 | all-21875 | [
"EncodeMap",
"provides",
"the",
"implementation",
"of",
"the",
"map",
"encoding",
"algorithm",
"where",
"n",
"is",
"the",
"number",
"of",
"elements",
"in",
"the",
"map",
"and",
"f",
"a",
"function",
"called",
"to",
"encode",
"each",
"element",
".",
"The",
... | [
"func",
"(",
"e",
"Encoder",
")",
"EncodeMap",
"(",
"n",
"int",
",",
"f",
"func",
"(",
"Encoder",
",",
"Encoder",
")",
"error",
")",
"(",
"err",
"error",
")",
"{",
"if",
"e",
".",
"key",
"{",
"if",
"e",
".",
"key",
",",
"err",
"=",
"<mask>",
... |
21,875 | all-21876 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetAllCookiesReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork38",
"(",
"&",
"w",
",",
"v",
... |
21,876 | all-21877 | [
"Establish",
"a",
"client",
"connection",
"to",
"get",
"events",
"from",
"the",
"given",
"node",
"."
] | [
"func",
"eventsConnect",
"(",
"address",
"string",
",",
"cert",
"*",
"shared",
".",
"CertInfo",
")",
"(",
"*",
"lxd",
".",
"EventListener",
",",
"error",
")",
"{",
"client",
",",
"err",
":=",
"Connect",
"(",
"address",
",",
"<mask>",
",",
"true",
")",
... |
21,877 | all-21878 | [
"GetGroupOk",
"returns",
"a",
"tuple",
"with",
"the",
"Group",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetGroupOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"<mask>",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"w",
"... |
21,878 | all-21879 | [
"Do",
"executes",
"Overlay",
".",
"highlightNode",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"HighlightNodeParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandHighlightNode",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
21,879 | all-21880 | [
"RandString",
"returns",
"a",
"random",
"alphabetical",
"string",
"of",
"size",
"n"
] | [
"func",
"RandString",
"(",
"r",
"*",
"rand",
".",
"Rand",
",",
"n",
"int",
")",
"string",
"{",
"b",
":=",
"make",
"(",
"[",
"]",
"<mask>",
",",
"n",
")",
"\n",
"for",
"i",
":=",
"range",
"b",
"{",
"b",
"[",
"i",
"]",
"=",
"letters",
"[",
"r... |
21,880 | all-21881 | [
"getCachedMonitor",
"returns",
"a",
"monitor",
"for",
"the",
"given",
"window",
"x",
"/",
"y",
"returns",
"false",
"if",
"monitor",
"is",
"not",
"found",
".",
"getCachedMonitor",
"must",
"be",
"called",
"on",
"the",
"main",
"thread",
"."
] | [
"func",
"getCachedMonitor",
"(",
"wx",
",",
"wy",
"int",
")",
"(",
"*",
"cachedMonitor",
",",
"bool",
")",
"{",
"for",
"_",
",",
"m",
":=",
"range",
"monitors",
"{",
"if",
"m",
".",
"x",
"<=",
"wx",
"&&",
"wx",
"<",
"m",
".",
"x",
"+",
"m",
"... |
21,881 | all-21882 | [
"Translate",
"is",
"a",
"wrapper",
"around",
"cairo_translate",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"Translate",
"(",
"tx",
",",
"ty",
"float64",
")",
"{",
"C",
".",
"cairo_translate",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"double",
"(",
"tx",
")",
",",
"C",
".",
"double",
"(",
"ty",
")",
")... |
21,882 | all-21883 | [
"CheckConnection",
"connects",
"to",
"the",
"specified",
"host",
"on",
"the",
"specified",
"port",
".",
"If",
"the",
"connection",
"is",
"successful",
"then",
"return",
"true",
"."
] | [
"func",
"CheckConnection",
"(",
"network",
",",
"ip",
"string",
",",
"port",
"int",
",",
"timeout",
"time",
".",
"Duration",
")",
"bool",
"{",
"conn",
",",
"_",
":=",
"net",
".",
"DialTimeout",
"(",
"network",
",",
"net",
".",
"JoinHostPort",
"(",
"ip"... |
21,883 | all-21884 | [
"pipelineDecode",
"is",
"used",
"to",
"decode",
"the",
"responses",
"of",
"pipelined",
"requests",
"."
] | [
"func",
"(",
"r",
"*",
"Raft",
")",
"pipelineDecode",
"(",
"s",
"*",
"followerReplication",
",",
"p",
"AppendPipeline",
",",
"stopCh",
",",
"finishCh",
"chan",
"struct",
"{",
"}",
")",
"{",
"defer",
"close",
"(",
"finishCh",
")",
"\n",
"respCh",
":=",
... |
21,884 | all-21885 | [
"SetRuleSelector",
"modifies",
"the",
"rule",
"selector",
".",
"See",
":",
"https",
":",
"//",
"chromedevtools",
".",
"github",
".",
"io",
"/",
"devtools",
"-",
"protocol",
"/",
"tot",
"/",
"CSS#method",
"-",
"setRuleSelector",
"parameters",
":",
"styleSheetID... | [
"func",
"SetRuleSelector",
"(",
"styleSheetID",
"StyleSheetID",
",",
"rangeVal",
"*",
"SourceRange",
",",
"selector",
"string",
")",
"*",
"SetRuleSelectorParams",
"{",
"return",
"&",
"SetRuleSelectorParams",
"{",
"StyleSheetID",
":",
"styleSheetID",
",",
"<mask>",
"... |
21,885 | all-21886 | [
"Make",
"sure",
"all",
"our",
"directories",
"are",
"available",
"."
] | [
"func",
"(",
"s",
"*",
"OS",
")",
"initDirs",
"(",
")",
"error",
"{",
"dirs",
":=",
"[",
"]",
"struct",
"{",
"path",
"string",
"\n",
"mode",
"os",
".",
"FileMode",
"\n",
"}",
"{",
"{",
"s",
".",
"VarDir",
",",
"0711",
"}",
",",
"{",
"filepath",... |
21,886 | all-21887 | [
"AddFlags",
"adds",
"flags",
"to",
"the",
"FlagSet",
"that",
"populate",
"the",
"wrapper",
"options",
"struct",
"provided",
"."
] | [
"func",
"(",
"o",
"*",
"<mask>",
")",
"AddFlags",
"(",
"fs",
"*",
"flag",
".",
"FlagSet",
")",
"{",
"fs",
".",
"StringVar",
"(",
"&",
"o",
".",
"ProcessLog",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"fs",
".",
"StringVar",
... |
21,887 | all-21888 | [
"copyFile",
"copies",
"src",
"to",
"tar",
"file",
"dst",
"."
] | [
"func",
"copyFile",
"(",
"tw",
"*",
"tar",
".",
"Writer",
",",
"dst",
",",
"src",
"string",
")",
"error",
"{",
"s",
",",
"err",
":=",
"os",
".",
"Open",
"(",
"src",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
... |
21,888 | all-21889 | [
"DialJournal",
"returns",
"no",
"error",
"if",
"the",
"process",
"can",
"dial",
"journal",
"socket",
".",
"Returns",
"an",
"error",
"if",
"dial",
"failed",
"whichi",
"indicates",
"journald",
"is",
"not",
"available",
"(",
"e",
".",
"g",
".",
"run",
"embedd... | [
"func",
"DialJournal",
"(",
")",
"error",
"{",
"conn",
",",
"err",
":=",
"net",
".",
"Dial",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"conn",
"!=",
"nil",
"{",
"defer",
"<mask>",
".",
"Close",
"(",
")",
"\n",
"}",
"\n",
"return",
"err... |
21,889 | all-21890 | [
"BuildCNIConfig",
"constructs",
"the",
"cni",
"configuration",
"from",
"eni"
] | [
"func",
"(",
"task",
"*",
"Task",
")",
"BuildCNIConfig",
"(",
")",
"(",
"*",
"ecscni",
".",
"Config",
",",
"error",
")",
"{",
"if",
"!",
"<mask>",
".",
"isNetworkModeVPC",
"(",
")",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
... |
21,890 | all-21891 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Effect",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation17",
"(",
"&",
"w",
",",
"v",
")",
"\n",... |
21,891 | all-21892 | [
"Mutate",
"applies",
"the",
"provided",
"mutators",
"to",
"this",
"builder",
"s",
"payment",
"or",
"operation",
"."
] | [
"func",
"(",
"b",
"*",
"ChangeTrustBuilder",
")",
"Mutate",
"(",
"muts",
"...",
"interface",
"{",
"}",
")",
"{",
"for",
"_",
",",
"m",
":=",
"range",
"muts",
"{",
"var",
"err",
"error",
"\n",
"switch",
"mut",
":=",
"m",
".",
"(",
"type",
")",
"{"... |
21,892 | all-21893 | [
"Log",
"implements",
"the",
"Backend",
"interface",
"."
] | [
"func",
"(",
"b",
"*",
"SyslogBackend",
")",
"Log",
"(",
"level",
"Level",
",",
"calldepth",
"int",
",",
"rec",
"*",
"Record",
")",
"error",
"{",
"line",
":=",
"rec",
".",
"Formatted",
"(",
"calldepth",
"+",
"1",
")",
"\n",
"switch",
"<mask>",
"{",
... |
21,893 | all-21894 | [
"UpdateIssues",
"downloads",
"new",
"issues",
"and",
"saves",
"in",
"database"
] | [
"func",
"UpdateIssues",
"(",
"db",
"*",
"gorm",
".",
"DB",
",",
"client",
"ClientInterface",
")",
"{",
"latest",
",",
"err",
":=",
"findLatestIssueUpdate",
"(",
"db",
",",
"client",
".",
"RepositoryName",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
... |
21,894 | all-21895 | [
"FindRegistry",
"returns",
"the",
"Registry",
"with",
"the",
"longest",
"prefix",
"for",
"ref",
"which",
"is",
"a",
"registry",
"repository",
"namespace",
"repository",
"or",
"image",
"reference",
"(",
"as",
"formatted",
"by",
"reference",
".",
"Domain",
"()",
... | [
"func",
"FindRegistry",
"(",
"ctx",
"*",
"types",
".",
"SystemContext",
",",
"ref",
"string",
")",
"(",
"*",
"Registry",
",",
"error",
")",
"{",
"registries",
",",
"err",
":=",
"GetRegistries",
"(",
"ctx",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"r... |
21,895 | all-21896 | [
"matrixSelector",
"evaluates",
"a",
"*",
"MatrixSelector",
"expression",
"."
] | [
"func",
"(",
"ev",
"*",
"evaluator",
")",
"matrixSelector",
"(",
"node",
"*",
"MatrixSelector",
")",
"Matrix",
"{",
"checkForSeriesSetExpansion",
"(",
"ev",
".",
"ctx",
",",
"node",
")",
"\n\n",
"var",
"(",
"offset",
"=",
"durationMilliseconds",
"(",
"node",... |
21,896 | all-21897 | [
"RunValueLogGC",
"triggers",
"a",
"value",
"log",
"garbage",
"collection",
".",
"It",
"picks",
"value",
"log",
"files",
"to",
"perform",
"GC",
"based",
"on",
"statistics",
"that",
"are",
"collected",
"duing",
"compactions",
".",
"If",
"no",
"such",
"statistics... | [
"func",
"(",
"db",
"*",
"DB",
")",
"RunValueLogGC",
"(",
"discardRatio",
"float64",
")",
"error",
"{",
"if",
"discardRatio",
">=",
"1.0",
"||",
"discardRatio",
"<=",
"0.0",
"{",
"return",
"ErrInvalidRequest",
"\n",
"}",
"\n\n",
"// Find head on disk",
"headKey... |
21,897 | all-21898 | [
"Delete",
"takes",
"name",
"of",
"the",
"prowJob",
"and",
"deletes",
"it",
".",
"Returns",
"an",
"error",
"if",
"one",
"occurs",
"."
] | [
"func",
"(",
"c",
"*",
"FakeProwJobs",
")",
"Delete",
"(",
"name",
"string",
",",
"<mask>",
"*",
"v1",
".",
"DeleteOptions",
")",
"error",
"{",
"_",
",",
"err",
":=",
"c",
".",
"Fake",
".",
"Invokes",
"(",
"testing",
".",
"NewDeleteAction",
"(",
"pro... |
21,898 | all-21899 | [
"/",
"*",
"IndentString",
"takes",
"a",
"string",
"and",
"indents",
"each",
"line",
"by",
"the",
"specified",
"amount",
"."
] | [
"func",
"IndentString",
"(",
"s",
"string",
",",
"indentation",
"uint",
")",
"string",
"{",
"components",
":=",
"strings",
".",
"Split",
"(",
"s",
",",
"\"",
"\\n",
"\"",
")",
"\n",
"result",
":=",
"\"",
"\"",
"\n",
"indent",
":=",
"strings",
".",
"R... |
21,899 | all-21900 | [
"expandClusterDrsVMConfigInfo",
"reads",
"certain",
"ResourceData",
"keys",
"and",
"returns",
"a",
"ClusterDrsVmConfigInfo",
"."
] | [
"func",
"expandClusterDrsVMConfigInfo",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"vm",
"*",
"object",
".",
"VirtualMachine",
")",
"(",
"*",
"<mask>",
".",
"ClusterDrsVmConfigInfo",
",",
"error",
")",
"{",
"obj",
":=",
"&",
"types",
".",
"ClusterDrs... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.