小编Kot*_*awa的帖子

"错误的参数数量(1为0)"在Ruby中意味着什么?

"参数错误:错误的参数数量(1表示0)"是什么意思?

ruby

59
推荐指数
2
解决办法
9万
查看次数

37
推荐指数
3
解决办法
25万
查看次数

从结束值创建一系列字符串

我用irb.

我写下面的代码.
"ax".."bc"
我预计
"ax""ay""az""ba"bb""bc"

但结果是公正的
"ax".."bc"

我该怎么说?谢谢.

ruby range

5
推荐指数
1
解决办法
126
查看次数

错误键入字符串后,为什么IRB不工作?

我开始使用IRB学习Ruby并在下面写错了代码:

irb(main):001:0>"amefurashi".delete(aiueo")
Run Code Online (Sandbox Code Playgroud)

我注意到它缺少双引号,并且提示符改为:

irb(main):002:1"
Run Code Online (Sandbox Code Playgroud)

我写了正确的代码:

irb(main):001:1"amefurashi".delete("aiueo")
Run Code Online (Sandbox Code Playgroud)

但为什么它不起作用?

ruby irb

4
推荐指数
1
解决办法
971
查看次数

如何为mac os x安装postgresql

我使用自制软件,将此命令写入terminal.app以安装postgresql.

`brew install postgresql`
<pre>==> Installing postgresql dependency: ossp-uuid  
==> Downloading ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz  

curl: (7) couldn't connect to host  
Trying a mirror...  
==> Downloading http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz  
######################################################################## 100.0%  
==> ./configure --disable-debug --without-perl --without-php --without-pgsql --prefix=/usr/local/Cell  
==> make  
==> make install  
/usr/local/Cellar/ossp-uuid/1.6.2: 12 files, 332K, built in 62 seconds  
==> Installing postgresql  
==> Downloading http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v9.1.1/postgresql-9.1.1.t  
######################################################################## 100.0%  
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.1 --enable-thread-safety --  
==> make install-world  
==> Caveats  
# Build Notes  

If builds of PostgreSQL 9 are failing and you have version 8.x …
Run Code Online (Sandbox Code Playgroud)

postgresql macos

4
推荐指数
1
解决办法
1万
查看次数

JAVA"while"为什么这段代码的结果= 4949?

我认为这段代码的结果= 4950.那是因为99 + 98 + ... 1 = 4950.你能告诉我怎么样吗?

public static void main(String[] args) {
    int n = 100;
    int total = 0;
    while(n >= 0){
        total += --n;
    }
    System.out.println(total);
}
Run Code Online (Sandbox Code Playgroud)

java

1
推荐指数
1
解决办法
173
查看次数

标签 统计

ruby ×3

java ×2

irb ×1

macos ×1

postgresql ×1

range ×1