摘要: System.Net.IPAddress addr;//获取IPaddr = new System.Net.IPAddress ( Dns.GetHostByName ( Dns.GetHostName ( ) ) .AddressList [0].Address ) ; return addr.T... 阅读全文
posted @ 2014-04-16 21:07 hikarusun 阅读(1162) 评论(0) 推荐(0) 编辑
摘要: class 你的类 { private Form1 frm; //构造函数 public 你的类( Form1 form) { frm = form; } //调用form方法 private void SendMessage(Form1 objform, int message) { objform.form的任何方法(message); } } //使用方法 SendMessage(... 阅读全文
posted @ 2014-04-04 23:09 hikarusun 阅读(9041) 评论(0) 推荐(0) 编辑
摘要: 1.输入sudo apt-get install vsftpd 回车 这样就安装完毕了,然后去建立一个ftp的帐号,我这里使用的是ftp。2.输入useradd ftp 回车 输入密码 回车 这样帐号就新建好了在/home/下应该会有一个ftp的文件夹3.配置vsftpd 输入vi /etc/vsf... 阅读全文
posted @ 2014-03-27 13:37 hikarusun 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 1.输入sudo apt-get install mysql-server 安装过程中会让你输入密码,这个密码是root的密码。 安装完毕后,就可以正常使用了,如果你需要外网用户能够连接继续下面的步骤。2.在终端输入mysql -u root -p 回车 输入您的密码 回车 进入mysql> 输入use mysql;回车 如果所有主机能够访问 输入GRANT ALL PRIVILEGES ON *.* TO'root'@'%' IDENTIFIED BY 'you_password' WITH GRANT OPTION; 输入flush p 阅读全文
posted @ 2014-03-27 11:32 hikarusun 阅读(4054) 评论(1) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-22 13:45 hikarusun 阅读(1369) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-12-05 15:04 hikarusun 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 翻译包下载网址:locallize.drupal.org中文模块 local自动下载模块 L10n_update第三方menu菜单admin menu,menu bar 打开这个后要关闭系统自带的toolbar第三方模块显示 modul filter未知模块笔记没写清楚 menu attribute,mega menu,speical items menu文本验证模块 Email,date,field_vaildation多语言模块 i18n水印模块 taxonomy,imagecache_ations文本运行php模块 php_fiter大神插件 views,entigy,rulesseo模 阅读全文
posted @ 2013-06-16 20:12 hikarusun 阅读(347) 评论(1) 推荐(1) 编辑
摘要: <VirtualHost *:80> ServerName www.***.com DocumentRoot /var/www/***/ <Directory "/var/www/***"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow From All</Directory></VirtualHost> 阅读全文
posted @ 2013-06-06 14:37 hikarusun 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 图片太大且规格不统一,显示的控制需要靠JavaScript来完成,用在移动设备上时显示效果不好且流量巨大,需要对现有图片库的图片进行一次处理,生成符合移动设备用的缩略图,将原来客户端JS做的工作转移到服务器端用PHP的GD库来集中处理。图片源与需要的大小:$src_img = "wallpaper.jpg";$dst_w = 300;$dst_h = 200; 剪裁图像,保证图像区域最大化显示,并按比例缩放到指定大小。一开始采用了 imagecopyresized 方法进行图像等比缩小,实际操作后发现,图像缩小后燥点非常严重。后再换用 imagecopyresampled 阅读全文
posted @ 2013-01-11 16:08 hikarusun 阅读(180) 评论(0) 推荐(0) 编辑
摘要: private double MeasureTextWidth(string text, double fontSize, string fontFamily) { FormattedText formattedText = new FormattedText( text, System.Globalization.CultureInfo.InvariantCulture, FlowDirection.LeftToRight, new Typeface(fontFamily.ToString()), fontSize, Brushes.Black ); returnformattedText. 阅读全文
posted @ 2012-12-05 02:32 hikarusun 阅读(614) 评论(0) 推荐(0) 编辑