摘要: 准备篇: 配置防火墙,开启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端口准备篇: 配置防火墙,开启80端口、3306端口 vi /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp 阅读全文
posted @ 2013-01-23 10:46 lixiaojin 阅读(184) 评论(0) 推荐(0) 编辑
摘要: tar zxvf filename -C /xx/xx 阅读全文
posted @ 2013-01-21 15:54 lixiaojin 阅读(287) 评论(0) 推荐(0) 编辑
摘要: C# 取二位小数点(四舍五入) double d = 0.12545678; Console.WriteLine(d); Console.WriteLine(d.ToString("F2")); //0.13 Console.WriteLine(d.ToString("N2")); //0.13 Console.Read(); double dd = 99999990.12545678; Console.WriteLine(dd); Console.WriteLine(dd.ToString("F3")); //99999990.12 阅读全文
posted @ 2012-11-08 16:09 lixiaojin 阅读(865) 评论(1) 推荐(0) 编辑
摘要: 在软件开发尤其是框架和底层开发时,为了更灵活的控制代码,常常需要进行一些动态的操作。比如根据用户的输入等动态的调用类中的方法或者根据数据库表结构、用户要求动态的生成一些类,然后再动态的调用类中的方法。当然使用这些方式时会对性能有一点影响,具体使用过程中可以根据实际情况来定,不过一般的B/S开发中主要的瓶颈还是在数据库操作和网速方面,这点影响应该可以忽略的下面我就从这两个方面来说说动态代码的使用:一、反射的使用可以使用反射动态地创建类型的实例,将类型绑定到现有对象,或从现有对象中获取类型。然后,可以调用类型的方法或访问其字段和属性。需要使用的命名空间:System.Reflection反射的作用 阅读全文
posted @ 2012-10-17 09:55 lixiaojin 阅读(301) 评论(0) 推荐(0) 编辑
摘要: .fixed-top {position:fixed;bottom:auto;top:0px;} .fixed-bottom {position:fixed;bottom:0px;top:auto;} .fixed-left {position:fixed;right:auto;left:0px;} .fixed-right {position:fixed;right:0px;left:auto;}* html,* html body {background-image:url(about:blank);background-attachment:fixed;} * html... 阅读全文
posted @ 2012-09-24 17:45 lixiaojin 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 今天测装了windows servers 2008 组建了个双网卡的VM环境。用到ping命令的时候,发现2008可以ping通本机(windows7)。本机无法ping通2008于是ping了自己的IP,没问题……那说明TCP/IP协议没有配置错误!于是想到应该是防火墙的问题!打开防火墙,看了一下!windows 2008的防火墙与之前XP、2003的防火墙有很大的区别!熟悉了一下界面之后,开始查看,果然!我看到了,回显请求 服务器管理器——配置——高级安全windows防火墙——入站规则找到“文件和打印机共享(回显请求-ICMPv4-in)”右击……选择“启用规则”就OK了!如果用到IPV 阅读全文
posted @ 2012-08-14 11:12 lixiaojin 阅读(3056) 评论(0) 推荐(0) 编辑
摘要: 虚拟机暂停了,突然停电,再开机后无法启动暂停的虚拟机,出现下面的错误VMware Workstation unrecoverable error: (vmx) Exception 0xc0000006 (disk error while paging) has occurred. A log file is available in “D:\Documents and Settings\user\My Documents\My Virt l Machines\Fedora-10\vmware.log”. A core file is available in “D:\Documents and 阅读全文
posted @ 2012-08-07 09:06 lixiaojin 阅读(1642) 评论(0) 推荐(0) 编辑
摘要: Microsoft IIS 7.0 and later This section contains instructions for manually setting up Internet Information Services (IIS) 7.0 and later to work with PHP on Microsoft Windows Vista SP1, Windows 7, Windows Server 2008 and Windows Server 2008 R2. For instructions on setting up IIS 5.1 and IIS 6.0 on W 阅读全文
posted @ 2012-07-04 11:34 lixiaojin 阅读(821) 评论(0) 推荐(0) 编辑
摘要: URL的获取很简单,ASP.NET通用: 【1】获取 完整url (协议名+域名+虚拟目录名+文件名+参数)string url=Request.Url.ToString();【2】获取 虚拟目录名+页面名+参数:string url=Request.RawUrl; (或 string url=Request.Url.PathAndQuery;)【3】获取 虚拟目录名+页面名: string url=HttpContext.Current.Request.Url.AbsolutePath; (或 string url= HttpContext.Current.Request.Path;)【.. 阅读全文
posted @ 2012-06-19 09:29 lixiaojin 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 一个简单的asp.net mvc3分页using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Web.Mvc;using System.Web.Mvc.Html;namespace System.Web.Mvc.Html{ public static class ExtensionMethods { /// <summary>/// 创建分页链接/// </summary> ... 阅读全文
posted @ 2012-06-15 15:31 lixiaojin 阅读(403) 评论(0) 推荐(0) 编辑