使用Go与redis构建有趣的应用client, _ := redis.Dial("tcp", "localhost:6379") defer client.Close() repl := client.Cmd("PING") content, _ := repl.Str() fmt.Println(content) // "PONG" } 连接客户端 package main import ( client, _ := redis.Dial("tcp", "localhost:6379") defer client.Close() repl := client.Cmd("PING") content, _ := repl.Str() fmt.Println(content) // "PONG" } 连接服务器器 连接客户端 package main import client, _ := redis.Dial("tcp", "localhost:6379") defer client.Close() repl := client.Cmd("PING") content, _ := repl.Str() fmt.Println(content) // "PONG" } 连接服务器器 执⾏行行命令并获取回复 连接客户端 package0 码力 | 176 页 | 2.34 MB | 1 年前3
Node.js Manual & Documentationeq='=') o querystring.escape o querystring.unescape REPL 交互式解释器 o repl.start(prompt='> ', stream=process.stdin) o REPL Features REPL 特性 Child Processes 子进程 o Event: 'exit' 事件:'exit' 赖的包找不到的情况下,就不会一直寻找到/usr/node_modules 目录或 /node_modules 目录中了。 In order to make modules available to the node REPL, it might be useful to also add the /usr/lib/node_modules folder to the $NODE_PATH environment variable of the files making the calls to require(), the packages themselves can be anywhere. 为了使模块在 node REPL 中可用,你可能需要将/usr/lib/node_modules 目录 加入到$NODE_PATH 环境变量中。由于在 node_modules 目录中搜索模块使用 的是相对路径,基于调用 req0 码力 | 153 页 | 1.21 MB | 1 年前3
NodeJS 中文文档 V0.2.3...............................................................................................56 REPL 交互执行............................................................................................. NodeJS,欢迎加入。 58 REPL REPL REPL REPL 交互执行 交互执行 交互执行 交互执行 node 的“读入、运行、输出循环模式(REPL)”既可以单独执行也很容易嵌入其它程序中。 REPL 提供了一种交互 式执行 Javascript 并查看结果的模式。这种模式可以用来调试、测试或者仅仅用来某些新特性。 如果直接执行 node 而不跟任何参数就会进入 REPL 模式。它类似于简化的 node。这样 REPL 就会使用标准终端 设置,如此一来你就可以使用 rlwarp 来执行高级行编辑。 示例,你可以在 bashrc 文件中添加如下指令: alias node="env NODE_NO_READLINE=1 rlwrap node" repl.start(prompt='node> ', stream=process.openStdin()) REPL 执行时将使用 prompt0 码力 | 62 页 | 542.14 KB | 1 年前3
Julia 中文文档JULIA_EXCLUSIVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 27.4 REPL 格式化输出 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 JULIA_ERROR_COLOR equality with a singleton 343 36 工作流程建议 345 36.1 基于 REPL 的工作流程 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 一个基本的编辑器 / REPL 工作流程 . . . . . . . . . . . . . . . . . . . . . you compile Matlab/Python/R/⋯code to Julia? . . . . . . . . . . . . . . . . . . . . . 357 38.2 会话和 REPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 如何从内存中删除某个对象?0 码力 | 1238 页 | 4.59 MB | 1 年前3
《Redis使用手册》(试读版)所以这个队列的体积越⼤, 它能够 记录的写命令就越多, 从服务器断线之后能够快速地重新回到⼀致状态的机会也就越⼤。 Redis 为这个队列设置 的默认⼤⼩为 1 MB , ⽤户也可以根据⾃⼰的需要, 通过配置选项 repl-backlog-size 来修改这个队列的⼤⼩。 18.4 ⽆需硬盘的复制 正如之前所说, 主服务器在进⾏完整同步的时候, 需要在本地创建 RDB ⽂件, 然后通过套接字将这个 RDB ⽂ 件传送给从服务器。 从服务器的数据同步。 要使⽤⽆需硬盘的复制特性, 我们只需要将 repl-diskless-sync 配置选项的值设置为 yes 就可以了: repl-diskless-sync⽐如以下代码就展示了如何在启动 Redis 服务器的同时, 启⽤服务器的⽆需硬盘复制特性: $ redis-server --repl-diskless-sync yes 最后要注意的是, ⽆需 可以通过在脚本⾥⾯调⽤ redis.set_repl() 函数并向它传⼊以下四个值来完成: redis.REPL_ALL —— 默认值,将写命令传播⾄ AOF ⽂件以及所有从服务器。 redis.REPL_AOF —— 只将写命令传播⾄ AOF ⽂件。 redis.REPL_SLAVE —— 只将写命令传播⾄所有从服务器。 redis.REPL_NONE —— 不传播写命令。 跟 redis 0 码力 | 352 页 | 6.57 MB | 1 年前3
06. 李欣宜 扩展Python的语法和语义 trings的已有代码,会有一次多余的源码重写。 同时,该机制不能直接用在REPL或者main模块里。 Python import mechanism lihaoyi/macropy利用了Python的import hook机制,代理了从源 代码转为字节码的过程。 和codecs的利用一样,该机制不能用在REPL或者main模块里。 出于方便使用者的考量,我们目前希望我们的语法语义扩展系统0 码力 | 39 页 | 3.69 MB | 1 年前3
Go Web编程(re *Regexp) ReplaceAll(src, repl []byte) []byte func (re *Regexp) ReplaceAllFunc(src []byte, repl func([]byte) []byte) []byte func (re *Regexp) ReplaceAllLiteral(src, repl []byte) []byte func (re *Regexp) *Regexp) ReplaceAllLiteralString(src, repl string) string func (re *Regexp) ReplaceAllString(src, repl string) string func (re *Regexp) ReplaceAllStringFunc(src string, repl func(string) string) string 这些0 码力 | 295 页 | 5.91 MB | 1 年前3
Apache ShardingSphere 中文文档 5.2.0和 Replication。 3. 配置 PostgreSQL 允许 Proxy 拥有 replication 权限。 pg_hba.conf 示例配置: host replication repl_acct 0.0.0.0/0 md5 详情请参见 The pg_hba.conf File。 4.2. ShardingSphere-Proxy 241 Apache ShardingSphere Log 和 Replication。 2. 配置 openGauss 允许 Proxy 拥有 replication 权限。 pg_hba.conf 示例配置: host replication repl_acct 0.0.0.0/0 md5 详情请参见 Configuring Client Access Authentication 和 Example: Logic Replication Code。 FIXED_ REPLICA_RANDOM 显示开启事务,读请求采用随机 策略路由到一个固定 repl ica;不 开事务,每次读流量使用随机策 略路由到不同的 replica FIXED_REPLI CA_ROUND_ROBIN 显示开启事务,读请求采用轮询 策略路由到一个固定 repl ica;不 开事务,每次读流量使用轮询策 略路由到不同的 replica FIXED_ REPLICA_WEIGHT0 码力 | 449 页 | 5.85 MB | 1 年前3
Debian 参考手册(版本 2.109)ReadLine/History 库的 Perl 扩展:perlsh(1) libreply-perl V:0, I:0 171 Perl 的 REPL : reply(1) libdevel-repl-perlV:0, I:0 237 Perl 的 REPL : re.pl(1) python3 V:712, I:950 81 Python: python3(1) 以及通过 python3-doc 跟踪一个 Perl 脚本 为测试 dash 代码,尝试下第 9.1.4 节,它提供了和 bash 类似的交互式环境。 为了测试 perl 代码,尝试下 Perl 的 REPL 环境,它为 Perl 提供了 Python 类似的 REPL (=READ + EVAL + PRINT + LOOP) 环境。 12.2.2 使用 shell 脚本的 GUI 程序 shell 脚本能够被改进用来制作一个吸引人的0 码力 | 261 页 | 1.39 MB | 1 年前3
Kubernetes安全求生指南完整的視覺化能見度! ©2019 VMware, Inc. 17 Harbor對於容器映像的安全防護措施 Development Team RBAC UAA AUTH REPL Image Pull K8s Cluster deployed by PKS Build Image Push Image Scan Image For CVEs Sign0 码力 | 23 页 | 2.14 MB | 1 年前3
共 42 条
- 1
- 2
- 3
- 4
- 5













