id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
24,800 | all-24801 | [
"Insert",
"adds",
"a",
"node",
"with",
"the",
"given",
"interval",
"into",
"the",
"tree",
"."
] | [
"func",
"(",
"ivt",
"*",
"IntervalTree",
")",
"Insert",
"(",
"ivl",
"Interval",
",",
"val",
"interface",
"{",
"}",
")",
"{",
"<mask>",
"y",
"*",
"intervalNode",
"\n",
"z",
":=",
"&",
"intervalNode",
"{",
"iv",
":",
"IntervalValue",
"{",
"ivl",
",",
"... |
24,801 | all-24802 | [
"Do",
"executes",
"Page",
".",
"setBypassCSP",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"SetBypassCSPParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"<mask>",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetBypassCSP",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
24,802 | all-24803 | [
"Finalize",
"ensures",
"there",
"no",
"nil",
"pointers",
"."
] | [
"func",
"(",
"c",
"*",
"AuthConfig",
")",
"Finalize",
"(",
")",
"{",
"if",
"c",
".",
"Enabled",
"==",
"nil",
"{",
"c",
".",
"Enabled",
"=",
"Bool",
"(",
"<mask>",
"||",
"StringPresent",
"(",
"c",
".",
"Username",
")",
"||",
"StringPresent",
"(",
"c... |
24,803 | all-24804 | [
"AddAllImageStates",
"indicates",
"an",
"expected",
"call",
"of",
"AddAllImageStates"
] | [
"func",
"(",
"mr",
"*",
"MockImageManagerMockRecorder",
")",
"AddAllImageStates",
"(",
"arg0",
"<mask>",
"{",
"}",
")",
"*",
"gomock",
".",
"Call",
"{",
"return",
"mr",
".",
"mock",
".",
"ctrl",
".",
"RecordCallWithMethodType",
"(",
"mr",
".",
"mock",
",",... |
24,804 | all-24805 | [
"UnmarshalEasyJSON",
"sets",
"the",
"HexColor",
"from",
"a",
"easyjson",
".",
"Lexer"
] | [
"func",
"(",
"h",
"*",
"HexColor",
")",
"UnmarshalEasyJSON",
"(",
"<mask>",
"*",
"jlexer",
".",
"Lexer",
")",
"{",
"if",
"data",
":=",
"in",
".",
"String",
"(",
")",
";",
"in",
".",
"Ok",
"(",
")",
"{",
"*",
"h",
"=",
"HexColor",
"(",
"data",
"... |
24,805 | all-24806 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventRequestIntercepted",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork52",
"(",
... |
24,806 | all-24807 | [
"GetVisibleSlice",
"is",
"a",
"wrapper",
"around",
"gtk_text_iter_get_visible_slice",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextIter",
")",
"GetVisibleSlice",
"(",
"<mask>",
"*",
"TextIter",
")",
"string",
"{",
"c",
":=",
"C",
".",
"gtk_text_iter_get_visible_slice",
"(",
"v",
".",
"native",
"(",
")",
",",
"end",
".",
"native",
"(",
")",
")",
"\n",
... |
24,807 | all-24808 | [
"Update",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockCgroup",
")",
"Update",
"(",
"arg0",
"*",
"specs_go",
".",
"LinuxResources",
")",
"error",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"ret0",
",",
"_",
":=",
"... |
24,808 | all-24809 | [
"Call",
".",
"MarshalAmino",
"()",
"and",
".",
"UnmarshalAmino",
"to",
"copy",
"if",
"possible",
".",
"Panics",
"if",
".",
"MarshalAmino",
"()",
"or",
".",
"UnmarshalAmino",
"()",
"return",
"an",
"error",
".",
"CONTRACT",
":",
"src",
"and",
"dst",
"are",
... | [
"func",
"callAminoCopy",
"(",
"src",
",",
"dst",
"reflect",
".",
"Value",
")",
"bool",
"{",
"if",
"src",
".",
"Type",
"(",
")",
"!=",
"dst",
".",
"Type",
"(",
")",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"if",
"src",
".",
"Kind",
... |
24,809 | all-24810 | [
"imageMatchesRepo",
"returns",
"true",
"iff",
"image",
".",
"Names",
"contains",
"an",
"element",
"with",
"the",
"same",
"repo",
"as",
"ref"
] | [
"func",
"imageMatchesRepo",
"(",
"image",
"*",
"storage",
".",
"Image",
",",
"ref",
"reference",
".",
"Named",
")",
"bool",
"{",
"repo",
":=",
"ref",
".",
"Name",
"(",
")",
"\n",
"for",
"_",
",",
"name",
":=",
"range",
"image",
".",
"Names",
"{",
"... |
24,810 | all-24811 | [
"LoginDialog",
"creates",
"a",
"new",
"login",
"dialog",
"*",
"title",
"-",
"custom",
"dialog",
"title",
"*",
"userName",
"-",
"initial",
"username",
".",
"Maybe",
"useful",
"if",
"you",
"want",
"to",
"implement",
"a",
"feature",
"remember",
"me",
"The",
"... | [
"func",
"CreateLoginDialog",
"(",
"title",
",",
"userName",
"string",
")",
"*",
"LoginDialog",
"{",
"dlg",
":=",
"new",
"(",
"LoginDialog",
")",
"\n\n",
"dlg",
".",
"View",
"=",
"AddWindow",
"(",
"15",
",",
"8",
",",
"10",
",",
"4",
",",
"title",
")"... |
24,811 | all-24812 | [
"Copy",
"returns",
"a",
"deep",
"copy",
"of",
"this",
"configuration",
"."
] | [
"func",
"(",
"c",
"*",
"WaitConfig",
")",
"Copy",
"(",
")",
"*",
"WaitConfig",
"{",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"<mask>",
"o",
"WaitConfig",
"\n",
"o",
".",
"Enabled",
"=",
"c",
".",
"Enabled",
"\n",
"o",
".",... |
24,812 | all-24813 | [
"SetTaskTimestamps",
"adds",
"the",
"timestamp",
"information",
"of",
"task",
"into",
"the",
"event",
"to",
"be",
"sent",
"by",
"SubmitTaskStateChange"
] | [
"func",
"(",
"change",
"*",
"TaskStateChange",
")",
"SetTaskTimestamps",
"(",
")",
"{",
"if",
"change",
".",
"Task",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"// Send the task timestamp if set",
"if",
"timestamp",
":=",
"change",
".",
"Task",
".",
"Get... |
24,813 | all-24814 | [
"GetResults",
"retrieves",
"the",
"Results",
"value",
"from",
"the",
"union",
"returning",
"ok",
"if",
"the",
"union",
"s",
"switch",
"indicated",
"the",
"value",
"is",
"valid",
"."
] | [
"func",
"(",
"u",
"TransactionResultResult",
")",
"GetResults",
"(",
")",
"(",
"<mask>",
"[",
"]",
"OperationResult",
",",
"ok",
"bool",
")",
"{",
"armName",
",",
"_",
":=",
"u",
".",
"ArmForSwitch",
"(",
"int32",
"(",
"u",
".",
"Code",
")",
")",
"\n... |
24,814 | all-24815 | [
"PutBlob",
"writes",
"contents",
"of",
"stream",
"and",
"returns",
"data",
"representing",
"the",
"result",
".",
"inputInfo",
".",
"Digest",
"can",
"be",
"optionally",
"provided",
"if",
"known",
";",
"it",
"is",
"not",
"mandatory",
"for",
"the",
"implementatio... | [
"func",
"(",
"d",
"*",
"ociImageDestination",
")",
"PutBlob",
"(",
"ctx",
"context",
".",
"Context",
",",
"stream",
"io",
".",
"Reader",
",",
"inputInfo",
"types",
".",
"BlobInfo",
",",
"<mask>",
"types",
".",
"BlobInfoCache",
",",
"isConfig",
"bool",
")",... |
24,815 | all-24816 | [
"GetMonitorStatusOk",
"returns",
"a",
"tuple",
"with",
"the",
"MonitorStatus",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsTest",
")",
"GetMonitorStatusOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"MonitorStatus",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"false",
"\n",
"}",
"\n",
"ret... |
24,816 | all-24817 | [
"ParseDump",
"processes",
"the",
"output",
"from",
"runtime",
".",
"Stack",
"()",
".",
"Returns",
"nil",
"*",
"Context",
"if",
"no",
"stack",
"trace",
"was",
"detected",
".",
"It",
"pipes",
"anything",
"not",
"detected",
"as",
"a",
"panic",
"stack",
"trace... | [
"func",
"ParseDump",
"(",
"r",
"io",
".",
"Reader",
",",
"<mask>",
"io",
".",
"Writer",
",",
"guesspaths",
"bool",
")",
"(",
"*",
"Context",
",",
"error",
")",
"{",
"goroutines",
",",
"err",
":=",
"parseDump",
"(",
"r",
",",
"out",
")",
"\n",
"if",... |
24,817 | all-24818 | [
"Mount",
"mounts",
"ZFS",
"file",
"systems",
"."
] | [
"func",
"(",
"d",
"*",
"Dataset",
")",
"Mount",
"(",
"overlay",
"bool",
",",
"options",
"[",
"]",
"string",
")",
"(",
"*",
"Dataset",
",",
"error",
")",
"{",
"if",
"d",
".",
"Type",
"==",
"DatasetSnapshot",
"{",
"return",
"nil",
",",
"errors",
".",... |
24,818 | all-24819 | [
"attach",
"a",
"level",
"of",
"a",
"texture",
"object",
"as",
"a",
"logical",
"buffer",
"to",
"the",
"currently",
"bound",
"framebuffer",
"object"
] | [
"func",
"FramebufferTexture2D",
"(",
"target",
"uint32",
",",
"attachment",
"uint32",
",",
"textarget",
"uint32",
",",
"texture",
"uint32",
",",
"level",
"int32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpFramebufferTexture2D",
",",
"5",
",",
"uintptr",
"(... |
24,819 | all-24820 | [
"GetAppPaintable",
"is",
"a",
"wrapper",
"around",
"gtk_widget_get_app_paintable",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"GetAppPaintable",
"(",
")",
"bool",
"{",
"c",
":=",
"C",
".",
"gtk_widget_get_app_paintable",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"<mask>",
"gobool",
"(",
"c",
")",
"\n",
"}"
] |
24,820 | all-24821 | [
"WriteToPNG",
"is",
"a",
"wrapper",
"around",
"cairo_surface_write_png",
"()",
".",
"It",
"writes",
"the",
"Cairo",
"surface",
"to",
"the",
"given",
"file",
"in",
"PNG",
"format",
"."
] | [
"func",
"(",
"v",
"*",
"Surface",
")",
"WriteToPNG",
"(",
"fileName",
"string",
")",
"error",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"fileName",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cstr",
")",
")",
"\n\n... |
24,821 | all-24822 | [
"Success",
"sets",
"response",
"Content",
"-",
"Type",
"and",
"body",
"to",
"the",
"given",
"values",
"."
] | [
"func",
"(",
"ctx",
"*",
"RequestCtx",
")",
"Success",
"(",
"contentType",
"string",
",",
"body",
"[",
"]",
"byte",
")",
"{",
"ctx",
".",
"SetContentType",
"(",
"contentType",
")",
"\n",
"ctx",
".",
"SetBody",
"(",
"<mask>",
")",
"\n",
"}"
] |
24,822 | all-24823 | [
"GetEmailOk",
"returns",
"a",
"tuple",
"with",
"the",
"Email",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"s",
"*",
"SyntheticsUser",
")",
"GetEmailOk",
"(",
")",
"(",
"string",
",",
"bool",
")",
"{",
"if",
"s",
"==",
"nil",
"||",
"s",
".",
"Email",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
... |
24,823 | all-24824 | [
"User",
"sets",
"the",
"query",
"key",
"from",
"which",
"to",
"obtain",
"the",
"user",
"."
] | [
"func",
"User",
"(",
"user",
"string",
")",
"TokenOpt",
"{",
"return",
"TokenOpt",
"{",
"func",
"(",
"o",
"*",
"options",
")",
"{",
"o",
".",
"user",
"=",
"<mask>",
"\n",
"}",
"}",
"\n",
"}"
] |
24,824 | all-24825 | [
"Validate",
"options"
] | [
"func",
"(",
"opts",
"*",
"<mask>",
")",
"Validate",
"(",
")",
"error",
"{",
"if",
"opts",
".",
"App",
".",
"IsZero",
"(",
")",
"{",
"opts",
".",
"App",
"=",
"meta",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}... |
24,825 | all-24826 | [
"keyRange",
"is",
"[",
"start",
"end",
")",
"including",
"start",
"excluding",
"end",
".",
"Do",
"ensure",
"that",
"the",
"start",
"end",
"byte",
"slices",
"are",
"owned",
"by",
"keyRange",
"struct",
"."
] | [
"func",
"(",
"st",
"*",
"Stream",
")",
"produceRanges",
"(",
"ctx",
"context",
".",
"Context",
")",
"{",
"splits",
":=",
"st",
".",
"db",
".",
"KeySplits",
"(",
"st",
".",
"Prefix",
")",
"\n",
"start",
":=",
"y",
".",
"SafeCopy",
"(",
"nil",
",",
... |
24,826 | all-24827 | [
"ApplyTagByName",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_text_buffer_apply_tag_by_name",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextBuffer",
")",
"ApplyTagByName",
"(",
"name",
"string",
",",
"start",
",",
"end",
"*",
"TextIter",
")",
"{",
"cstr",
":=",
"C",
".",
"CString",
"(",
"name",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Point... |
24,827 | all-24828 | [
"NewReader",
"returns",
"a",
"reader",
"for",
"a",
"blob",
".",
"It",
"always",
"succeeds",
";",
"if",
"the",
"blob",
"does",
"not",
"exist",
"then",
"an",
"error",
"will",
"be",
"reported",
"upon",
"first",
"read",
"."
] | [
"func",
"NewReader",
"(",
"c",
"context",
".",
"<mask>",
",",
"blobKey",
"appengine",
".",
"BlobKey",
")",
"Reader",
"{",
"return",
"openBlob",
"(",
"c",
",",
"blobKey",
")",
"\n",
"}"
] |
24,828 | all-24829 | [
"Add",
"adds",
"a",
"value",
"to",
"the",
"series",
"and",
"updates",
"the",
"moving",
"average",
"."
] | [
"func",
"(",
"e",
"*",
"VariableEWMA",
")",
"Add",
"(",
"value",
"float64",
")",
"{",
"switch",
"{",
"case",
"e",
".",
"count",
"<",
"WARMUP_SAMPLES",
":",
"e",
".",
"count",
"++",
"\n",
"e",
".",
"value",
"+=",
"value",
"\n",
"case",
"e",
".",
"... |
24,829 | all-24830 | [
"GetUser",
"gets",
"the",
"user",
"associated",
"with",
"the",
"authentication"
] | [
"func",
"(",
"c",
"Client",
")",
"GetUser",
"(",
")",
"(",
"*",
"<mask>",
",",
"error",
")",
"{",
"holder",
":=",
"usersHolder",
"{",
"}",
"\n",
"if",
"err",
":=",
"c",
".",
"Get",
"(",
"\"",
"\"",
",",
"nil",
",",
"&",
"holder",
")",
";",
"e... |
24,830 | all-24831 | [
"MakeCommand",
"returns",
"an",
"aggregate",
"command",
"."
] | [
"func",
"MakeCommand",
"(",
")",
"*",
"cobra",
".",
"Command",
"{",
"<mask>",
":=",
"&",
"flags",
"{",
"}",
"\n",
"cmd",
":=",
"&",
"cobra",
".",
"Command",
"{",
"Use",
":",
"\"",
"\"",
",",
"Short",
":",
"\"",
"\"",
",",
"Long",
":",
"`Given mul... |
24,831 | all-24832 | [
"Stroke",
"strokes",
"the",
"paths",
"with",
"the",
"color",
"specified",
"by",
"SetStrokeColor"
] | [
"func",
"(",
"gc",
"*",
"GraphicContext",
")",
"Stroke",
"(",
"paths",
"...",
"*",
"draw2d",
".",
"Path",
")",
"{",
"_",
",",
"_",
",",
"_",
",",
"alphaS",
":=",
"gc",
".",
"Current",
".",
"StrokeColor",
".",
"RGBA",
"(",
")",
"\n",
"gc",
".",
... |
24,832 | all-24833 | [
"SetTitle",
"changes",
"the",
"EditField",
"content",
"and",
"emits",
"OnChage",
"eventif",
"the",
"new",
"value",
"does",
"not",
"equal",
"to",
"old",
"one"
] | [
"func",
"(",
"e",
"*",
"EditField",
")",
"SetTitle",
"(",
"<mask>",
"string",
")",
"{",
"e",
".",
"setTitleInternal",
"(",
"title",
")",
"\n",
"e",
".",
"offset",
"=",
"0",
"\n",
"e",
".",
"end",
"(",
")",
"\n",
"}"
] |
24,833 | all-24834 | [
"Create",
"a",
"dial",
"function",
"that",
"connects",
"to",
"the",
"given",
"listener",
"."
] | [
"func",
"dqliteMemoryDial",
"(",
"listener",
"net",
".",
"Listener",
")",
"dqlite",
".",
"DialFunc",
"{",
"return",
"func",
"(",
"ctx",
"context",
".",
"Context",
",",
"address",
"string",
")",
"(",
"<mask>",
".",
"Conn",
",",
"error",
")",
"{",
"return"... |
24,834 | all-24835 | [
"GetState",
"returns",
"a",
"docker",
".",
"hosts",
".",
"state",
".",
"State",
"value",
"representing",
"the",
"current",
"state",
"of",
"the",
"host",
"."
] | [
"func",
"(",
"d",
"*",
"Driver",
")",
"GetState",
"(",
")",
"(",
"state",
".",
"State",
",",
"error",
")",
"{",
"c",
",",
"err",
":=",
"newComputeUtil",
"(",
"d",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"state",
".",
"None",
",",
"e... |
24,835 | all-24836 | [
"NewAgent",
"bootstraps",
"a",
"new",
"config",
".",
"Agent",
"struct",
"from",
"the",
"passed",
"dependencies",
"."
] | [
"func",
"NewAgent",
"(",
"configAgent",
"*",
"config",
".",
"<mask>",
",",
"pluginConfigAgent",
"*",
"ConfigAgent",
",",
"clientAgent",
"*",
"ClientAgent",
",",
"logger",
"*",
"logrus",
".",
"Entry",
")",
"Agent",
"{",
"prowConfig",
":=",
"configAgent",
".",
... |
24,836 | all-24837 | [
"NewBackoff",
"creates",
"a",
"new",
"Backoff",
"using",
"the",
"specified",
"BackoffStrategy",
"start",
"duration",
"and",
"limit",
"."
] | [
"func",
"NewBackoff",
"(",
"strategy",
"BackoffStrategy",
",",
"start",
"time",
".",
"Duration",
",",
"limit",
"time",
".",
"Duration",
")",
"*",
"Backoff",
"{",
"backoff",
":=",
"Backoff",
"{",
"strategy",
":",
"strategy",
",",
"start",
":",
"start",
",",... |
24,837 | all-24838 | [
"Do",
"executes",
"ServiceWorker",
".",
"dispatchSyncEvent",
"against",
"the",
"provided",
"context",
"."
] | [
"func",
"(",
"p",
"*",
"DispatchSyncEventParams",
")",
"Do",
"(",
"ctx",
"<mask>",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandDispatchSyncEvent",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
24,838 | all-24839 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"GetFullAXTreeReturns",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7",
"(",
"&",
"w",
",",
"v... |
24,839 | all-24840 | [
"HasType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequest",
")",
"HasType",
"(",
")",
"bool",
"{",
"if",
"g",
"!=",
"nil",
"&&",
"g",
".",
"<mask>",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
24,840 | all-24841 | [
"OptClientTotalPoolSize",
"is",
"the",
"maximum",
"number",
"of",
"connections",
"in",
"the",
"pool",
"."
] | [
"func",
"OptClientTotalPoolSize",
"(",
"<mask>",
"int",
")",
"ClientOption",
"{",
"return",
"func",
"(",
"options",
"*",
"ClientOptions",
")",
"error",
"{",
"options",
".",
"TotalPoolSize",
"=",
"size",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"}"
] |
24,841 | all-24842 | [
"TODO",
":",
"Should",
"map",
"[",
"string",
"]",
"and",
"struct",
"allow",
"direct",
"method",
"calls?",
"Check",
"if",
"first",
"letter",
"is",
"uppercase?"
] | [
"func",
"map__index",
"(",
"L",
"*",
"lua",
".",
"State",
")",
"int",
"{",
"v",
",",
"t",
":=",
"valueOfProxy",
"(",
"L",
",",
"1",
")",
"\n",
"key",
":=",
"reflect",
".",
"New",
"(",
"t",
".",
"Key",
"(",
")",
")",
"\n",
"err",
":=",
"LuaToG... |
24,842 | all-24843 | [
"Merge",
"combines",
"all",
"values",
"in",
"this",
"configuration",
"with",
"the",
"values",
"in",
"the",
"other",
"configuration",
"with",
"values",
"in",
"the",
"other",
"configuration",
"taking",
"precedence",
".",
"Maps",
"and",
"slices",
"are",
"merged",
... | [
"func",
"(",
"c",
"*",
"EnvConfig",
")",
"Merge",
"(",
"o",
"*",
"EnvConfig",
")",
"*",
"EnvConfig",
"{",
"if",
"c",
"==",
"nil",
"{",
"if",
"o",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"o",
".",
"Copy",
"(",
")",
"\n",
... |
24,843 | all-24844 | [
"sessionFile",
"is",
"a",
"helper",
"that",
"generates",
"a",
"unique",
"hash",
"of",
"the",
"client",
"s",
"URL",
"to",
"use",
"as",
"the",
"session",
"file",
"name",
".",
"This",
"is",
"the",
"same",
"logic",
"used",
"as",
"part",
"of",
"govmomi",
"a... | [
"func",
"(",
"c",
"*",
"Config",
")",
"sessionFile",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"u",
",",
"err",
":=",
"c",
".",
"vimURLWithoutPassword",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err",
"\n",... |
24,844 | all-24845 | [
"copy",
"a",
"block",
"of",
"pixels",
"from",
"one",
"framebuffer",
"object",
"to",
"another"
] | [
"func",
"BlitNamedFramebuffer",
"(",
"readFramebuffer",
"uint32",
",",
"drawFramebuffer",
"uint32",
",",
"srcX0",
"int32",
",",
"srcY0",
"int32",
",",
"srcX1",
"int32",
",",
"srcY1",
"int32",
",",
"dstX0",
"int32",
",",
"dstY0",
"int32",
",",
"dstX1",
"int32",... |
24,845 | all-24846 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetContentQuadsParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom49",
"(",
"&",
... |
24,846 | all-24847 | [
"Repaint",
"draws",
"the",
"control",
"on",
"its",
"View",
"surface"
] | [
"func",
"(",
"b",
"*",
"Button",
")",
"Draw",
"(",
")",
"{",
"if",
"b",
".",
"hidden",
"{",
"return",
"\n",
"}",
"\n\n",
"b",
".",
"mtx",
".",
"RLock",
"(",
")",
"\n",
"defer",
"b",
".",
"mtx",
".",
"RUnlock",
"(",
")",
"\n",
"PushAttributes",
... |
24,847 | all-24848 | [
"===",
"deriv",
"(",
"node",
"ValueTypeMatrix",
")",
"Vector",
"==="
] | [
"func",
"funcDeriv",
"(",
"vals",
"[",
"]",
"Value",
",",
"args",
"Expressions",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"mat",
":=",
"vals",
"[",
"0",
"]",
".",
"(",
"Matrix",
")",
"\n\n",
"for",
"_",
",",
"samples",
":=",
"range",
... |
24,848 | all-24849 | [
"newImageDestination",
"creates",
"a",
"new",
"ImageDestination",
"for",
"the",
"specified",
"reference",
"."
] | [
"func",
"newImageDestination",
"(",
"ctx",
"context",
".",
"<mask>",
",",
"sys",
"*",
"types",
".",
"SystemContext",
",",
"ref",
"openshiftReference",
")",
"(",
"types",
".",
"ImageDestination",
",",
"error",
")",
"{",
"client",
",",
"err",
":=",
"newOpenshi... |
24,849 | all-24850 | [
"NewMonitor",
"creates",
"new",
"instance",
"of",
"billing",
"monitor",
".",
"interval",
"specifies",
"how",
"often",
"channels",
"checks",
"must",
"be",
"performed",
"."
] | [
"func",
"NewMonitor",
"(",
"interval",
"uint64",
",",
"<mask>",
"*",
"reform",
".",
"DB",
",",
"logger",
"log",
".",
"Logger",
",",
"pr",
"*",
"proc",
".",
"Processor",
")",
"(",
"*",
"Monitor",
",",
"error",
")",
"{",
"if",
"db",
"==",
"nil",
"||"... |
24,850 | all-24851 | [
"Sync",
"synchronizes",
"client",
"s",
"endpoints",
"with",
"the",
"known",
"endpoints",
"from",
"the",
"etcd",
"membership",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Sync",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"mresp",
",",
"err",
":=",
"c",
".",
"MemberList",
"(",
"ctx",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"... |
24,851 | all-24852 | [
"=====",
"Actions",
"POST",
"/",
"api",
"/",
"scenarios",
"Create",
"a",
"new",
"Scenario",
"."
] | [
"func",
"(",
"loc",
"*",
"ScenarioLocator",
")",
"Create",
"(",
"snapshotTimestamp",
"*",
"time",
".",
"Time",
",",
"options",
"rsapi",
".",
"APIParams",
")",
"(",
"*",
"ScenarioLocator",
",",
"error",
")",
"{",
"var",
"res",
"*",
"ScenarioLocator",
"\n",
... |
24,852 | all-24853 | [
"List",
"through",
"all",
"Tag",
"-",
"related",
"(",
"i",
".",
"e",
"starting",
"with",
"Tag",
")",
"method",
"of",
"the",
"Parameter",
"type",
"and",
"execute",
"them",
"."
] | [
"func",
"(",
"p",
"*",
"Parameter",
")",
"DiscoverProperties",
"(",
"tag",
"reflect",
".",
"StructTag",
")",
"error",
"{",
"if",
"len",
"(",
"tag",
")",
">",
"0",
"{",
"paramtype",
":=",
"reflect",
".",
"TypeOf",
"(",
"(",
"*",
"Parameter",
")",
"(",... |
24,853 | all-24854 | [
"GetFacet",
"returns",
"the",
"Facet",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"a",
"*",
"ApmOrLogQueryGroupBySort",
")",
"GetFacet",
"(",
")",
"<mask>",
"{",
"if",
"a",
"==",
"nil",
"||",
"a",
".",
"Facet",
"==",
"nil",
"{",
"return",
"\"",
"\"",
"\n",
"}",
"\n",
"return",
"*",
"a",
".",
"Facet",
"\n",
"}"
] |
24,854 | all-24855 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"EventExecutionContextDestroyed",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"<mask>",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime31",
"(",
"&",
"w",
",... |
24,855 | all-24856 | [
"GetString",
"is",
"a",
"wrapper",
"around",
"g_value_get_string",
"()",
".",
"GetString",
"()",
"returns",
"a",
"non",
"-",
"nil",
"error",
"if",
"g_value_get_string",
"()",
"returned",
"a",
"NULL",
"pointer",
"to",
"distinguish",
"between",
"returning",
"a",
... | [
"func",
"(",
"v",
"*",
"Value",
")",
"GetString",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"g_value_get_string",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"\"",
"\"",
",",
... |
24,856 | all-24857 | [
"Connect",
"connect",
"the",
"client",
"to",
"the",
"irc",
"server"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Connect",
"(",
")",
"error",
"{",
"if",
"c",
".",
"IrcAddress",
"==",
"\"",
"\"",
"&&",
"c",
".",
"TLS",
"{",
"c",
".",
"IrcAddress",
"=",
"ircTwitchTLS",
"\n",
"}",
"else",
"if",
"c",
".",
"IrcAddress",
"==... |
24,857 | all-24858 | [
"Make",
"sure",
"the",
"local",
"Write",
"is",
"called",
"."
] | [
"func",
"(",
"w",
"*",
"jsonpResponseWriter",
")",
"WriteJson",
"(",
"v",
"<mask>",
"{",
"}",
")",
"error",
"{",
"b",
",",
"err",
":=",
"w",
".",
"EncodeJson",
"(",
"v",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
... |
24,858 | all-24859 | [
"redactError",
"removes",
"api",
"and",
"application",
"keys",
"from",
"error",
"strings"
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"redactError",
"(",
"err",
"error",
")",
"error",
"{",
"if",
"err",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"errString",
":=",
"err",
".",
"Error",
"(",
")",
"\n\n",
"if",
"len",
"(",
"client",... |
24,859 | all-24860 | [
"OfflineThreshold",
"returns",
"the",
"configured",
"heartbeat",
"threshold",
"i",
".",
"e",
".",
"the",
"number",
"of",
"seconds",
"before",
"after",
"which",
"an",
"unresponsive",
"node",
"is",
"considered",
"offline",
".."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"OfflineThreshold",
"(",
")",
"time",
".",
"Duration",
"{",
"n",
":=",
"c",
".",
"m",
".",
"GetInt64",
"(",
"\"",
"\"",
")",
"\n",
"return",
"<mask>",
".",
"Duration",
"(",
"n",
")",
"*",
"time",
".",
"Second... |
24,860 | all-24861 | [
"computeDevAddr",
"handles",
"the",
"logic",
"for",
"SaveDevIDs",
"and",
"allows",
"it",
"to",
"be",
"used",
"outside",
"of",
"a",
"subresource",
"."
] | [
"func",
"computeDevAddr",
"(",
"device",
"types",
".",
"BaseVirtualDevice",
",",
"ctlr",
"types",
".",
"BaseVirtualController",
")",
"(",
"string",
",",
"error",
")",
"{",
"vd",
":=",
"device",
".",
"GetVirtualDevice",
"(",
")",
"\n",
"vc",
":=",
"ctlr",
"... |
24,861 | all-24862 | [
"NewV1",
"creates",
"a",
"new",
"UUID",
"with",
"variant",
"1",
"as",
"described",
"in",
"RFC",
"4122",
".",
"Variant",
"1",
"is",
"based",
"on",
"hosts",
"MAC",
"address",
"and",
"actual",
"timestamp",
"(",
"as",
"count",
"of",
"100",
"-",
"nanosecond",... | [
"func",
"NewV1",
"(",
")",
"*",
"UUID",
"{",
"var",
"uuid",
"UUID",
"\n",
"requests",
"<-",
"true",
"\n",
"s",
":=",
"<-",
"answers",
"\n",
"copy",
"(",
"uuid",
"[",
":",
"4",
"]",
",",
"s",
"[",
"4",
":",
"]",
")",
"\n",
"copy",
"(",
"uuid",... |
24,862 | all-24863 | [
"Exec",
"executes",
"a",
"pixelsCommand",
"."
] | [
"func",
"(",
"c",
"*",
"pixelsCommand",
")",
"Exec",
"(",
"indexOffset",
"int",
")",
"error",
"{",
"p",
",",
"err",
":=",
"c",
".",
"img",
".",
"<mask>",
".",
"Pixels",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
... |
24,863 | all-24864 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"PrepareForLeakDetectionParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory6",
"(",
... |
24,864 | all-24865 | [
"Scan",
"read",
"a",
"value",
"from",
"a",
"database",
"driver"
] | [
"func",
"(",
"r",
"*",
"Password",
")",
"Scan",
"(",
"raw",
"<mask>",
"{",
"}",
")",
"error",
"{",
"switch",
"v",
":=",
"raw",
".",
"(",
"type",
")",
"{",
"case",
"[",
"]",
"byte",
":",
"*",
"r",
"=",
"Password",
"(",
"string",
"(",
"v",
")",... |
24,865 | all-24866 | [
"Stability",
":",
"***",
"EXPERIMENTAL",
"***",
"Idempotently",
"ensure",
"that",
"a",
"keypair",
"of",
"a",
"given",
"name",
"exists",
"Required",
"scopes",
":",
"ec2",
"-",
"manager",
":",
"manage",
"-",
"key",
"-",
"pairs",
":",
"<name",
">",
"See",
"... | [
"func",
"(",
"eC2Manager",
"*",
"EC2Manager",
")",
"EnsureKeyPair",
"(",
"name",
"string",
",",
"payload",
"*",
"SSHPublicKey",
")",
"error",
"{",
"cd",
":=",
"tcclient",
".",
"Client",
"(",
"*",
"eC2Manager",
")",
"\n",
"_",
",",
"_",
",",
"err",
":="... |
24,866 | all-24867 | [
"Less",
"implements",
"sort",
".",
"Interface",
"."
] | [
"func",
"(",
"lop",
"listOfPeers",
")",
"Less",
"(",
"i",
",",
"j",
"int",
")",
"bool",
"{",
"return",
"lop",
"[",
"i",
"]",
".",
"Name",
"<",
"lop",
"[",
"j",
"]",
".",
"<mask>",
"\n",
"}"
] |
24,867 | all-24868 | [
"Upsert",
"is",
"like",
"Update",
"but",
"key",
"is",
"not",
"required",
"to",
"be",
"present"
] | [
"func",
"(",
"c",
"*",
"readWriteCollection",
")",
"Upsert",
"(",
"key",
"string",
",",
"val",
"proto",
".",
"Message",
",",
"f",
"func",
"(",
")",
"error",
")",
"error",
"{",
"if",
"err",
":=",
"<mask>",
".",
"CheckType",
"(",
"c",
".",
"template",
... |
24,868 | all-24869 | [
"SetHostPublicIPv4Address",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockManager",
")",
"SetHostPublicIPv4Address",
"(",
"arg0",
"<mask>",
")",
"{",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
")",
"\n",
"}"
] |
24,869 | all-24870 | [
"Run",
"lexes",
"the",
"input",
"by",
"executing",
"state",
"functions",
"until",
"the",
"state",
"is",
"nil"
] | [
"func",
"(",
"l",
"*",
"Lexer",
")",
"run",
"(",
")",
"{",
"for",
"<mask>",
":=",
"lexText",
";",
"state",
"!=",
"nil",
";",
"{",
"state",
"=",
"state",
"(",
"l",
")",
"\n",
"}",
"\n",
"}"
] |
24,870 | all-24871 | [
"OptFieldTypeInt",
"adds",
"an",
"integer",
"field",
"."
] | [
"func",
"OptFieldTypeInt",
"(",
"min",
"int64",
",",
"max",
"int64",
")",
"FieldOption",
"{",
"return",
"func",
"(",
"options",
"*",
"FieldOptions",
")",
"{",
"options",
".",
"fieldType",
"=",
"FieldTypeInt",
"\n",
"<mask>",
".",
"min",
"=",
"min",
"\n",
... |
24,871 | all-24872 | [
"session",
"session处理"
] | [
"func",
"session",
"(",
"ctx",
"*",
"Context",
")",
"{",
"var",
"cookie",
"*",
"http",
".",
"Cookie",
"\n",
"cookies",
":=",
"ctx",
".",
"Request",
".",
"Cookies",
"(",
")",
"\n",
"if",
"len",
"(",
"cookies",
")",
"==",
"0",
"{",
"ctx",
".",
"Nex... |
24,872 | all-24873 | [
"Comment",
"adds",
"a",
"comment",
"to",
"the",
"query",
"to",
"identify",
"it",
"in",
"the",
"database",
"profiler",
"output",
".",
"Relevant",
"documentation",
":",
"http",
":",
"//",
"docs",
".",
"mongodb",
".",
"org",
"/",
"manual",
"/",
"reference",
... | [
"func",
"(",
"q",
"*",
"Query",
")",
"Comment",
"(",
"comment",
"string",
")",
"*",
"Query",
"{",
"q",
".",
"m",
".",
"Lock",
"(",
")",
"\n",
"q",
".",
"op",
".",
"<mask>",
".",
"Comment",
"=",
"comment",
"\n",
"q",
".",
"op",
".",
"hasOptions"... |
24,873 | all-24874 | [
"CreateStream",
"will",
"create",
"a",
"new",
"stream",
"and",
"register",
"it"
] | [
"func",
"(",
"s",
"*",
"Server",
")",
"CreateStream",
"(",
"id",
"string",
")",
"*",
"Stream",
"{",
"s",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"defer",
"s",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n\n",
"if",
"s",
".",
"Streams",
"[",
"id",
"... |
24,874 | all-24875 | [
"Flush",
"waits",
"until",
"all",
"records",
"in",
"the",
"buffered",
"channel",
"have",
"been",
"processed",
"."
] | [
"func",
"(",
"b",
"*",
"ChannelMemoryBackend",
")",
"Flush",
"(",
")",
"{",
"b",
".",
"flushWg",
".",
"Add",
"(",
"1",
")",
"\n",
"b",
".",
"<mask>",
"<-",
"eventFlush",
"\n",
"b",
".",
"flushWg",
".",
"Wait",
"(",
")",
"\n",
"}"
] |
24,875 | all-24876 | [
"ReadIndexTable",
"loads",
"a",
"index",
"table",
"."
] | [
"func",
"ReadIndexTable",
"(",
"r",
"<mask>",
".",
"Reader",
")",
"(",
"IndexTable",
",",
"error",
")",
"{",
"idx",
":=",
"IndexTable",
"{",
"}",
"\n",
"d",
",",
"err",
":=",
"da",
".",
"Read",
"(",
"r",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... |
24,876 | all-24877 | [
"SetShowAll",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_app_chooser_widget_set_show_all",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"AppChooserWidget",
")",
"SetShowAll",
"(",
"setting",
"bool",
")",
"{",
"C",
".",
"gtk_app_chooser_widget_set_show_all",
"(",
"v",
".",
"native",
"(",
")",
",",
"gbool",
"(",
"<mask>",
")",
")",
"\n",
"}"
] |
24,877 | all-24878 | [
"Takes",
"values",
"from",
"the",
"form",
"data",
"and",
"puts",
"them",
"into",
"a",
"struct"
] | [
"func",
"mapForm",
"(",
"formStruct",
"reflect",
".",
"Value",
",",
"form",
"map",
"[",
"string",
"]",
"[",
"]",
"string",
",",
"formfile",
"map",
"[",
"string",
"]",
"[",
"]",
"*",
"multipart",
".",
"FileHeader",
",",
"errors",
"Errors",
")",
"{",
"... |
24,878 | all-24879 | [
"AddTask",
"adds",
"a",
"new",
"task",
"to",
"the",
"state"
] | [
"func",
"(",
"state",
"*",
"DockerTaskEngineState",
")",
"AddTask",
"(",
"task",
"*",
"apitask",
".",
"Task",
")",
"{",
"state",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"state",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n\n",
"state",
".",... |
24,879 | all-24880 | [
"UpdateGraph",
"updates",
"passed",
"graph",
"."
] | [
"func",
"(",
"a",
"*",
"API",
")",
"UpdateGraph",
"(",
"cfg",
"*",
"Graph",
")",
"(",
"*",
"Graph",
",",
"error",
")",
"{",
"if",
"cfg",
"==",
"nil",
"{",
"return",
"nil",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"g... |
24,880 | all-24881 | [
"Properties",
"is",
"a",
"convenience",
"method",
"that",
"wraps",
"fetching",
"the",
"Folder",
"MO",
"from",
"its",
"higher",
"-",
"level",
"object",
"."
] | [
"func",
"Properties",
"(",
"<mask>",
"*",
"object",
".",
"Folder",
")",
"(",
"*",
"mo",
".",
"Folder",
",",
"error",
")",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithTimeout",
"(",
"context",
".",
"Background",
"(",
")",
",",
"provider",
".... |
24,881 | all-24882 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform2uiv",
"(",
"<mask>",
"uint32",
",",
"location",
"int32",
",",
"count",
"int32",
",",
"value",
"*",
"uint32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpProgramUniform2uiv",
",",
"4",
",",
"uintptr",
"(",
"program",
")",
",",
"uin... |
24,882 | all-24883 | [
"getNode",
"returns",
"a",
"pointer",
"to",
"the",
"node",
"located",
"at",
"offset",
".",
"If",
"the",
"offset",
"is",
"zero",
"then",
"the",
"nil",
"node",
"pointer",
"is",
"returned",
"."
] | [
"func",
"(",
"s",
"*",
"Arena",
")",
"getNode",
"(",
"offset",
"uint32",
")",
"*",
"node",
"{",
"if",
"<mask>",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"return",
"(",
"*",
"node",
")",
"(",
"unsafe",
".",
"Pointer",
"(",
"&",
"s",
"... |
24,883 | all-24884 | [
"WhitelistWritableFields",
"will",
"enforce",
"the",
"authorization",
"by",
"making",
"sure",
"only",
"the",
"specified",
"fields",
"can",
"be",
"changed",
"by",
"the",
"client",
".",
"Note",
":",
"This",
"enforcer",
"can",
"only",
"be",
"used",
"to",
"authori... | [
"func",
"WhitelistWritableFields",
"(",
"fields",
"...",
"string",
")",
"*",
"Enforcer",
"{",
"return",
"E",
"(",
"\"",
"\"",
",",
"fire",
".",
"Only",
"(",
"fire",
".",
"Create",
",",
"fire",
".",
"Update",
")",
",",
"func",
"(",
"ctx",
"*",
"<mask>... |
24,884 | all-24885 | [
"GetPeriod",
"returns",
"the",
"Period",
"field",
"if",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"."
] | [
"func",
"(",
"t",
"*",
"ThresholdCount",
")",
"GetPeriod",
"(",
")",
"Period",
"{",
"if",
"t",
"==",
"nil",
"||",
"t",
".",
"Period",
"==",
"nil",
"{",
"<mask>",
"Period",
"{",
"}",
"\n",
"}",
"\n",
"return",
"*",
"t",
".",
"Period",
"\n",
"}"
] |
24,885 | all-24886 | [
"GetPath",
"()",
"is",
"a",
"wrapper",
"around",
"g_settings_schema_get_path",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"SettingsSchema",
")",
"GetPath",
"(",
")",
"string",
"{",
"return",
"C",
".",
"GoString",
"(",
"(",
"*",
"C",
".",
"<mask>",
")",
"(",
"C",
".",
"g_settings_schema_get_path",
"(",
"v",
".",
"native",
"(",
")",
")",
")",
")",... |
24,886 | all-24887 | [
"Convenience",
"function",
"to",
"ensure",
"that",
"SRV",
"names",
"are",
"well",
"-",
"formed",
"."
] | [
"func",
"(",
"ds",
"*",
"DNSServer",
")",
"qualifySrv",
"(",
"service",
",",
"protocol",
"string",
")",
"string",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"service",
",",
"protocol",
",",
"ds",
".",
"<mask>",
")",
"\n",
"}"
] |
24,887 | all-24888 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"StopScreencastParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage3",
"(",
"&",
... |
24,888 | all-24889 | [
"TokenHandler",
"manage",
"authorizations"
] | [
"func",
"TokenHandler",
"(",
"next",
"http",
".",
"<mask>",
",",
"cnf",
"web",
".",
"Config",
")",
"http",
".",
"Handler",
"{",
"return",
"http",
".",
"HandlerFunc",
"(",
"func",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"R... |
24,889 | all-24890 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"EventMetadata",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice4",
"(",
"&"... |
24,890 | all-24891 | [
"printf",
"prints",
"into",
"the",
"backend",
"buffer",
".",
"This",
"will",
"not",
"show",
"immediately",
".",
"printf",
"shall",
"be",
"called",
"from",
"queue",
"context",
"."
] | [
"func",
"(",
"w",
"*",
"Window",
")",
"printf",
"(",
"x",
",",
"y",
"int",
",",
"a",
"Attributes",
",",
"<mask>",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"out",
":=",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"args",
"..."... |
24,891 | all-24892 | [
"TeamHasMember",
"checks",
"if",
"a",
"user",
"belongs",
"to",
"a",
"team"
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"TeamHasMember",
"(",
"teamID",
"int",
",",
"memberLogin",
"string",
")",
"(",
"bool",
",",
"error",
")",
"{",
"c",
".",
"log",
"(",
"\"",
"\"",
",",
"teamID",
",",
"memberLogin",
")",
"\n",
"projectMaintainers",
... |
24,892 | all-24893 | [
"OnStart",
"implements",
"BaseService",
"."
] | [
"func",
"(",
"p",
"*",
"Peer",
")",
"OnStart",
"(",
")",
"<mask>",
"{",
"p",
".",
"BaseService",
".",
"OnStart",
"(",
")",
"\n",
"_",
",",
"err",
":=",
"p",
".",
"mconn",
".",
"Start",
"(",
")",
"\n",
"return",
"err",
"\n",
"}"
] |
24,893 | all-24894 | [
"SetPixbufColumn",
"is",
"a",
"wrapper",
"around",
"gtk_icon_view_set_pixbuf_column",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"IconView",
")",
"SetPixbufColumn",
"(",
"<mask>",
"int",
")",
"{",
"C",
".",
"gtk_icon_view_set_pixbuf_column",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"gint",
"(",
"column",
")",
")",
"\n",
"}"
] |
24,894 | all-24895 | [
"parseMetadataAtContainerCreate",
"gathers",
"metadata",
"from",
"task",
"and",
"cluster",
"configurations",
"then",
"packages",
"it",
"for",
"JSON",
"Marshaling",
".",
"We",
"use",
"this",
"version",
"to",
"get",
"data",
"available",
"prior",
"to",
"container",
"... | [
"func",
"(",
"manager",
"*",
"metadataManager",
")",
"parseMetadataAtContainerCreate",
"(",
"task",
"*",
"apitask",
".",
"Task",
",",
"containerName",
"string",
")",
"Metadata",
"{",
"return",
"Metadata",
"{",
"cluster",
":",
"manager",
".",
"cluster",
",",
"t... |
24,895 | all-24896 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"DOMNode",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12",
"(",
"&",
"w",
",",
"v",
")",
"\... |
24,896 | all-24897 | [
"CreateAPIKey",
"creates",
"an",
"API",
"key",
"from",
"given",
"struct",
"and",
"fills",
"the",
"rest",
"of",
"its",
"fields",
"or",
"returns",
"an",
"error",
"on",
"failure"
] | [
"func",
"(",
"client",
"*",
"Client",
")",
"CreateAPIKey",
"(",
"<mask>",
"string",
")",
"(",
"*",
"APIKey",
",",
"error",
")",
"{",
"toPost",
":=",
"struct",
"{",
"Name",
"*",
"string",
"`json:\"name,omitempty\"`",
"\n",
"}",
"{",
"&",
"name",
",",
"}... |
24,897 | all-24898 | [
"UnmarshalText",
"hydrates",
"this",
"instance",
"from",
"text"
] | [
"func",
"(",
"u",
"*",
"MAC",
")",
"UnmarshalText",
"(",
"data",
"[",
"]",
"<mask>",
")",
"error",
"{",
"// validation is performed later on",
"*",
"u",
"=",
"MAC",
"(",
"string",
"(",
"data",
")",
")",
"\n",
"return",
"nil",
"\n",
"}"
] |
24,898 | all-24899 | [
"Command",
"executes",
"command",
"args",
"...",
".",
"The",
"filter",
"s",
"input",
"items",
"are",
"fed",
"as",
"standard",
"input",
"to",
"the",
"command",
"one",
"line",
"per",
"input",
"item",
".",
"The",
"standard",
"output",
"of",
"the",
"command",
... | [
"func",
"Command",
"(",
"command",
"string",
",",
"args",
"...",
"string",
")",
"Filter",
"{",
"return",
"FilterFunc",
"(",
"func",
"(",
"arg",
"Arg",
")",
"error",
"{",
"cmd",
":=",
"exec",
".",
"Command",
"(",
"command",
",",
"args",
"...",
")",
"\... |
24,899 | all-24900 | [
"NotFound",
"configurates",
"http",
".",
"HandlerFunc",
"which",
"is",
"called",
"when",
"no",
"matching",
"route",
"is",
"found",
".",
"If",
"it",
"is",
"not",
"set",
"http",
".",
"NotFound",
"is",
"used",
".",
"Be",
"sure",
"to",
"set",
"404",
"respons... | [
"func",
"(",
"r",
"*",
"Router",
")",
"NotFound",
"(",
"handlers",
"...",
"Handler",
")",
"{",
"handlers",
"=",
"validateAndWrapHandlers",
"(",
"handlers",
")",
"\n",
"r",
".",
"notFound",
"=",
"func",
"(",
"rw",
"http",
".",
"ResponseWriter",
",",
"req"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.