id int32 0 25.3k | idx stringlengths 5 9 | nl_tokens listlengths 1 418 | pl_tokens listlengths 22 4.98k |
|---|---|---|---|
3,700 | all-3701 | [
"Start",
"starts",
"a",
"new",
"background",
"service",
"to",
"pull",
"periodically",
"."
] | [
"func",
"Start",
"(",
"repo",
"*",
"Repo",
")",
"{",
"if",
"repo",
".",
"Interval",
"<=",
"0",
"{",
"// ignore, don't setup periodic pull.",
"Logger",
"(",
")",
".",
"Println",
"(",
"\"",
"\"",
")",
"\n",
"return",
"\n",
"}",
"\n",
"service",
":=",
"&"... |
3,701 | all-3702 | [
"VectorscalarBinop",
"evaluates",
"a",
"binary",
"operation",
"between",
"a",
"Vector",
"and",
"a",
"Scalar",
"."
] | [
"func",
"(",
"ev",
"*",
"evaluator",
")",
"VectorscalarBinop",
"(",
"op",
"ItemType",
",",
"lhs",
"Vector",
",",
"rhs",
"Scalar",
",",
"swap",
",",
"returnBool",
"bool",
",",
"enh",
"*",
"EvalNodeHelper",
")",
"Vector",
"{",
"for",
"_",
",",
"lhsSample",... |
3,702 | all-3703 | [
"HasResource",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"e",
"*",
"<mask>",
")",
"HasResource",
"(",
")",
"bool",
"{",
"if",
"e",
"!=",
"nil",
"&&",
"e",
".",
"Resource",
"!=",
"nil",
"{",
"return",
"true",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
3,703 | all-3704 | [
"UpdateStoragePool",
"updates",
"the",
"pool",
"to",
"match",
"the",
"provided",
"StoragePool",
"struct"
] | [
"func",
"(",
"r",
"*",
"ProtocolLXD",
")",
"UpdateStoragePool",
"(",
"name",
"string",
",",
"pool",
"api",
".",
"StoragePoolPut",
",",
"ETag",
"string",
")",
"error",
"{",
"if",
"!",
"r",
".",
"HasExtension",
"(",
"\"",
"\"",
")",
"{",
"return",
"fmt",... |
3,704 | all-3705 | [
"RegisterHandlerVersion",
"inserts",
"a",
"handler",
"on",
"a",
"list",
"of",
"handlers"
] | [
"func",
"RegisterHandlerVersion",
"(",
"<mask>",
",",
"path",
",",
"method",
"string",
",",
"h",
"http",
".",
"Handler",
")",
"{",
"var",
"th",
"TsuruHandler",
"\n",
"th",
".",
"version",
"=",
"version",
"\n",
"th",
".",
"path",
"=",
"path",
"\n",
"th"... |
3,705 | all-3706 | [
"StatusString",
"returns",
"the",
"string",
"of",
"the",
"cgroup",
"resource",
"status"
] | [
"func",
"(",
"vol",
"*",
"VolumeResource",
")",
"StatusString",
"(",
"status",
"resourcestatus",
".",
"ResourceStatus",
")",
"string",
"{",
"return",
"VolumeStatus",
"(",
"status",
")",
".",
"<mask>",
"(",
")",
"\n",
"}"
] |
3,706 | all-3707 | [
"EtcdVolume",
"creates",
"a",
"persistent",
"volume",
"backed",
"by",
"a",
"volume",
"with",
"name",
"name"
] | [
"func",
"EtcdVolume",
"(",
"persistentDiskBackend",
"backend",
",",
"opts",
"*",
"AssetOpts",
",",
"hostPath",
"string",
",",
"name",
"string",
",",
"size",
"int",
")",
"(",
"*",
"v1",
".",
"PersistentVolume",
",",
"error",
")",
"{",
"spec",
":=",
"&",
"... |
3,707 | all-3708 | [
"NewImageDestination",
"returns",
"a",
"types",
".",
"ImageDestination",
"for",
"this",
"reference",
".",
"The",
"caller",
"must",
"call",
".",
"Close",
"()",
"on",
"the",
"returned",
"ImageDestination",
"."
] | [
"func",
"(",
"ref",
"dirReference",
")",
"NewImageDestination",
"(",
"ctx",
"context",
".",
"Context",
",",
"sys",
"*",
"types",
".",
"SystemContext",
")",
"(",
"types",
".",
"ImageDestination",
",",
"error",
")",
"{",
"compress",
":=",
"false",
"\n",
"if"... |
3,708 | all-3709 | [
"start",
"prepares",
"and",
"starts",
"server",
"in",
"a",
"new",
"goroutine",
".",
"It",
"is",
"no",
"longer",
"safe",
"to",
"modify",
"a",
"server",
"s",
"fields",
"after",
"it",
"has",
"been",
"sent",
"to",
"Start",
".",
"This",
"function",
"is",
"j... | [
"func",
"(",
"s",
"*",
"EtcdServer",
")",
"start",
"(",
")",
"{",
"lg",
":=",
"s",
".",
"getLogger",
"(",
")",
"\n\n",
"if",
"s",
".",
"Cfg",
".",
"SnapshotCount",
"==",
"0",
"{",
"if",
"lg",
"!=",
"nil",
"{",
"lg",
".",
"Info",
"(",
"\"",
"\... |
3,709 | all-3710 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"a",
"specified",
"program",
"object"
] | [
"func",
"ProgramUniform2f",
"(",
"program",
"uint32",
",",
"location",
"int32",
",",
"v0",
"float32",
",",
"v1",
"float32",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpProgramUniform2f",
",",
"4",
",",
"uintptr",
"(",
"program",
")",
",",
"uintptr",
"(",... |
3,710 | all-3711 | [
"tryAddLevel0Table",
"returns",
"true",
"if",
"ok",
"and",
"no",
"stalling",
"."
] | [
"func",
"(",
"s",
"*",
"levelHandler",
")",
"tryAddLevel0Table",
"(",
"t",
"*",
"table",
".",
"Table",
")",
"bool",
"{",
"y",
".",
"AssertTrue",
"(",
"s",
".",
"level",
"==",
"0",
")",
"\n",
"// Need lock as we may be deleting the first table during a level 0 co... |
3,711 | all-3712 | [
"IsEmpty",
"tests",
"the",
"Stack",
"to",
"determine",
"if",
"it",
"is",
"populate",
"or",
"not",
"."
] | [
"func",
"(",
"stack",
"*",
"Stack",
")",
"IsEmpty",
"(",
")",
"bool",
"{",
"stack",
".",
"key",
".",
"RLock",
"(",
")",
"\n",
"defer",
"<mask>",
".",
"key",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"stack",
".",
"underlyer",
"==",
"nil",
"||",
"... |
3,712 | all-3713 | [
"controllerTypeToClass",
"converts",
"a",
"controller",
"type",
"to",
"a",
"specific",
"short",
"-",
"form",
"controller",
"class",
"namely",
"for",
"use",
"with",
"working",
"with",
"IDs",
"."
] | [
"func",
"controllerTypeToClass",
"(",
"c",
"<mask>",
".",
"BaseVirtualController",
")",
"(",
"string",
",",
"error",
")",
"{",
"var",
"t",
"string",
"\n",
"switch",
"c",
".",
"(",
"type",
")",
"{",
"case",
"*",
"types",
".",
"VirtualIDEController",
":",
... |
3,713 | all-3714 | [
"/",
"*",
"Parses",
"a",
"new",
"EvaluableExpression",
"from",
"the",
"given",
"[",
"expression",
"]",
"string",
".",
"Returns",
"an",
"error",
"if",
"the",
"given",
"expression",
"has",
"invalid",
"syntax",
"."
] | [
"func",
"NewEvaluableExpression",
"(",
"expression",
"string",
")",
"(",
"*",
"EvaluableExpression",
",",
"error",
")",
"{",
"functions",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"ExpressionFunction",
")",
"\n",
"return",
"NewEvaluableExpressionWithFunctions",
... |
3,714 | all-3715 | [
"FileWriter",
"generates",
"*",
"osFile",
"-",
">",
"io",
".",
"Writer"
] | [
"func",
"FileWriter",
"(",
"path",
"string",
",",
"perm",
"os",
".",
"FileMode",
")",
"*",
"os",
".",
"File",
"{",
"if",
"<mask>",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"var",
"err",
"error",
"\n",
"var",
"file",
"*",
"os",
"... |
3,715 | all-3716 | [
"MicrosoftSecret",
"creates",
"a",
"microsoft",
"secret",
"with",
"following",
"parameters",
":",
"container",
"-",
"Azure",
"blob",
"container",
"id",
"-",
"Azure",
"storage",
"account",
"name",
"secret",
"-",
"Azure",
"storage",
"account",
"key"
] | [
"func",
"MicrosoftSecret",
"(",
"container",
"string",
",",
"id",
"string",
",",
"secret",
"string",
")",
"map",
"[",
"string",
"]",
"[",
"]",
"byte",
"{",
"return",
"map",
"[",
"string",
"]",
"[",
"]",
"byte",
"{",
"\"",
"\"",
":",
"[",
"]",
"byte... |
3,716 | all-3717 | [
"buildUpdateRelMap",
"builds",
"a",
"table",
"of",
"prefixes",
"used",
"to",
"determine",
"which",
"directories",
"to",
"update",
"and",
"visit",
".",
"root",
"and",
"dirs",
"must",
"be",
"absolute",
"canonical",
"file",
"paths",
".",
"Each",
"entry",
"in",
... | [
"func",
"buildUpdateRelMap",
"(",
"root",
"string",
",",
"dirs",
"[",
"]",
"string",
")",
"map",
"[",
"string",
"]",
"bool",
"{",
"relMap",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"bool",
")",
"\n",
"for",
"_",
",",
"dir",
":=",
"range",
"dir... |
3,717 | all-3718 | [
"prevKeyFromPuts",
"gets",
"the",
"prev",
"key",
"that",
"is",
"being",
"put",
";",
"ignores",
"the",
"put",
"action",
"response",
"."
] | [
"func",
"prevKeyFromPuts",
"(",
"resp",
"*",
"clientv3",
".",
"TxnResponse",
")",
"*",
"mvccpb",
".",
"KeyValue",
"{",
"for",
"_",
",",
"r",
":=",
"<mask>",
"resp",
".",
"Responses",
"{",
"pkv",
":=",
"r",
".",
"GetResponsePut",
"(",
")",
".",
"PrevKv"... |
3,718 | all-3719 | [
"Useful",
"functions",
"for",
"unreliable",
"backends"
] | [
"func",
"tryMount",
"(",
"src",
"string",
",",
"dst",
"string",
",",
"<mask>",
"string",
",",
"flags",
"uintptr",
",",
"options",
"string",
")",
"error",
"{",
"var",
"err",
"error",
"\n\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"20",
";",
"i",
"++"... |
3,719 | all-3720 | [
"GetNmberUp",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_get_number_up",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"GetNmberUp",
"(",
")",
"int",
"{",
"c",
":=",
"C",
".",
"gtk_print_settings_get_number_up",
"(",
"ps",
".",
"native",
"(",
")",
")",
"\n",
"return",
"int",
"(",
"c",
")",
"\n",
"}"
] |
3,720 | all-3721 | [
"ReadNetworkInterfaceTypes",
"returns",
"a",
"list",
"of",
"network",
"interface",
"types",
".",
"This",
"is",
"used",
"in",
"the",
"VM",
"data",
"source",
"to",
"discover",
"the",
"types",
"of",
"the",
"NIC",
"drivers",
"on",
"the",
"virtual",
"machine",
".... | [
"func",
"ReadNetworkInterfaceTypes",
"(",
"l",
"object",
".",
"VirtualDeviceList",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"log",
".",
"Printf",
"(",
"\"",
"\"",
")",
"\n",
"devices",
":=",
"l",
".",
"Select",
"(",
"func",
"(",
"device",
... |
3,721 | all-3722 | [
"/",
"*",
"start",
"capturing",
"frames",
"from",
"camera",
":",
"index",
"=",
"camera_index",
"+",
"domain_offset",
"(",
"CV_CAP_",
"*",
")"
] | [
"func",
"NewCameraCapture",
"(",
"index",
"int",
")",
"*",
"Capture",
"{",
"cap",
":=",
"C",
".",
"cvCreateCameraCapture",
"(",
"C",
".",
"int",
"(",
"<mask>",
")",
")",
"\n",
"return",
"(",
"*",
"Capture",
")",
"(",
"cap",
")",
"\n",
"}"
] |
3,722 | all-3723 | [
"SetGPUIDs",
"sets",
"the",
"GPUIDs"
] | [
"func",
"(",
"n",
"*",
"NvidiaGPUManager",
")",
"SetGPUIDs",
"(",
"gpuIDs",
"[",
"]",
"string",
")",
"{",
"n",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"n",
".",
"<mask>",
".",
"Unlock",
"(",
")",
"\n",
"n",
".",
"GPUIDs",
"=",
"gpuIDs"... |
3,723 | all-3724 | [
"Decode",
"the",
"string",
"geohash",
"to",
"a",
"(",
"lat",
"lng",
")",
"point",
"."
] | [
"func",
"Decode",
"(",
"hash",
"string",
")",
"(",
"lat",
",",
"lng",
"float64",
")",
"{",
"<mask>",
":=",
"BoundingBox",
"(",
"hash",
")",
"\n",
"return",
"box",
".",
"Round",
"(",
")",
"\n",
"}"
] |
3,724 | all-3725 | [
"Writes",
"JSON",
"formatted",
"targets",
"to",
"output",
"file",
"."
] | [
"func",
"(",
"a",
"*",
"Adapter",
")",
"writeOutput",
"(",
")",
"error",
"{",
"arr",
":=",
"mapToArray",
"(",
"a",
".",
"groups",
")",
"\n",
"b",
",",
"_",
":=",
"json",
".",
"MarshalIndent",
"(",
"arr",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
"... |
3,725 | all-3726 | [
"Simple",
"assert",
"call",
"for",
"unit",
"and",
"functional",
"tests"
] | [
"func",
"Assert",
"(",
"t",
"Tester",
",",
"b",
"bool",
",",
"message",
"...",
"interface",
"{",
"}",
")",
"{",
"if",
"!",
"b",
"{",
"<mask>",
",",
"file",
",",
"line",
",",
"_",
":=",
"runtime",
".",
"Caller",
"(",
"1",
")",
"\n",
"caller_func_i... |
3,726 | all-3727 | [
"Create",
"is",
"a",
"wrapper",
"around",
"cairo_create",
"()",
"."
] | [
"func",
"Create",
"(",
"target",
"*",
"Surface",
")",
"*",
"<mask>",
"{",
"c",
":=",
"C",
".",
"cairo_create",
"(",
"target",
".",
"native",
"(",
")",
")",
"\n",
"ctx",
":=",
"wrapContext",
"(",
"c",
")",
"\n",
"runtime",
".",
"SetFinalizer",
"(",
... |
3,727 | all-3728 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"Content",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoHar13",
"(",
"&",
"w",
",",
"v",
")",
"\n",
"r... |
3,728 | all-3729 | [
"GetTransientFor",
"is",
"a",
"wrapper",
"around",
"gtk_window_get_transient_for",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Window",
")",
"GetTransientFor",
"(",
")",
"(",
"*",
"Window",
",",
"error",
")",
"{",
"c",
":=",
"C",
".",
"gtk_window_get_transient_for",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"<mask>",... |
3,729 | all-3730 | [
"/",
"*",
"Identify",
"the",
"beginning",
"of",
"a",
"segment",
"that",
"performs",
"a",
"database",
"operation",
".",
"SQL",
"Obfuscation",
"===============",
"If",
"you",
"supply",
"the",
"sql_obfuscator",
"parameter",
"with",
"NULL",
"the",
"supplied",
"SQL",... | [
"func",
"SegmentDatastoreBegin",
"(",
"id",
",",
"parent",
"int64",
",",
"table",
",",
"operation",
",",
"sql",
",",
"sqlTraceRollupName",
"string",
")",
"(",
"int64",
",",
"error",
")",
"{",
"ctable",
":=",
"C",
".",
"CString",
"(",
"table",
")",
"\n",
... |
3,730 | all-3731 | [
"GetCreateFlags",
"registers",
"the",
"flags",
"this",
"driver",
"adds",
"to",
"docker",
"hosts",
"create"
] | [
"func",
"(",
"d",
"*",
"Driver",
")",
"GetCreateFlags",
"(",
")",
"[",
"]",
"mcnflag",
".",
"Flag",
"{",
"return",
"[",
"]",
"mcnflag",
".",
"Flag",
"{",
"mcnflag",
".",
"StringFlag",
"{",
"EnvVar",
":",
"\"",
"\"",
",",
"Name",
":",
"\"",
"\"",
... |
3,731 | all-3732 | [
"VerifyProvider",
"runs",
"the",
"verification",
"process",
"against",
"a",
"running",
"Provider",
"."
] | [
"func",
"(",
"p",
"*",
"mockClient",
")",
"VerifyProvider",
"(",
"<mask>",
"types",
".",
"VerifyRequest",
")",
"(",
"types",
".",
"ProviderVerifierResponse",
",",
"error",
")",
"{",
"return",
"p",
".",
"VerifyProviderResponse",
",",
"p",
".",
"VerifyProviderEr... |
3,732 | all-3733 | [
"for",
"drag",
"-",
"begin",
"event"
] | [
"func",
"DragSetIconPixbuf",
"(",
"<mask>",
"*",
"gdk",
".",
"DragContext",
",",
"pixbuf",
"*",
"gdk",
".",
"Pixbuf",
",",
"hot_x",
"int",
",",
"hot_y",
"int",
")",
"{",
"ctx",
":=",
"unsafe",
".",
"Pointer",
"(",
"context",
".",
"Native",
"(",
")",
... |
3,733 | all-3734 | [
"resourceVSphereComputeClusterHostGroupObjects",
"handles",
"the",
"fetching",
"of",
"the",
"cluster",
"and",
"group",
"name",
"depending",
"on",
"what",
"attributes",
"are",
"available",
":",
"*",
"If",
"the",
"resource",
"ID",
"is",
"available",
"the",
"data",
"... | [
"func",
"resourceVSphereComputeClusterHostGroupObjects",
"(",
"d",
"*",
"schema",
".",
"ResourceData",
",",
"meta",
"<mask>",
"{",
"}",
",",
")",
"(",
"*",
"object",
".",
"ClusterComputeResource",
",",
"string",
",",
"error",
")",
"{",
"if",
"d",
".",
"Id",
... |
3,734 | all-3735 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"ActivateTargetParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget32",
"(",
"&",
... |
3,735 | all-3736 | [
"Rename",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockFileSystem",
")",
"Rename",
"(",
"arg0",
",",
"arg1",
"string",
")",
"error",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call",
"(",
"m",
",",
"\"",
"\"",
",",
"arg0",
",",
"arg1",
")",
"\n",
"ret0",
",",
"_",
":=",
... |
3,736 | all-3737 | [
"NewOptions",
"returns",
"Options",
"struct",
"filled",
"with",
"default",
"values",
"."
] | [
"func",
"NewOptions",
"(",
")",
"*",
"Options",
"{",
"return",
"&",
"<mask>",
"{",
"Brokers",
":",
"[",
"]",
"string",
"{",
"\"",
"\"",
"}",
",",
"Topic",
":",
"\"",
"\"",
",",
"Partition",
":",
"0",
",",
"Protocol",
":",
"ProtocolPlain",
",",
"Ini... |
3,737 | all-3738 | [
"Set",
"function",
"updates",
"the",
"value",
"of",
"a",
"key",
"in",
"the",
"configuration",
".",
"Function",
"Set",
"()",
"is",
"exactly",
"the",
"same",
"as",
"function",
"Add",
"()",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"Set",
"(",
"section",
"string",
",",
"key",
"string",
",",
"value",
"string",
")",
"{",
"_",
",",
"ok",
":=",
"c",
".",
"config",
"[",
"section",
"]",
"\n",
"if",
"!",
"ok",
"{",
"c",
".",
"config",
"[",
... |
3,738 | all-3739 | [
"openWAL",
"returns",
"a",
"WAL",
"ready",
"for",
"reading",
"."
] | [
"func",
"(",
"rc",
"*",
"raftNode",
")",
"openWAL",
"(",
"snapshot",
"*",
"raftpb",
".",
"Snapshot",
")",
"*",
"wal",
".",
"WAL",
"{",
"if",
"!",
"wal",
".",
"Exist",
"(",
"rc",
".",
"waldir",
")",
"{",
"if",
"err",
":=",
"os",
".",
"Mkdir",
"(... |
3,739 | all-3740 | [
"SetReallocateRedraws",
"is",
"a",
"wrapper",
"around",
"gtk_container_set_reallocate_redraws",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"SetReallocateRedraws",
"(",
"needsRedraws",
"bool",
")",
"{",
"C",
".",
"gtk_container_set_reallocate_redraws",
"(",
"v",
".",
"native",
"(",
")",
",",
"gbool",
"(",
"needsRedraws",
")",
")",
"\n",
"}"
] |
3,740 | all-3741 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"CloseParams",
")",
"UnmarshalJSON",
"(",
"data",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"<mask>",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser19",
"(",
"&",
"r",
... |
3,741 | all-3742 | [
"writeHeaders",
"writes",
"out",
"the",
"HTTP",
"headers",
"as",
"arg2",
"and",
"creates",
"the",
"arg3",
"writer",
"."
] | [
"func",
"(",
"w",
"*",
"tchanResponseWriter",
")",
"writeHeaders",
"(",
")",
"{",
"// TODO(prashant): Allow creating write buffers that let you grow the buffer underneath.",
"wb",
":=",
"typed",
".",
"NewWriteBufferWithSize",
"(",
"10000",
")",
"\n",
"wb",
".",
"WriteUint... |
3,742 | all-3743 | [
"See",
"bcd",
".",
"Tracer",
".",
"AddKV",
"()",
"."
] | [
"func",
"(",
"t",
"*",
"BTTracer",
")",
"AddKV",
"(",
"options",
"[",
"]",
"string",
",",
"key",
",",
"val",
"string",
")",
"[",
"]",
"string",
"{",
"return",
"t",
".",
"AddOptions",
"(",
"<mask>",
",",
"t",
".",
"kvp",
",",
"key",
"+",
"t",
".... |
3,743 | all-3744 | [
"Load",
"a",
"font",
"from",
"cache",
"if",
"exists",
"otherwise",
"it",
"will",
"load",
"the",
"font",
"from",
"file"
] | [
"func",
"(",
"cache",
"*",
"SyncFolderFontCache",
")",
"Load",
"(",
"fontData",
"FontData",
")",
"(",
"font",
"*",
"truetype",
".",
"Font",
",",
"err",
"error",
")",
"{",
"cache",
".",
"RLock",
"(",
")",
"\n",
"font",
"=",
"cache",
".",
"fonts",
"[",... |
3,744 | all-3745 | [
"Getint",
"returns",
"the",
"integer",
"value",
"for",
"a",
"given",
"key",
"."
] | [
"func",
"(",
"c",
"*",
"Config",
")",
"Getint",
"(",
"<mask>",
"string",
")",
"(",
"int",
",",
"error",
")",
"{",
"if",
"value",
",",
"found",
":=",
"c",
".",
"data",
"[",
"key",
"]",
";",
"found",
"{",
"v",
",",
"err",
":=",
"strconv",
".",
... |
3,745 | all-3746 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"SetDataSizeLimitsForTestParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork12",
... |
3,746 | all-3747 | [
"SetStateFlags",
"is",
"a",
"wrapper",
"around",
"gtk_widget_set_state_flags",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Widget",
")",
"SetStateFlags",
"(",
"stateFlags",
"StateFlags",
",",
"clear",
"bool",
")",
"{",
"C",
".",
"gtk_widget_set_state_flags",
"(",
"v",
".",
"native",
"(",
")",
",",
"C",
".",
"GtkStateFlags",
"(",
"stateFlags",
")",
","... |
3,747 | all-3748 | [
"Equal",
"is",
"a",
"wrapper",
"around",
"gtk_text_iter_equal",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"TextIter",
")",
"Equal",
"(",
"v1",
"*",
"TextIter",
")",
"bool",
"{",
"<mask>",
"gobool",
"(",
"C",
".",
"gtk_text_iter_equal",
"(",
"v",
".",
"native",
"(",
")",
",",
"v1",
".",
"native",
"(",
")",
")",
")",
"\n",
"}"
] |
3,748 | all-3749 | [
"ParseJSONBody",
"parses",
"a",
"JSON",
"body",
"."
] | [
"func",
"ParseJSONBody",
"(",
"r",
"io",
".",
"Reader",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"<mask>",
"v",
"interface",
"{",
"}",
"\n",
"if",
"err",
":=",
"json",
".",
"NewDecoder",
"(",
"r",
")",
".",
"Decode",
"(",
"&",
"v"... |
3,749 | all-3750 | [
"LoadObjects",
"loads",
"objects",
"form",
"an",
"specific",
"source",
".",
"It",
"can",
"load",
"objects",
"from",
"different",
"source",
"types",
"that",
"are",
"implemented",
"following",
"the",
"SourceType",
"interface",
"."
] | [
"func",
"(",
"s",
"*",
"Seekret",
")",
"LoadObjects",
"(",
"st",
"SourceType",
",",
"source",
"string",
",",
"<mask>",
"LoadOptions",
")",
"error",
"{",
"objectList",
",",
"err",
":=",
"st",
".",
"LoadObjects",
"(",
"source",
",",
"opt",
")",
"\n",
"if... |
3,750 | all-3751 | [
"invalidate",
"a",
"region",
"of",
"a",
"texture",
"image"
] | [
"func",
"InvalidateTexSubImage",
"(",
"texture",
"uint32",
",",
"level",
"int32",
",",
"xoffset",
"int32",
",",
"yoffset",
"int32",
",",
"zoffset",
"int32",
",",
"width",
"int32",
",",
"height",
"int32",
",",
"depth",
"int32",
")",
"{",
"C",
".",
"glowInva... |
3,751 | all-3752 | [
"MarshalYAML",
"implements",
"of",
"yaml",
".",
"Marshaler",
"interface",
".",
"It",
"marshals",
"string",
"representations",
"of",
"time",
".",
"Duration",
"."
] | [
"func",
"(",
"o",
"<mask>",
")",
"MarshalYAML",
"(",
")",
"(",
"interface",
"{",
"}",
",",
"error",
")",
"{",
"return",
"optionsJSON",
"{",
"Timeout",
":",
"marshal",
".",
"Duration",
"(",
"o",
".",
"Timeout",
")",
",",
"KeepAlive",
":",
"marshal",
"... |
3,752 | all-3753 | [
"specify",
"a",
"callback",
"to",
"receive",
"debugging",
"messages",
"from",
"the",
"GL",
"Parameter",
"callback",
"has",
"type",
"C",
".",
"GLDEBUGPROC",
"."
] | [
"func",
"DebugMessageCallback",
"(",
"<mask>",
"unsafe",
".",
"Pointer",
",",
"userParam",
"unsafe",
".",
"Pointer",
")",
"{",
"syscall",
".",
"Syscall",
"(",
"gpDebugMessageCallback",
",",
"2",
",",
"syscall",
".",
"NewCallback",
"(",
"callback",
")",
",",
... |
3,753 | all-3754 | [
"Debugf",
"records",
"the",
"log",
"with",
"debug",
"level"
] | [
"func",
"Debugf",
"(",
"format",
"string",
",",
"args",
"...",
"<mask>",
"{",
"}",
")",
"{",
"logger",
".",
"Output",
"(",
"2",
",",
"LevelDebug",
",",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"args",
"...",
")",
")",
"\n",
"}"
] |
3,754 | all-3755 | [
"query",
"the",
"name",
"of",
"an",
"active",
"shader",
"subroutine"
] | [
"func",
"GetActiveSubroutineName",
"(",
"program",
"uint32",
",",
"shadertype",
"uint32",
",",
"index",
"uint32",
",",
"bufsize",
"int32",
",",
"length",
"*",
"int32",
",",
"name",
"*",
"uint8",
")",
"{",
"syscall",
".",
"Syscall6",
"(",
"gpGetActiveSubroutine... |
3,755 | all-3756 | [
"writeXML",
"serializes",
"a",
"struct",
"to",
"a",
"response",
"as",
"XML"
] | [
"func",
"writeXML",
"(",
"w",
"http",
".",
"ResponseWriter",
",",
"r",
"*",
"http",
".",
"Request",
",",
"code",
"int",
",",
"v",
"interface",
"{",
"}",
")",
"{",
"w",
".",
"Header",
"(",
")",
".",
"Set",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
... |
3,756 | all-3757 | [
"SuggestGasPrice",
"retrieves",
"the",
"currently",
"suggested",
"gas",
"price",
"to",
"allow",
"a",
"timely",
"execution",
"of",
"a",
"transaction",
"."
] | [
"func",
"(",
"b",
"*",
"backendInstance",
")",
"SuggestGasPrice",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"*",
"big",
".",
"Int",
",",
"error",
")",
"{",
"ctx2",
",",
"cancel",
":=",
"b",
".",
"addTimeout",
"(",
"ctx",
")",
"\n",
"defer",
... |
3,757 | all-3758 | [
"Age",
"returns",
"the",
"time",
"since",
"all",
"states",
"have",
"been",
"activated",
".",
"It",
"will",
"panic",
"if",
"any",
"of",
"the",
"state",
"is",
"not",
"active",
"."
] | [
"func",
"(",
"m",
"*",
"MultiState",
")",
"Age",
"(",
"t",
"time",
".",
"Time",
")",
"time",
".",
"Duration",
"{",
"minAge",
":=",
"time",
".",
"Duration",
"(",
"1",
"<<",
"63",
"-",
"1",
")",
"\n",
"for",
"_",
",",
"state",
":=",
"<mask>",
"m"... |
3,758 | all-3759 | [
"GetOrientation",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_page_setup_get_orientation",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PageSetup",
")",
"GetOrientation",
"(",
")",
"PageOrientation",
"{",
"c",
":=",
"C",
".",
"gtk_page_setup_get_orientation",
"(",
"ps",
".",
"native",
"(",
")",
")",
"\n",
"return",
"PageOrientation",
"(",
"c",
")",
"\n",
"}"
] |
3,759 | all-3760 | [
"setPreviousLog",
"is",
"used",
"to",
"setup",
"the",
"PrevLogEntry",
"and",
"PrevLogTerm",
"for",
"an",
"AppendEntriesRequest",
"given",
"the",
"next",
"index",
"to",
"replicate",
"."
] | [
"func",
"(",
"r",
"*",
"Raft",
")",
"setPreviousLog",
"(",
"req",
"*",
"AppendEntriesRequest",
",",
"nextIndex",
"uint64",
")",
"error",
"{",
"// Guard for the first index, since there is no 0 log entry",
"// Guard against the previous index being a snapshot as well",
"lastSnap... |
3,760 | all-3761 | [
"Stop",
"shuts",
"down",
"the",
"client",
"and",
"cleans",
"up",
".",
"You",
"must",
"not",
"send",
"any",
"messages",
"on",
"the",
"send",
"channel",
"after",
"calling",
"this",
"function",
"."
] | [
"func",
"(",
"c",
"*",
"Client",
")",
"Stop",
"(",
")",
"{",
"// Tell reader and writer to end.",
"close",
"(",
"c",
".",
"doneChan",
")",
"\n\n",
"// We won't be sending anything further to writer. Let it clean up.",
"close",
"(",
"c",
".",
"sendChan",
")",
"\n\n",... |
3,761 | all-3762 | [
"GetPrecisionOk",
"returns",
"a",
"tuple",
"with",
"the",
"Precision",
"field",
"if",
"it",
"s",
"non",
"-",
"nil",
"zero",
"value",
"otherwise",
"and",
"a",
"boolean",
"to",
"check",
"if",
"the",
"value",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryValueDefinition",
")",
"GetPrecisionOk",
"(",
")",
"(",
"int",
",",
"bool",
")",
"{",
"if",
"q",
"==",
"nil",
"||",
"q",
".",
"Precision",
"==",
"nil",
"{",
"return",
"0",
",",
"<mask>",
"\n",
"}",
"\n",
"return",
"*",
... |
3,762 | all-3763 | [
"PopLast",
"removes",
"the",
"bottommost",
"item",
".",
"PopLast",
"does",
"nothing",
"if",
"the",
"stack",
"does",
"not",
"contain",
"at",
"least",
"2",
"items",
"."
] | [
"func",
"(",
"s",
"*",
"VecStack",
")",
"PopLast",
"(",
")",
"(",
"value",
"*",
"Vec",
")",
"{",
"if",
"lastElem",
":=",
"s",
".",
"popLast",
"(",
"s",
".",
"<mask>",
")",
";",
"s",
".",
"size",
">=",
"2",
"&&",
"lastElem",
"!=",
"nil",
"{",
... |
3,763 | all-3764 | [
"WithTargetName",
"eventTarget",
"interface",
"name",
"to",
"stop",
"on",
".",
"If",
"equal",
"to",
"*",
"or",
"not",
"provided",
"will",
"stop",
"on",
"any",
"EventTarget",
"."
] | [
"func",
"(",
"p",
"SetEventListenerBreakpointParams",
")",
"WithTargetName",
"(",
"targetName",
"<mask>",
")",
"*",
"SetEventListenerBreakpointParams",
"{",
"p",
".",
"TargetName",
"=",
"targetName",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
3,764 | all-3765 | [
"IsEnabledFor",
"will",
"return",
"true",
"if",
"logging",
"is",
"enabled",
"for",
"the",
"given",
"module",
"."
] | [
"func",
"(",
"l",
"*",
"moduleLeveled",
")",
"IsEnabledFor",
"(",
"level",
"Level",
",",
"module",
"string",
")",
"bool",
"{",
"return",
"<mask>",
"<=",
"l",
".",
"GetLevel",
"(",
"module",
")",
"\n",
"}"
] |
3,765 | all-3766 | [
"Format",
"creates",
"JSON",
"struct",
"from",
"provided",
"record",
"and",
"returns",
"it",
"."
] | [
"func",
"(",
"formatter",
"*",
"JSONFormatter",
")",
"Format",
"(",
"record",
"*",
"Record",
")",
"string",
"{",
"<mask>",
",",
"_",
":=",
"json",
".",
"Marshal",
"(",
"record",
")",
"\n",
"return",
"string",
"(",
"data",
")",
"\n",
"}"
] |
3,766 | all-3767 | [
"StorageVolumeNodeAddresses",
"returns",
"the",
"addresses",
"of",
"all",
"nodes",
"on",
"which",
"the",
"volume",
"with",
"the",
"given",
"name",
"if",
"defined",
".",
"The",
"empty",
"string",
"is",
"used",
"in",
"place",
"of",
"the",
"address",
"of",
"the... | [
"func",
"(",
"c",
"*",
"ClusterTx",
")",
"StorageVolumeNodeAddresses",
"(",
"poolID",
"int64",
",",
"project",
",",
"name",
"string",
",",
"typ",
"int",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"nodes",
":=",
"[",
"]",
"struct",
"{",
"id... |
3,767 | all-3768 | [
"ListenAndServe",
"serves",
"HTTP",
"requests",
"from",
"the",
"given",
"TCP",
"addr",
"using",
"the",
"given",
"handler",
"."
] | [
"func",
"ListenAndServe",
"(",
"addr",
"string",
",",
"handler",
"RequestHandler",
")",
"error",
"{",
"s",
":=",
"&",
"Server",
"{",
"<mask>",
":",
"handler",
",",
"}",
"\n",
"return",
"s",
".",
"ListenAndServe",
"(",
"addr",
")",
"\n",
"}"
] |
3,768 | all-3769 | [
"fieldString",
"-",
"Creates",
"field",
"value",
"string",
"."
] | [
"func",
"(",
"t",
"*",
"<mask>",
")",
"fieldString",
"(",
"name",
",",
"value",
"string",
")",
"string",
"{",
"value",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"value",
")",
"\n",
"spacesLeft",
":=",
"t",
".",
"fieldSizes",
"[",
"name",
"]... |
3,769 | all-3770 | [
"migrateGrpcCompilers",
"converts",
"go_grpc_library",
"rules",
"into",
"go_proto_library",
"rules",
"with",
"a",
"compilers",
"attribute",
"."
] | [
"func",
"migrateGrpcCompilers",
"(",
"c",
"*",
"config",
".",
"Config",
",",
"f",
"*",
"rule",
".",
"<mask>",
")",
"{",
"for",
"_",
",",
"r",
":=",
"range",
"f",
".",
"Rules",
"{",
"if",
"r",
".",
"Kind",
"(",
")",
"!=",
"\"",
"\"",
"||",
"r",
... |
3,770 | all-3771 | [
"CheckExtract",
"returns",
"an",
"option",
"that",
"sets",
"whether",
"to",
"check",
"if",
"extracting",
"contexts",
"from",
"carriers",
"works",
"."
] | [
"func",
"CheckExtract",
"(",
"val",
"bool",
")",
"APICheckOption",
"{",
"<mask>",
"func",
"(",
"s",
"*",
"APICheckSuite",
")",
"{",
"s",
".",
"opts",
".",
"CheckExtract",
"=",
"val",
"\n",
"}",
"\n",
"}"
] |
3,771 | all-3772 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"DiscardConsoleEntriesParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime41",
"(",
"&",
"w",
",",
... |
3,772 | all-3773 | [
"NewStellarValueExt",
"creates",
"a",
"new",
"StellarValueExt",
"."
] | [
"func",
"NewStellarValueExt",
"(",
"v",
"int32",
",",
"value",
"interface",
"{",
"}",
")",
"(",
"result",
"StellarValueExt",
",",
"err",
"error",
")",
"{",
"result",
".",
"V",
"=",
"v",
"\n",
"<mask>",
"int32",
"(",
"v",
")",
"{",
"case",
"0",
":",
... |
3,773 | all-3774 | [
"ContainerStats",
"mocks",
"base",
"method"
] | [
"func",
"(",
"m",
"*",
"MockClient",
")",
"ContainerStats",
"(",
"arg0",
"context",
".",
"<mask>",
",",
"arg1",
"string",
",",
"arg2",
"bool",
")",
"(",
"types",
".",
"ContainerStats",
",",
"error",
")",
"{",
"ret",
":=",
"m",
".",
"ctrl",
".",
"Call... |
3,774 | all-3775 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"DispatchTouchEventParams",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"<mask>",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7",
"(",
"&",
"w",
",",
"v",
... |
3,775 | all-3776 | [
"Produce",
"line",
"comments",
"by",
"concatenating",
"given",
"strings",
"and",
"producing",
"80",
"characters",
"long",
"lines",
"starting",
"with",
"//"
] | [
"func",
"comment",
"(",
"elems",
"...",
"string",
")",
"string",
"{",
"var",
"lines",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"e",
":=",
"range",
"elems",
"{",
"lines",
"=",
"append",
"(",
"lines",
",",
"strings",
".",
"Split",
"(",
"e",
",",
... |
3,776 | all-3777 | [
"HasType",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"g",
"*",
"GraphDefinitionRequestStyle",
")",
"HasType",
"(",
")",
"bool",
"{",
"if",
"g",
"!=",
"nil",
"&&",
"g",
".",
"Type",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
3,777 | all-3778 | [
"Fatalm",
"executes",
"the",
"same",
"function",
"on",
"the",
"default",
"Base",
"instance"
] | [
"func",
"Fatalm",
"(",
"m",
"*",
"Attrs",
",",
"<mask>",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"curDefault",
".",
"Fatalm",
"(",
"m",
",",
"msg",
",",
"a",
"...",
")",
"\n",
"}"
] |
3,778 | all-3779 | [
"NewRcodezeroChanges",
"returns",
"a",
"RcodeZero",
"specific",
"array",
"with",
"rrset",
"change",
"objects",
"."
] | [
"func",
"(",
"p",
"*",
"RcodeZeroProvider",
")",
"NewRcodezeroChanges",
"(",
"action",
"string",
",",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
")",
"[",
"]",
"*",
"rc0",
".",
"RRSetChange",
"{",
"<mask>",
":=",
"make",
"(",
"[",
"]",
"*... |
3,779 | all-3780 | [
"MarshalJSON",
"supports",
"json",
".",
"Marshaler",
"interface"
] | [
"func",
"(",
"v",
"PlatformFontUsage",
")",
"MarshalJSON",
"(",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"w",
":=",
"jwriter",
".",
"Writer",
"{",
"}",
"\n",
"easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss28",
"(",
"&",
"w",
",",
"v",
")",
... |
3,780 | all-3781 | [
"Returns",
"the",
"region",
"name",
"given",
"a",
"country",
"code",
"and",
"region",
"code"
] | [
"func",
"GetRegionName",
"(",
"countryCode",
",",
"regionCode",
"string",
")",
"string",
"{",
"cc",
":=",
"C",
".",
"CString",
"(",
"countryCode",
")",
"\n",
"defer",
"C",
".",
"free",
"(",
"unsafe",
".",
"Pointer",
"(",
"cc",
")",
")",
"\n\n",
"rc",
... |
3,781 | all-3782 | [
"FlushCache",
"clears",
"all",
"cached",
"templates",
"."
] | [
"func",
"FlushCache",
"(",
")",
"{",
"cacheMutex",
".",
"Lock",
"(",
")",
"\n",
"cache",
"=",
"make",
"(",
"<mask>",
"[",
"string",
"]",
"template",
".",
"Template",
")",
"\n",
"cacheMutex",
".",
"Unlock",
"(",
")",
"\n",
"}"
] |
3,782 | all-3783 | [
"GetWithRestart",
"checks",
"to",
"see",
"if",
"a",
"field",
"has",
"been",
"modified",
"returns",
"the",
"new",
"value",
"and",
"sets",
"restart",
"if",
"it",
"has",
"changed",
"."
] | [
"func",
"(",
"r",
"*",
"Subresource",
")",
"GetWithRestart",
"(",
"key",
"string",
")",
"interface",
"{",
"}",
"{",
"if",
"r",
".",
"HasChange",
"(",
"<mask>",
")",
"{",
"r",
".",
"SetRestart",
"(",
"key",
")",
"\n",
"}",
"\n",
"return",
"r",
".",
... |
3,783 | all-3784 | [
"subworker",
"catches",
"any",
"panic",
"while",
"running",
"the",
"job",
"."
] | [
"func",
"(",
"pool",
"*",
"Pool",
")",
"subworker",
"(",
"job",
"*",
"Job",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"if",
"err",
":=",
"recover",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"log",
".",
"Println",
"(",
"\"",
"\"",
",",
"err",
")... |
3,784 | all-3785 | [
"SetCollate",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_print_settings_set_collate",
"()",
"."
] | [
"func",
"(",
"<mask>",
"*",
"PrintSettings",
")",
"SetCollate",
"(",
"collate",
"bool",
")",
"{",
"C",
".",
"gtk_print_settings_set_collate",
"(",
"ps",
".",
"native",
"(",
")",
",",
"gbool",
"(",
"collate",
")",
")",
"\n",
"}"
] |
3,785 | all-3786 | [
"UnmarshalJSON",
"supports",
"json",
".",
"Unmarshaler",
"interface"
] | [
"func",
"(",
"v",
"*",
"GetDatabaseTableNamesParams",
")",
"UnmarshalJSON",
"(",
"<mask>",
"[",
"]",
"byte",
")",
"error",
"{",
"r",
":=",
"jlexer",
".",
"Lexer",
"{",
"Data",
":",
"data",
"}",
"\n",
"easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase1",
"("... |
3,786 | all-3787 | [
"IsMouseClickEvent",
"returns",
"if",
"a",
"user",
"action",
"can",
"be",
"treated",
"as",
"mouse",
"click",
"."
] | [
"func",
"IsMouseClickEvent",
"(",
"ev",
"Event",
")",
"bool",
"{",
"if",
"ev",
".",
"<mask>",
"==",
"EventClick",
"{",
"return",
"true",
"\n",
"}",
"\n",
"if",
"ev",
".",
"Type",
"==",
"EventMouse",
"&&",
"ev",
".",
"Key",
"==",
"term",
".",
"MouseLe... |
3,787 | all-3788 | [
"DeleteMapping",
"removes",
"the",
"port",
"mapping",
"to",
"UPnP",
"interface",
"."
] | [
"func",
"(",
"n",
"*",
"upnp",
")",
"DeleteMapping",
"(",
"protocol",
"string",
",",
"extPort",
",",
"intPort",
"int",
")",
"error",
"{",
"return",
"n",
".",
"<mask>",
".",
"DeletePortMapping",
"(",
"\"",
"\"",
",",
"uint16",
"(",
"extPort",
")",
",",
... |
3,788 | all-3789 | [
"GetMe",
"returns",
"basic",
"information",
"about",
"the",
"bot",
"in",
"form",
"of",
"a",
"UserResponse",
"."
] | [
"func",
"(",
"api",
"*",
"TelegramBotAPI",
")",
"GetMe",
"(",
")",
"(",
"*",
"UserResponse",
",",
"error",
")",
"{",
"resp",
":=",
"&",
"UserResponse",
"{",
"}",
"\n",
"_",
",",
"err",
":=",
"api",
".",
"c",
".",
"<mask>",
"(",
"getMe",
",",
"res... |
3,789 | all-3790 | [
"Find",
"the",
"starting",
"point",
"of",
"the",
"regions",
"R1",
"R2",
"&",
"RV"
] | [
"func",
"findRegions",
"(",
"word",
"*",
"snowballword",
".",
"SnowballWord",
")",
"(",
"r1start",
",",
"r2start",
",",
"rvstart",
"int",
")",
"{",
"r1start",
"=",
"romance",
".",
"VnvSuffix",
"(",
"word",
",",
"isLowerVowel",
",",
"0",
")",
"\n",
"r2sta... |
3,790 | all-3791 | [
"MarshalString",
"appends",
"the",
"bytes",
"to",
"the",
"buffer",
"with",
"a",
"size",
"prefix",
"and",
"correct",
"padding",
"."
] | [
"func",
"(",
"m",
"*",
"Marshaller",
")",
"MarshalBytes",
"(",
"bs",
"[",
"]",
"byte",
")",
"{",
"if",
"m",
".",
"Error",
"!=",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"if",
"len",
"(",
"m",
".",
"Data",
")",
"<",
"m",
".",
"offset",
"+",
"4",... |
3,791 | all-3792 | [
"NewMockClient",
"creates",
"a",
"new",
"mock",
"instance"
] | [
"func",
"NewMockClient",
"(",
"ctrl",
"*",
"gomock",
".",
"<mask>",
")",
"*",
"MockClient",
"{",
"mock",
":=",
"&",
"MockClient",
"{",
"ctrl",
":",
"ctrl",
"}",
"\n",
"mock",
".",
"recorder",
"=",
"&",
"MockClientMockRecorder",
"{",
"mock",
"}",
"\n",
... |
3,792 | all-3793 | [
"AttachNextTo",
"()",
"is",
"a",
"wrapper",
"around",
"gtk_grid_attach_next_to",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"Grid",
")",
"AttachNextTo",
"(",
"child",
",",
"sibling",
"IWidget",
",",
"side",
"PositionType",
",",
"width",
",",
"height",
"int",
")",
"{",
"C",
".",
"gtk_grid_attach_next_to",
"(",
"v",
".",
"native",
"(",
")",
",",
"<mask>... |
3,793 | all-3794 | [
"WithBody",
"adds",
"the",
"body",
"to",
"the",
"put",
"apps",
"app",
"routes",
"route",
"params"
] | [
"func",
"(",
"o",
"*",
"PutAppsAppRoutesRouteParams",
")",
"WithBody",
"(",
"<mask>",
"*",
"models",
".",
"RouteWrapper",
")",
"*",
"PutAppsAppRoutesRouteParams",
"{",
"o",
".",
"SetBody",
"(",
"body",
")",
"\n",
"return",
"o",
"\n",
"}"
] |
3,794 | all-3795 | [
"Specify",
"the",
"value",
"of",
"a",
"uniform",
"variable",
"for",
"the",
"current",
"program",
"object"
] | [
"func",
"Uniform4fv",
"(",
"location",
"int32",
",",
"count",
"int32",
",",
"value",
"*",
"float32",
")",
"{",
"C",
".",
"glowUniform4fv",
"(",
"gpUniform4fv",
",",
"(",
"C",
".",
"GLint",
")",
"(",
"location",
")",
",",
"(",
"C",
".",
"GLsizei",
")"... |
3,795 | all-3796 | [
"GetAppMenu",
"is",
"a",
"wrapper",
"around",
"gtk_application_get_app_menu",
"()",
"."
] | [
"func",
"(",
"v",
"*",
"<mask>",
")",
"GetAppMenu",
"(",
")",
"*",
"glib",
".",
"MenuModel",
"{",
"c",
":=",
"C",
".",
"gtk_application_get_app_menu",
"(",
"v",
".",
"native",
"(",
")",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"return",
"nil",
"\n",... |
3,796 | all-3797 | [
"RequestVote",
"implements",
"the",
"Transport",
"interface",
"."
] | [
"func",
"(",
"n",
"*",
"NetworkTransport",
")",
"RequestVote",
"(",
"<mask>",
"ServerID",
",",
"target",
"ServerAddress",
",",
"args",
"*",
"RequestVoteRequest",
",",
"resp",
"*",
"RequestVoteResponse",
")",
"error",
"{",
"return",
"n",
".",
"genericRPC",
"(",... |
3,797 | all-3798 | [
"HasQueryIsFailed",
"returns",
"a",
"boolean",
"if",
"a",
"field",
"has",
"been",
"set",
"."
] | [
"func",
"(",
"q",
"*",
"QueryConfig",
")",
"HasQueryIsFailed",
"(",
")",
"bool",
"{",
"if",
"q",
"!=",
"nil",
"&&",
"q",
".",
"QueryIsFailed",
"!=",
"nil",
"{",
"return",
"<mask>",
"\n",
"}",
"\n\n",
"return",
"false",
"\n",
"}"
] |
3,798 | all-3799 | [
"ReloadConfig",
"reloads",
"some",
"settings",
"from",
"config"
] | [
"func",
"(",
"app",
"*",
"App",
")",
"ReloadConfig",
"(",
")",
"error",
"{",
"app",
".",
"Lock",
"(",
")",
"\n",
"defer",
"app",
".",
"Unlock",
"(",
")",
"\n\n",
"<mask>",
"err",
"error",
"\n",
"if",
"err",
"=",
"app",
".",
"configure",
"(",
")",... |
3,799 | all-3800 | [
"ZeroToEnd",
"zeros",
"a",
"file",
"starting",
"from",
"SEEK_CUR",
"to",
"its",
"SEEK_END",
".",
"May",
"temporarily",
"shorten",
"the",
"length",
"of",
"the",
"file",
"."
] | [
"func",
"ZeroToEnd",
"(",
"f",
"*",
"os",
".",
"File",
")",
"error",
"{",
"// TODO: support FALLOC_FL_ZERO_RANGE",
"off",
",",
"err",
":=",
"f",
".",
"Seek",
"(",
"0",
",",
"io",
".",
"SeekCurrent",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.