id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
22,900 | all-22901 | [
"convert",
"your",
"main",
"()",
"into",
"a",
"prog",
"(",
"state",
")",
"prog",
"()",
"is",
"run",
"in",
"a",
"child",
"process"
] | [
"func",
"prog",
"(",
"state",
"overseer",
".",
"State",
")",
"{",
"fmt",
".",
"Printf",
"(",
"\"",
"\\n",
"\"",
",",
"BuildID",
",",
"state",
".",
"ID",
")",
"\n",
"http",
".",
"Handle",
"(",
"\"",
"\"",
",",
"http",
".",
"HandlerFunc",
"(",
"fun... |
22,901 | all-22902 | [
"CreateContainers",
"create",
"the",
"specified",
"number",
"of",
"containers",
"."
] | [
"func",
"CreateContainers",
"(",
"c",
"lxd",
".",
"ContainerServer",
",",
"count",
"int",
",",
"parallel",
"int",
",",
"fingerprint",
"string",
",",
"privileged",
"bool",
")",
"(",
"time",
".",
"Duration",
",",
"error",
")",
"{",
"var",
"duration",
"time",... |
22,902 | all-22903 | [
"AllImageStates",
"returns",
"all",
"of",
"the",
"image",
".",
"ImageStates"
] | [
"func",
"(",
"state",
"*",
"DockerTaskEngineState",
")",
"AllImageStates",
"(",
")",
"[",
"]",
"*",
"image",
".",
"ImageState",
"{",
"state",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"<mask>",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n\n",
... |
22,903 | all-22904 | [
"LoadBytes",
"loads",
"YAML",
"bytes"
] | [
"func",
"LoadBytes",
"(",
"conf",
"interface",
"{",
"}",
",",
"src",
"[",
"]",
"<mask>",
")",
"error",
"{",
"return",
"loadConfigBytes",
"(",
"conf",
",",
"src",
",",
"nil",
",",
"yaml",
".",
"Unmarshal",
")",
"\n",
"}"
] |
22,904 | all-22905 | [
"Config",
"runs",
"git",
"config",
"."
] | [
"func",
"(",
"r",
"*",
"Repo",
")",
"Config",
"(",
"key",
",",
"<mask>",
"string",
")",
"error",
"{",
"r",
".",
"logger",
".",
"Infof",
"(",
"\"",
"\"",
",",
"key",
",",
"value",
")",
"\n",
"if",
"b",
",",
"err",
":=",
"r",
".",
"gitCommand",
... |
22,905 | all-22906 | [
"GetPreviewFilename",
"is",
"a",
"wrapper",
"around",
"gtk_file_chooser_get_preview_filename",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"FileChooser",
")",
"GetPreviewFilename",
"(",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_file_chooser_get_preview_filename",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"defer",
"C",
".",
"<mask>",
"(",
"unsafe",
".",
"Pointe... |
22,906 | all-22907 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"ResolveNodeParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom11",
"(",
"&",
"w",
",",
"v",
")",
... |
22,907 | all-22908 | [
"Dial",
"dials",
"the",
"given",
"TCP",
"addr",
"using",
"tcp4",
".",
"This",
"function",
"has",
"the",
"following",
"additional",
"features",
"comparing",
"to",
"net",
".",
"Dial",
":",
"*",
"It",
"reduces",
"load",
"on",
"DNS",
"resolver",
"by",
"caching... | [
"func",
"(",
"d",
"*",
"TCPDialer",
")",
"Dial",
"(",
"addr",
"string",
")",
"(",
"net",
".",
"Conn",
",",
"error",
")",
"{",
"return",
"d",
".",
"dial",
"(",
"addr",
",",
"<mask>",
",",
"DefaultDialTimeout",
")",
"\n",
"}"
] |
22,908 | all-22909 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"AwaitPromiseParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51",
"(",
"&",
... |
22,909 | all-22910 | [
"GetHostName",
"returns",
"the",
"HostName",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"c",
"*",
"Check",
")",
"GetHostName",
"(",
")",
"<mask>",
"{",
"if",
"c",
"==",
"nil",
"||",
"c",
".",
"HostName",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"c",
".",
"HostName",
"\n",
"}"
] |
22,910 | all-22911 | [
"VisitAllInOrder",
"calls",
"f",
"for",
"each",
"header",
"in",
"the",
"order",
"they",
"were",
"received",
".",
"f",
"must",
"not",
"retain",
"references",
"to",
"key",
"and",
"/",
"or",
"value",
"after",
"returning",
".",
"Copy",
"key",
"and",
"/",
"or... | [
"func",
"(",
"h",
"*",
"RequestHeader",
")",
"VisitAllInOrder",
"(",
"f",
"func",
"(",
"key",
",",
"value",
"[",
"]",
"byte",
")",
")",
"{",
"h",
".",
"parseRawHeaders",
"(",
")",
"\n",
"var",
"s",
"headerScanner",
"\n",
"s",
".",
"b",
"=",
"h",
... |
22,911 | all-22912 | [
"PutVertices",
"puts",
"the",
"given",
"dest",
"with",
"vertices",
"that",
"can",
"be",
"passed",
"to",
"DrawTriangles",
"."
] | [
"func",
"(",
"i",
"*",
"Image",
")",
"PutVertex",
"(",
"dest",
"[",
"]",
"float32",
",",
"dx",
",",
"dy",
",",
"sx",
",",
"sy",
"float32",
",",
"bx0",
",",
"by0",
",",
"bx1",
",",
"by1",
"float32",
",",
"cr",
",",
"cg",
",",
"cb",
",",
"ca",
... |
22,912 | all-22913 | [
"Value",
"implements",
"the",
"driver",
"Valuer",
"interface",
"."
] | [
"func",
"(",
"n",
"NullDecimal",
")",
"Value",
"(",
")",
"(",
"driver",
".",
"Value",
",",
"error",
")",
"{",
"if",
"!",
"n",
".",
"Valid",
"{",
"return",
"nil",
",",
"nil",
"\n",
"}",
"\n",
"if",
"n",
".",
"Decimal",
"==",
"nil",
"{",
"return"... |
22,913 | all-22914 | [
"NewTypeFilterWrapperPlugin",
"is",
"the",
"constructor",
"of",
"TypeFilterWrapperPlugin"
] | [
"func",
"NewTypeFilterWrapperPlugin",
"(",
"plugin",
"Plugin",
")",
"*",
"TypeFilterWrapperPlugin",
"{",
"return",
"&",
"TypeFilterWrapperPlugin",
"{",
"plugin",
":",
"plugin",
",",
"pass",
":",
"<mask>",
"[",
"string",
"]",
"bool",
"{",
"}",
",",
"}",
"\n",
... |
22,914 | all-22915 | [
"Scale",
"scales",
"the",
"matrix",
"by",
"(",
"x",
"y",
")",
"."
] | [
"func",
"(",
"g",
"*",
"GeoM",
")",
"Scale",
"(",
"x",
",",
"y",
"float64",
")",
"{",
"a",
":=",
"(",
"float64",
"(",
"g",
".",
"a_1",
")",
"+",
"1",
")",
"*",
"x",
"\n",
"b",
":=",
"float64",
"(",
"g",
".",
"b",
")",
"*",
"x",
"\n",
"t... |
22,915 | all-22916 | [
"Ask",
"will",
"call",
"UI",
".",
"Ask",
"with",
"message",
"then",
"wait",
"for",
"UI",
".",
"Ask",
"to",
"return",
"a",
"response",
"and",
"/",
"or",
"error",
".",
"It",
"will",
"clean",
"the",
"response",
"by",
"removing",
"any",
"carriage",
"return... | [
"func",
"(",
"ui",
"*",
"ConcurrentUI",
")",
"Ask",
"(",
"<mask>",
",",
"trim",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"ui",
".",
"l",
".",
"Lock",
"(",
")",
"\n",
"defer",
"ui",
".",
"l",
".",
"Unlock",
"(",
")",
"\n",
"res",
... |
22,916 | all-22917 | [
"Subscribe",
"to",
"events",
".",
"It",
"will",
"return",
"true",
"if",
"successfully",
"subscribed",
"means",
"the",
"handler",
"haven",
"t",
"subscribed",
"before",
"."
] | [
"func",
"(",
"b",
"*",
"Bus",
")",
"Subscribe",
"(",
"h",
"Handler",
")",
"bool",
"{",
"b",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"b",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"for",
"_",
",",
"v",
":=",
"<mask>",
"b",
".",
"h... |
22,917 | all-22918 | [
"unbind",
"takes",
"all",
"service",
"instances",
"that",
"are",
"bound",
"to",
"the",
"app",
"and",
"unbind",
"them",
".",
"This",
"method",
"is",
"used",
"by",
"Destroy",
"(",
"before",
"destroying",
"the",
"app",
"it",
"unbinds",
"all",
"service",
"inst... | [
"func",
"(",
"app",
"*",
"App",
")",
"unbind",
"(",
"evt",
"*",
"event",
".",
"Event",
",",
"requestID",
"string",
")",
"error",
"{",
"instances",
",",
"err",
":=",
"service",
".",
"GetServiceInstancesBoundToApp",
"(",
"app",
".",
"Name",
")",
"\n",
"i... |
22,918 | all-22919 | [
"Error",
"is",
"the",
"string",
"representation",
"of",
"a",
"provisioning",
"error",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"Error",
"(",
")",
"string",
"{",
"var",
"err",
"string",
"\n",
"if",
"e",
".",
"Err",
"!=",
"nil",
"{",
"err",
"=",
"e",
".",
"Err",
".",
"Error",
"(",
")",
"+",
"\"",
"\"",
"+",
"e",
".",
"Reason",
"\... |
22,919 | all-22920 | [
"HasAlertId",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"a",
"*",
"AlertValueDefinition",
")",
"HasAlertId",
"(",
")",
"bool",
"{",
"if",
"a",
"!=",
"nil",
"&&",
"a",
".",
"AlertId",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
22,920 | all-22921 | [
"Validate",
"validates",
"this",
"state"
] | [
"func",
"(",
"m",
"State",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"<mask>",
"[",
"]",
"error",
"\n\n",
"// value enum",
"if",
"err",
":=",
"m",
".",
"validateStateEnum",
"(",
"\"",
"\"",
",",
"\"",
"\"",
... |
22,921 | all-22922 | [
"GetTaskByArn",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockTaskEngine",
")",
"GetTaskByArn",
"(",
"arg0",
"string",
")",
"(",
"*",
"task",
".",
"Task",
",",
"bool",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0... |
22,922 | all-22923 | [
"FqName",
"returns",
"namespace",
".",
"name"
] | [
"func",
"FqName",
"(",
"o",
"metav1",
".",
"<mask>",
")",
"string",
"{",
"if",
"o",
".",
"GetNamespace",
"(",
")",
"==",
"\"",
"\"",
"{",
"return",
"o",
".",
"GetName",
"(",
")",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
... |
22,923 | all-22924 | [
"Gain",
"applies",
"the",
"multiplier",
"to",
"the",
"passed",
"buffer",
".",
"A",
"multipler",
"of",
"1",
"would",
"increase",
"the",
"amplitude",
"of",
"the",
"signal",
"by",
"100%",
"while",
"a",
"multiplier",
"of",
"0",
"would",
"not",
"do",
"anything"... | [
"func",
"Gain",
"(",
"buf",
"*",
"audio",
".",
"FloatBuffer",
",",
"multiplier",
"float64",
")",
"error",
"{",
"if",
"buf",
"==",
"nil",
"{",
"return",
"<mask>",
".",
"ErrInvalidBuffer",
"\n",
"}",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",... |
22,924 | all-22925 | [
"Enabled",
"returns",
"whether",
"an",
"API",
"s",
"capabilities",
"are",
"enabled",
".",
"The",
"wildcard",
"*",
"capability",
"matches",
"every",
"capability",
"of",
"an",
"API",
".",
"If",
"the",
"underlying",
"RPC",
"fails",
"(",
"if",
"the",
"package",
... | [
"func",
"Enabled",
"(",
"ctx",
"context",
".",
"Context",
",",
"api",
",",
"capability",
"string",
")",
"bool",
"{",
"req",
":=",
"&",
"<mask>",
".",
"IsEnabledRequest",
"{",
"Package",
":",
"&",
"api",
",",
"Capability",
":",
"[",
"]",
"string",
"{",
... |
22,925 | all-22926 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Style",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss5",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"retu... |
22,926 | all-22927 | [
"resolvePaths",
"is",
"a",
"modified",
"copy",
"of",
"k8s",
".",
"io",
"/",
"kubernetes",
"/",
"pkg",
"/",
"client",
"/",
"unversioned",
"/",
"clientcmd",
".",
"ClientConfigLoadingRules",
".",
"resolvePaths",
".",
"ResolvePaths",
"updates",
"the",
"given",
"re... | [
"func",
"resolvePaths",
"(",
"refs",
"[",
"]",
"*",
"string",
",",
"base",
"string",
")",
"error",
"{",
"for",
"_",
",",
"ref",
":=",
"<mask>",
"refs",
"{",
"// Don't resolve empty paths",
"if",
"len",
"(",
"*",
"ref",
")",
">",
"0",
"{",
"// Don't res... |
22,927 | all-22928 | [
"DeleteRecordSet",
"deletes",
"recordset",
"in",
"the",
"given",
"DNS",
"zone"
] | [
"func",
"(",
"c",
"designateClient",
")",
"DeleteRecordSet",
"(",
"zoneID",
",",
"recordSetID",
"string",
")",
"<mask>",
"{",
"return",
"recordsets",
".",
"Delete",
"(",
"c",
".",
"serviceClient",
",",
"zoneID",
",",
"recordSetID",
")",
".",
"ExtractErr",
"(... |
22,928 | all-22929 | [
"YRoot",
"returns",
"the",
"y",
"coordinate",
"of",
"the",
"pointer",
"relative",
"to",
"the",
"root",
"of",
"the",
"screen",
"."
] | [
"func",
"(",
"v",
"*",
"EventButton",
")",
"YRoot",
"(",
")",
"float64",
"{",
"c",
":=",
"v",
".",
"native",
"(",
")",
".",
"y_root",
"\n",
"<mask>",
"float64",
"(",
"c",
")",
"\n",
"}"
] |
22,929 | all-22930 | [
"HasTitleSize",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"ToplistDefinition",
")",
"HasTitleSize",
"(",
")",
"bool",
"{",
"if",
"t",
"!=",
"nil",
"&&",
"t",
".",
"TitleSize",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
22,930 | all-22931 | [
"GetRaw",
"returns",
"the",
"value",
"of",
"the",
"given",
"key",
"which",
"must",
"be",
"of",
"type",
"String",
"."
] | [
"func",
"(",
"m",
"*",
"Map",
")",
"GetRaw",
"(",
"name",
"string",
")",
"string",
"{",
"key",
":=",
"m",
".",
"schema",
".",
"mustGetKey",
"(",
"name",
")",
"\n",
"value",
",",
"ok",
":=",
"m",
".",
"values",
"[",
"name",
"]",
"\n",
"if",
"!",... |
22,931 | all-22932 | [
"ReadLimitBody",
"reads",
"response",
"from",
"the",
"given",
"r",
"limiting",
"the",
"body",
"size",
".",
"If",
"maxBodySize",
">",
"0",
"and",
"the",
"body",
"size",
"exceeds",
"maxBodySize",
"then",
"ErrBodyTooLarge",
"is",
"returned",
".",
"io",
".",
"EO... | [
"func",
"(",
"resp",
"*",
"Response",
")",
"ReadLimitBody",
"(",
"r",
"*",
"bufio",
".",
"Reader",
",",
"maxBodySize",
"int",
")",
"error",
"{",
"resp",
".",
"resetSkipHeader",
"(",
")",
"\n",
"err",
":=",
"resp",
".",
"Header",
".",
"Read",
"(",
"r"... |
22,932 | all-22933 | [
"MarshalEasyJSON",
"satisfies",
"easyjson",
".",
"Marshaler",
"."
] | [
"func",
"(",
"t",
"ScreenshotParamsFormat",
")",
"MarshalEasyJSON",
"(",
"out",
"*",
"jwriter",
".",
"Writer",
")",
"{",
"out",
".",
"<mask>",
"(",
"string",
"(",
"t",
")",
")",
"\n",
"}"
] |
22,933 | all-22934 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform3ui",
"(",
"program",
"uint32",
",",
"<mask>",
"int32",
",",
"v0",
"uint32",
",",
"v1",
"uint32",
",",
"v2",
"uint32",
")",
"{",
"C",
".",
"glowProgramUniform3ui",
"(",
"gpProgramUniform3ui",
",",
"(",
"C",
".",
"GLuint",
")",
"(",
... |
22,934 | all-22935 | [
"IsPtr",
"returns",
"true",
"if",
"we",
"guess",
"it",
"s",
"a",
"pointer",
".",
"It",
"s",
"only",
"a",
"guess",
"it",
"can",
"be",
"easily",
"be",
"confused",
"by",
"a",
"bitmask",
"."
] | [
"func",
"(",
"a",
"*",
"Arg",
")",
"IsPtr",
"(",
")",
"bool",
"{",
"// Assumes all pointers are above 16Mb and positive.",
"return",
"a",
".",
"<mask>",
">",
"16",
"*",
"1024",
"*",
"1024",
"&&",
"a",
".",
"Value",
"<",
"math",
".",
"MaxInt64",
"\n",
"}"... |
22,935 | all-22936 | [
"NewForConfigOrDie",
"creates",
"a",
"new",
"Clientset",
"for",
"the",
"given",
"config",
"and",
"panics",
"if",
"there",
"is",
"an",
"error",
"in",
"the",
"config",
"."
] | [
"func",
"NewForConfigOrDie",
"(",
"c",
"*",
"rest",
".",
"Config",
")",
"*",
"Clientset",
"{",
"var",
"cs",
"Clientset",
"\n",
"<mask>",
".",
"prowV1",
"=",
"prowv1",
".",
"NewForConfigOrDie",
"(",
"c",
")",
"\n\n",
"cs",
".",
"DiscoveryClient",
"=",
"di... |
22,936 | all-22937 | [
"Verify",
"that",
"leafHash",
"is",
"a",
"leaf",
"hash",
"of",
"the",
"simple",
"-",
"merkle",
"-",
"tree",
"which",
"hashes",
"to",
"rootHash",
"."
] | [
"func",
"(",
"sp",
"*",
"SimpleProof",
")",
"Verify",
"(",
"index",
"int",
",",
"total",
"int",
",",
"leafHash",
"[",
"]",
"byte",
",",
"rootHash",
"[",
"]",
"<mask>",
")",
"bool",
"{",
"computedHash",
":=",
"computeHashFromAunts",
"(",
"index",
",",
"... |
22,937 | all-22938 | [
"bind",
"a",
"user",
"-",
"defined",
"varying",
"out",
"variable",
"to",
"a",
"fragment",
"shader",
"color",
"number",
"and",
"index"
] | [
"func",
"BindFragDataLocationIndexed",
"(",
"program",
"uint32",
",",
"colorNumber",
"uint32",
",",
"index",
"uint32",
",",
"name",
"*",
"uint8",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpBindFragDataLocationIndexed",
",",
"4",
",",
"uintptr",
"(",
"program"... |
22,938 | all-22939 | [
"replicateTo",
"is",
"a",
"helper",
"to",
"replicate",
"()",
"used",
"to",
"replicate",
"the",
"logs",
"up",
"to",
"a",
"given",
"last",
"index",
".",
"If",
"the",
"follower",
"log",
"is",
"behind",
"we",
"take",
"care",
"to",
"bring",
"them",
"up",
"t... | [
"func",
"(",
"r",
"*",
"Raft",
")",
"replicateTo",
"(",
"s",
"*",
"followerReplication",
",",
"lastIndex",
"uint64",
")",
"(",
"shouldStop",
"bool",
")",
"{",
"// Create the base request",
"var",
"req",
"AppendEntriesRequest",
"\n",
"var",
"resp",
"AppendEntries... |
22,939 | all-22940 | [
"BytesMap",
"maps",
"a",
"function",
"on",
"each",
"element",
"of",
"a",
"slice",
"of",
"bytes",
"."
] | [
"func",
"BytesMap",
"(",
"f",
"func",
"(",
"byte",
")",
"byte",
",",
"data",
"[",
"]",
"byte",
")",
"[",
"]",
"byte",
"{",
"size",
":=",
"len",
"(",
"data",
")",
"\n",
"result",
":=",
"make",
"(",
"[",
"]",
"byte",
",",
"size",
",",
"size",
"... |
22,940 | all-22941 | [
"TriggerMatches",
"returns",
"true",
"if",
"the",
"comment",
"body",
"should",
"trigger",
"this",
"presubmit",
".",
"This",
"is",
"usually",
"a",
"/",
"test",
"foo",
"string",
"."
] | [
"func",
"(",
"ps",
"Presubmit",
")",
"TriggerMatches",
"(",
"body",
"string",
")",
"bool",
"{",
"return",
"ps",
".",
"Trigger",
"!=",
"\"",
"\"",
"&&",
"ps",
".",
"<mask>",
".",
"MatchString",
"(",
"body",
")",
"\n",
"}"
] |
22,941 | all-22942 | [
"GetServiceOk",
"returns",
"a",
"tuple",
"with",
"the",
"Service",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"t",
"*",
"TraceServiceDefinition",
")",
"GetServiceOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Service",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return"... |
22,942 | all-22943 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"StickyPositionConstraint",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree",
"(",
"&",
"w",
",",
"v"... |
22,943 | all-22944 | [
"New",
"generator",
"for",
"adding",
"VCS",
"to",
"an",
"application"
] | [
"func",
"New",
"(",
"opts",
"*",
"Options",
")",
"(",
"*",
"genny",
".",
"Generator",
",",
"error",
")",
"{",
"g",
":=",
"genny",
".",
"New",
"(",
")",
"\n\n",
"if",
"err",
":=",
"opts",
".",
"Validate",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
... |
22,944 | all-22945 | [
"TODO",
"(",
"jrick",
")",
"GtkIconSet",
"/",
"*",
"func",
"(",
"v",
"*",
"Image",
")",
"GetIconSet",
"()",
"{",
"}",
"TODO",
"(",
"jrick",
")",
"GdkPixbufAnimation",
"/",
"*",
"func",
"(",
"v",
"*",
"Image",
")",
"GetAnimation",
"()",
"{",
"}",
"G... | [
"func",
"(",
"v",
"*",
"Image",
")",
"GetIconName",
"(",
")",
"(",
"string",
",",
"IconSize",
")",
"{",
"var",
"iconName",
"*",
"C",
".",
"gchar",
"\n",
"var",
"size",
"C",
".",
"GtkIconSize",
"\n",
"C",
".",
"gtk_image_get_icon_name",
"(",
"v",
".",... |
22,945 | all-22946 | [
"MarshalText",
"implements",
"the",
"TextMarshaler",
"interface",
"."
] | [
"func",
"(",
"l",
"List",
")",
"MarshalText",
"(",
")",
"(",
"text",
"[",
"]",
"byte",
",",
"err",
"error",
")",
"{",
"var",
"buf",
"bytes",
".",
"<mask>",
"\n",
"l",
".",
"writeToBuffer",
"(",
"&",
"buf",
")",
"\n",
"return",
"buf",
".",
"Bytes"... |
22,946 | all-22947 | [
"Allow",
"allows",
"permission",
"mode",
"for",
"roles"
] | [
"func",
"Allow",
"(",
"mode",
"PermissionMode",
",",
"roles",
"...",
"string",
")",
"*",
"Permission",
"{",
"return",
"Global",
".",
"Allow",
"(",
"<mask>",
",",
"roles",
"...",
")",
"\n",
"}"
] |
22,947 | all-22948 | [
"GetTag",
"gets",
"an",
"object",
"out",
"of",
"the",
"object",
"store",
"by",
"tag",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"GetTag",
"(",
"<mask>",
"string",
",",
"writer",
"io",
".",
"Writer",
")",
"error",
"{",
"getTagClient",
",",
"err",
":=",
"c",
".",
"ObjectAPIClient",
".",
"GetTag",
"(",
"c",
".",
"Ctx",
"(",
")",
",",
"&",
"p... |
22,948 | all-22949 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetHistogramsReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser11",
"(",
"&",
"w",
",",
"v",
... |
22,949 | all-22950 | [
"Advertise",
"advertises",
"with",
"Hyperbahn",
"."
] | [
"func",
"(",
"s",
"*",
"internalServer",
")",
"Advertise",
"(",
"hyperbahnHosts",
"[",
"]",
"string",
")",
"error",
"{",
"config",
":=",
"hyperbahn",
".",
"<mask>",
"{",
"InitialNodes",
":",
"hyperbahnHosts",
"}",
"\n",
"hc",
",",
"err",
":=",
"hyperbahn",... |
22,950 | all-22951 | [
"Close",
"closes",
"all",
"currently",
"open",
"connections",
"."
] | [
"func",
"(",
"c",
"*",
"<mask>",
")",
"Close",
"(",
")",
"error",
"{",
"c",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"closeIdleConns",
"(",
")",
"\n",
"c",
".",
"freeconn",
"=",... |
22,951 | all-22952 | [
"AddRawJob",
"helper",
"to",
"add",
"a",
"job",
"to",
"the",
"pipeline",
"manifest"
] | [
"func",
"(",
"s",
"*",
"ConcoursePipeline",
")",
"AddRawJob",
"(",
"<mask>",
"atc",
".",
"JobConfig",
")",
"{",
"s",
".",
"Jobs",
"=",
"append",
"(",
"s",
".",
"Jobs",
",",
"job",
")",
"\n",
"}"
] |
22,952 | all-22953 | [
"WithPageRanges",
"paper",
"ranges",
"to",
"print",
"e",
".",
"g",
".",
"1",
"-",
"5",
"8",
"11",
"-",
"13",
".",
"Defaults",
"to",
"the",
"empty",
"string",
"which",
"means",
"print",
"all",
"pages",
"."
] | [
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithPageRanges",
"(",
"pageRanges",
"<mask>",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"PageRanges",
"=",
"pageRanges",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
22,953 | all-22954 | [
"NewLogCache",
"is",
"used",
"to",
"create",
"a",
"new",
"LogCache",
"with",
"the",
"given",
"capacity",
"and",
"backend",
"store",
"."
] | [
"func",
"NewLogCache",
"(",
"capacity",
"int",
",",
"store",
"LogStore",
")",
"(",
"*",
"LogCache",
",",
"error",
")",
"{",
"if",
"capacity",
"<=",
"0",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"c",
... |
22,954 | all-22955 | [
"SetKey",
"sets",
"cookie",
"name",
"."
] | [
"func",
"(",
"c",
"*",
"Cookie",
")",
"SetKey",
"(",
"<mask>",
"string",
")",
"{",
"c",
".",
"key",
"=",
"append",
"(",
"c",
".",
"key",
"[",
":",
"0",
"]",
",",
"key",
"...",
")",
"\n",
"}"
] |
22,955 | all-22956 | [
"Next",
"returns",
"the",
"next",
"page",
"of",
"resources",
".",
"We",
"may",
"need",
"to",
"fetch",
"multiple",
"pages",
"from",
"the",
"Twilio",
"API",
"before",
"we",
"find",
"one",
"in",
"the",
"right",
"date",
"range",
"so",
"latency",
"may",
"be",... | [
"func",
"(",
"c",
"*",
"callDateIterator",
")",
"Next",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"*",
"CallPage",
",",
"error",
")",
"{",
"var",
"page",
"*",
"CallPage",
"\n",
"for",
"{",
"// just wipe it clean every time to avoid remnants hanging around... |
22,956 | all-22957 | [
"StartServer",
"starts",
"a",
"remote",
"Pact",
"Mock",
"Server",
"."
] | [
"func",
"(",
"p",
"*",
"mockClient",
")",
"StartServer",
"(",
"args",
"[",
"]",
"string",
",",
"<mask>",
"int",
")",
"*",
"types",
".",
"MockServer",
"{",
"return",
"p",
".",
"MockServer",
"\n",
"}"
] |
22,957 | all-22958 | [
"setupUnixDevice",
"()",
"creates",
"the",
"unix",
"device",
"and",
"sets",
"up",
"the",
"necessary",
"low",
"-",
"level",
"liblxc",
"configuration",
"items",
"."
] | [
"func",
"(",
"c",
"*",
"containerLXC",
")",
"setupUnixDevice",
"(",
"prefix",
"string",
",",
"dev",
"types",
".",
"Device",
",",
"major",
"int",
",",
"minor",
"int",
",",
"path",
"string",
",",
"createMustSucceed",
"bool",
",",
"defaultMode",
"bool",
")",
... |
22,958 | all-22959 | [
"HasType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"c",
"*",
"CheckStatusDefinition",
")",
"HasType",
"(",
")",
"bool",
"{",
"if",
"c",
"!=",
"nil",
"&&",
"c",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
22,959 | all-22960 | [
"Parameter",
"image",
"has",
"type",
"C",
".",
"GLeglImageOES",
"."
] | [
"func",
"EGLImageTargetTextureStorageEXT",
"(",
"texture",
"uint32",
",",
"image",
"unsafe",
".",
"Pointer",
",",
"attrib_list",
"*",
"int32",
")",
"{",
"C",
".",
"glowEGLImageTargetTextureStorageEXT",
"(",
"gpEGLImageTargetTextureStorageEXT",
",",
"(",
"C",
".",
"G... |
22,960 | all-22961 | [
"Load",
"all",
"containers",
"of",
"this",
"nodes",
"."
] | [
"func",
"containerLoadNodeAll",
"(",
"s",
"*",
"state",
".",
"State",
")",
"(",
"[",
"]",
"container",
",",
"error",
")",
"{",
"// Get all the container arguments",
"var",
"cts",
"[",
"]",
"db",
".",
"Container",
"\n",
"err",
":=",
"s",
".",
"Cluster",
"... |
22,961 | all-22962 | [
"OpenNode",
"creates",
"a",
"new",
"Node",
"object",
".",
"The",
"fresh",
"hook",
"parameter",
"is",
"used",
"by",
"the",
"daemon",
"to",
"mark",
"all",
"known",
"patch",
"names",
"as",
"applied",
"when",
"a",
"brand",
"new",
"database",
"is",
"created",
... | [
"func",
"OpenNode",
"(",
"dir",
"string",
",",
"fresh",
"func",
"(",
"*",
"Node",
")",
"error",
",",
"legacyPatches",
"map",
"[",
"int",
"]",
"*",
"LegacyPatch",
")",
"(",
"*",
"Node",
",",
"*",
"Dump",
",",
"error",
")",
"{",
"// When updating the nod... |
22,962 | all-22963 | [
"SetSelectionMode",
"is",
"a",
"wrapper",
"around",
"gtk_flow_box_set_selection_mode",
"()"
] | [
"func",
"(",
"fb",
"*",
"FlowBox",
")",
"SetSelectionMode",
"(",
"<mask>",
"SelectionMode",
")",
"{",
"C",
".",
"gtk_flow_box_set_selection_mode",
"(",
"fb",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkSelectionMode",
"(",
"mode",
")",
")",
"\n",
"}"
] |
22,963 | all-22964 | [
"StripPunctuation",
"strips",
"puncation",
"from",
"string",
"."
] | [
"func",
"StripPunctuation",
"(",
"s",
"string",
")",
"<mask>",
"{",
"s",
"=",
"stripPuncRe",
".",
"ReplaceAllString",
"(",
"s",
",",
"\"",
"\"",
")",
"\n",
"s",
"=",
"nWhitespaceRe",
".",
"ReplaceAllString",
"(",
"s",
",",
"\"",
"\"",
")",
"\n",
"retur... |
22,964 | all-22965 | [
"Do",
"executes",
"Runtime",
".",
"getHeapUsage",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"usedSize",
"-",
"Used",
"heap",
"size",
"in",
"bytes",
".",
"totalSize",
"-",
"Allocated",
"heap",
"size",
"in",
"bytes",
"."
] | [
"func",
"(",
"p",
"*",
"GetHeapUsageParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"usedSize",
"float64",
",",
"totalSize",
"float64",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetHeapUsageReturns",
"\n",
"err",
"=",
... |
22,965 | all-22966 | [
"PresubmitSpec",
"initializes",
"a",
"ProwJobSpec",
"for",
"a",
"given",
"presubmit",
"job",
"."
] | [
"func",
"PresubmitSpec",
"(",
"p",
"config",
".",
"Presubmit",
",",
"refs",
"prowapi",
".",
"Refs",
")",
"prowapi",
".",
"ProwJobSpec",
"{",
"pjs",
":=",
"specFromJobBase",
"(",
"p",
".",
"JobBase",
")",
"\n",
"pjs",
".",
"Type",
"=",
"prowapi",
".",
"... |
22,966 | all-22967 | [
"HasTitle",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"h",
"*",
"HostmapDefinition",
")",
"HasTitle",
"(",
")",
"bool",
"{",
"if",
"h",
"!=",
"nil",
"&&",
"h",
".",
"Title",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"<mask>",
"\n",
"}"
] |
22,967 | all-22968 | [
"SetError",
"sets",
"e",
".",
"Error",
"to",
"the",
"JSON",
"representation",
"of",
"v",
".",
"If",
"JSON",
"marshaling",
"fails",
"it",
"panics",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"SetError",
"(",
"v",
"interface",
"{",
"}",
")",
"{",
"b",
",",
"err",
":=",
"json",
".",
"Marshal",
"(",
"v",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"panic",
"(",
"\"",
"\"",
"+",
"err",
".",
"Error"... |
22,968 | all-22969 | [
"generate",
"sampler",
"object",
"names"
] | [
"func",
"GenSamplers",
"(",
"count",
"int32",
",",
"samplers",
"*",
"uint32",
")",
"{",
"C",
".",
"glowGenSamplers",
"(",
"gpGenSamplers",
",",
"(",
"C",
".",
"GLsizei",
")",
"(",
"<mask>",
")",
",",
"(",
"*",
"C",
".",
"GLuint",
")",
"(",
"unsafe",
... |
22,969 | all-22970 | [
"String",
"returns",
"a",
"lossy",
"string",
"representation",
"of",
"the",
"config",
"suitable",
"for",
"human",
"readable",
"display",
".",
"Consequently",
"it",
"*",
"should",
"not",
"*",
"return",
"any",
"sensitive",
"information",
"."
] | [
"func",
"(",
"cfg",
"*",
"Config",
")",
"<mask>",
"(",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
"+",
"\"",
"\"",
"+",
"\"",
"\"",
"+",
"\"",
"\"",
"+",
"\"",
"\"",
"+",
"\"",
"\"",
"+",
"\"",
"\"",
"+",
"\"",
"\... |
22,970 | all-22971 | [
"Addrs",
"function"
] | [
"func",
"(",
"p",
"*",
"Provider",
")",
"Addrs",
"(",
"args",
"map",
"[",
"string",
"]",
"string",
",",
"l",
"*",
"log",
".",
"Logger",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"authToken",
":=",
"argsOrEnv",
"(",
"args",
",",
"\"",
... |
22,971 | all-22972 | [
"===",
"sum_over_time",
"(",
"Matrix",
"ValueTypeMatrix",
")",
"Vector",
"==="
] | [
"func",
"funcSumOverTime",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"<mask>",
"{",
"return",
"aggrOverTime",
"(",
"vals",
",",
"enh",
",",
"func",
"(",
"values",
"[",
"]",
"Point",
")",
"float64"... |
22,972 | all-22973 | [
"LogField",
"adds",
"the",
"key",
"/",
"value",
"pair",
"onto",
"the",
"Logger",
"to",
"be",
"printed",
"out",
"as",
"part",
"of",
"the",
"request",
"logging",
".",
"This",
"allows",
"you",
"to",
"easily",
"add",
"things",
"like",
"metrics",
"(",
"think"... | [
"func",
"(",
"d",
"*",
"DefaultContext",
")",
"LogField",
"(",
"key",
"string",
",",
"value",
"<mask>",
"{",
"}",
")",
"{",
"d",
".",
"logger",
"=",
"d",
".",
"logger",
".",
"WithField",
"(",
"key",
",",
"value",
")",
"\n",
"}"
] |
22,973 | all-22974 | [
"GetURLOk",
"returns",
"a",
"tuple",
"with",
"the",
"URL",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"w",
"*",
"Widget",
")",
"GetURLOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"w",
"==",
"nil",
"||",
"w",
".",
"URL",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"return",
"*",
"w",
".",
... |
22,974 | all-22975 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GPUInfo",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo5",
"(",
"&",
"r",
... |
22,975 | all-22976 | [
"CloseNotify",
"return",
"true",
"across",
"the",
"channel",
"when",
"the",
"connection",
"in",
"the",
"browser",
"has",
"been",
"severed",
"."
] | [
"func",
"(",
"es",
"*",
"EventSource",
")",
"CloseNotify",
"(",
")",
"<-",
"chan",
"bool",
"{",
"if",
"cn",
",",
"ok",
":=",
"es",
".",
"w",
".",
"(",
"closeNotifier",
")",
";",
"<mask>",
"{",
"return",
"cn",
".",
"CloseNotify",
"(",
")",
"\n",
"... |
22,976 | all-22977 | [
"LastError",
"returns",
"the",
"last",
"non",
"nil",
"error",
"or",
"nil"
] | [
"func",
"LastError",
"(",
"errs",
"...",
"error",
")",
"<mask>",
"{",
"for",
"i",
":=",
"len",
"(",
"errs",
")",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
"{",
"err",
":=",
"errs",
"[",
"i",
"]",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"r... |
22,977 | all-22978 | [
"Locator",
"returns",
"a",
"locator",
"for",
"the",
"given",
"resource"
] | [
"func",
"(",
"r",
"*",
"Cloud",
")",
"Locator",
"(",
"api",
"*",
"API",
")",
"*",
"CloudLocator",
"{",
"<mask>",
"api",
".",
"CloudLocator",
"(",
"r",
".",
"Href",
")",
"\n",
"}"
] |
22,978 | all-22979 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GrantPermissionsParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser4",
"(",
"&",
"w",
",",
"v",... |
22,979 | all-22980 | [
"RequestSelectionNotification",
"()",
"is",
"a",
"wrapper",
"around",
"gdk_display_request_selection_notification",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Display",
")",
"RequestSelectionNotification",
"(",
"selection",
"Atom",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gdk_display_request_selection_notification",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>",
".",
"native",
"(",
")",
... |
22,980 | all-22981 | [
"New",
"creates",
"a",
"new",
"bench",
"and",
"intializes",
"the",
"intial",
"values",
"of",
"...",
"threads",
":",
"the",
"number",
"of",
"concurrent",
"threads",
"to",
"execute",
"duration",
":",
"the",
"duration",
"to",
"run",
"the",
"benchmarks",
"for",
... | [
"func",
"New",
"(",
"showProgress",
"bool",
",",
"threads",
"int",
",",
"duration",
"time",
".",
"Duration",
",",
"rampUp",
"<mask>",
".",
"Duration",
",",
"timeout",
"time",
".",
"Duration",
")",
"*",
"Bench",
"{",
"return",
"&",
"Bench",
"{",
"showProg... |
22,981 | all-22982 | [
"Path",
"for",
"given",
"action",
"for",
"now",
"simplify",
"and",
"take",
"first",
"path",
"in",
"PathPatterns",
".",
"In",
"the",
"future",
"we",
"may",
"want",
"to",
"create",
"one",
"action",
"in",
"generated",
"JS",
"per",
"path",
"."
] | [
"func",
"<mask>",
"(",
"a",
"*",
"gen",
".",
"Action",
")",
"string",
"{",
"pattern",
":=",
"a",
".",
"PathPatterns",
"[",
"0",
"]",
"\n",
"vars",
":=",
"pattern",
".",
"Variables",
"\n",
"ivars",
":=",
"make",
"(",
"[",
"]",
"interface",
"{",
"}",... |
22,982 | all-22983 | [
"NewPutFileClient",
"returns",
"a",
"new",
"client",
"for",
"putting",
"files",
"into",
"pfs",
"in",
"a",
"single",
"request",
"."
] | [
"func",
"(",
"c",
"APIClient",
")",
"NewPutFileClient",
"(",
")",
"(",
"PutFileClient",
",",
"<mask>",
")",
"{",
"pfc",
",",
"err",
":=",
"c",
".",
"PfsAPIClient",
".",
"PutFile",
"(",
"c",
".",
"Ctx",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",... |
22,983 | all-22984 | [
"String",
"returns",
"a",
"string",
"representation",
"of",
"the",
"Livestatus",
"query",
"."
] | [
"func",
"(",
"q",
"Query",
")",
"String",
"(",
")",
"string",
"{",
"s",
":=",
"\"",
"\"",
"+",
"q",
".",
"table",
"\n",
"if",
"len",
"(",
"q",
".",
"headers",
")",
">",
"0",
"{",
"s",
"+=",
"\"",
"\\n",
"\"",
"+",
"strings",
".",
"Join",
"(... |
22,984 | all-22985 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"CallFrame",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48",
"(",
"&",
"w",
",",
"v",
")",
"\n"... |
22,985 | all-22986 | [
"Add",
"a",
"key",
"into",
"the",
"node",
"list"
] | [
"func",
"(",
"l",
"*",
"NodeList",
")",
"Add",
"(",
"node",
"*",
"skiplist",
".",
"Node",
")",
"{",
"node",
".",
"SetLink",
"(",
"l",
".",
"<mask>",
")",
"\n",
"l",
".",
"head",
"=",
"node",
"\n",
"}"
] |
22,986 | all-22987 | [
"allTemplatesRendered",
"returns",
"true",
"if",
"all",
"the",
"templates",
"in",
"this",
"Runner",
"have",
"been",
"rendered",
"at",
"least",
"one",
"time",
"."
] | [
"func",
"(",
"r",
"*",
"<mask>",
")",
"allTemplatesRendered",
"(",
")",
"bool",
"{",
"r",
".",
"renderEventsLock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"r",
".",
"renderEventsLock",
".",
"RUnlock",
"(",
")",
"\n\n",
"for",
"_",
",",
"tmpl",
":=",
"... |
22,987 | all-22988 | [
"SetLevel",
"sets",
"the",
"log",
"level",
"for",
"logging"
] | [
"func",
"SetLevel",
"(",
"logLevel",
"string",
")",
"{",
"parsedLevel",
",",
"ok",
":=",
"levels",
"[",
"strings",
".",
"ToLower",
"(",
"logLevel",
")",
"]",
"\n\n",
"if",
"ok",
"{",
"levelLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"levelLock",
".",
... |
22,988 | all-22989 | [
"Do",
"executes",
"Target",
".",
"getTargetInfo",
"against",
"the",
"provided",
"context",
".",
"returns",
":",
"targetInfo"
] | [
"func",
"(",
"p",
"*",
"GetTargetInfoParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"targetInfo",
"*",
"Info",
",",
"err",
"error",
")",
"{",
"// execute",
"var",
"res",
"GetTargetInfoReturns",
"\n",
"err",
"=",
"cdp",
".",
"Execute... |
22,989 | all-22990 | [
"This",
"function",
"recreates",
"an",
"rbd",
"container",
"including",
"its",
"snapshots",
".",
"It",
"recreates",
"the",
"dependencies",
"between",
"the",
"container",
"and",
"the",
"snapshots",
":",
"-",
"create",
"an",
"empty",
"rbd",
"storage",
"volume",
... | [
"func",
"(",
"s",
"*",
"storageCeph",
")",
"doCrossPoolContainerCopy",
"(",
"target",
"container",
",",
"source",
"container",
",",
"containerOnly",
"bool",
",",
"refresh",
"bool",
",",
"refreshSnapshots",
"[",
"]",
"container",
")",
"error",
"{",
"sourcePool",
... |
22,990 | all-22991 | [
"ServeTCP",
"serves",
"request",
"on",
"TCP",
"listener",
"."
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"ServeTCP",
"(",
"ln",
"net",
".",
"Listener",
")",
"(",
"err",
"error",
")",
"{",
"return",
"s",
".",
"<mask>",
".",
"Serve",
"(",
"ln",
")",
"\n",
"}"
] |
22,991 | all-22992 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetManifestForFrameReturns",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache1"... |
22,992 | all-22993 | [
"validateDatastoreFolder",
"checks",
"to",
"make",
"sure",
"the",
"folder",
"is",
"a",
"datastore",
"folder",
"and",
"returns",
"it",
"if",
"it",
"is",
"or",
"an",
"error",
"if",
"it",
"isn",
"t",
"."
] | [
"func",
"validateDatastoreFolder",
"(",
"folder",
"*",
"object",
".",
"Folder",
")",
"(",
"*",
"object",
".",
"Folder",
",",
"error",
")",
"{",
"ft",
",",
"err",
":=",
"FindType",
"(",
"<mask>",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"ni... |
22,993 | all-22994 | [
"Write",
"function",
"set",
"the",
"value",
"of",
"the",
"node",
"to",
"the",
"given",
"value",
".",
"If",
"the",
"receiver",
"node",
"is",
"a",
"directory",
"a",
"Not",
"A",
"File",
"error",
"will",
"be",
"returned",
"."
] | [
"func",
"(",
"n",
"*",
"<mask>",
")",
"Write",
"(",
"value",
"string",
",",
"index",
"uint64",
")",
"*",
"v2error",
".",
"Error",
"{",
"if",
"n",
".",
"IsDir",
"(",
")",
"{",
"return",
"v2error",
".",
"NewError",
"(",
"v2error",
".",
"EcodeNotFile",
... |
22,994 | all-22995 | [
"query",
"the",
"name",
"of",
"an",
"active",
"uniform"
] | [
"func",
"GetActiveUniformName",
"(",
"program",
"uint32",
",",
"uniformIndex",
"uint32",
",",
"bufSize",
"int32",
",",
"length",
"*",
"int32",
",",
"uniformName",
"*",
"uint8",
")",
"{",
"C",
".",
"glowGetActiveUniformName",
"(",
"gpGetActiveUniformName",
",",
"... |
22,995 | all-22996 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"SetIgnoreInputEventsParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput4",
"(",
"&",
"w",
",",
"v",... |
22,996 | all-22997 | [
"SetTextColumn",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_set_text_column",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"SetTextColumn",
"(",
"<mask>",
"int",
")",
"{",
"C",
".",
"gtk_icon_view_set_text_column",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"column",
")",
")",
"\n",
"}"
] |
22,997 | all-22998 | [
"NewMergeQuerier",
"returns",
"a",
"new",
"Querier",
"that",
"merges",
"results",
"of",
"input",
"queriers",
".",
"NB",
"NewMergeQuerier",
"will",
"return",
"NoopQuerier",
"if",
"no",
"queriers",
"are",
"passed",
"to",
"it",
"and",
"will",
"filter",
"NoopQuerier... | [
"func",
"NewMergeQuerier",
"(",
"primaryQuerier",
"Querier",
",",
"queriers",
"[",
"]",
"Querier",
")",
"Querier",
"{",
"filtered",
":=",
"make",
"(",
"[",
"]",
"Querier",
",",
"0",
",",
"len",
"(",
"queriers",
")",
")",
"\n",
"for",
"_",
",",
"querier... |
22,998 | all-22999 | [
"newSdNamespaceFilter",
"initialized",
"AWS",
"SD",
"Namespace",
"Filter",
"based",
"on",
"given",
"string",
"config"
] | [
"func",
"newSdNamespaceFilter",
"(",
"namespaceTypeConfig",
"string",
")",
"*",
"sd",
".",
"NamespaceFilter",
"{",
"switch",
"namespaceTypeConfig",
"{",
"case",
"sdNamespaceTypePublic",
":",
"return",
"&",
"sd",
".",
"NamespaceFilter",
"{",
"Name",
":",
"aws",
"."... |
22,999 | all-23000 | [
"HTTPRespondMarshalIndentJSON",
"marshals",
"response",
"as",
"JSON",
"to",
"responseWriter",
"sets",
"Content",
"-",
"Type",
"to",
"application",
"/",
"json",
"and",
"compresses",
"the",
"response",
"if",
"Content",
"-",
"Encoding",
"from",
"the",
"request",
"all... | [
"func",
"HTTPRespondMarshalIndentJSON",
"(",
"response",
"interface",
"{",
"}",
",",
"prefix",
",",
"indent",
"string",
",",
"responseWriter",
"http",
".",
"ResponseWriter",
",",
"request",
"*",
"http",
".",
"Request",
")",
"(",
"err",
"error",
")",
"{",
"Ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.