摘要: vsftpd.ftpusers:位于/etc目录下。它指定了哪些用户账户不能访问FTP服务器,例如root等。 vsftpd.user_list:位于/etc目录下。该文件里的用户账户在默认情况下也不能访问FTP服务器,仅当vsftpd.conf配置文件里启用userlist_enable=NO选项时才允许访问。 vsftpd.conf:位于/etc/vsftpd目录下。来自定义用户登录控制、用户权限控制、超时设置、服务器功能选项、服务器性能选项、服务器响应消息等FTP服务器的配置。 (1)用户登录控制 anonymous_enable=YES,允许匿名用户登录。 no_anon_p... 阅读全文
posted @ 2014-02-26 14:36 sangxb 阅读(6470) 评论(0) 推荐(0)
摘要: 1:安装vsftpdyum install vsftpd2:关闭防火墙 serviceiptables stop3:允许21端口通行 执行# vi/etc/sysconfig/iptables 添加下面两条到配置防火墙配置的22号端口那行的下面 -A INPUT -m state --stateNEW -m tcp -p tcp --dport 21 -j ACCEPT -A INPUT-p tcp--dport 30000:30100 -j ACCEPT4:重启防火墙 service iptables restart5:启动ftp service vsftpd start (这时... 阅读全文
posted @ 2014-02-26 14:35 sangxb 阅读(367) 评论(0) 推荐(0)
摘要: 准备篇:1、配置防火墙,开启80端口、3306端口 vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #允许80端口通过防火墙 -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT #允许3306端口通过防火墙备注:很多人把这两条规则添加到防火墙配置的最后一行,导致防火墙启动失败,正确的应该是添加到默认的22端口这条规则的下面如下所示:######################## 阅读全文
posted @ 2014-02-26 14:31 sangxb 阅读(205) 评论(0) 推荐(0)
摘要: 安装:String str = "/XXXX.apk"; String fileName = Environment.getExternalStorageDirectory() + str; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(fileName)), "application/vnd.android.package-archive"); startActivity(intent);卸载:Uri package 阅读全文
posted @ 2014-02-26 14:27 sangxb 阅读(734) 评论(0) 推荐(0)
摘要: 方法一:通过WindowManager获取1 private DisplayMetrics dm;//屏幕分辨率容器2 dm = new DisplayMetrics();3 this.getWindowManager().getDefaultDisplay().getMetrics(dm);4 int width = dm.widthPixels;5 int height = dm.heightPixels;View Code 方法二:通过Resources获取1 DisplayMetrics dm = getResources().getDispla... 阅读全文
posted @ 2014-02-25 11:39 sangxb 阅读(2954) 评论(0) 推荐(1)
摘要: 使用Fragment的时候,出现了这个错误IllegalStateException: Can not perform this action after onSaveInstanceState:如图在使用FragmentTransition的 commit方法添加一个Fragment的时候出现的,... 阅读全文
posted @ 2014-02-25 10:09 sangxb 阅读(552) 评论(0) 推荐(0)
摘要: Eclipse运行程序时出现问题:Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.解决方案: 因为最新的19版本会在你的项目下建立一个依赖包 Android... 阅读全文
posted @ 2014-02-18 14:26 sangxb 阅读(254) 评论(0) 推荐(0)
摘要: launchMode在多个Activity跳转的过程中扮演着重要的角色,它可以决定是否生成新的Activity实例,是否重用已存在的Activity实例,是否和其他Activity实例公用一个task里。Activity 有四种加载模式 [1] standard 模式 这是默认模式,每次激活Activity时都会创建Activity实例,并放入任务栈中。 [2] singleTop 模式 如果在任务的栈顶正好存在该Activity的实例,就重用该实例( 会调用实例的 onNewIntent() ),否则就会创建新的实例并放入栈顶,即使栈中已经存在该Activity的实例,只要不在栈顶,... 阅读全文
posted @ 2013-10-29 09:45 sangxb 阅读(305) 评论(0) 推荐(0)
摘要: 今天收藏了这几种关于识别ie版本的几种代码,有需要的朋友参考一下:var isIE=!!window.ActiveXObject;var isIE6=isIE&&!window.XMLHttpRequest;var isIE8=isIE&&!!document.documentMode;var isIE7=isIE&&!isIE6&&!isIE8;if (isIE){ if (isIE6){ alert("ie6"); }else if (isIE8){ alert("ie8"); }els 阅读全文
posted @ 2013-10-25 09:59 sangxb 阅读(313) 评论(0) 推荐(0)
摘要: 1、前端JS代码/* receiver-----接收人 */function foreachEmail(receiver){ var str=""; var email =""; if(receiver!="" && receiver.indexOf(";")>0) { var arremail=receiver.split(";"); for(var i=0;i 0){ if(arremail[i] != arremail[i-1]){ email = email+&qu 阅读全文
posted @ 2013-10-25 09:56 sangxb 阅读(239) 评论(0) 推荐(0)