Understanding Ruby with BPF - rbperfrbperf: Understanding Ruby with BPF Javier Honduvilla CotoOctober 28th-29th, 2020 Why BPF? Why BPF? - Flexibility Why BPF? - Flexibility - Low overhead Why BPF? - Flexibility profiling - No modifications of the tracee rbperf rbperf - Profile Ruby programs rbperf - Profile Ruby programs - Trace complex Ruby programs execution rbperf – on-CPU profiling - $ rbperf record --pid=124 for a dynamic language - Supporting multiple Ruby versions Challenges - Implementing the stack walking for a dynamic language - Supporting multiple Ruby versions - Correctness testing Challenges - 0 码力 | 19 页 | 972.07 KB | 1 年前3
Hello 算法 1.2.0 繁体中文 Ruby 版Hello 演算法 Ruby 語言版 作者:靳宇棟(@krahets) 程式碼審閱:阮春科秀(@khoaxuantu) Release 1.2.0 2024‑12‑06 序 兩年前,我在力扣上分享了“劍指 Offer”系列題解,受到了許多讀者的鼓勵與支持。在與讀者交流期間,我 最常被問到的一個問題是“如何入門演算法”。漸漸地,我對這個問題產生了濃厚的興趣。 兩眼一抹黑地刷題似乎是最受 換句話說,基本資料型別提供了資料的“內容型別”,而資料結構提供了資料的“組織方式”。例如以下程式 碼,我們用相同的資料結構(陣列)來儲存與表示不同的基本資料型別,包括 int、float、char、bool 等。 # Ruby 的串列可以自由儲存各種基本資料型別和物件引用 data = [0, 0.0, 'a', false, ListNode(0)] 3.3 數字編碼 * Tip 在本書中,標題帶有 * 符號 列元素依次複製到新陣列。這是一個 ?(?) 的操作,在陣列很大的情況下非常耗時。程式碼如下所示: # === File: array.rb === ### 擴展陣列長度 ### # 請注意,Ruby 的 Array 是動態陣列,可以直接擴展 # 為了方便學習,本函式將 Array 看作長度不可變的陣列 def extend(nums, enlarge) # 初始化一個擴展長度後的陣列0 码力 | 372 页 | 18.75 MB | 10 月前3
Hello 算法 1.2.0 简体中文 Ruby 版Hello 算法 Ruby 语言版 作者:靳宇栋(@krahets) 代码审阅:阮春科秀(@khoaxuantu) Release 1.2.0 2024‑12‑06 序 两年前,我在力扣上分享了“剑指 Offer”系列题解,受到了许多读者的鼓励和支持。在与读者交流期间,我 最常被问的一个问题是“如何入门算法”。逐渐地,我对这个问题产生了浓厚的兴趣。 两眼一抹黑地刷题似乎是最受欢迎的方 换句话说,基本数据类型提供了数据的“内容类型”,而数据结构提供了数据的“组织方式”。例如以下代码, 我们用相同的数据结构(数组)来存储与表示不同的基本数据类型,包括 int、float、char、bool 等。 # Ruby 的列表可以自由存储各种基本数据类型和对象引用 data = [0, 0.0, 'a', false, ListNode(0)] 3.3 数字编码 * Tip 在本书中,标题带有 * 符号 数组元素依次复制到新数组。这是一个 ?(?) 的操作,在数组很大的情况下非常耗时。代码如下所示: # === File: array.rb === ### 扩展数组长度 ### # 请注意,Ruby 的 Array 是动态数组,可以直接扩展 # 为了方便学习,本函数将 Array 看作长度不可变的数组 def extend(nums, enlarge) # 初始化一个扩展长度后的数组0 码力 | 372 页 | 18.44 MB | 10 月前3
OpenShift Container Platform 4.14 镜像为什么使用镜像流 1.9. 镜像流标签 1.10. 镜像流镜像 1.11. 镜像流触发器 1.12. 如何使用 CLUSTER SAMPLES OPERATOR 1.13. 关于模板 1.14. 如何使用 RUBY ON RAILS 第 第 2 章 章 配置 配置 CLUSTER SAMPLES OPERATOR 2.1. 了解 CLUSTER SAMPLES OPERATOR 2.2. CLUSTER 控制台创建应用程序 10.4. 使用 CLI 从模板创建对象 10.5. 修改所上传的模板 10.6. 使用即时应用程序和快速启动模板 10.7. 编写模板 第 第 11 章 章 使用 使用 RUBY ON RAILS 11.1. 先决条件 11.2. 设置数据库 11.3. 编写应用程序 11.4. 将应用程序部署至 OPENSHIFT CONTAINER PLATFORM 第 第 12 OpenShift Container Platform 4.14 镜 镜像 像 6 模板是要复制的对象的定义。您可以使用模板来构建和部署配置。 1.14. 如何使用 RUBY ON RAILS 作为开发人员,您可以使用 Ruby on Rails 进行: 编写应用程序: 设置数据库。 创建欢迎页面。 为 OpenShift Container Platform 配置应用程序。 将您的应用存储在0 码力 | 118 页 | 1.13 MB | 1 年前3
OpenShift Container Platform 4.2 镜像. . . . . . . . . 8.5. 修改所上传的模板 8.6. 使用 INSTANT APP 和 QUICKSTART 模板 8.7. 编写模板 第 第 9 章 章 使用 使用 RUBY ON RAILS 9.1. 设置数据库 9.2. 编写应用程序 9.3. 将应用程序部署至 OPENSHIFT CONTAINER PLATFORM 第 第 10 章 章 使用 使用镜 镜像 redhat.io 的被镜像(mirror)的镜像与您需要的任何镜像流相关联 $ oc image mirror registry.redhat.io/rhscl/ruby-25-rhel7:latest ${MIRROR_ADDR}/rhscl/ruby- 25-rhel7:latest 3. 在集群的镜像配置对象中,为镜像添加所需的可信 CA: $ oc create configmap registry-config 上专用的容器镜像时适用的准则。 启 启用 用 Source-to-Image (S2I) 的 的镜 镜像 像 对于计划运行由第三方提供的应用程序代码的镜像,例如专为运行由开发人员提供的 Ruby 代码而设计的 Ruby 镜像,您可以让镜像与 Source-to-Image (S2I) 构建工具协同工作。S2I 是一个框架,便于编写以应 用程序源代码为输入的镜像和生成以运行汇编应用程序为输出的新镜像。0 码力 | 92 页 | 971.35 KB | 1 年前3
OpenShift Container Platform 4.7 镜像为什么使用镜像流 1.9. 镜像流标签 1.10. 镜像流镜像 1.11. 镜像流触发器 1.12. 如何使用 CLUSTER SAMPLES OPERATOR 1.13. 关于模板 1.14. 如何使用 RUBY ON RAILS 第 第 2 章 章 配置 配置 CLUSTER SAMPLES OPERATOR 2.1. 了解 CLUSTER SAMPLES OPERATOR 2.1.1. Cluster 4. 编写模板对象列表 10.7.5. 将模板标记为可绑定 10.7.6. 公开模板对象字段 10.7.7. 等待模板就绪 10.7.8. 从现有对象创建模板 第 第 11 章 章 使用 使用 RUBY ON RAILS 11.1. 先决条件 11.2. 设置数据库 11.3. 编写应用程序 11.3.1. 创建欢迎页面 50 51 52 53 53 54 54 55 56 OpenShift Container Platform 4.7 镜 镜像 像 8 模板是要复制的对象的定义。您可以使用 模板 来构建和部署配置。 1.14. 如何使用 RUBY ON RAILS 作为开发者,您可以使用 Ruby on Rails 进行: 编写应用程序: 设置数据库. 创建欢迎页面。 为 OpenShift Container Platform 配置应用程序。 将应用存储在0 码力 | 123 页 | 1.20 MB | 1 年前3
OpenShift Container Platform 3.11 开始使用数据库,以及相关的信息和教程,供开发人员 参考来快速开始进行应用程序开发。Quickstart 模板提供了编程语言支持,它利用 构建器(builder)镜 像。 语 语言 言 实 实施及指南 施及指南 Ruby Rails Python Django Node.js Node.js PHP CakePHP Perl Dancer Java OpenShift Container Platform 您需要已下载并安装 OpenShift Container Platform CLI 。 4.3. FORK SAMPLE 仓库 1. 登录到 GitHub,访问 Ruby 示例 页面。 注意 注意 本节介绍 Ruby 示例,但您可以使用 OpenShift Container Platform GitHub 项目 中提供的任何语言示例进行操作。 2. Fork 仓库。 您会被重新指向您的新 Project。 2. 点击 Browse,然后从下拉列表中选择 ruby。 3. 点击 ruby:latest builder 镜像。 4. 为您的应用程序输入一个 名称 名称,并指定 Git Repository URL,即 https://github.com//ruby-ex.git。 5. 在默认情况下,此示例应用程序会自动创建路由、Webhook 0 码力 | 24 页 | 290.05 KB | 1 年前3
OpenShift Container Platform 4.10 CLI 工具30.159.137:5432 -> 8080) frontend deploys origin-ruby-sample:latest <- builds https://github.com/openshift/ruby-hello-world with joe-project/ruby-20-centos7:latest #1 deployed 22 minutes ago - container in the pod will be chosen oc attach mypod # Get output from ruby-container from pod mypod oc attach mypod -c ruby-container OpenShift Container Platform 4.10 CLI 工具 工具 24 2.5.1.9. oc auth raw terminal mode; sends stdin to 'bash' in ruby-container from pod mypod # and sends stdout/stderr from 'bash' back to the client oc attach mypod -c ruby-container -i -t # Get output from the first0 码力 | 120 页 | 1.04 MB | 1 年前3
OpenShift Container Platform 4.13 CLI 工具30.159.137:5432 -> 8080) frontend deploys origin-ruby-sample:latest <- builds https://github.com/openshift/ruby-hello-world with joe-project/ruby-20-centos7:latest #1 deployed 22 minutes ago - oc attach mypod # Get output from ruby-container from pod mypod oc attach mypod -c ruby-container # Switch to raw terminal mode; sends stdin to 'bash' in ruby-container from pod mypod # and sends sends stdout/stderr from 'bash' back to the client oc attach mypod -c ruby-container -i -t # Get output from the first pod of a replica set named nginx oc attach rs/nginx # Check to see if I can0 码力 | 128 页 | 1.11 MB | 1 年前3
OpenShift Container Platform 4.8 CLI 工具30.159.137:5432 -> 8080) frontend deploys origin-ruby-sample:latest <- builds https://github.com/openshift/ruby-hello-world with joe-project/ruby-20-centos7:latest #1 deployed 22 minutes ago - container in the pod will be chosen oc attach mypod # Get output from ruby-container from pod mypod oc attach mypod -c ruby-container OpenShift Container Platform 4.8 CLI 工具 工具 24 2.5.1.9. oc auth raw terminal mode, sends stdin to 'bash' in ruby-container from pod mypod # and sends stdout/stderr from 'bash' back to the client oc attach mypod -c ruby-container -i -t # Get output from the first0 码力 | 152 页 | 1.24 MB | 1 年前3
共 959 条
- 1
- 2
- 3
- 4
- 5
- 6
- 96













