您的当前位置:TAGS -> ruby
  • redis的ruby客户端(三)

    后端开发2025年07月19日

    1. 介绍 clients这里列出了redis所支持的语言的所有客户端程序,其中就有ruby的。有这么多的客户端,说明要实现redis的客户端是不难的。其实你只要掌握一种语言的socket编程就可以实现的,比如ruby中的socket编程,本站会有相关的章节来单独介绍在ruby中是如何进行socket编程的。redis是基于tcp/ip的通讯协议,也就是说...

  • ruby and python

    后端开发2025年07月18日

    1........... ...

  • Vim 7.4.1952 with Python/Ruby/Lua/Perl/C Syntax built for Ubuntu 16.04 x86_64

    后端开发2025年07月18日

    The default Vim provided by Ubuntu 16.04 even did not have Python support. That's insane. I say, what if I wanted to use Vim as a Python IDE in Linux as before? Ubuntu, you can't ...

  • Ruby语法解释:attr_reader,attr_writer和attr_accessor

    后端开发2025年07月18日

    attr_reader :abc 你可以在对象的实例中用 实例名.abc 得到这个变量的值,但不能修改,它相当于 def abcreturn @abcend 顺便说一下attr_writer和attr_accessor,attr_writer :abc它相当于 def abc=(abc) @abc = abcend 在这个情况下你不能通过实例名.abc获得...

  • Ruby: Call the system and get system information.

    后端开发2025年07月18日

    1. Kill the task cmd2="taskkill /F /IM typeperf.exe"stdout2=%x{#{cmd2}} 2. Start counters: cmd="typeperf -cfc:\\test.txt>c:\\test3.csv" 3. Get system in...

  • ruby安装sass报错解决办法

    后端开发2025年07月18日

    ERROR: Could not find a valid gem 'sass' (>= 0), here is why: Unable to download data from http://rubygems.org/ - Errno::EACCES: Per mission denied - connect(2) (http://rub...

  • Ruby语言学习记录

    后端开发2025年07月17日

    1、不需要声明即可使用变量2、类的名称的第一字母必须大写3、一个有构造函数的典型类class Rectangleattr_accessor:height,:widthdef initialize (hgt,wdth)@height = hgt@width = wdthenddef area ()@height*@widthendend4、程序控制(1)循环...

  • ruby数组和哈希表的区别,递归,二分查找方法

    后端开发2025年07月17日

    ...

  • Ruby 基础教程1-6

    后端开发2025年07月17日

    1.循环实现方法 循环语句 (while;for; loop,until) 循环方法(times,each) 2.for for 变量 in 对象 主体 end 3.while while 条件 end 4.until与while相反 条件不成立才进入循环体 until 条件 end 5.循环控制 break next redo 重复执行当前循环,循环变量...

  • Ruby 基础教程1-4

    后端开发2025年07月17日

    1.对象 数值对象 字符串对象 数组对象,散列对象 正则表达式对象 时间对象 文件对象 符号对象 2.类 Numeric String Array Hash Regexp File Symbol 3.变量,变量的开头决定了变量的类型 局部变量,以英文字母或者_开头 全局变量,以$开头 实例变量,以@开头 类变量,以@@开头 伪变量(nil,true,fal...