id
int32
0
25.3k
idx
stringlengths
5
9
nl_tokens
listlengths
1
418
pl_tokens
listlengths
22
4.98k
6,800
all-6801
[ "New", "Lexer", "from", "the", "input", "string" ]
[ "func", "New", "(", "input", "string", ")", "*", "Lexer", "{", "l", ":=", "&", "Lexer", "{", "input", ":", "<mask>", ",", "curLine", ":", "1", "}", "\n", "l", ".", "readChar", "(", ")", "\n", "return", "l", "\n", "}" ]
6,801
all-6802
[ "SearchDatastore", "searches", "a", "datastore", "using", "the", "supplied", "HostDatastoreBrowser", "and", "a", "supplied", "path", ".", "The", "current", "implementation", "only", "returns", "the", "basic", "information", "so", "all", "FileQueryFlags", "set", "but...
[ "func", "SearchDatastore", "(", "ds", "*", "object", ".", "Datastore", ",", "name", "string", ")", "(", "[", "]", "*", "types", ".", "FileInfo", ",", "error", ")", "{", "result", ",", "err", ":=", "searchDatastore", "(", "ds", ",", "name", ")", "\n",...
6,802
all-6803
[ "importSpec", "returns", "the", "import", "spec", "if", "f", "imports", "path", "or", "nil", "otherwise", "." ]
[ "func", "importSpec", "(", "f", "*", "ast", ".", "File", ",", "path", "string", ")", "*", "ast", ".", "ImportSpec", "{", "for", "_", ",", "s", ":=", "range", "f", ".", "Imports", "{", "if", "importPath", "(", "s", ")", "==", "<mask>", "{", "retur...
6,803
all-6804
[ "FromMap", "feels", "updates", "user", "data", "from", "a", "map" ]
[ "func", "(", "ud", "*", "UserData", ")", "FromMap", "(", "m", "UserDataMap", ")", "{", "for", "<mask>", ",", "value", ":=", "range", "m", "{", "ud", ".", "Store", "(", "key", ",", "value", ")", "\n", "}", "\n", "}" ]
6,804
all-6805
[ "RunRequested", "executes", "the", "config", ".", "Presubmits", "that", "are", "requested" ]
[ "func", "RunRequested", "(", "c", "Client", ",", "pr", "*", "github", ".", "PullRequest", ",", "requestedJobs", "[", "]", "config", ".", "Presubmit", ",", "eventGUID", "string", ")", "error", "{", "baseSHA", ",", "err", ":=", "c", ".", "GitHubClient", "....
6,805
all-6806
[ "NewRemoteExecutor", "-", "This", "method", "creates", "executor", "based", "on", "ssh", "it", "has", "concrete", "ssh", "reference" ]
[ "func", "NewRemoteExecutor", "(", "sshCfg", "SshConfig", ")", "(", "executor", "Executer", ",", "err", "error", ")", "{", "clientconfig", ":=", "&", "ssh", ".", "ClientConfig", "{", "<mask>", ":", "sshCfg", ".", "Username", ",", "Auth", ":", "sshCfg", ".",...
6,806
all-6807
[ "MarshalEasyJSON", "satisfies", "easyjson", ".", "Marshaler", "." ]
[ "func", "(", "t", "ScrollRectType", ")", "MarshalEasyJSON", "(", "out", "*", "jwriter", ".", "Writer", ")", "{", "out", ".", "<mask>", "(", "string", "(", "t", ")", ")", "\n", "}" ]
6,807
all-6808
[ "ParseString", "creates", "a", "new", "*", "Durafmt", "struct", "from", "a", "string", ".", "returns", "an", "error", "if", "input", "is", "invalid", "." ]
[ "func", "ParseString", "(", "input", "string", ")", "(", "*", "Durafmt", ",", "error", ")", "{", "if", "input", "==", "\"", "\"", "||", "input", "==", "\"", "\"", "{", "return", "nil", ",", "<mask>", ".", "New", "(", "\"", "\"", "+", "input", ")"...
6,808
all-6809
[ "SubnetLocator", "builds", "a", "locator", "from", "the", "given", "href", "." ]
[ "func", "(", "api", "*", "API", ")", "SubnetLocator", "(", "href", "<mask>", ")", "*", "SubnetLocator", "{", "return", "&", "SubnetLocator", "{", "Href", "(", "href", ")", ",", "api", "}", "\n", "}" ]
6,809
all-6810
[ "execEvalStmt", "evaluates", "the", "expression", "of", "an", "evaluation", "statement", "for", "the", "given", "time", "range", "." ]
[ "func", "(", "ng", "*", "Engine", ")", "execEvalStmt", "(", "ctx", "context", ".", "Context", ",", "query", "*", "query", ",", "s", "*", "EvalStmt", ")", "(", "Value", ",", "storage", ".", "Warnings", ",", "error", ")", "{", "prepareSpanTimer", ",", ...
6,810
all-6811
[ "Get", "Labels", "from", "Regexp", "matches" ]
[ "func", "getLabelsFromREMatches", "(", "matches", "[", "]", "[", "]", "string", ")", "(", "labels", "[", "]", "string", ")", "{", "for", "_", ",", "match", ":=", "range", "matches", "{", "for", "_", ",", "label", ":=", "range", "strings", ".", "Split...
6,811
all-6812
[ "Constructs", "a", "new", "compressedResponseWriter", "based", "on", "client", "request", "headers", "." ]
[ "func", "newCompressedResponseWriter", "(", "writer", "http", ".", "ResponseWriter", ",", "req", "*", "http", ".", "Request", ")", "*", "compressedResponseWriter", "{", "encodings", ":=", "strings", ".", "Split", "(", "req", ".", "Header", ".", "Get", "(", "...
6,812
all-6813
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "ForciblyPurgeJavaScriptMemoryParams", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory16"...
6,813
all-6814
[ "IsNoVaultHandlerDefined", "asserts", "a", "dirty", "string", "matching", "against", "the", "error", "message", "provided", "by", "err", ".", "This", "is", "necessary", "due", "to", "the", "poor", "error", "handling", "design", "of", "the", "Vault", "library", ...
[ "func", "IsNoVaultHandlerDefined", "(", "err", "error", ")", "bool", "{", "cause", ":=", "microerror", ".", "Cause", "(", "err", ")", "\n\n", "if", "cause", "!=", "nil", "&&", "strings", ".", "Contains", "(", "cause", ".", "Error", "(", ")", ",", "\"",...
6,814
all-6815
[ "Clone", "returns", "a", "clone", "of", "the", "current", "Envelope" ]
[ "func", "(", "e", "*", "Envelope", ")", "Clone", "(", ")", "*", "Envelope", "{", "if", "e", "==", "nil", "{", "return", "nil", "\n", "}", "\n\n", "newEnvelope", ":=", "&", "Envelope", "{", "e", ".", "Text", ",", "e", ".", "HTML", ",", "e", ".",...
6,815
all-6816
[ "Get", "returns", "the", "value", "of", "the", "cookie", "with", "the", "given", "name", ".", "Returns", "http", ".", "ErrNoCookie", "if", "there", "s", "no", "cookie", "with", "that", "name", "in", "the", "request", "." ]
[ "func", "(", "c", "*", "Cookies", ")", "Get", "(", "name", "string", ")", "(", "string", ",", "error", ")", "{", "ck", ",", "err", ":=", "c", ".", "req", ".", "Cookie", "(", "<mask>", ")", "\n", "if", "err", "!=", "nil", "{", "return", "\"", ...
6,816
all-6817
[ "NewEventLog", "returns", "an", "initialized", "EventLog", "with", "the", "given", "family", "and", "title", "." ]
[ "func", "NewEventLog", "(", "family", ",", "title", "string", ")", "xtr", ".", "EventLog", "{", "e", ":=", "&", "EventLog", "{", "family", ":", "family", ",", "title", ":", "title", ",", "el", ":", "xtr", ".", "NewEventLog", "(", "family", ",", "<mas...
6,817
all-6818
[ "RepositoryAssetLocator", "builds", "a", "locator", "from", "the", "given", "href", "." ]
[ "func", "(", "api", "*", "API", ")", "RepositoryAssetLocator", "(", "href", "<mask>", ")", "*", "RepositoryAssetLocator", "{", "return", "&", "RepositoryAssetLocator", "{", "Href", "(", "href", ")", ",", "api", "}", "\n", "}" ]
6,818
all-6819
[ "/", "*", "Read", "implements", "the", "io", ".", "Reader", "interface", ".", "It", "advances", "the", "cursor", "as", "it", "reads", "." ]
[ "func", "(", "b", "*", "Buffer", ")", "Read", "(", "d", "[", "]", "byte", ")", "(", "int", ",", "error", ")", "{", "b", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "b", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "if", "b", ".", ...
6,819
all-6820
[ "NewPeerAddressIp", "creates", "a", "new", "PeerAddressIp", "." ]
[ "func", "NewPeerAddressIp", "(", "aType", "IpAddrType", ",", "value", "interface", "{", "}", ")", "(", "result", "PeerAddressIp", ",", "err", "error", ")", "{", "result", ".", "Type", "=", "aType", "\n", "switch", "IpAddrType", "(", "aType", ")", "{", "c...
6,820
all-6821
[ "WithHTTPClient", "adds", "the", "HTTPClient", "to", "the", "get", "apps", "app", "routes", "params" ]
[ "func", "(", "o", "*", "GetAppsAppRoutesParams", ")", "WithHTTPClient", "(", "client", "*", "<mask>", ".", "Client", ")", "*", "GetAppsAppRoutesParams", "{", "o", ".", "SetHTTPClient", "(", "client", ")", "\n", "return", "o", "\n", "}" ]
6,821
all-6822
[ "SetFontName", "is", "a", "wrapper", "around", "gtk_font_button_set_font_name", "()", "." ]
[ "func", "(", "v", "*", "FontButton", ")", "SetFontName", "(", "fontname", "string", ")", "bool", "{", "cstr", ":=", "C", ".", "CString", "(", "fontname", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointer", "(", "cstr", ")", ")", ...
6,822
all-6823
[ "UpdateComments", "downloads", "issue", "and", "pull", "-", "request", "comments", "and", "save", "in", "DB" ]
[ "func", "UpdateComments", "(", "issueID", "int", ",", "pullRequest", "bool", ",", "db", "*", "gorm", ".", "<mask>", ",", "client", "ClientInterface", ")", "{", "latest", ":=", "findLatestCommentUpdate", "(", "issueID", ",", "db", ",", "client", ".", "Reposit...
6,823
all-6824
[ "export", "FileSequence_Basename" ]
[ "func", "FileSequence_Basename", "(", "id", "FileSeqId", ")", "*", "C", ".", "char", "{", "fs", ",", "ok", ":=", "sFileSeqs", ".", "Get", "(", "<mask>", ")", "\n", "// caller must free string", "if", "!", "ok", "{", "return", "C", ".", "CString", "(", ...
6,824
all-6825
[ "getAuthInfo", "is", "a", "modified", "copy", "of", "k8s", ".", "io", "/", "kubernetes", "/", "pkg", "/", "client", "/", "unversioned", "/", "clientcmd", ".", "DirectClientConfig", ".", "getAuthInfo", "." ]
[ "func", "(", "config", "*", "directClientConfig", ")", "getAuthInfo", "(", ")", "clientcmdAuthInfo", "{", "authInfos", ":=", "config", ".", "config", ".", "AuthInfos", "\n", "authInfoName", ":=", "config", ".", "getAuthInfoName", "(", ")", "\n\n", "<mask>", "m...
6,825
all-6826
[ "Returns", "the", "rants", "tagged", "for", "weekly" ]
[ "func", "(", "c", "*", "Client", ")", "WeeklyRants", "(", ")", "(", "[", "]", "RantModel", ",", "error", ")", "{", "url", ":=", "fmt", ".", "Sprintf", "(", "WEEKLY_PATH", ",", "API", ",", "APP_VERSION", ")", "\n", "res", ",", "err", ":=", "http", ...
6,826
all-6827
[ "Next", "gets", "the", "next", "set", "of", "updates", "from", "the", "etcd", "resolver", ".", "Calls", "to", "Next", "should", "be", "serialized", ";", "concurrent", "calls", "are", "not", "safe", "since", "there", "is", "no", "way", "to", "reconcile", ...
[ "func", "(", "gw", "*", "gRPCWatcher", ")", "Next", "(", ")", "(", "[", "]", "*", "naming", ".", "Update", ",", "error", ")", "{", "if", "gw", ".", "wch", "==", "nil", "{", "// first Next() returns all addresses", "return", "gw", ".", "firstNext", "(",...
6,827
all-6828
[ "GetQueryOk", "returns", "a", "tuple", "with", "the", "Query", "field", "if", "it", "s", "non", "-", "nil", "zero", "value", "otherwise", "and", "a", "boolean", "to", "check", "if", "the", "value", "has", "been", "set", "." ]
[ "func", "(", "e", "*", "EventStreamDefinition", ")", "GetQueryOk", "(", ")", "(", "string", ",", "bool", ")", "{", "if", "e", "==", "nil", "||", "e", ".", "<mask>", "==", "nil", "{", "return", "\"", "\"", ",", "false", "\n", "}", "\n", "return", ...
6,828
all-6829
[ "CreateBranch", "creates", "a", "new", "branch" ]
[ "func", "(", "c", "APIClient", ")", "CreateBranch", "(", "repoName", "string", ",", "branch", "string", ",", "commit", "string", ",", "provenance", "[", "]", "*", "pfs", ".", "Branch", ")", "error", "{", "var", "head", "*", "pfs", ".", "Commit", "\n", ...
6,829
all-6830
[ "InitializeResources", "initializes", "the", "required", "field", "in", "the", "task", "on", "agent", "restart", "Some", "of", "the", "fields", "in", "task", "isn", "t", "saved", "in", "the", "agent", "state", "file", "agent", "needs", "to", "initialize", "t...
[ "func", "(", "task", "*", "<mask>", ")", "InitializeResources", "(", "resourceFields", "*", "taskresource", ".", "ResourceFields", ")", "{", "task", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "task", ".", "lock", ".", "Unlock", "(", ")", "\n\n", ...
6,830
all-6831
[ "Do", "executes", "Profiler", ".", "takeTypeProfile", "against", "the", "provided", "context", ".", "returns", ":", "result", "-", "Type", "profile", "for", "all", "scripts", "since", "startTypeProfile", "()", "was", "turned", "on", "." ]
[ "func", "(", "p", "*", "TakeTypeProfileParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "result", "[", "]", "*", "ScriptTypeProfile", ",", "err", "error", ")", "{", "// execute", "var", "res", "TakeTypeProfileReturns", "\n", "err", "=",...
6,831
all-6832
[ "specify", "a", "two", "-", "dimensional", "texture", "image" ]
[ "func", "TexImage2D", "(", "target", "uint32", ",", "level", "int32", ",", "internalformat", "int32", ",", "width", "int32", ",", "height", "int32", ",", "border", "int32", ",", "format", "uint32", ",", "xtype", "uint32", ",", "pixels", "unsafe", ".", "Poi...
6,832
all-6833
[ "Delete", "-", "handle", "a", "delete", "lease", "call" ]
[ "func", "(", "s", "*", "Lease", ")", "Delete", "(", "logger", "*", "log", ".", "Logger", ",", "req", "*", "http", ".", "Request", ")", "(", "statusCode", "int", ",", "response", "interface", "{", "}", ")", "{", "var", "(", "err", "error", "\n", "...
6,833
all-6834
[ "NewVHostPathRewriter", "returns", "path", "rewriter", "which", "strips", "slashesCount", "leading", "slashes", "from", "the", "path", "and", "prepends", "the", "path", "with", "request", "s", "host", "thus", "simplifying", "virtual", "hosting", "for", "static", "...
[ "func", "NewVHostPathRewriter", "(", "slashesCount", "int", ")", "PathRewriteFunc", "{", "return", "func", "(", "ctx", "*", "RequestCtx", ")", "[", "]", "byte", "{", "path", ":=", "stripLeadingSlashes", "(", "ctx", ".", "Path", "(", ")", ",", "slashesCount",...
6,834
all-6835
[ "/", "*", "CancelDetects", "cancels", "any", "pending", "detects", "and", "cleans", "up", "their", "goroutines", ".", "You", "should", "always", "call", "this", "when", "you", "re", "done", "with", "a", "set", "of", "Detect", "channels", "." ]
[ "func", "(", "b", "*", "Buffer", ")", "CancelDetects", "(", ")", "{", "b", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "b", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "<mask>", "(", "b", ".", "detectCloser", ")", "\n", "b", ".", "dete...
6,835
all-6836
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "GetComputedStyleForNodeParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss46", "(", "&", "w", ",", "v...
6,836
all-6837
[ "GetOperation", "returns", "an", "Operation", "entry", "for", "the", "provided", "uuid" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "GetOperation", "(", "uuid", "string", ")", "(", "*", "api", ".", "Operation", ",", "string", ",", "error", ")", "{", "op", ":=", "api", ".", "Operation", "{", "}", "\n\n", "// Fetch the raw value", "etag", ",...
6,837
all-6838
[ "simultaneously", "specify", "and", "enable", "several", "interleaved", "arrays" ]
[ "func", "InterleavedArrays", "(", "format", "uint32", ",", "stride", "int32", ",", "<mask>", "unsafe", ".", "Pointer", ")", "{", "C", ".", "glowInterleavedArrays", "(", "gpInterleavedArrays", ",", "(", "C", ".", "GLenum", ")", "(", "format", ")", ",", "(",...
6,838
all-6839
[ "ParseRequestHeaders", "parses", "the", "special", "HTTP", "request", "headers", "available", "to", "push", "task", "request", "handlers", ".", "This", "function", "silently", "ignores", "values", "of", "the", "wrong", "format", "." ]
[ "func", "ParseRequestHeaders", "(", "h", "http", ".", "Header", ")", "*", "RequestHeaders", "{", "ret", ":=", "&", "RequestHeaders", "{", "QueueName", ":", "h", ".", "Get", "(", "\"", "\"", ")", ",", "TaskName", ":", "h", ".", "Get", "(", "\"", "\"",...
6,839
all-6840
[ "Decode", "uses", "the", "length", "of", "the", "slice", "to", "infer", "the", "length", "of", "the", "Value", "field", "." ]
[ "func", "(", "v", "*", "ValueStruct", ")", "Decode", "(", "b", "[", "]", "byte", ")", "{", "v", ".", "Meta", "=", "b", "[", "0", "]", "\n", "v", ".", "UserMeta", "=", "b", "[", "1", "]", "\n", "<mask>", "sz", "int", "\n", "v", ".", "Expires...
6,840
all-6841
[ "newHelperMethodConditionalComment", "creates", "and", "returns", "an", "HTML", "comment", "." ]
[ "func", "newHelperMethodConditionalComment", "(", "ln", "*", "line", ",", "rslt", "*", "result", ",", "src", "*", "source", ",", "parent", "element", ",", "opts", "*", "Options", ")", "(", "*", "helperMethodConditionalComment", ",", "error", ")", "{", "switc...
6,841
all-6842
[ "GetTitle", "returns", "the", "Title", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "q", "*", "QueryValueDefinition", ")", "GetTitle", "(", ")", "<mask>", "{", "if", "q", "==", "nil", "||", "q", ".", "Title", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "q", ".", "Title", "\n", "}" ]
6,842
all-6843
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "GetRealtimeDataReturns", ")", "UnmarshalJSON", "(", "<mask>", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "data", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio", "(", "&...
6,843
all-6844
[ "OptIndexTrackExistence", "enables", "keeping", "track", "of", "existence", "of", "columns", "." ]
[ "func", "OptIndexTrackExistence", "(", "trackExistence", "bool", ")", "IndexOption", "{", "return", "func", "(", "options", "*", "IndexOptions", ")", "{", "<mask>", ".", "trackExistence", "=", "trackExistence", "\n", "options", ".", "trackExistenceSet", "=", "true...
6,844
all-6845
[ "GetRoleName", "returns", "the", "RoleName", "field", "if", "non", "-", "nil", "zero", "value", "otherwise", "." ]
[ "func", "(", "i", "*", "IntegrationAWSAccountDeleteRequest", ")", "GetRoleName", "(", ")", "<mask>", "{", "if", "i", "==", "nil", "||", "i", ".", "RoleName", "==", "nil", "{", "return", "\"", "\"", "\n", "}", "\n", "return", "*", "i", ".", "RoleName", ...
6,845
all-6846
[ "Restart", "starts", "the", "member", "using", "the", "preserved", "data", "dir", "." ]
[ "func", "(", "m", "*", "member", ")", "Restart", "(", "t", "testing", ".", "TB", ")", "error", "{", "lg", ".", "Info", "(", "\"", "\"", ",", "zap", ".", "String", "(", "\"", "\"", ",", "m", ".", "<mask>", ")", ",", "zap", ".", "Strings", "(",...
6,846
all-6847
[ "UnmarshalText", "implements", "TextUnMarshaler", "from", "encoding" ]
[ "func", "(", "r", "*", "ToS", ")", "UnmarshalText", "(", "data", "[", "]", "byte", ")", "error", "{", "if", "v", ",", "ok", ":=", "_tosNameToValue", "[", "string", "(", "data", ")", "]", ";", "ok", "{", "*", "r", "=", "v", "\n", "return", "nil"...
6,847
all-6848
[ "Verifies", "whether", "the", "server", "is", "ready", "or", "not", "." ]
[ "func", "(", "h", "*", "Handler", ")", "isReady", "(", ")", "bool", "{", "ready", ":=", "atomic", ".", "LoadUint32", "(", "&", "h", ".", "<mask>", ")", "\n", "return", "ready", ">", "0", "\n", "}" ]
6,848
all-6849
[ "Execute", "-", "deletes", "org", "from", "config" ]
[ "func", "(", "c", "*", "DeleteOrgConfigurationCommand", ")", "Execute", "(", "[", "]", "<mask>", ")", "error", "{", "if", "err", ":=", "config", ".", "NewManager", "(", "c", ".", "ConfigDirectory", ")", ".", "DeleteOrgConfig", "(", "c", ".", "OrgName", "...
6,849
all-6850
[ "Find", "the", "starting", "point", "of", "the", "regions", "R1", "R2", "&", "RV" ]
[ "func", "findRegions", "(", "word", "*", "snowballword", ".", "SnowballWord", ")", "(", "r1start", ",", "r2start", ",", "rvstart", "int", ")", "{", "// R1 & R2 are defined in the standard manner.", "r1start", "=", "romance", ".", "VnvSuffix", "(", "word", ",", "...
6,850
all-6851
[ "NewSession", "returns", "a", "new", "*", "Session", "You", "need", "to", "provide", "a", "Rootable", "object", "that", "will", "be", "used", "to", "contain", "the", "results", "of", "the", "authentication", "process", "like", "the", "api", "key", "for", "...
[ "func", "NewSession", "(", "username", ",", "<mask>", ",", "organization", ",", "url", "string", ",", "root", "Rootable", ")", "*", "Session", "{", "tr", ":=", "&", "http", ".", "Transport", "{", "Proxy", ":", "http", ".", "ProxyFromEnvironment", ",", "T...
6,851
all-6852
[ "Color", "colors", "the", "foreground", "of", "the", "given", "string", "(", "whatever", "the", "previous", "background", "color", "was", "it", "is", "left", "alone", ")", "." ]
[ "func", "(", "c", "<mask>", ")", "Color", "(", "val", "string", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "c", ",", "val", ",", "ResetColor", ")", "\n", "}" ]
6,852
all-6853
[ "ValidEnum", "validates", "a", "proposed", "value", "for", "this", "enum", ".", "Implements", "the", "Enum", "interface", "for", "AccountMergeResultCode" ]
[ "func", "(", "e", "AccountMergeResultCode", ")", "ValidEnum", "(", "v", "int32", ")", "bool", "{", "_", ",", "<mask>", ":=", "accountMergeResultCodeMap", "[", "v", "]", "\n", "return", "ok", "\n", "}" ]
6,853
all-6854
[ "Param", "returns", "the", "value", "of", "the", "URL", "param", ".", "It", "is", "a", "shortcut", "for", "c", ".", "Params", ".", "ByName", "(", "key", ")", "router", ".", "GET", "(", "/", "user", "/", ":", "id", "func", "(", "c", "*", "gin", ...
[ "func", "(", "ctx", "*", "Context", ")", "Param", "(", "<mask>", "string", ")", "string", "{", "return", "ctx", ".", "Params", ".", "ByName", "(", "key", ")", "\n", "}" ]
6,854
all-6855
[ "GetFlags", "is", "a", "wrapper", "around", "g_settings_get_flags", "()", "." ]
[ "func", "(", "v", "*", "Settings", ")", "GetFlags", "(", "name", "string", ")", "uint", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "name", ")", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", "."...
6,855
all-6856
[ "SyncAll", "signals", "update", "for", "all", "resources", "hold", "by", "the", "client", "." ]
[ "func", "(", "c", "*", "Client", ")", "SyncAll", "(", ")", "error", "{", "c", ".", "lock", ".", "Lock", "(", ")", "\n", "defer", "c", ".", "lock", ".", "Unlock", "(", ")", "\n\n", "resources", ",", "err", ":=", "c", ".", "storage", ".", "List",...
6,856
all-6857
[ "/", "*", "PostAppsAppRoutes", "creates", "new", "route" ]
[ "func", "(", "a", "*", "Client", ")", "PostAppsAppRoutes", "(", "params", "*", "PostAppsAppRoutesParams", ")", "(", "*", "PostAppsAppRoutesOK", ",", "error", ")", "{", "// TODO: Validate the params before sending", "if", "params", "==", "nil", "{", "params", "=", ...
6,857
all-6858
[ "title", ":", "app", "log", "path", ":", "/", "apps", "/", "{", "app", "}", "/", "log", "method", ":", "POST", "consume", ":", "application", "/", "x", "-", "www", "-", "form", "-", "urlencoded", "responses", ":", "200", ":", "Ok", "400", ":", "I...
[ "func", "addLog", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "error", "{", "a", ",", "err", ":=", "app", ".", "GetByName", "(", "r", ".", "URL", ".", "Query", "(", ")", "...
6,858
all-6859
[ "PixbufNewFromFileAtScale", "is", "a", "wrapper", "around", "gdk_pixbuf_new_from_file_at_scale", "()", "." ]
[ "func", "PixbufNewFromFileAtScale", "(", "filename", "string", ",", "width", ",", "height", "int", ",", "preserveAspectRatio", "bool", ")", "(", "*", "Pixbuf", ",", "error", ")", "{", "cstr", ":=", "C", ".", "CString", "(", "filename", ")", "\n", "defer", ...
6,859
all-6860
[ "platformString", "returns", "platform", "-", "specific", "config", "data", "that", "can", "be", "serialized", "to", "string", "for", "debugging" ]
[ "func", "(", "cfg", "*", "Config", ")", "platformString", "(", ")", "string", "{", "// Returns a string if the default image name/tag of the Pause container has", "// been overridden", "if", "cfg", ".", "PauseContainerImageName", "==", "DefaultPauseContainerImageName", "&&", ...
6,860
all-6861
[ "SeekWithCmp", "moves", "iterator", "to", "a", "provided", "item", "by", "using", "custom", "comparator" ]
[ "func", "(", "<mask>", "*", "Iterator", ")", "SeekWithCmp", "(", "itm", "unsafe", ".", "Pointer", ",", "cmp", "CompareFn", ",", "eqCmp", "CompareFn", ")", "bool", "{", "var", "found", "bool", "\n", "if", "found", "=", "it", ".", "s", ".", "findPath", ...
6,861
all-6862
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "QuerySelectorParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom20", "(", "&", "...
6,862
all-6863
[ "Change", "the", "ownership", "of", "the", "given", "unix", "socket", "file" ]
[ "func", "socketUnixSetOwnership", "(", "<mask>", "string", ",", "group", "string", ")", "error", "{", "var", "gid", "int", "\n", "var", "err", "error", "\n\n", "if", "group", "!=", "\"", "\"", "{", "gid", ",", "err", "=", "shared", ".", "GroupId", "(",...
6,863
all-6864
[ "Scan", "implements", "the", "database", "/", "sql", "Scanner", "interface", "." ]
[ "func", "(", "rat", "*", "Rat", ")", "Scan", "(", "src", "interface", "{", "}", ")", "(", "err", "error", ")", "{", "rat", ".", "Rat", "=", "new", "(", "big", ".", "Rat", ")", "\n", "<mask>", "t", ":=", "src", ".", "(", "type", ")", "{", "c...
6,864
all-6865
[ "SetTitle", "is", "a", "wrapper", "around", "g_notification_set_title", "()", "." ]
[ "func", "(", "v", "*", "Notification", ")", "SetTitle", "(", "<mask>", "string", ")", "{", "cstr1", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "title", ")", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "...
6,865
all-6866
[ "Add", "will", "add", "the", "specified", "models", "to", "the", "catalog", "." ]
[ "func", "(", "c", "*", "Catalog", ")", "Add", "(", "<mask>", "...", "Model", ")", "{", "for", "_", ",", "model", ":=", "range", "models", "{", "// get name", "name", ":=", "Init", "(", "model", ")", ".", "Meta", "(", ")", ".", "PluralName", "\n\n",...
6,866
all-6867
[ "FindIssues", "returns", "f", ".", "Issues" ]
[ "func", "(", "f", "*", "FakeClient", ")", "FindIssues", "(", "query", ",", "<mask>", "string", ",", "asc", "bool", ")", "(", "[", "]", "github", ".", "Issue", ",", "error", ")", "{", "return", "f", ".", "Issues", ",", "nil", "\n", "}" ]
6,867
all-6868
[ "GetPageIterator", "returns", "a", "OutgoingCallerIDPageIterator", "with", "the", "given", "page", "filters", ".", "Call", "iterator", ".", "Next", "()", "to", "get", "the", "first", "page", "of", "resources", "(", "and", "again", "to", "retrieve", "subsequent",...
[ "func", "(", "o", "*", "OutgoingCallerIDService", ")", "GetPageIterator", "(", "data", "<mask>", ".", "Values", ")", "*", "OutgoingCallerIDPageIterator", "{", "iter", ":=", "NewPageIterator", "(", "o", ".", "client", ",", "data", ",", "callerIDPathPart", ")", ...
6,868
all-6869
[ "MarshalJSON", "supports", "json", ".", "Marshaler", "interface" ]
[ "func", "(", "v", "InsertTextParams", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "w", ":=", "jwriter", ".", "Writer", "{", "}", "\n", "easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput5", "(", "&", "w", ",", "v", ")", ...
6,869
all-6870
[ "GetClientChannels", "gets", "client", "channel", "information", "." ]
[ "func", "(", "h", "*", "Handler", ")", "GetClientChannels", "(", "tkn", "string", ",", "channelStatus", ",", "serviceStatus", "[", "]", "string", ",", "offset", ",", "limit", "uint", ")", "(", "*", "GetClientChannelsResult", ",", "error", ")", "{", "logger...
6,870
all-6871
[ "shouldVisit", "returns", "true", "if", "Walk", "should", "visit", "the", "subdirectory", "rel", "." ]
[ "func", "shouldVisit", "(", "rel", "string", ",", "mode", "Mode", ",", "updateRels", "map", "[", "string", "]", "bool", ")", "bool", "{", "if", "<mask>", "!=", "UpdateDirsMode", "{", "return", "true", "\n", "}", "\n", "_", ",", "ok", ":=", "updateRels"...
6,871
all-6872
[ "Write", "creates", "new", "influxdb", ".", "BatchPoints", "containing", "p", "and", "delegates", "that", "to", "the", "writer" ]
[ "func", "(", "w", "*", "SinglePointWriter", ")", "Write", "(", "bpConf", "influxdb", ".", "BatchPointsConfig", ",", "p", "*", "influxdb", ".", "<mask>", ")", "error", "{", "bp", ":=", "newBatchPoints", "(", "bpConf", ")", "\n", "bp", ".", "AddPoint", "("...
6,872
all-6873
[ "Output", "returns", "the", "output", "filename", "for", "testing", "." ]
[ "func", "Output", "(", "name", ",", "ext", "string", ")", "string", "{", "var", "root", "string", "\n", "if", "ext", "==", "\"", "\"", "||", "ext", "==", "\"", "\"", "{", "root", "=", "\"", "\"", "\n", "}", "\n", "return", "fmt", ".", "Sprintf", ...
6,873
all-6874
[ "totalNetworkAdapters", "returns", "the", "total", "number", "of", "network", "adapters", "in", "the", "VMX", "file", "." ]
[ "func", "(", "v", "*", "VM", ")", "totalNetworkAdapters", "(", "vmx", "map", "[", "string", "]", "string", ")", "int", "{", "var", "total", "int", "\n", "prefix", ":=", "\"", "\"", "\n\n", "for", "key", ":=", "range", "vmx", "{", "if", "strings", "...
6,874
all-6875
[ "GetPageTitle", "is", "a", "wrapper", "around", "gtk_assistant_get_page_title", "()", "." ]
[ "func", "(", "v", "*", "Assistant", ")", "GetPageTitle", "(", "page", "IWidget", ")", "string", "{", "return", "goString", "(", "C", ".", "gtk_assistant_get_page_title", "(", "v", ".", "native", "(", ")", ",", "<mask>", ".", "toWidget", "(", ")", ")", ...
6,875
all-6876
[ "NewWhisper", "create", "instance", "of", "Whisper" ]
[ "func", "NewWhisper", "(", "rootPath", "string", ",", "schemas", "WhisperSchemas", ",", "aggregation", "*", "WhisperAggregation", ",", "recv", "func", "(", "chan", "bool", ")", "string", ",", "<mask>", "func", "(", "string", ")", "(", "*", "points", ".", "...
6,876
all-6877
[ "String", "representation", "suitable", "for", "human", "consumption", "." ]
[ "func", "(", "o", "*", "Object", ")", "String", "(", ")", "string", "{", "var", "buf", "bytes", ".", "<mask>", "\n", "fmt", ".", "Fprint", "(", "&", "buf", ",", "o", ".", "reflectType", ")", "\n", "if", "o", ".", "Name", "!=", "\"", "\"", "{", ...
6,877
all-6878
[ "SetTitle", "()", "is", "a", "wrapper", "around", "gtk_tree_view_column_set_title", "()", "." ]
[ "func", "(", "v", "*", "TreeViewColumn", ")", "SetTitle", "(", "t", "string", ")", "{", "cstr", ":=", "(", "*", "C", ".", "gchar", ")", "(", "C", ".", "CString", "(", "t", ")", ")", "\n", "defer", "C", ".", "<mask>", "(", "unsafe", ".", "Pointe...
6,878
all-6879
[ "GetColor", "is", "a", "wrapper", "around", "gtk_style_context_get_color", "()", "." ]
[ "func", "(", "v", "*", "StyleContext", ")", "GetColor", "(", "<mask>", "StateFlags", ")", "*", "gdk", ".", "RGBA", "{", "gdkColor", ":=", "gdk", ".", "NewRGBA", "(", ")", "\n", "C", ".", "gtk_style_context_get_color", "(", "v", ".", "native", "(", ")",...
6,879
all-6880
[ "Parse", "parses", "a", "NAT", "interface", "description", "." ]
[ "func", "Parse", "(", "config", "*", "Config", ")", "(", "Interface", ",", "error", ")", "{", "switch", "config", ".", "Mechanism", "{", "case", "\"", "\"", ":", "return", "any", "(", "config", ")", ",", "nil", "\n", "case", "\"", "\"", ":", "retur...
6,880
all-6881
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "HighlightRectParams", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay9", "(", "&", ...
6,881
all-6882
[ "Addrs", "discovers", "ip", "addresses", "of", "nodes", "that", "match", "the", "given", "filter", "criteria", ".", "The", "config", "string", "must", "have", "the", "format", "provider", "=", "xxx", "key", "=", "val", "key", "=", "val", "...", "where", ...
[ "func", "(", "d", "*", "Discover", ")", "Addrs", "(", "cfg", "string", ",", "l", "*", "<mask>", ".", "Logger", ")", "(", "[", "]", "string", ",", "error", ")", "{", "d", ".", "once", ".", "Do", "(", "d", ".", "initProviders", ")", "\n\n", "args...
6,882
all-6883
[ "Printf", "outputs", "formatted", "Print", "log" ]
[ "func", "(", "g", "*", "Glg", ")", "Printf", "(", "<mask>", "string", ",", "val", "...", "interface", "{", "}", ")", "error", "{", "return", "g", ".", "out", "(", "PRINT", ",", "format", ",", "val", "...", ")", "\n", "}" ]
6,883
all-6884
[ "copyUpdatedConfigAndManifest", "updates", "the", "image", "per", "ic", ".", "manifestUpdates", "if", "necessary", "stores", "the", "resulting", "config", "and", "manifest", "to", "the", "destination", "and", "returns", "the", "stored", "manifest", "." ]
[ "func", "(", "ic", "*", "imageCopier", ")", "copyUpdatedConfigAndManifest", "(", "ctx", "context", ".", "Context", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "pendingImage", ":=", "ic", ".", "src", "\n", "if", "!", "reflect", ".", "DeepEqual", ...
6,884
all-6885
[ "NewWriter", "returns", "a", "new", "Writer", "it", "will", "flush", "when", "it", "gets", "termHeight", "many", "lines", "including", "the", "header", "line", ".", "The", "header", "line", "will", "be", "reprinted", "termHeight", "many", "lines", "have", "b...
[ "func", "NewWriter", "(", "w", "io", ".", "Writer", ",", "<mask>", "string", ")", "*", "Writer", "{", "if", "header", "[", "len", "(", "header", ")", "-", "1", "]", "!=", "'\\n'", "{", "panic", "(", "\"", "\"", ")", "\n", "}", "\n", "tabwriter", ...
6,885
all-6886
[ "RenameProject", "renames", "an", "existing", "project", "entry" ]
[ "func", "(", "r", "*", "ProtocolLXD", ")", "RenameProject", "(", "name", "string", ",", "project", "api", ".", "ProjectPost", ")", "(", "Operation", ",", "error", ")", "{", "if", "!", "r", ".", "HasExtension", "(", "\"", "\"", ")", "{", "return", "ni...
6,886
all-6887
[ "Rename", "renames", "a", "dataset", "." ]
[ "func", "(", "d", "*", "Dataset", ")", "Rename", "(", "name", "string", ",", "createParent", "bool", ",", "recursiveRenameSnapshots", "bool", ")", "(", "*", "Dataset", ",", "error", ")", "{", "args", ":=", "<mask>", "(", "[", "]", "string", ",", "3", ...
6,887
all-6888
[ "ClipboardGet", "()", "is", "a", "wrapper", "around", "gtk_clipboard_get", "()", "." ]
[ "func", "ClipboardGet", "(", "atom", "gdk", ".", "Atom", ")", "(", "*", "Clipboard", ",", "error", ")", "{", "c", ":=", "C", ".", "gtk_clipboard_get", "(", "C", ".", "GdkAtom", "(", "unsafe", ".", "Pointer", "(", "<mask>", ")", ")", ")", "\n", "if"...
6,888
all-6889
[ "init", "intializes", "the", "decoder", "for", "decoding", "a", "new", "file", "." ]
[ "func", "(", "d", "*", "decoder29", ")", "init", "(", "r", "io", ".", "ByteReader", ",", "<mask>", "bool", ")", "error", "{", "if", "d", ".", "br", "==", "nil", "{", "d", ".", "br", "=", "newRarBitReader", "(", "r", ")", "\n", "}", "else", "{",...
6,889
all-6890
[ "API", "functions" ]
[ "func", "operationGet", "(", "d", "*", "Daemon", ",", "r", "*", "http", ".", "Request", ")", "Response", "{", "id", ":=", "mux", ".", "Vars", "(", "r", ")", "[", "\"", "\"", "]", "\n\n", "var", "body", "*", "api", ".", "Operation", "\n\n", "// Fi...
6,890
all-6891
[ "registerResource", "sends", "a", "request", "to", "create", "CRDs", "and", "waits", "for", "them", "to", "initialize" ]
[ "func", "registerResource", "(", "config", "*", "<mask>", ".", "Config", ",", "t", "Type", ")", "error", "{", "c", ",", "err", ":=", "apiextensionsclient", ".", "NewForConfig", "(", "config", ")", "\n", "if", "err", "!=", "nil", "{", "return", "err", "...
6,891
all-6892
[ "ErrorList", "implements", "the", "error", "interface", "." ]
[ "func", "(", "l", "ErrorList", ")", "Error", "(", ")", "string", "{", "switch", "len", "(", "l", ")", "{", "case", "0", ":", "return", "\"", "\"", "\n", "<mask>", "1", ":", "return", "l", "[", "0", "]", ".", "Error", "(", ")", "\n", "}", "\n"...
6,892
all-6893
[ "Errorln", "logging" ]
[ "func", "(", "l", "*", "StdLevelLogger", ")", "Errorln", "(", "args", "...", "interface", "{", "}", ")", "{", "l", ".", "loglnFunc", "(", "ErrorLevel", ",", "l", ".", "<mask>", ",", "args", "...", ")", "\n", "}" ]
6,893
all-6894
[ "PadFrameRange", "takes", "a", "frame", "range", "string", "and", "returns", "a", "new", "range", "with", "each", "number", "padded", "out", "with", "zeros", "to", "a", "given", "width" ]
[ "func", "PadFrameRange", "(", "frange", "string", ",", "pad", "int", ")", "string", "{", "// We don't need to do anything if they gave us", "// an invalid pad number", "if", "pad", "<", "2", "{", "return", "frange", "\n", "}", "\n\n", "size", ":=", "strings", ".",...
6,894
all-6895
[ "title", ":", "service", "instance", "proxy", "path", ":", "/", "services", "/", "{", "service", "}", "/", "proxy", "/", "{", "instance", "}", "method", ":", "*", "responses", ":", "401", ":", "Unauthorized", "404", ":", "Instance", "not", "found" ]
[ "func", "serviceInstanceProxy", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Request", ",", "t", "auth", ".", "Token", ")", "(", "err", "error", ")", "{", "serviceName", ":=", "r", ".", "URL", ".", "Query", "(", ")", ".", "...
6,895
all-6896
[ "Do", "executes", "DOM", ".", "getDocument", "against", "the", "provided", "context", ".", "returns", ":", "root", "-", "Resulting", "node", "." ]
[ "func", "(", "p", "*", "GetDocumentParams", ")", "Do", "(", "ctx", "context", ".", "Context", ")", "(", "root", "*", "cdp", ".", "Node", ",", "err", "error", ")", "{", "// execute", "var", "res", "GetDocumentReturns", "\n", "err", "=", "cdp", ".", "E...
6,896
all-6897
[ "Sum32", "returns", "the", "32", "bits", "Hash", "value", "." ]
[ "func", "(", "xxh", "*", "XXHZero", ")", "Sum32", "(", ")", "uint32", "{", "h32", ":=", "uint32", "(", "xxh", ".", "totalLen", ")", "\n", "if", "h32", ">=", "16", "{", "h32", "+=", "rol1", "(", "xxh", ".", "v1", ")", "+", "rol7", "(", "xxh", ...
6,897
all-6898
[ "NewSkiplist", "makes", "a", "new", "empty", "skiplist", "with", "a", "given", "arena", "size" ]
[ "func", "NewSkiplist", "(", "arenaSize", "int64", ")", "*", "Skiplist", "{", "arena", ":=", "newArena", "(", "arenaSize", ")", "\n", "head", ":=", "newNode", "(", "arena", ",", "nil", ",", "y", ".", "ValueStruct", "{", "}", ",", "maxHeight", ")", "\n",...
6,898
all-6899
[ "UnmarshalJSON", "supports", "json", ".", "Unmarshaler", "interface" ]
[ "func", "(", "v", "*", "EventTargetDestroyed", ")", "UnmarshalJSON", "(", "data", "[", "]", "byte", ")", "error", "{", "r", ":=", "jlexer", ".", "Lexer", "{", "Data", ":", "<mask>", "}", "\n", "easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget14", "(", "&",...
6,899
all-6900
[ "Create", "creates", "a", "role", "if", "it", "doesn", "t", "exist", "yet", ".", "Creating", "roles", "is", "idempotent", "in", "the", "vault", "api", "so", "no", "need", "to", "check", "if", "it", "already", "exists", "." ]
[ "func", "(", "s", "*", "service", ")", "Create", "(", "params", "CreateParams", ")", "error", "{", "logicalStore", ":=", "s", ".", "vaultClient", ".", "Logical", "(", ")", "\n\n", "data", ":=", "map", "[", "string", "]", "interface", "{", "}", "{", "...