后端开发2025年07月18日
1........... ...
后端开发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 ...
后端开发2025年07月18日
attr_reader :abc 你可以在对象的实例中用 实例名.abc 得到这个变量的值,但不能修改,它相当于 def abcreturn @abcend 顺便说一下attr_writer和attr_accessor,attr_writer :abc它相当于 def abc=(abc) @abc = abcend 在这个情况下你不能通过实例名.abc获得...
后端开发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...
后端开发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...
后端开发2025年07月17日
1、不需要声明即可使用变量2、类的名称的第一字母必须大写3、一个有构造函数的典型类class Rectangleattr_accessor:height,:widthdef initialize (hgt,wdth)@height = hgt@width = wdthenddef area ()@height*@widthendend4、程序控制(1)循环...
后端开发2025年07月17日
...
后端开发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 重复执行当前循环,循环变量...
后端开发2025年07月17日
1.对象 数值对象 字符串对象 数组对象,散列对象 正则表达式对象 时间对象 文件对象 符号对象 2.类 Numeric String Array Hash Regexp File Symbol 3.变量,变量的开头决定了变量的类型 局部变量,以英文字母或者_开头 全局变量,以$开头 实例变量,以@开头 类变量,以@@开头 伪变量(nil,true,fal...
后端开发2025年07月17日
1.条件语句 if unless case unless和if相反,条件不成立则执行 2.条件 除了 false和nil 其他都是true 3.unless 语法 unless 条件 处理 end 4.case语句 case 比较对象 when 值1 when 值2 when 值3 else end when后面,ruby是用'==='做比较,'==='比...