用户服务器登陆后停在以下界面 Connecting to ... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Last :: from 183.12.29.213 Welcome to aliyun Elastic Compute Service! 就是欢迎界面,看不到命令行,需要按ctrl+c才能进入,肯定是执行profile时卡住了 这时操作非常慢,查看top都是bash进程 重启后发现,服务器刚…
int i = 0; while (flag) { printf("please input a number >>> "); scanf("%d", &i);//输入一个字符或字符串的时候死循环 printf("%d\n", i); } 以上直接返回一串0........死循环 当scanf输入类型不匹配的时候,返回一个0值,但是之前输入的字符仍旧在缓冲区里面,所以解决方式也比较容易,在代码中加入ffl…
先写一下原因吧!我是写的SSH项目,在项目中我遇到的问题是把分页对象(也就是pageBean对象)转化为json数据,下面为代码: public class PageBean <T>{//当前页private int pageNum;//页面显示数量private int pageSize; //查询总数(查询数据库所得)private int totalRecord;//当前页开始索引private int startIndex; //总页面数private int totalPage; /…
同事反馈他在一测试服务器(CentOS Linux release 7.2.1511)上修改了/etc/profile文件后,使用source命令不能生效,让我帮忙看看,结果使用SecureCRT一登录就发现下面错误信息: Last login: Fri Nov 4 00:42:45 2016 from 10.20.34.14 -bash: $'\r': command not found -bash: $'\r': command not found -bash: $'\r': c…