id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
7,000
all-7001
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "Param", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoHar4", "(", "&", "r", ",", "v...
7,001
all-7002
[ "LoadWorkspaceFile", "is", "similar", "to", "LoadFile", "but", "parses", "the", "file", "as", "a", "WORKSPACE", "file", "." ]
[ "func", "LoadWorkspaceFile", "(", "path", ",", "pkg", "string", ")", "(", "*", "File", ",", "error", ")", "{", "<mask>", ",", "err", ":=", "ioutil", ".", "ReadFile", "(", "path", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "err"...
7,002
all-7003
[ "SetDetailedAction", "is", "a", "wrapper", "around", "g_menu_item_set_detailed_action", "()", "." ]
[ "func", "(", "v", "*", "MenuItem", ")", "SetDetailedAction", "(", "<mask>", "string", ")", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "act", ")", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", ...
7,003
all-7004
[ "defaultEnv", "adds", "the", "map", "of", "environment", "variables", "to", "the", "container", "except", "keys", "already", "defined", "." ]
[ "func", "defaultEnv", "(", "c", "*", "coreapi", ".", "Container", ",", "rawEnv", "map", "[", "string", "]", "string", ")", "{", "<mask>", ":=", "sets", ".", "String", "{", "}", "\n", "for", "_", ",", "arg", ":=", "range", "c", ".", "Env", "{", "k...
7,004
all-7005
[ "expandClusterDpmConfigInfo", "reads", "certain", "ResourceData", "keys", "and", "returns", "a", "ClusterDpmConfigInfo", "." ]
[ "func", "expandClusterDpmConfigInfo", "(", "d", "*", "schema", ".", "ResourceData", ")", "*", "<mask>", ".", "ClusterDpmConfigInfo", "{", "obj", ":=", "&", "types", ".", "ClusterDpmConfigInfo", "{", "DefaultDpmBehavior", ":", "types", ".", "DpmBehavior", "(", "d...
7,005
all-7006
[ "datastoreRootPathFromHostSystemID", "returns", "the", "root", "datastore", "folder", "path", "for", "a", "specific", "host", "system", "ID", "." ]
[ "func", "datastoreRootPathFromHostSystemID", "(", "client", "*", "govmomi", ".", "Client", ",", "hsID", "string", ")", "(", "string", ",", "error", ")", "{", "hs", ",", "err", ":=", "hostsystem", ".", "FromID", "(", "<mask>", ",", "hsID", ")", "\n", "if"...
7,006
all-7007
[ "getEnv", "returns", "the", "environment", "variable", "if", "it", "s", "declared", "in", "the", "app", ".", "It", "will", "return", "an", "error", "if", "the", "variable", "is", "not", "defined", "in", "this", "app", "." ]
[ "func", "(", "app", "*", "App", ")", "getEnv", "(", "name", "string", ")", "(", "bind", ".", "EnvVar", ",", "error", ")", "{", "if", "env", ",", "ok", ":=", "app", ".", "Env", "[", "name", "]", ";", "ok", "{", "return", "env", ",", "nil", "\n...
7,007
all-7008
[ "MarshalEasyJSON", "satisfies", "easyjson", ".", "Marshaler", "." ]
[ "func", "(", "t", "Type", ")", "MarshalEasyJSON", "(", "out", "*", "jwriter", ".", "Writer", ")", "{", "<mask>", ".", "String", "(", "string", "(", "t", ")", ")", "\n", "}" ]
7,008
all-7009
[ "Encoder", "returns", "the", "encoding", "between", "font", "code", "point", "sequences", "and", "UTF", "-", "8", "." ]
[ "func", "(", "f", "Font", ")", "Encoder", "(", ")", "TextEncoding", "{", "enc", ":=", "f", ".", "V", ".", "Key", "(", "\"", "\"", ")", "\n", "switch", "enc", ".", "Kind", "(", ")", "{", "case", "Name", ":", "switch", "enc", ".", "Name", "(", ...
7,009
all-7010
[ "multiply", "the", "current", "matrix", "by", "a", "perspective", "matrix" ]
[ "func", "Frustum", "(", "left", "float64", ",", "right", "float64", ",", "bottom", "float64", ",", "<mask>", "float64", ",", "zNear", "float64", ",", "zFar", "float64", ")", "{", "C", ".", "glowFrustum", "(", "gpFrustum", ",", "(", "C", ".", "GLdouble", ...
7,010
all-7011
[ "Restart", "restarts", "a", "machine", "which", "is", "known", "to", "be", "running", "." ]
[ "func", "(", "d", "*", "Driver", ")", "Restart", "(", ")", "error", "{", "if", "err", ":=", "d", ".", "Stop", "(", ")", ";", "err", "!=", "nil", "{", "return", "fmt", ".", "Errorf", "(", "\"", "\"", ",", "err", ")", "\n", "}", "\n\n", "if", ...
7,011
all-7012
[ "SetFromFile", "is", "a", "wrapper", "around", "gtk_status_icon_set_from_file", "()" ]
[ "func", "(", "v", "*", "StatusIcon", ")", "SetFromFile", "(", "<mask>", "string", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "filename", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", "\n", "C", ...
7,012
all-7013
[ "Calculates", "the", "per", "-", "element", "sum", "of", "an", "array", "and", "a", "scalar", ".", "dst", "=", "src", "+", "value" ]
[ "func", "AddScalar", "(", "src", "*", "IplImage", ",", "value", "Scalar", ",", "dst", "*", "IplImage", ")", "{", "AddScalarWithMask", "(", "src", ",", "<mask>", ",", "dst", ",", "nil", ")", "\n", "}" ]
7,013
all-7014
[ "Rotate", "rotates", "the", "matrix", "by", "theta", ".", "The", "unit", "is", "radian", "." ]
[ "func", "(", "g", "*", "GeoM", ")", "Rotate", "(", "theta", "float64", ")", "{", "if", "theta", "==", "0", "{", "return", "\n", "}", "\n\n", "sin64", ",", "cos64", ":=", "math", ".", "Sincos", "(", "theta", ")", "\n", "sin", ",", "cos", ":=", "...
7,014
all-7015
[ "returns", "a", "subset", "of", "a", "buffer", "object", "s", "data", "store" ]
[ "func", "GetBufferSubData", "(", "target", "uint32", ",", "offset", "int", ",", "size", "int", ",", "data", "unsafe", ".", "Pointer", ")", "{", "C", ".", "glowGetBufferSubData", "(", "gpGetBufferSubData", ",", "(", "C", ".", "GLenum", ")", "(", "target", ...
7,015
all-7016
[ "Draw", "Hello", "World" ]
[ "func", "Draw", "(", "gc", "draw2d", ".", "GraphicContext", ",", "text", "string", ")", "{", "// Draw a rounded rectangle using default colors", "draw2dkit", ".", "RoundedRectangle", "(", "gc", ",", "5", ",", "5", ",", "135", ",", "95", ",", "10", ",", "10",...
7,016
all-7017
[ "updateAppliedStatusUnsafe", "updates", "the", "container", "transitioning", "status" ]
[ "func", "(", "c", "*", "<mask>", ")", "updateAppliedStatusUnsafe", "(", "knownStatus", "apicontainerstatus", ".", "ContainerStatus", ")", "{", "if", "c", ".", "AppliedStatus", "==", "apicontainerstatus", ".", "ContainerStatusNone", "{", "return", "\n", "}", "\n\n"...
7,017
all-7018
[ "GetMethodOk", "returns", "a", "tuple", "with", "the", "Method", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "SyntheticsRequest", ")", "GetMethodOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "s", "==", "nil", "||", "s", ".", "Method", "==", "nil", "{", "return", "\"", "\"", ",", "<mask>", "\n", "}", "\n", "return", "*...
7,018
all-7019
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "SetScriptSourceParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger6", "(", "&",...
7,019
all-7020
[ "Getuint", "returns", "the", "unsigned", "integer", "value", "for", "a", "given", "key", "." ]
[ "func", "(", "c", "*", "Config", ")", "Getuint", "(", "key", "string", ")", "(", "uint", ",", "error", ")", "{", "if", "value", ",", "found", ":=", "c", ".", "data", "[", "<mask>", "]", ";", "found", "{", "v", ",", "err", ":=", "strconv", ".", ...
7,020
all-7021
[ "StartSession", "initaillizes", "a", "session", "context", ".", "This", "function", "should", "be", "called", "in", "a", "implementation", "of", "possum", ".", "HandleFunc", "." ]
[ "func", "(", "ctx", "*", "Context", ")", "StartSession", "(", "f", "session", ".", "FactoryFunc", ")", "(", "err", "error", ")", "{", "ctx", ".", "<mask>", ",", "err", "=", "f", "(", "ctx", ".", "Response", ",", "ctx", ".", "Request", ")", "\n", ...
7,021
all-7022
[ "NewClient", "creates", "a", "Boskos", "client", "for", "the", "specified", "URL", "and", "resource", "owner", ".", "Clients", "created", "with", "this", "function", "default", "to", "retrying", "failed", "connection", "attempts", "three", "times", "with", "a", ...
[ "func", "NewClient", "(", "owner", "string", ",", "url", "string", ")", "*", "Client", "{", "client", ":=", "&", "Client", "{", "url", ":", "url", ",", "owner", ":", "owner", ",", "<mask>", ":", "storage", ".", "NewMemoryStorage", "(", ")", ",", "}",...
7,022
all-7023
[ "PrettyPrintVersionNoAdditional", "returns", "a", "version", "string", "without", "version", ".", "Additional", "." ]
[ "func", "PrettyPrintVersionNoAdditional", "(", "version", "*", "pb", ".", "Version", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "<mask>", ".", "Major", ",", "version", ".", "Minor", ",", "version", ".", "Micro", ")", "\n",...
7,023
all-7024
[ "------------------------------------------------------------", "Mutator", "implementations", "------------------------------------------------------------", "MutateTransactionEnvelope", "adds", "a", "signature", "to", "the", "provided", "envelope" ]
[ "func", "(", "m", "Sign", ")", "MutateTransactionEnvelope", "(", "txe", "*", "TransactionEnvelopeBuilder", ")", "error", "{", "hash", ",", "err", ":=", "txe", ".", "<mask>", ".", "Hash", "(", ")", "\n\n", "if", "err", "!=", "nil", "{", "return", "err", ...
7,024
all-7025
[ "GetContainerResponse", "gets", "container", "response", "for", "v3", "metadata" ]
[ "func", "GetContainerResponse", "(", "containerID", "string", ",", "state", "dockerstate", ".", "TaskEngineState", ")", "(", "*", "v2", ".", "ContainerResponse", ",", "error", ")", "{", "containerResponse", ",", "err", ":=", "v2", ".", "NewContainerResponse", "(...
7,025
all-7026
[ "Returns", "information", "about", "an", "active", "attribute", "variable", "for", "the", "specified", "program", "object" ]
[ "func", "GetActiveAttrib", "(", "program", "uint32", ",", "<mask>", "uint32", ",", "bufSize", "int32", ",", "length", "*", "int32", ",", "size", "*", "int32", ",", "xtype", "*", "uint32", ",", "name", "*", "uint8", ")", "{", "syscall", ".", "Syscall9", ...
7,026
all-7027
[ "Remove", "deletes", "the", "virtual", "machine", "and", "resources", "associated", "to", "it", "." ]
[ "func", "(", "d", "*", "Driver", ")", "Remove", "(", ")", "error", "{", "if", "err", ":=", "d", ".", "checkLegacyDriver", "(", "false", ")", ";", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "// NOTE(ahmetalpbalkan):", "// - remove atte...
7,027
all-7028
[ "getConn", "is", "used", "to", "get", "a", "connection", "from", "the", "pool", "." ]
[ "func", "(", "n", "*", "NetworkTransport", ")", "getConn", "(", "target", "ServerAddress", ")", "(", "*", "netConn", ",", "error", ")", "{", "// Check for a pooled conn", "if", "conn", ":=", "n", ".", "getPooledConn", "(", "target", ")", ";", "conn", "!=",...
7,028
all-7029
[ "HandleFunc", "specifies", "a", "pair", "of", "handler", "and", "view", "to", "handle", "the", "request", "witch", "matching", "router", "." ]
[ "func", "(", "mux", "*", "ServerMux", ")", "HandleFunc", "(", "r", "router", ".", "Router", ",", "h", "HandlerFunc", ",", "v", "view", ".", "<mask>", ")", "{", "mux", ".", "routers", ".", "Add", "(", "r", ",", "h", ",", "v", ")", "\n", "}" ]
7,029
all-7030
[ "watchCommandFunc", "executes", "the", "watch", "command", "." ]
[ "func", "watchCommandFunc", "(", "c", "*", "cli", ".", "Context", ",", "ki", "<mask>", ".", "KeysAPI", ")", "{", "if", "len", "(", "c", ".", "Args", "(", ")", ")", "==", "0", "{", "handleError", "(", "c", ",", "ExitBadArgs", ",", "errors", ".", "...
7,030
all-7031
[ "expandCustomizationIPSettingsIPV6AddressSpec", "reads", "certain", "ResourceData", "keys", "and", "returns", "a", "CustomizationIPSettingsIpV6AddressSpec", "." ]
[ "func", "expandCustomizationIPSettingsIPV6AddressSpec", "(", "d", "*", "schema", ".", "ResourceData", ",", "n", "int", ",", "gwAdd", "bool", ")", "(", "*", "types", ".", "CustomizationIPSettingsIpV6AddressSpec", ",", "bool", ")", "{", "v", ",", "ok", ":=", "d"...
7,031
all-7032
[ "SetElement", "sets", "an", "element", "at", "(", "i", "j", ")", "." ]
[ "func", "(", "g", "*", "GeoM", ")", "SetElement", "(", "i", ",", "j", "int", ",", "element", "float64", ")", "{", "e", ":=", "float32", "(", "element", ")", "\n", "switch", "{", "case", "i", "==", "0", "&&", "j", "==", "0", ":", "g", ".", "a_...
7,032
all-7033
[ "Percentile", "returns", "given", "percentile", "for", "age", "of", "all", "active", "states", "at", "time", "t" ]
[ "func", "(", "b", "BundledStates", ")", "Percentile", "(", "t", "time", ".", "Time", ",", "percentile", "int", ")", "<mask>", ".", "Duration", "{", "if", "percentile", ">", "100", "||", "percentile", "<=", "0", "{", "panic", "(", "fmt", ".", "Errorf", ...
7,033
all-7034
[ "Prev", "moves", "to", "the", "previous", "position", ".", "If", "there", "are", "no", "previous", "nodes", "then", "Valid", "()", "will", "be", "false", "after", "this", "call", "." ]
[ "func", "(", "it", "*", "Iterator", ")", "Prev", "(", ")", "{", "prev", ":=", "it", ".", "<mask>", ".", "getPrev", "(", "it", ".", "nd", ",", "0", ")", "\n", "it", ".", "setNode", "(", "prev", ",", "true", ")", "\n", "}" ]
7,034
all-7035
[ "SendTextMsg", "发送文本消息" ]
[ "func", "(", "w", "*", "Webhook", ")", "SendTextMsg", "(", "content", "string", ",", "isAtAll", "bool", ",", "mobiles", "...", "string", ")", "error", "{", "return", "w", ".", "SendPayload", "(", "&", "Payload", "{", "MsgType", ":", "\"", "\"", ",", ...
7,035
all-7036
[ "GetTitle", "returns", "the", "Title", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "s", "*", "ScatterplotDefinition", ")", "GetTitle", "(", ")", "<mask>", "{", "if", "s", "==", "nil", "||", "s", ".", "Title", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "s", ".", "Title", "\n", "}" ]
7,036
all-7037
[ "Dedupe", "log", "lines", "to", "next", "only", "repeating", "every", "repeat", "duration", "." ]
[ "func", "Dedupe", "(", "next", "log", ".", "Logger", ",", "repeat", "time", ".", "Duration", ")", "*", "Deduper", "{", "d", ":=", "&", "Deduper", "{", "next", ":", "next", ",", "repeat", ":", "repeat", ",", "quit", ":", "make", "(", "chan", "struct...
7,037
all-7038
[ "PackStart", "()", "is", "a", "wrapper", "around", "gtk_tree_view_column_pack_start", "()", "." ]
[ "func", "(", "v", "*", "TreeViewColumn", ")", "PackStart", "(", "<mask>", "ICellRenderer", ",", "expand", "bool", ")", "{", "C", ".", "gtk_tree_view_column_pack_start", "(", "v", ".", "native", "(", ")", ",", "cell", ".", "toCellRenderer", "(", ")", ",", ...
7,038
all-7039
[ "Remember", "accepts", "a", "dependency", "and", "the", "data", "to", "store", "associated", "with", "that", "dep", ".", "This", "function", "converts", "the", "given", "data", "to", "a", "proper", "type", "and", "stores", "it", "interally", "." ]
[ "func", "(", "b", "*", "Brain", ")", "Remember", "(", "d", "dep", ".", "Dependency", ",", "<mask>", "interface", "{", "}", ")", "{", "b", ".", "Lock", "(", ")", "\n", "defer", "b", ".", "Unlock", "(", ")", "\n\n", "b", ".", "data", "[", "d", ...
7,039
all-7040
[ "Read", "method", "for", "io", ".", "Reader", "interface", "." ]
[ "func", "(", "bc", "*", "Base64Cleaner", ")", "Read", "(", "p", "[", "]", "byte", ")", "(", "n", "int", ",", "err", "error", ")", "{", "// Size our buf to smallest of len(p) or len(bc.buffer).", "size", ":=", "len", "(", "bc", ".", "buffer", ")", "\n", "...
7,040
all-7041
[ "Unmatched", "returns", "all", "the", "ranges", "which", "were", "never", "used", "to", "ignore", "an", "issue" ]
[ "func", "(", "d", "*", "directiveParser", ")", "Unmatched", "(", ")", "map", "[", "string", "]", "ignoredRanges", "{", "unmatched", ":=", "map", "[", "string", "]", "ignoredRanges", "{", "}", "\n", "for", "path", ",", "ranges", ":=", "range", "d", ".",...
7,041
all-7042
[ "print", "log" ]
[ "func", "(", "f", "*", "FileLogger", ")", "p", "(", "str", "string", ")", "{", "f", ".", "mu", ".", "RLock", "(", ")", "\n", "defer", "f", ".", "mu", ".", "RUnlock", "(", ")", "\n\n", "f", ".", "lg", ".", "Output", "(", "2", ",", "str", ")"...
7,042
all-7043
[ "InputChars", "return", "printable", "runes", "read", "from", "the", "keyboard", "at", "the", "time", "update", "is", "called", ".", "InputChars", "represents", "the", "environment", "s", "locale", "-", "dependent", "translation", "of", "keyboard", "input", "to"...
[ "func", "InputChars", "(", ")", "[", "]", "rune", "{", "rb", ":=", "uiDriver", "(", ")", ".", "Input", "(", ")", ".", "RuneBuffer", "(", ")", "\n", "return", "<mask>", "(", "make", "(", "[", "]", "rune", ",", "0", ",", "len", "(", "rb", ")", ...
7,043
all-7044
[ "render", "primitives", "using", "a", "count", "derived", "from", "a", "transform", "feedback", "object" ]
[ "func", "DrawTransformFeedback", "(", "mode", "uint32", ",", "<mask>", "uint32", ")", "{", "syscall", ".", "Syscall", "(", "gpDrawTransformFeedback", ",", "2", ",", "uintptr", "(", "mode", ")", ",", "uintptr", "(", "id", ")", ",", "0", ")", "\n", "}" ]
7,044
all-7045
[ "CreateOrderFromButtonCode", "creates", "an", "order", "for", "a", "given", "button", "code" ]
[ "func", "(", "c", "Client", ")", "CreateOrderFromButtonCode", "(", "buttonCode", "string", ")", "(", "*", "<mask>", ",", "error", ")", "{", "holder", ":=", "orderHolder", "{", "}", "\n", "if", "err", ":=", "c", ".", "Post", "(", "\"", "\"", "+", "but...
7,045
all-7046
[ "sanityCheck", "performs", "integrity", "checking", "of", "the", "SSA", "representation", "of", "the", "function", "fn", "and", "returns", "true", "if", "it", "was", "valid", ".", "Diagnostics", "are", "written", "to", "reporter", "if", "non", "-", "nil", "o...
[ "func", "sanityCheck", "(", "fn", "*", "Function", ",", "reporter", "<mask>", ".", "Writer", ")", "bool", "{", "if", "reporter", "==", "nil", "{", "reporter", "=", "os", ".", "Stderr", "\n", "}", "\n", "return", "(", "&", "sanity", "{", "reporter", "...
7,046
all-7047
[ "Runs", "a", "cascaded", "save", "operation", "with", "one", "configuration" ]
[ "func", "cascadeSaveWithConfig", "(", "conf", "*", "CascadeConfig", ",", "doc", "Document", ")", "(", "*", "mgo", ".", "ChangeInfo", ",", "error", ")", "{", "// Create a new map with just the props to cascade", "<mask>", ":=", "conf", ".", "Data", "\n\n", "switch"...
7,047
all-7048
[ "TODO", ":", "support", "separate", "WAL", "directory" ]
[ "func", "archive", "(", "baseDir", ",", "etcdLogPath", ",", "dataDir", "string", ")", "error", "{", "dir", ":=", "filepath", ".", "Join", "(", "baseDir", ",", "\"", "\"", ",", "<mask>", ".", "Now", "(", ")", ".", "Format", "(", "time", ".", "RFC3339"...
7,048
all-7049
[ "VerifyDockerManifestSignature", "checks", "that", "unverifiedSignature", "uses", "expectedKeyIdentity", "to", "sign", "unverifiedManifest", "as", "expectedDockerReference", "using", "mech", "." ]
[ "func", "VerifyDockerManifestSignature", "(", "unverifiedSignature", ",", "unverifiedManifest", "[", "]", "byte", ",", "expectedDockerReference", "string", ",", "mech", "SigningMechanism", ",", "expectedKeyIdentity", "string", ")", "(", "*", "Signature", ",", "error", ...
7,049
all-7050
[ "Exec", "sends", "the", "request", "a", "request", "and", "decodes", "the", "response", "." ]
[ "func", "(", "r", "*", "RequestBuilder", ")", "Exec", "(", "ctx", "context", ".", "Context", ",", "res", "interface", "{", "}", ")", "error", "{", "httpRes", ",", "err", ":=", "r", ".", "Send", "(", "ctx", ")", "\n", "if", "err", "!=", "nil", "{"...
7,050
all-7051
[ "QueryContext", "implements", "the", "database", "/", "sql", "/", "driver", "/", "QueryerContext", "interface", "." ]
[ "func", "(", "c", "*", "conn", ")", "QueryContext", "(", "ctx", "context", ".", "Context", ",", "query", "string", ",", "args", "[", "]", "driver", ".", "NamedValue", ")", "(", "rows", "driver", ".", "Rows", ",", "err", "error", ")", "{", "if", "c"...
7,051
all-7052
[ "GetOrders", "gets", "orders", "associated", "with", "an", "account" ]
[ "func", "(", "c", "<mask>", ")", "GetOrders", "(", "page", "int", ")", "(", "*", "orders", ",", "error", ")", "{", "holder", ":=", "ordersHolder", "{", "}", "\n", "params", ":=", "map", "[", "string", "]", "int", "{", "\"", "\"", ":", "page", ","...
7,052
all-7053
[ "Tap", "performs", "the", "provided", "Tap", "event", "on", "each", "element", "in", "the", "selection", "." ]
[ "func", "(", "s", "*", "Selection", ")", "Tap", "(", "event", "Tap", ")", "error", "{", "var", "touchFunc", "func", "(", "*", "api", ".", "Element", ")", "error", "\n", "switch", "event", "{", "case", "SingleTap", ":", "touchFunc", "=", "s", ".", "...
7,053
all-7054
[ "ApplyTag", "()", "is", "a", "wrapper", "around", "gtk_text_buffer_apply_tag", "()", "." ]
[ "func", "(", "v", "*", "TextBuffer", ")", "ApplyTag", "(", "tag", "*", "TextTag", ",", "<mask>", ",", "end", "*", "TextIter", ")", "{", "C", ".", "gtk_text_buffer_apply_tag", "(", "v", ".", "native", "(", ")", ",", "tag", ".", "native", "(", ")", "...
7,054
all-7055
[ "specify", "a", "one", "-", "dimensional", "texture", "image", "in", "a", "compressed", "format" ]
[ "func", "CompressedTexImage1D", "(", "target", "uint32", ",", "level", "int32", ",", "internalformat", "uint32", ",", "<mask>", "int32", ",", "border", "int32", ",", "imageSize", "int32", ",", "data", "unsafe", ".", "Pointer", ")", "{", "syscall", ".", "Sysc...
7,055
all-7056
[ "List", "the", "names", "of", "all", "secrets", ".", "By", "default", "this", "end", "-", "point", "will", "try", "to", "return", "up", "to", "1000", "secret", "names", "in", "one", "request", ".", "But", "it", "**", "may", "return", "less", "**", "e...
[ "func", "(", "secrets", "*", "Secrets", ")", "List", "(", "continuationToken", ",", "limit", "string", ")", "(", "*", "SecretsList", ",", "error", ")", "{", "v", ":=", "<mask>", ".", "Values", "{", "}", "\n", "if", "continuationToken", "!=", "\"", "\""...
7,056
all-7057
[ "String", "returns", "the", "name", "of", "e" ]
[ "func", "(", "e", "PaymentResultCode", ")", "String", "(", ")", "string", "{", "name", ",", "_", ":=", "paymentResultCodeMap", "[", "int32", "(", "e", ")", "]", "\n", "return", "<mask>", "\n", "}" ]
7,057
all-7058
[ "MiddlewareList", "list", "creates", "a", "single", "middlware", "callback", "from", "an", "array" ]
[ "func", "MiddlewareList", "(", "middlware", "[", "]", "Middleware", ")", "Middleware", "{", "return", "Middleware", "(", "func", "(", "next", "Handler", ")", "Handler", "{", "for", "_", ",", "m", ":=", "range", "middlware", "{", "next", "=", "m", "(", ...
7,058
all-7059
[ "define", "an", "array", "of", "normals" ]
[ "func", "NormalPointer", "(", "xtype", "uint32", ",", "stride", "int32", ",", "pointer", "unsafe", ".", "Pointer", ")", "{", "C", ".", "glowNormalPointer", "(", "gpNormalPointer", ",", "(", "C", ".", "GLenum", ")", "(", "xtype", ")", ",", "(", "C", "."...
7,059
all-7060
[ "Union", "returns", "the", "smallest", "rectangle", "that", "contains", "both", "r", "and", "s", "." ]
[ "func", "(", "r", "Rectangle", ")", "Union", "(", "s", "Rectangle", ")", "Rectangle", "{", "if", "r", ".", "Empty", "(", ")", "{", "return", "s", "\n", "}", "\n", "if", "s", ".", "Empty", "(", ")", "{", "<mask>", "r", "\n", "}", "\n", "if", "...
7,060
all-7061
[ "GetRequestsOk", "returns", "a", "tuple", "with", "the", "Requests", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "h", "*", "HostmapDefinition", ")", "GetRequestsOk", "(", ")", "(", "HostmapRequests", ",", "bool", ")", "{", "if", "h", "==", "nil", "||", "h", ".", "Requests", "==", "nil", "{", "return", "HostmapRequests", "{", "}", ",", "<mask>", "\n",...
7,061
all-7062
[ "Add", "adds", "a", "peer", "to", "the", "root", "peer", "list", "if", "it", "does", "not", "exist", "or", "return", "an", "existing", "peer", "if", "it", "exists", "." ]
[ "func", "(", "l", "*", "RootPeerList", ")", "Add", "(", "hostPort", "string", ")", "*", "Peer", "{", "l", ".", "RLock", "(", ")", "\n\n", "if", "p", ",", "ok", ":=", "l", ".", "peersByHostPort", "[", "hostPort", "]", ";", "ok", "{", "l", ".", "...
7,062
all-7063
[ "Base64", "returns", "a", "string", "which", "is", "the", "xdr", "-", "then", "-", "base64", "-", "encoded", "form", "of", "the", "builder", "s", "underlying", "transaction", "envelope" ]
[ "func", "(", "b", "*", "TransactionEnvelopeBuilder", ")", "Base64", "(", ")", "(", "string", ",", "error", ")", "{", "bs", ",", "<mask>", ":=", "b", ".", "Bytes", "(", ")", "\n", "return", "base64", ".", "StdEncoding", ".", "EncodeToString", "(", "bs",...
7,063
all-7064
[ "NetworkCreate", "creates", "a", "new", "network", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "NetworkCreate", "(", "name", ",", "description", "string", ",", "config", "map", "[", "string", "]", "string", ")", "(", "int64", ",", "error", ")", "{", "var", "<mask>", "int64", "\n", "err", ":=", "c", ".", ...
7,064
all-7065
[ "virtualMachineFromContainerView", "is", "a", "compatability", "method", "that", "is", "used", "when", "the", "version", "of", "vSphere", "is", "too", "old", "to", "support", "using", "SearchIndex", "s", "FindByUuid", "method", "correctly", ".", "This", "is", "m...
[ "func", "virtualMachineFromContainerView", "(", "ctx", "context", ".", "Context", ",", "client", "*", "govmomi", ".", "Client", ",", "uuid", "string", ")", "(", "object", ".", "Reference", ",", "error", ")", "{", "log", ".", "Printf", "(", "\"", "\"", ",...
7,065
all-7066
[ "Internal", "function", "called", "by", "ConnectLXD", "and", "ConnectPublicLXD" ]
[ "func", "httpsLXD", "(", "url", "string", ",", "args", "*", "ConnectionArgs", ")", "(", "ContainerServer", ",", "error", ")", "{", "// Use empty args if not specified", "if", "args", "==", "nil", "{", "args", "=", "&", "ConnectionArgs", "{", "}", "\n", "}", ...
7,066
all-7067
[ "NewIssue", "creates", "a", "new", "(", "orm", ")", "Issue", "from", "a", "github", "Issue" ]
[ "func", "NewIssue", "(", "gIssue", "*", "github", ".", "Issue", ",", "repository", "string", ")", "(", "*", "sql", ".", "Issue", ",", "error", ")", "{", "if", "gIssue", ".", "Number", "==", "nil", "||", "gIssue", ".", "Title", "==", "nil", "||", "g...
7,067
all-7068
[ "===", "abs", "(", "Vector", "ValueTypeVector", ")", "Vector", "===" ]
[ "func", "funcAbs", "(", "vals", "[", "]", "Value", ",", "args", "Expressions", ",", "enh", "*", "EvalNodeHelper", ")", "<mask>", "{", "return", "simpleFunc", "(", "vals", ",", "enh", ",", "math", ".", "Abs", ")", "\n", "}" ]
7,068
all-7069
[ "Enqueue", "enqueues", "a", "drawing", "command", "other", "than", "a", "draw", "-", "image", "command", ".", "For", "a", "draw", "-", "image", "command", "use", "EnqueueDrawTrianglesCommand", "." ]
[ "func", "(", "q", "*", "commandQueue", ")", "Enqueue", "(", "command", "command", ")", "{", "// TODO: If dst is the screen, reorder the command to be the last.", "q", ".", "commands", "=", "<mask>", "(", "q", ".", "commands", ",", "command", ")", "\n", "}" ]
7,069
all-7070
[ "RemoteAddr", "returns", "the", "remote", "network", "address", "." ]
[ "func", "(", "c", "*", "Conn", ")", "RemoteAddr", "(", ")", "<mask>", ".", "Addr", "{", "ws", ":=", "c", ".", "ws", ".", "Load", "(", ")", ".", "(", "*", "websocket", ".", "Conn", ")", "\n", "if", "ws", "==", "nil", "{", "return", "nil", "\n"...
7,070
all-7071
[ "Flush", "removes", "all", "the", "items", "in", "the", "cache", "after", "expiration", "seconds", ".", "If", "expiration", "is", "<", "=", "0", "it", "removes", "all", "the", "items", "right", "now", "." ]
[ "func", "(", "c", "*", "Client", ")", "Flush", "(", "expiration", "int", ")", "error", "{", "servers", ",", "err", ":=", "c", ".", "servers", ".", "Servers", "(", ")", "\n", "var", "failed", "[", "]", "*", "Addr", "\n", "var", "errs", "[", "]", ...
7,071
all-7072
[ "expandVirtualMachineResourceAllocation", "reads", "the", "VM", "resource", "allocation", "resource", "data", "keys", "for", "the", "type", "supplied", "by", "key", "and", "returns", "an", "appropriate", "types", ".", "ResourceAllocationInfo", "reference", "." ]
[ "func", "expandVirtualMachineResourceAllocation", "(", "d", "*", "schema", ".", "ResourceData", ",", "key", "string", ")", "*", "types", ".", "ResourceAllocationInfo", "{", "shareLevelKey", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "key", ")", "\n", ...
7,072
all-7073
[ "HasEnv", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "t", "*", "TraceServiceDefinition", ")", "HasEnv", "(", ")", "bool", "{", "if", "t", "!=", "nil", "&&", "t", ".", "Env", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
7,073
all-7074
[ "OnRecv", "causes", "all", "requests", "received", "on", "conn", "to", "invoke", "f", "(", "req", "nil", ")", "and", "all", "responses", "to", "invoke", "f", "(", "req", "resp", ")" ]
[ "func", "OnRecv", "(", "f", "func", "(", "*", "<mask>", ",", "*", "Response", ")", ")", "ConnOpt", "{", "return", "func", "(", "c", "*", "Conn", ")", "{", "c", ".", "onRecv", "=", "append", "(", "c", ".", "onRecv", ",", "f", ")", "}", "\n", "...
7,074
all-7075
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "MoveToReturns", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom29", "(", "&", "r", ...
7,075
all-7076
[ "Delete", "()", "is", "a", "wrapper", "around", "gtk_text_buffer_delete", "()", "." ]
[ "func", "(", "v", "*", "TextBuffer", ")", "Delete", "(", "start", ",", "<mask>", "*", "TextIter", ")", "{", "C", ".", "gtk_text_buffer_delete", "(", "v", ".", "native", "(", ")", ",", "(", "*", "C", ".", "GtkTextIter", ")", "(", "start", ")", ",", ...
7,076
all-7077
[ "forStateSample", "returns", "the", "sample", "for", "ALERTS_FOR_STATE", "." ]
[ "func", "(", "r", "*", "AlertingRule", ")", "forStateSample", "(", "alert", "*", "Alert", ",", "ts", "time", ".", "Time", ",", "v", "float64", ")", "promql", ".", "Sample", "{", "lb", ":=", "labels", ".", "NewBuilder", "(", "r", ".", "labels", ")", ...
7,077
all-7078
[ "LookupShadow", "looks", "for", "the", "entry", "for", "the", "given", "user", "name", "." ]
[ "func", "LookupShadow", "(", "name", "string", ")", "(", "*", "Shadow", ",", "error", ")", "{", "entries", ",", "err", ":=", "LookupInShadow", "(", "S_NAME", ",", "<mask>", ",", "1", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ",", "...
7,078
all-7079
[ "GetCombinedStatus", "returns", "the", "overall", "status", "for", "a", "commit", "." ]
[ "func", "(", "f", "*", "FakeClient", ")", "GetCombinedStatus", "(", "<mask>", ",", "repo", ",", "ref", "string", ")", "(", "*", "github", ".", "CombinedStatus", ",", "error", ")", "{", "return", "f", ".", "CombinedStatuses", "[", "ref", "]", ",", "nil"...
7,079
all-7080
[ "Query", "querys", "form", "parameter", "." ]
[ "func", "(", "ctx", "*", "<mask>", ")", "Query", "(", "name", "string", ")", "string", "{", "ctx", ".", "parseForm", "(", ")", "\n", "return", "ctx", ".", "Req", ".", "Form", ".", "Get", "(", "name", ")", "\n", "}" ]
7,080
all-7081
[ "SetApplicationID", "is", "a", "wrapper", "around", "g_application_set_application_id", "()", "." ]
[ "func", "(", "v", "*", "Application", ")", "SetApplicationID", "(", "id", "string", ")", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "<mask>", ")", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".",...
7,081
all-7082
[ "commandPath", "is", "like", "cobra", ".", "Command", ".", "CommandPath", "but", "tweaked", "to", "use", "c", ".", "Use", "instead", "of", "c", ".", "Name", "for", "the", "root", "command", "so", "it", "works", "with", "viewcore", "s", "unusual", "comman...
[ "func", "commandPath", "(", "c", "*", "cobra", ".", "Command", ")", "string", "{", "if", "c", ".", "HasParent", "(", ")", "{", "return", "commandPath", "(", "c", ")", "+", "\"", "\"", "+", "c", ".", "<mask>", "(", ")", "\n", "}", "\n", "return", ...
7,082
all-7083
[ "Kill", "this", "function", "as", "soon", "as", "zfs", "is", "fixed", "." ]
[ "func", "(", "c", "*", "containerLXC", ")", "StorageStartSensitive", "(", ")", "(", "bool", ",", "error", ")", "{", "// Initialize storage interface for the container.", "err", ":=", "c", ".", "initStorage", "(", ")", "\n", "if", "err", "!=", "nil", "{", "re...
7,083
all-7084
[ "Records", "returns", "the", "list", "of", "records", "in", "a", "given", "zone", "." ]
[ "func", "(", "p", "*", "LinodeProvider", ")", "Records", "(", ")", "(", "[", "]", "*", "endpoint", ".", "Endpoint", ",", "error", ")", "{", "zones", ",", "err", ":=", "p", ".", "Zones", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "...
7,084
all-7085
[ "Validate", "checks", "that", "the", "minimum", "fields", "are", "provided", ".", "Deprecated", ":", "This", "map", "be", "deleted", "after", "the", "native", "library", "replaces", "Ruby", "deps", "and", "should", "not", "be", "used", "outside", "of", "this...
[ "func", "(", "v", "*", "VerifyMessageRequest", ")", "Validate", "(", ")", "error", "{", "v", ".", "Args", "=", "[", "]", "string", "{", "}", "\n\n", "if", "len", "(", "v", ".", "PactURLs", ")", "!=", "0", "{", "v", ".", "Args", "=", "append", "...
7,085
all-7086
[ "establish", "a", "buffer", "for", "selection", "mode", "values" ]
[ "func", "SelectBuffer", "(", "size", "int32", ",", "<mask>", "*", "uint32", ")", "{", "syscall", ".", "Syscall", "(", "gpSelectBuffer", ",", "2", ",", "uintptr", "(", "size", ")", ",", "uintptr", "(", "unsafe", ".", "Pointer", "(", "buffer", ")", ")", ...
7,086
all-7087
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "AppManifestError", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage82", "(", "&", "r", ...
7,087
all-7088
[ "appendConfigurationEntry", "changes", "the", "configuration", "and", "adds", "a", "new", "configuration", "entry", "to", "the", "log", ".", "This", "must", "only", "be", "called", "from", "the", "main", "thread", "." ]
[ "func", "(", "r", "*", "Raft", ")", "appendConfigurationEntry", "(", "<mask>", "*", "configurationChangeFuture", ")", "{", "configuration", ",", "err", ":=", "nextConfiguration", "(", "r", ".", "configurations", ".", "latest", ",", "r", ".", "configurations", ...
7,088
all-7089
[ "NewURIFromHostPort", "returns", "a", "URI", "with", "specified", "host", "and", "port", "." ]
[ "func", "NewURIFromHostPort", "(", "host", "string", ",", "port", "uint16", ")", "(", "*", "URI", ",", "error", ")", "{", "uri", ":=", "DefaultURI", "(", ")", "\n", "err", ":=", "uri", ".", "SetHost", "(", "<mask>", ")", "\n", "if", "err", "!=", "n...
7,089
all-7090
[ "CookbookLocator", "builds", "a", "locator", "from", "the", "given", "href", "." ]
[ "func", "(", "api", "*", "API", ")", "CookbookLocator", "(", "href", "<mask>", ")", "*", "CookbookLocator", "{", "return", "&", "CookbookLocator", "{", "Href", "(", "href", ")", ",", "api", "}", "\n", "}" ]
7,090
all-7091
[ "Shrink", "a", "database", "/", "global", "/", "logs", ".", "db", "that", "grew", "unwildly", "due", "to", "a", "bug", "in", "the", "3", ".", "6", "release", "." ]
[ "func", "patchShrinkLogsDBFile", "(", "name", "string", ",", "d", "*", "Daemon", ")", "error", "{", "dir", ":=", "filepath", ".", "Join", "(", "d", ".", "os", ".", "VarDir", ",", "\"", "\"", ",", "\"", "\"", ")", "\n", "info", ",", "err", ":=", "...
7,091
all-7092
[ "taskStateChangesToSend", "gets", "a", "list", "task", "state", "changes", "for", "container", "events", "that", "have", "been", "batched", "and", "not", "sent", "beyond", "the", "drainEventsFrequency", "threshold" ]
[ "func", "(", "handler", "*", "TaskHandler", ")", "taskStateChangesToSend", "(", ")", "[", "]", "api", ".", "TaskStateChange", "{", "handler", ".", "lock", ".", "RLock", "(", ")", "\n", "defer", "handler", ".", "lock", ".", "RUnlock", "(", ")", "\n\n", ...
7,092
all-7093
[ "Value", "converts", "DateTime", "to", "a", "primitive", "value", "ready", "to", "written", "to", "a", "database", "." ]
[ "func", "(", "t", "DateTime", ")", "<mask>", "(", ")", "(", "driver", ".", "Value", ",", "error", ")", "{", "return", "driver", ".", "Value", "(", "t", ".", "String", "(", ")", ")", ",", "nil", "\n", "}" ]
7,093
all-7094
[ "Next", "moves", "over", "the", "boundary", "to", "the", "next", "part", "returns", "true", "if", "there", "is", "another", "part", "to", "be", "read", "." ]
[ "func", "(", "b", "*", "boundaryReader", ")", "Next", "(", ")", "(", "bool", ",", "error", ")", "{", "if", "b", ".", "finished", "{", "return", "false", ",", "nil", "\n", "}", "\n", "if", "b", ".", "partsRead", ">", "0", "{", "// Exhaust the curren...
7,094
all-7095
[ "DeleteField", "deletes", "a", "field", "on", "the", "server", "." ]
[ "func", "(", "c", "*", "Client", ")", "DeleteField", "(", "field", "*", "Field", ")", "error", "{", "span", ":=", "c", ".", "tracer", ".", "StartSpan", "(", "\"", "\"", ")", "\n", "defer", "span", ".", "Finish", "(", ")", "\n\n", "path", ":=", "f...
7,095
all-7096
[ "Auth", "-", "fake", "out", "making", "an", "auth", "call" ]
[ "func", "(", "s", "*", "FakeVCDClient", ")", "Auth", "(", "username", ",", "<mask>", "string", ")", "(", "err", "error", ")", "{", "return", "s", ".", "ErrAuthFake", "\n", "}" ]
7,096
all-7097
[ "/", "*", "Get", "the", "state", "of", "a", "single", "channel", "." ]
[ "func", "(", "c", "*", "Client", ")", "Channel", "(", "name", "string", ",", "additionalQueries", "map", "[", "string", "]", "string", ")", "(", "*", "Channel", ",", "error", ")", "{", "path", ":=", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "c",...
7,097
all-7098
[ "CertDelete", "deletes", "a", "certificate", "from", "the", "db", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "CertDelete", "(", "fingerprint", "string", ")", "error", "{", "err", ":=", "exec", "(", "c", ".", "<mask>", ",", "\"", "\"", ",", "fingerprint", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n"...
7,098
all-7099
[ "Do", "executes", "Emulation", ".", "setUserAgentOverride", "against", "the", "provided", "context", "." ]
[ "func", "(", "p", "*", "SetUserAgentOverrideParams", ")", "Do", "(", "ctx", "<mask>", ".", "Context", ")", "(", "err", "error", ")", "{", "return", "cdp", ".", "Execute", "(", "ctx", ",", "CommandSetUserAgentOverride", ",", "p", ",", "nil", ")", "\n", ...
7,099
all-7100
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "DispatchMouseEventParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8", "(", "&",...