id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
23,500
all-23501
[ "findInGopath", "searches", "the", "gopath", "for", "the", "named", "import", "directory", "." ]
[ "func", "findInGopath", "(", "dir", "string", ",", "gopath", "[", "]", "string", ")", "(", "string", ",", "error", ")", "{", "for", "_", ",", "v", ":=", "range", "gopath", "{", "dst", ":=", "filepath", ".", "Join", "(", "v", ",", "\"", "\"", ",",...
23,501
all-23502
[ "Get", "returns", "the", "cached", "vm", ".", "ByteCode", "if", "available" ]
[ "func", "(", "c", "*", "FileCache", ")", "Get", "(", "<mask>", "string", ")", "(", "*", "CacheEntity", ",", "error", ")", "{", "path", ":=", "c", ".", "GetCachePath", "(", "key", ")", "\n\n", "// Need to avoid race condition", "file", ",", "err", ":=", ...
23,502
all-23503
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "QuerySelectorReturns", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom19", "(", "&", "w", ",", "v", ")",...
23,503
all-23504
[ "CursorNewFromName", "is", "a", "wrapper", "around", "gdk_cursor_new_from_name", "()", "." ]
[ "func", "CursorNewFromName", "(", "<mask>", "*", "Display", ",", "name", "string", ")", "(", "*", "Cursor", ",", "error", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "name", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", ...
23,504
all-23505
[ "Remove", "indicates", "an", "expected", "call", "of", "Remove" ]
[ "func", "(", "mr", "*", "MockControlMockRecorder", ")", "Remove", "(", "arg0", "<mask>", "{", "}", ")", "*", "gomock", ".", "Call", "{", "return", "mr", ".", "mock", ".", "ctrl", ".", "RecordCallWithMethodType", "(", "mr", ".", "mock", ",", "\"", "\"",...
23,505
all-23506
[ "Seek", "is", "implementation", "of", "io", ".", "Seeker", "s", "Seek", "." ]
[ "func", "(", "s", "*", "stream", ")", "Seek", "(", "offset", "int64", ",", "whence", "int", ")", "(", "int64", ",", "error", ")", "{", "switch", "whence", "{", "case", "io", ".", "SeekStart", ":", "offset", "=", "offset", "+", "s", ".", "headerSize...
23,506
all-23507
[ "HasAggregator", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "ScatterplotRequest", ")", "HasAggregator", "(", ")", "bool", "{", "if", "s", "!=", "nil", "&&", "s", ".", "Aggregator", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
23,507
all-23508
[ "NewClient", "-", "constructor", "for", "a", "new", "dispenser", "client" ]
[ "func", "NewClient", "(", "apiKey", "string", ",", "url", "string", ",", "client", "clientDoer", ")", "*", "PDClient", "{", "return", "&", "PDClient", "{", "APIKey", ":", "apiKey", ",", "client", ":", "client", ",", "URL", ":", "<mask>", ",", "}", "\n"...
23,508
all-23509
[ "getLedger", "gets", "a", "copy", "of", "the", "device", "and", "caches", "it" ]
[ "func", "getLedger", "(", ")", "(", "*", "ledger", ".", "Ledger", ",", "error", ")", "{", "var", "err", "error", "\n", "if", "device", "==", "nil", "{", "device", ",", "err", "=", "ledger", ".", "FindLedger", "(", ")", "\n", "}", "\n", "return", ...
23,509
all-23510
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "<mask>", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache", "(", "&", "w", ",", "v", ")", ...
23,510
all-23511
[ "UpdateSpaceUsers", "-" ]
[ "func", "(", "m", "*", "DefaultManager", ")", "UpdateSpaceUsers", "(", ")", "error", "{", "uaaUsers", ",", "err", ":=", "m", ".", "UAAMgr", ".", "ListUsers", "(", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\n\n", "spaceCon...
23,511
all-23512
[ "LoadConfig", "reads", "the", "yaml", "config", "at", "path" ]
[ "func", "LoadConfig", "(", "path", "string", ",", "orgs", "string", ")", "(", "*", "Configuration", ",", "error", ")", "{", "if", "path", "==", "\"", "\"", "{", "return", "nil", ",", "errors", ".", "New", "(", "\"", "\"", ")", "\n", "}", "\n", "v...
23,512
all-23513
[ "RequestURI", "returns", "request", "s", "URI", "." ]
[ "func", "(", "req", "*", "<mask>", ")", "RequestURI", "(", ")", "[", "]", "byte", "{", "if", "req", ".", "parsedURI", "{", "requestURI", ":=", "req", ".", "uri", ".", "RequestURI", "(", ")", "\n", "req", ".", "SetRequestURIBytes", "(", "requestURI", ...
23,513
all-23514
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "DetachFromTargetParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget21", "(", "&", "w", ",", "v",...
23,514
all-23515
[ "Unmarshal", "deserializes", "raw", "into", "the", "out", "value", ".", "If", "the", "out", "value", "type", "is", "not", "compatible", "with", "raw", "a", "*", "bson", ".", "TypeError", "is", "returned", ".", "See", "the", "Unmarshal", "function", "docume...
[ "func", "(", "raw", "Raw", ")", "Unmarshal", "(", "out", "interface", "{", "}", ")", "(", "err", "error", ")", "{", "defer", "handleErr", "(", "&", "err", ")", "\n", "v", ":=", "reflect", ".", "ValueOf", "(", "out", ")", "\n", "switch", "v", ".",...
23,515
all-23516
[ "Release", "decrements", "a", "socket", "reference", ".", "The", "socket", "will", "be", "recycled", "once", "its", "released", "as", "many", "times", "as", "it", "s", "been", "acquired", "." ]
[ "func", "(", "socket", "*", "mongoSocket", ")", "Release", "(", ")", "{", "socket", ".", "Lock", "(", ")", "\n", "if", "socket", ".", "references", "==", "0", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n", "socket", ".", "references", "--", ...
23,516
all-23517
[ "/", "*", "dgr", "/", "yopla" ]
[ "func", "(", "n", "ACFullname", ")", "ShortName", "(", ")", "string", "{", "name", ":=", "n", ".", "Name", "(", ")", "\n", "if", "!", "strings", ".", "Contains", "(", "name", ",", "\"", "\"", ")", "{", "return", "<mask>", "\n", "}", "\n", "return...
23,517
all-23518
[ "Save", "the", "current", "session", "." ]
[ "func", "(", "s", "*", "Session", ")", "Save", "(", ")", "error", "{", "return", "s", ".", "<mask>", ".", "Save", "(", "s", ".", "req", ",", "s", ".", "res", ")", "\n", "}" ]
23,518
all-23519
[ "TODO", "(", "jrick", ")", "GtkIconSet", "/", "*", "func", "(", "v", "*", "Image", ")", "SetFromIconSet", "()", "{", "}", "TODO", "(", "jrick", ")", "GdkPixbufAnimation", "/", "*", "func", "(", "v", "*", "Image", ")", "SetFromAnimation", "()", "{", "...
[ "func", "(", "v", "*", "Image", ")", "SetFromIconName", "(", "iconName", "string", ",", "<mask>", "IconSize", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "iconName", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "cst...
23,519
all-23520
[ "Unregisters", "Handler", "from", "the", "EventController", ".", "This", "is", "idempotent", "where", "if", "a", "Handler", "is", "not", "registered", "no", "error", "is", "returned", "." ]
[ "func", "(", "e", "*", "EventController", ")", "UnregisterHandler", "(", "n", "string", ")", "error", "{", "e", ".", "handlerMutex", ".", "Lock", "(", ")", "\n", "<mask>", "(", "e", ".", "Handlers", ",", "n", ")", "\n", "e", ".", "handlerMutex", ".",...
23,520
all-23521
[ "Do", "performs", "a", "Request", "using", "macaroon", "authentication", "if", "set", "." ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "<mask>", "(", "req", "*", "http", ".", "Request", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "if", "r", ".", "bakeryClient", "!=", "nil", "{", "r", ".", "addMacaroonHeaders", "(", "re...
23,521
all-23522
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "DispatchKeyEventParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9", "(", "&", ...
23,522
all-23523
[ "HasLayoutVersion", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "w", "*", "Widget", ")", "HasLayoutVersion", "(", ")", "bool", "{", "if", "w", "!=", "nil", "&&", "w", ".", "LayoutVersion", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
23,523
all-23524
[ "DoDeadline", "performs", "the", "given", "request", "and", "waits", "for", "response", "until", "the", "given", "deadline", ".", "Request", "must", "contain", "at", "least", "non", "-", "zero", "RequestURI", "with", "full", "url", "(", "including", "scheme", ...
[ "func", "(", "c", "*", "PipelineClient", ")", "DoDeadline", "(", "req", "*", "Request", ",", "resp", "*", "<mask>", ",", "deadline", "time", ".", "Time", ")", "error", "{", "return", "c", ".", "getConnClient", "(", ")", ".", "DoDeadline", "(", "req", ...
23,524
all-23525
[ "Write", "allows", "GRPCInfoWriter", "to", "implement", "the", "io", ".", "Writer", "interface", ".", "This", "will", "take", "gRPC", "logs", "which", "look", "something", "like", "this", ":", "INFO", ":", "2019", "/", "02", "/", "18", "12", ":", "21", ...
[ "func", "(", "l", "*", "GRPCLogWriter", ")", "Write", "(", "p", "[", "]", "byte", ")", "(", "int", ",", "error", ")", "{", "parts", ":=", "strings", ".", "SplitN", "(", "string", "(", "p", ")", ",", "\"", "\"", ",", "4", ")", "\n", "entry", "...
23,525
all-23526
[ "WriteFile", "-" ]
[ "func", "WriteFile", "(", "configFile", "string", ",", "dataType", "interface", "{", "}", ")", "error", "{", "<mask>", ",", "err", ":=", "yaml", ".", "Marshal", "(", "dataType", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "\n", "}", "\...
23,526
all-23527
[ "specify", "storage", "for", "a", "two", "-", "dimensional", "multisample", "array", "texture" ]
[ "func", "TexStorage3DMultisample", "(", "target", "uint32", ",", "samples", "int32", ",", "internalformat", "uint32", ",", "width", "int32", ",", "height", "int32", ",", "depth", "int32", ",", "fixedsamplelocations", "bool", ")", "{", "C", ".", "glowTexStorage3D...
23,527
all-23528
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "Key", ")", "MarshalJSON", "(", ")", "(", "[", "]", "<mask>", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb10", "(", "&", "w", ",", "v", ")", "\n", ...
23,528
all-23529
[ "GetChannelsUsage", "returns", "detailed", "usage", "on", "channels", "." ]
[ "func", "(", "h", "*", "Handler", ")", "GetChannelsUsage", "(", "tkn", "string", ",", "<mask>", "[", "]", "string", ")", "(", "map", "[", "string", "]", "Usage", ",", "error", ")", "{", "logger", ":=", "h", ".", "logger", ".", "Add", "(", "\"", "...
23,529
all-23530
[ "Add", "adds", "a", "new", "set", "of", "container", "stats", "to", "the", "queue", "." ]
[ "func", "(", "queue", "*", "Queue", ")", "Add", "(", "dockerStat", "*", "types", ".", "StatsJSON", ")", "error", "{", "queue", ".", "setLastStat", "(", "dockerStat", ")", "\n", "stat", ",", "err", ":=", "dockerStatsToContainerStats", "(", "dockerStat", ")"...
23,530
all-23531
[ "Write", "implements", "Handler", "interface" ]
[ "func", "(", "h", "*", "TimeRotatingFileHandler", ")", "Write", "(", "b", "[", "]", "<mask>", ")", "(", "n", "int", ",", "err", "error", ")", "{", "h", ".", "doRollover", "(", ")", "\n", "return", "h", ".", "fd", ".", "Write", "(", "b", ")", "\...
23,531
all-23532
[ "GetCgroupMountPath", "returns", "cgroup", "mount", "path", "of", "the", "resource" ]
[ "func", "(", "cgroup", "*", "CgroupResource", ")", "GetCgroupMountPath", "(", ")", "string", "{", "cgroup", ".", "<mask>", ".", "RLock", "(", ")", "\n", "defer", "cgroup", ".", "lock", ".", "RUnlock", "(", ")", "\n", "return", "cgroup", ".", "cgroupMount...
23,532
all-23533
[ "NewEC2MetadataClient", "creates", "an", "ec2metadata", "client", "to", "retrieve", "metadata" ]
[ "func", "NewEC2MetadataClient", "(", "client", "HttpClient", ")", "EC2MetadataClient", "{", "if", "client", "==", "nil", "{", "return", "&", "ec2MetadataClientImpl", "{", "<mask>", ":", "ec2metadata", ".", "New", "(", "session", ".", "New", "(", ")", ",", "a...
23,533
all-23534
[ "GetCairoContext", "()", "is", "a", "wrapper", "around", "gtk_print_context_get_cairo_context", "()", "." ]
[ "func", "(", "pc", "*", "PrintContext", ")", "GetCairoContext", "(", ")", "*", "cairo", ".", "Context", "{", "c", ":=", "C", ".", "gtk_print_context_get_cairo_context", "(", "<mask>", ".", "native", "(", ")", ")", "\n", "return", "cairo", ".", "WrapContext...
23,534
all-23535
[ "GetPopup", "is", "a", "wrapper", "around", "gtk_menu_button_get_popup", "()", "." ]
[ "func", "(", "v", "*", "MenuButton", ")", "GetPopup", "(", ")", "*", "<mask>", "{", "c", ":=", "C", ".", "gtk_menu_button_get_popup", "(", "v", ".", "native", "(", ")", ")", "\n", "if", "c", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "re...
23,535
all-23536
[ "copy", "a", "block", "of", "pixels", "from", "one", "framebuffer", "object", "to", "another" ]
[ "func", "BlitFramebuffer", "(", "srcX0", "int32", ",", "srcY0", "int32", ",", "srcX1", "int32", ",", "srcY1", "int32", ",", "dstX0", "int32", ",", "dstY0", "int32", ",", "dstX1", "int32", ",", "dstY1", "int32", ",", "mask", "uint32", ",", "filter", "uint...
23,536
all-23537
[ "uppercase", "first", "character" ]
[ "func", "(", "<mask>", "*", "Ruleset", ")", "Capitalize", "(", "word", "string", ")", "string", "{", "return", "strings", ".", "ToUpper", "(", "word", "[", ":", "1", "]", ")", "+", "word", "[", "1", ":", "]", "\n", "}" ]
23,537
all-23538
[ "serverConn", "returns", "a", "loggingConn", "at", "the", "opposite", "end", "of", "the", "loggingPipe", "of", "clientConn", "(", "see", "the", "clientConn", "description", "for", "more", "information", ")" ]
[ "func", "(", "p", "*", "loggingPipe", ")", "serverConn", "(", ")", "*", "loggingConn", "{", "return", "&", "loggingConn", "{", "<mask>", ":", "p", ",", "r", ":", "p", ".", "serverReader", ",", "w", ":", "p", ".", "clientWriter", ",", "}", "\n", "}"...
23,538
all-23539
[ "NewTargets", "is", "a", "convenience", "method", "to", "create", "a", "new", "Targets", "object", "from", "a", "vararg", "of", "strings" ]
[ "func", "NewTargets", "(", "<mask>", "...", "string", ")", "Targets", "{", "t", ":=", "make", "(", "Targets", ",", "0", ",", "len", "(", "target", ")", ")", "\n", "t", "=", "append", "(", "t", ",", "target", "...", ")", "\n", "return", "t", "\n",...
23,539
all-23540
[ "Translate", "translates", "the", "matrix", "by", "(", "tx", "ty", ")", "." ]
[ "func", "(", "g", "*", "GeoM", ")", "Translate", "(", "tx", ",", "ty", "float64", ")", "{", "g", ".", "tx", "+=", "float32", "(", "<mask>", ")", "\n", "g", ".", "ty", "+=", "float32", "(", "ty", ")", "\n", "}" ]
23,540
all-23541
[ "SetShowCloseButton", "is", "a", "wrapper", "around", "gtk_search_bar_set_show_close_button", "()" ]
[ "func", "(", "v", "*", "SearchBar", ")", "SetShowCloseButton", "(", "<mask>", "bool", ")", "{", "C", ".", "gtk_search_bar_set_show_close_button", "(", "v", ".", "native", "(", ")", ",", "gbool", "(", "visible", ")", ")", "\n", "}" ]
23,541
all-23542
[ "SetKnownStatus", "safely", "sets", "the", "currently", "known", "status", "of", "the", "resource" ]
[ "func", "(", "cgroup", "*", "CgroupResource", ")", "SetKnownStatus", "(", "<mask>", "resourcestatus", ".", "ResourceStatus", ")", "{", "cgroup", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "cgroup", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "c...
23,542
all-23543
[ "Fatal", "logging" ]
[ "func", "(", "l", "*", "StdLevelLogger", ")", "Fatal", "(", "args", "...", "interface", "{", "}", ")", "{", "l", ".", "logFunc", "(", "FatalLevel", ",", "l", ".", "<mask>", ",", "args", "...", ")", "\n", "}" ]
23,543
all-23544
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetProcessInfoReturns", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo1", "(", ...
23,544
all-23545
[ "FailPipeline", "updates", "the", "pipeline", "s", "state", "to", "failed", "and", "sets", "the", "failure", "reason" ]
[ "func", "FailPipeline", "(", "ctx", "context", ".", "Context", ",", "etcdClient", "*", "etcd", ".", "Client", ",", "pipelinesCollection", "col", ".", "Collection", ",", "pipelineName", "string", ",", "<mask>", "string", ")", "error", "{", "_", ",", "err", ...
23,545
all-23546
[ "IsFile", "tests", "the", "existence", "of", "a", "file", "in", "the", "guest", "operating", "system", ".", "Parameters", ":", "filepath", ":", "The", "path", "to", "the", "file", "to", "be", "tested", ".", "Remarks", ":", "*", "Only", "absolute", "paths...
[ "func", "(", "g", "*", "Guest", ")", "IsFile", "(", "filepath", "string", ")", "(", "bool", ",", "error", ")", "{", "var", "jobHandle", "C", ".", "VixHandle", "=", "C", ".", "VIX_INVALID_HANDLE", "\n", "var", "err", "C", ".", "VixError", "=", "C", ...
23,546
all-23547
[ "RegistryRepoName", "returns", "the", "repository", "as", "used", "in", "the", "registry", "URL" ]
[ "func", "(", "n", "ImageName", ")", "RegistryRepoName", "(", ")", "string", "{", "repo", ":=", "n", ".", "Repository", "\n", "if", "repo", "==", "\"", "\"", "{", "repo", "=", "\"", "\"", "\n", "}", "\n", "return", "fmt", ".", "Sprintf", "(", "\"", ...
23,547
all-23548
[ "UnmarshalEasyJSON", "satisfies", "easyjson", ".", "Unmarshaler", "." ]
[ "func", "(", "t", "*", "BreakLocationType", ")", "UnmarshalEasyJSON", "(", "in", "*", "jlexer", ".", "Lexer", ")", "{", "switch", "BreakLocationType", "(", "in", ".", "String", "(", ")", ")", "{", "case", "BreakLocationTypeDebuggerStatement", ":", "*", "t", ...
23,548
all-23549
[ "GetCluster", "returns", "information", "about", "a", "cluster", "If", "this", "client", "is", "not", "trusted", "the", "password", "must", "be", "supplied" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "GetCluster", "(", ")", "(", "*", "api", ".", "Cluster", ",", "string", ",", "error", ")", "{", "if", "!", "r", ".", "HasExtension", "(", "\"", "\"", ")", "{", "return", "nil", ",", "\"", "\"", ",", "f...
23,549
all-23550
[ "Close", "closes", "the", "stream", ".", "When", "closing", "the", "stream", "owned", "by", "the", "player", "will", "also", "be", "closed", "by", "calling", "its", "Close", ".", "This", "means", "that", "the", "source", "stream", "passed", "via", "NewPlay...
[ "func", "(", "p", "*", "Player", ")", "Close", "(", ")", "<mask>", "{", "runtime", ".", "SetFinalizer", "(", "p", ",", "nil", ")", "\n", "return", "p", ".", "p", ".", "Close", "(", ")", "\n", "}" ]
23,550
all-23551
[ "GetEndOk", "returns", "a", "tuple", "with", "the", "End", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "d", "*", "Downtime", ")", "GetEndOk", "(", ")", "(", "int", ",", "bool", ")", "{", "if", "d", "==", "nil", "||", "d", ".", "End", "==", "nil", "{", "return", "0", ",", "false", "\n", "}", "\n", "return", "*", "d", ".", "End", ...
23,551
all-23552
[ "Skew", "skews", "the", "matrix", "by", "(", "skewX", "skewY", ")", ".", "The", "unit", "is", "radian", "." ]
[ "func", "(", "g", "*", "GeoM", ")", "Skew", "(", "skewX", ",", "skewY", "float64", ")", "{", "sx64", ":=", "math", ".", "Tan", "(", "skewX", ")", "\n", "sy64", ":=", "math", ".", "Tan", "(", "skewY", ")", "\n", "sx", ",", "sy", ":=", "float32",...
23,552
all-23553
[ "Clean", "mocks", "base", "method" ]
[ "func", "(", "m", "*", "MockManager", ")", "Clean", "(", "arg0", "string", ")", "error", "{", "ret", ":=", "m", ".", "ctrl", ".", "Call", "(", "m", ",", "\"", "\"", ",", "arg0", ")", "\n", "ret0", ",", "_", ":=", "<mask>", "[", "0", "]", ".",...
23,553
all-23554
[ "In", "this", "example", "we", "will", "see", "how", "custom", "templates", "are", "cached", "the", "same", "code", "snippet", "(", "httpcache", ".", "CacheFasthttp", ")", "is", "working", "for", "fasthttp", "-", "everything", "else", ".", "Here", "we", "r...
[ "func", "init", "(", ")", "{", "e", ":=", "<mask>", ".", "New", "(", "html", ".", "Config", "{", "Layout", ":", "\"", "\"", "}", ")", "\n", "template", ".", "AddEngine", "(", "e", ")", "\n", "if", "err", ":=", "template", ".", "Load", "(", ")",...
23,554
all-23555
[ "Unsubscribe", "handler", "from", "the", "bus", ".", "It", "will", "return", "false", "if", "the", "handler", "not", "subscribed", "." ]
[ "func", "(", "b", "*", "Bus", ")", "Unsubscribe", "(", "h", "<mask>", ")", "bool", "{", "b", ".", "mu", ".", "Lock", "(", ")", "\n", "defer", "b", ".", "mu", ".", "Unlock", "(", ")", "\n\n", "for", "i", ",", "v", ":=", "range", "b", ".", "h...
23,555
all-23556
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetInlineStylesForNodeReturns", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss43", "(", "&", "w", ",", "v...
23,556
all-23557
[ "Delete", "a", "role", ".", "This", "operation", "will", "succeed", "regardless", "of", "whether", "or", "not", "the", "role", "exists", ".", "Required", "scopes", ":", "auth", ":", "delete", "-", "role", ":", "<roleId", ">", "See", "#deleteRole" ]
[ "func", "(", "auth", "*", "Auth", ")", "DeleteRole", "(", "roleId", "string", ")", "error", "{", "cd", ":=", "tcclient", ".", "Client", "(", "*", "auth", ")", "\n", "_", ",", "_", ",", "err", ":=", "(", "&", "cd", ")", ".", "APICall", "(", "nil...
23,557
all-23558
[ "NewHandler", "returns", "new", "Handler", "instance", "." ]
[ "func", "NewHandler", "(", "counter", "*", "Counter", ",", "level", "logging", ".", "Level", ")", "(", "h", "*", "Handler", ")", "{", "return", "&", "Handler", "{", "Counter", ":", "<mask>", ",", "Level", ":", "level", ",", "}", "\n", "}" ]
23,558
all-23559
[ "Validate", "the", "request", "signature", "given", "on", "input", "and", "return", "list", "of", "scopes", "that", "the", "authenticating", "client", "has", ".", "This", "method", "is", "used", "by", "other", "services", "that", "wish", "rely", "on", "Taskc...
[ "func", "(", "auth", "*", "Auth", ")", "AuthenticateHawk", "(", "payload", "*", "HawkSignatureAuthenticationRequest", ")", "(", "*", "HawkSignatureAuthenticationResponse", ",", "error", ")", "{", "cd", ":=", "tcclient", ".", "Client", "(", "*", "auth", ")", "\...
23,559
all-23560
[ "copy", "a", "two", "-", "dimensional", "texture", "subimage" ]
[ "func", "CopyTextureSubImage2D", "(", "texture", "uint32", ",", "level", "int32", ",", "xoffset", "int32", ",", "yoffset", "int32", ",", "x", "int32", ",", "y", "int32", ",", "width", "int32", ",", "<mask>", "int32", ")", "{", "C", ".", "glowCopyTextureSub...
23,560
all-23561
[ "ReMap", "returns", "a", "PathMapper", "that", "compares", "file", "paths", "to", "the", "input", "pattern", "and", "maps", "matches", "to", "the", "replacement", "string", "(", "see", "Regexp", ".", "ReplaceAllString", ")", "." ]
[ "func", "ReMap", "(", "pattern", "string", ",", "replacement", "string", ")", "PathMapper", "{", "re", ":=", "regexp", ".", "MustCompile", "(", "pattern", ")", "\n", "return", "func", "(", "filePath", "string", ")", "string", "{", "if", "!", "<mask>", "....
23,561
all-23562
[ "ExtractAll", "cluster", "state", "as", "a", "slice", "of", "operations", "." ]
[ "func", "(", "c", "APIClient", ")", "ExtractAll", "(", "objects", "bool", ")", "(", "[", "]", "*", "admin", ".", "Op", ",", "error", ")", "{", "var", "result", "[", "]", "*", "admin", ".", "Op", "\n", "if", "err", ":=", "c", ".", "Extract", "("...
23,562
all-23563
[ "MustAccount", "retrieves", "the", "Account", "value", "from", "the", "union", "panicing", "if", "the", "value", "is", "not", "set", "." ]
[ "func", "(", "u", "LedgerEntryData", ")", "MustAccount", "(", ")", "AccountEntry", "{", "val", ",", "<mask>", ":=", "u", ".", "GetAccount", "(", ")", "\n\n", "if", "!", "ok", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n\n", "return", "val", "...
23,563
all-23564
[ "ToIP", "returns", "equivalent", "net", ".", "IP", "." ]
[ "func", "(", "n", "NetworkNumber", ")", "ToIP", "(", ")", "net", ".", "IP", "{", "ip", ":=", "make", "(", "net", ".", "IP", ",", "len", "(", "n", ")", "*", "BytePerUint32", ")", "\n", "for", "i", ":=", "0", ";", "i", "<", "len", "(", "n", "...
23,564
all-23565
[ "HasX", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "s", "*", "ScatterplotRequests", ")", "HasX", "(", ")", "bool", "{", "if", "s", "!=", "nil", "&&", "s", ".", "X", "!=", "nil", "{", "return", "true", "\n", "}", "\n\n", "return", "<mask>", "\n", "}" ]
23,565
all-23566
[ "SendHtml", "sends", "the", "message", "as", "HTML", "as", "defined", "by", "XEP", "-", "0071" ]
[ "func", "(", "c", "*", "Client", ")", "SendHtml", "(", "chat", "Chat", ")", "(", "n", "int", ",", "err", "error", ")", "{", "return", "fmt", ".", "Fprintf", "(", "c", ".", "conn", ",", "\"", "\"", "+", "\"", "\"", "+", "\"", "\"", ",", "xmlEs...
23,566
all-23567
[ "Add", "an", "Ip", "address", "to", "an", "interface", ".", "This", "is", "identical", "to", ":", "ip", "addr", "add", "$ip", "/", "$ipNet", "dev", "$iface" ]
[ "func", "NetworkLinkAddIp", "(", "iface", "*", "net", ".", "Interface", ",", "ip", "net", ".", "IP", ",", "ipNet", "*", "<mask>", ".", "IPNet", ")", "error", "{", "return", "networkLinkIpAction", "(", "syscall", ".", "RTM_NEWADDR", ",", "syscall", ".", "...
23,567
all-23568
[ "Status", "sends", "a", "string", "to", "HipChat", "to", "indicate", "whether", "the", "client", "is", "available", "to", "chat", "away", "or", "idle", "." ]
[ "func", "(", "c", "*", "<mask>", ")", "Status", "(", "s", "string", ")", "{", "c", ".", "connection", ".", "Presence", "(", "c", ".", "Id", ",", "s", ")", "\n", "}" ]
23,568
all-23569
[ "HasStyle", "returns", "a", "boolean", "if", "a", "field", "has", "been", "set", "." ]
[ "func", "(", "g", "*", "GraphDefinition", ")", "HasStyle", "(", ")", "bool", "{", "if", "g", "!=", "nil", "&&", "g", ".", "Style", "!=", "nil", "{", "return", "<mask>", "\n", "}", "\n\n", "return", "false", "\n", "}" ]
23,569
all-23570
[ "SetLineJoin", "is", "a", "wrapper", "around", "cairo_set_line_join", "()", "." ]
[ "func", "(", "v", "*", "<mask>", ")", "SetLineJoin", "(", "lineJoin", "LineJoin", ")", "{", "C", ".", "cairo_set_line_join", "(", "v", ".", "native", "(", ")", ",", "C", ".", "cairo_line_join_t", "(", "lineJoin", ")", ")", "\n", "}" ]
23,570
all-23571
[ "GetNoDial", "returns", "true", "if", "the", "no", "dial", "option", "is", "set", "in", "the", "context", "." ]
[ "func", "GetNoDial", "(", "ctx", "context", ".", "<mask>", ")", "(", "nodial", "bool", ",", "reason", "string", ")", "{", "v", ":=", "ctx", ".", "Value", "(", "noDial", ")", "\n", "if", "v", "!=", "nil", "{", "return", "true", ",", "v", ".", "(",...
23,571
all-23572
[ "QueryChanges", "queries", "for", "all", "changes", "from", "all", "projects", "after", "lastUpdate", "time", "returns", "an", "instance", ":", "changes", "map" ]
[ "func", "(", "c", "*", "Client", ")", "QueryChanges", "(", "lastUpdate", "time", ".", "Time", ",", "rateLimit", "int", ")", "map", "[", "string", "]", "[", "]", "ChangeInfo", "{", "result", ":=", "map", "[", "string", "]", "[", "]", "ChangeInfo", "{"...
23,572
all-23573
[ "Update", "the", "key", "with", "the", "given", "data", ".", "Valid", "parameters", "may", "be", "found", "here", ":", "https", ":", "//", "www", ".", "twilio", ".", "com", "/", "docs", "/", "api", "/", "rest", "/", "keys#instance", "-", "post" ]
[ "func", "(", "a", "*", "KeyService", ")", "Update", "(", "ctx", "context", ".", "Context", ",", "sid", "string", ",", "data", "url", ".", "Values", ")", "(", "*", "Key", ",", "error", ")", "{", "key", ":=", "new", "(", "Key", ")", "\n", "err", ...
23,573
all-23574
[ "Next", "advances", "our", "concat", "iterator", "." ]
[ "func", "(", "s", "*", "ConcatIterator", ")", "Next", "(", ")", "{", "s", ".", "cur", ".", "Next", "(", ")", "\n", "if", "s", ".", "cur", ".", "Valid", "(", ")", "{", "// Nothing to do. Just stay with the current table.", "return", "\n", "}", "\n", "fo...
23,574
all-23575
[ "Close", "our", "writer", ".", "Subsequent", "writes", "will", "fail", "." ]
[ "func", "(", "l", "*", "Writer", ")", "Close", "(", ")", "error", "{", "l", ".", "mutex", ".", "Lock", "(", ")", "\n", "defer", "l", ".", "mutex", ".", "Unlock", "(", ")", "\n\n", "return", "l", ".", "<mask>", ".", "Close", "(", ")", "\n", "}...
23,575
all-23576
[ "Loop", "performs", "a", "function", "that", "creates", "new", "jobs", "with", "a", "certain", "frequency", ".", "If", "at", "the", "moment", "there", "is", "already", "a", "similar", "active", "job", "then", "such", "job", "is", "ignored", ".", "The", "...
[ "func", "Loop", "(", "ctx", "context", ".", "<mask>", ",", "logger", "log", ".", "Logger", ",", "db", "*", "reform", ".", "DB", ",", "queue", "job", ".", "Queue", ",", "duration", "time", ".", "Duration", ",", "f", "func", "(", ")", "[", "]", "*"...
23,576
all-23577
[ "return", "parameters", "of", "a", "buffer", "object" ]
[ "func", "GetNamedBufferParameteriv", "(", "buffer", "uint32", ",", "pname", "uint32", ",", "params", "*", "int32", ")", "{", "C", ".", "glowGetNamedBufferParameteriv", "(", "gpGetNamedBufferParameteriv", ",", "(", "C", ".", "GLuint", ")", "(", "<mask>", ")", "...
23,577
all-23578
[ "RadioButtonNew", "is", "a", "wrapper", "around", "gtk_radio_button_new", "()", "." ]
[ "func", "RadioButtonNew", "(", "<mask>", "*", "glib", ".", "SList", ")", "(", "*", "RadioButton", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_radio_button_new", "(", "cGSList", "(", "group", ")", ")", "\n", "if", "c", "==", "nil", "{", "return"...
23,578
all-23579
[ "CreatePangoLayout", "()", "is", "a", "wrapper", "around", "gtk_print_context_create_pango_layout", "()", "." ]
[ "func", "(", "pc", "*", "PrintContext", ")", "CreatePangoLayout", "(", ")", "*", "pango", ".", "Layout", "{", "c", ":=", "C", ".", "gtk_print_context_create_pango_layout", "(", "<mask>", ".", "native", "(", ")", ")", "\n", "return", "pango", ".", "WrapLayo...
23,579
all-23580
[ "GetAutoscaleOk", "returns", "a", "tuple", "with", "the", "Autoscale", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "q", "*", "QueryValueDefinition", ")", "GetAutoscaleOk", "(", ")", "(", "bool", ",", "bool", ")", "{", "if", "q", "==", "nil", "||", "q", ".", "Autoscale", "==", "nil", "{", "return", "false", ",", "<mask>", "\n", "}", "\n", "return", ...
23,580
all-23581
[ "GetComparator", "returns", "the", "Comparator", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "d", "*", "DashboardConditionalFormat", ")", "GetComparator", "(", ")", "string", "{", "if", "d", "==", "nil", "||", "d", ".", "Comparator", "==", "nil", "{", "<mask>", "\"", "\"", "\n", "}", "\n", "return", "*", "d", ".", "Comparator", ...
23,581
all-23582
[ "WalkPath", "is", "used", "to", "walk", "the", "tree", "but", "only", "visiting", "nodes", "from", "the", "root", "down", "to", "a", "given", "leaf", ".", "Where", "WalkPrefix", "walks", "all", "the", "entries", "*", "under", "*", "the", "given", "prefix...
[ "func", "(", "t", "*", "Tree", ")", "WalkPath", "(", "path", "string", ",", "fn", "WalkFn", ")", "{", "n", ":=", "t", ".", "root", "\n", "search", ":=", "path", "\n", "for", "{", "// Visit the leaf values if any", "if", "n", ".", "leaf", "!=", "nil",...
23,582
all-23583
[ "arg1Reader", "returns", "an", "ArgReader", "to", "read", "arg1", "." ]
[ "func", "(", "r", "*", "reqResReader", ")", "arg1Reader", "(", ")", "(", "ArgReader", ",", "error", ")", "{", "return", "r", ".", "argReader", "(", "<mask>", "/* last */", ",", "reqResReaderPreArg1", ",", "reqResReaderPreArg2", ")", "\n", "}" ]
23,583
all-23584
[ "EnsureSafe", "compares", "the", "provided", "safety", "parameters", "with", "the", "ones", "currently", "in", "use", "by", "the", "session", "and", "picks", "the", "most", "conservative", "choice", "for", "each", "setting", ".", "That", "is", ":", "-", "saf...
[ "func", "(", "s", "*", "Session", ")", "EnsureSafe", "(", "<mask>", "*", "Safe", ")", "{", "s", ".", "m", ".", "Lock", "(", ")", "\n", "s", ".", "ensureSafe", "(", "safe", ")", "\n", "s", ".", "m", ".", "Unlock", "(", ")", "\n", "}" ]
23,584
all-23585
[ "Create", "an", "array", "of", "Typed", "helpers", "Used", "for", "when", "the", "root", "is", "an", "array", "which", "contains", "objects" ]
[ "func", "JsonArray", "(", "data", "[", "]", "byte", ")", "(", "[", "]", "Typed", ",", "error", ")", "{", "var", "m", "[", "]", "interface", "{", "}", "\n", "err", ":=", "json", ".", "Unmarshal", "(", "<mask>", ",", "&", "m", ")", "\n", "if", ...
23,585
all-23586
[ "GetChild1", "()", "is", "a", "wrapper", "around", "gtk_paned_get_child1", "()", "." ]
[ "func", "(", "v", "*", "Paned", ")", "GetChild1", "(", ")", "(", "*", "Widget", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_paned_get_child1", "(", "v", ".", "native", "(", ")", ")", "\n", "if", "c", "==", "nil", "{", "<mask>", "nil", ","...
23,586
all-23587
[ "CertUpdate", "updates", "the", "certificate", "with", "the", "given", "fingerprint", "." ]
[ "func", "(", "c", "*", "Cluster", ")", "CertUpdate", "(", "fingerprint", "string", ",", "certName", "string", ",", "certType", "int", ")", "error", "{", "err", ":=", "c", ".", "<mask>", "(", "func", "(", "tx", "*", "ClusterTx", ")", "error", "{", "_"...
23,587
all-23588
[ "NewReference", "returns", "an", "OCI", "reference", "for", "a", "directory", "and", "a", "image", ".", "We", "do", "not", "expose", "an", "API", "supplying", "the", "resolvedDir", ";", "we", "could", "but", "recomputing", "it", "is", "generally", "cheap", ...
[ "func", "NewReference", "(", "dir", ",", "image", "string", ")", "(", "types", ".", "ImageReference", ",", "error", ")", "{", "resolved", ",", "err", ":=", "explicitfilepath", ".", "ResolvePathToFullyExplicit", "(", "dir", ")", "\n", "if", "err", "!=", "ni...
23,588
all-23589
[ "StartSession", "creates", "a", "session", "with", "the", "backend", "and", "handles", "requests", "using", "the", "passed", "in", "arguments", ".", "The", "engine", "is", "expected", "to", "initialized", "and", "gathering", "container", "metrics", "by", "the", ...
[ "func", "StartSession", "(", "params", "*", "TelemetrySessionParams", ",", "statsEngine", "stats", ".", "<mask>", ")", "error", "{", "backoff", ":=", "retry", ".", "NewExponentialBackoff", "(", "time", ".", "Second", ",", "1", "*", "time", ".", "Minute", ","...
23,589
all-23590
[ "String", "returns", "the", "Modifier", "as", "string", "value", "." ]
[ "func", "(", "t", "Modifier", ")", "String", "(", ")", "string", "{", "switch", "t", "{", "case", "ModifierNone", ":", "return", "\"", "\"", "\n", "case", "ModifierAlt", ":", "return", "\"", "\"", "\n", "case", "ModifierCtrl", ":", "return", "\"", "\""...
23,590
all-23591
[ "HTMLHandler", "is", "a", "HTTP", "middleware", "that", "should", "be", "used", "alongide", "HTML", "pages", "." ]
[ "func", "(", "s", "Service", ")", "HTMLHandler", "(", "h", "http", ".", "Handler", ")", "http", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ")...
23,591
all-23592
[ "KeyUnwrap", "decrypts", "previously", "encrypted", "key", "(", "CEK", ")", "with", "KEK", "key", "using", "AES", "Key", "Wrap", "(", "rfc", "3394", ")", "algorithm" ]
[ "func", "KeyUnwrap", "(", "encryptedCek", ",", "kek", "[", "]", "byte", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "// 1) Initialize variables", "c", ":=", "arrays", ".", "Slice", "(", "encryptedCek", ",", "8", ")", ";", "a", ":=", "c", "[",...
23,592
all-23593
[ "PrependPage", "is", "a", "wrapper", "around", "gtk_assistant_prepend_page", "()", "." ]
[ "func", "(", "v", "*", "Assistant", ")", "PrependPage", "(", "page", "IWidget", ")", "int", "{", "c", ":=", "C", ".", "gtk_assistant_prepend_page", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "toWidget", "(", ")", ")", "\n", "return", "int...
23,593
all-23594
[ "appMain", "is", "the", "main", "routine", "for", "gomobile", "-", "build", "mode", "." ]
[ "func", "(", "u", "*", "UserInterface", ")", "appMain", "(", "a", "app", ".", "App", ")", "{", "var", "glctx", "gl", ".", "Context", "\n", "touches", ":=", "map", "[", "touch", ".", "Sequence", "]", "*", "Touch", "{", "}", "\n", "for", "e", ":=",...
23,594
all-23595
[ "FilterPresubmits", "determines", "which", "presubmits", "should", "run", "and", "which", "should", "be", "skipped", "by", "evaluating", "the", "user", "-", "provided", "filter", "." ]
[ "func", "FilterPresubmits", "(", "filter", "Filter", ",", "changes", "config", ".", "ChangedFilesProvider", ",", "branch", "string", ",", "presubmits", "[", "]", "config", ".", "Presubmit", ",", "logger", "*", "logrus", ".", "Entry", ")", "(", "[", "]", "c...
23,595
all-23596
[ "export", "FileSequence_Len" ]
[ "func", "FileSequence_Len", "(", "id", "FileSeqId", ")", "C", ".", "size_t", "{", "fs", ",", "ok", ":=", "sFileSeqs", ".", "Get", "(", "<mask>", ")", "\n", "if", "!", "ok", "{", "return", "0", "\n", "}", "\n", "return", "C", ".", "size_t", "(", "...
23,596
all-23597
[ "resourceVSphereVirtualMachineCreateCloneWithSDRS", "runs", "the", "clone", "part", "of", "resourceVSphereVirtualMachineCreateClone", "through", "storage", "DRS", ".", "It", "s", "designed", "to", "be", "run", "when", "a", "storage", "cluster", "is", "specified", "versu...
[ "func", "resourceVSphereVirtualMachineCreateCloneWithSDRS", "(", "d", "*", "schema", ".", "ResourceData", ",", "meta", "interface", "{", "}", ",", "srcVM", "*", "object", ".", "VirtualMachine", ",", "fo", "*", "object", ".", "Folder", ",", "name", "string", ",...
23,597
all-23598
[ "ParseXML", "creates", "an", "XMLTree", "structure", "from", "an", "io", ".", "Reader", "." ]
[ "func", "ParseXML", "(", "r", "io", ".", "Reader", ",", "op", "...", "ParseSettings", ")", "(", "tree", ".", "Node", ",", "error", ")", "{", "ov", ":=", "ParseOptions", "{", "Strict", ":", "true", ",", "XMLRoot", ":", "xmlele", ".", "Root", ",", "}...
23,598
all-23599
[ "Value", "implements", "the", "database", "/", "sql", "/", "Valuer", "interface", "." ]
[ "func", "(", "d", "Decimal", ")", "Value", "(", ")", "(", "driver", ".", "Value", ",", "error", ")", "{", "m", ":=", "bigIntFree", ".", "Get", "(", ")", ".", "(", "*", "big", ".", "Int", ")", "\n", "neg", ",", "exp", ",", "df", ":=", "convert...
23,599
all-23600
[ "Fatalln", "logging" ]
[ "func", "(", "l", "*", "StdLevelLogger", ")", "Fatalln", "(", "args", "...", "<mask>", "{", "}", ")", "{", "l", ".", "loglnFunc", "(", "FatalLevel", ",", "l", ".", "context", ",", "args", "...", ")", "\n", "}" ]