当我运行它并输入一个数字时,它只是不停地重复它.例如,如果我放3,它会做3 3 3 3 3但不停止
int main()
{
int current=0, prev=1, prev2=1, fibnum;
cout << "Enter the number of Fibonacci numbers to compute: ";
cin >> fibnum;
if (fibnum <=0)
{
cout << "Error: Enter a positive number: ";
}
while (fibnum > 0){
current = prev + prev2;
prev = prev2;
prev2 = current;
current++;
cout << "," << fibnum;
cout << endl;
}
return 0;
}
Run Code Online (Sandbox Code Playgroud) 我是nohup命令的新手,但我不太了解它.我有一个名为update_item_loc.sql的sql脚本,我用putty调用它
到目前为止,我已完成以下命令
login as: **username**
sprusr13@servername.server.com's password:**xx**
username@servername:~> cd /fs01/app/rms04/external/scripts
username@servername:/fs01/app/rms04/external/scripts> sqlplus $UP
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Jan 27 16:16:50 2012 Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
- 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
userDB@DBserver>
Run Code Online (Sandbox Code Playgroud)
所以下一个命令就是
userDB@DBserver>nohup update_item_loc.sql > /fs01/app/rms04/external/logs/update_item_loc.log &
Run Code Online (Sandbox Code Playgroud)
它是否正确?
我想通过使用内置的rcon管理Minecraft服务器.
问题是服务器不返回内容.打开putty - >设置地址 - >设置端口 - >选择ssh - >点击打开 - >控制台打开,但是它的空&我什么也做不了.
奇怪的是:1.端口打开2.在putty日志中显示:连接到xxx.xxx.xxx.xxx端口xxxxx 3. minecraft控制台通知我连接到rcon
所以它看起来我已连接,但在putty控制台中没有任何显示.
我试过这个查询工具,它的工作正常.如果这个工具可以,为什么腻子不行?
Thnx任何帮助.
您好,我安装了一台安装了 Centos 5(64 位)的服务器,当我在输入用户 root 和密码后连接 Putty 时,我得到一个主题标签而不是美元符号,我很困惑。
[root@mokmeuh ~]#
Run Code Online (Sandbox Code Playgroud)
而且似乎很多命令都不起作用
[root@mokmeuh ~]# $chmod u+x file.sh
Run Code Online (Sandbox Code Playgroud)
这只是一个,但我无法运行 shell 脚本或类似的东西,所以我很困惑,需要一些帮助。
我正在尝试清除我的网络应用程序在 Putty 上的缓存:
php app/console cache:clear --env=prod
但是我得到了一个 Fatal error: Allowed memory size of 67108864 bytes exhausted...
我将我的 .user.ini 更改为 128M,而 info.php 显示了 128M 的正确值。但是当我在 putty 中运行命令时,我仍然收到一条消息
Fatal error: Allowed memory size of 67108864 bytes exhausted...
为什么在 info.php 上显示正确,而在错误信息中显示不正确?
我启动了一个无法使用 PuTTY 连接的 EC2 实例。我使用的是使用 PuTTYgen 创建然后导入 AWS 的密钥对。我已经在连接 -> SSH -> Auth 中指定了客户端的私钥文件。我在端口 22 上为 PuTTY 选择了 SSH。EC2 实例有一个安全组,该组有一个入站规则,允许来自我家用笔记本电脑的 IP 地址的端口 22 上的 TCP。当我尝试连接时仍然没有快乐。
在 PuTTY 窗口中,我看到:
Using username "ec2-user".
Server refused our key
Run Code Online (Sandbox Code Playgroud)
还会弹出一个错误对话框,显示此消息:
Disconnected: No supported authentication methods available (server sent publickey)
Run Code Online (Sandbox Code Playgroud)
任何人都可以建议我应该研究的其他事情或做不同的事情吗?我以前在这方面取得了成功,所以我知道它可以工作,但显然我已经忘记了一个或多个拼图。
在此先感谢您的任何建议,感谢您的帮助。
我使用 PuTTy 密钥生成器创建了一个公钥。我将公钥复制到david.pub并发送给将密钥放在服务器(vps)上的开发人员,以便我可以克隆存储库。当我创建公钥时,我输入了一个密码。当我尝试克隆时,会发生这种情况:
$ git clone my_app:money_app.git new_money_app
Cloning into 'new_money_app'...
Enter passphrase for key '/c/Users/User1/.ssh/david.pub':
我输入我设置的密码,这行重复了 3 次 Enter passphrase for key '/c/Users/User1/.ssh/david.pub':
然后显示后
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
存储库存在。这是我的配置文件的外观:
Host my_app
User git
HostName xx.xx.xxx.xx
PubkeyAuthentication yes
PreferredAuthentications publickey
IdentityFile ~/.ssh/david.pub
Run Code Online (Sandbox Code Playgroud)
我如何解决这个问题,以便我可以克隆存储库?我对 GIT 完全陌生,是否需要重新创建公钥?我被告知要创建一个公钥,我还需要一个私钥吗?
我是前端开发人员,所以这很令人困惑。
创建makefile时,我写道
test: main.o 1.o
gcc -o test main.o 1.o
main.o: main.c a.h
gcc -c main.c
1.o: 1.c a.h
gcc -c 1.c
Run Code Online (Sandbox Code Playgroud)
但是我不明白为什么我在第一行中使用-o并在第二,第三行中使用-c。它们之间有什么区别?
即使控制台(putty)关闭,如何保持golang项目运行.我在golang中开发了REST API,并在AWS上托管并使用putty连接和运行项目
以下命令用于安装和运行项目(myapi)
go install myapi
myapi
Run Code Online (Sandbox Code Playgroud)
当我关闭腻子时,它停止工作.
我已经第一次在git上提交了我的linux盒子.我还将远程仓库添加到Bit桶帐户.
当我在git commit最后40分钟击中时,我看到像这样的连续线
y
y
y
y
y
Run Code Online (Sandbox Code Playgroud)
在我的腻子终端.我想知道那是正常的,或者我应该打破这个操作