预览模式: 普通 | 列表

收集的时间服务器

   由于需要用到 时间ACL,交换机需要启用 sntp 功能来同步时间。这里收集了一些时间服务器:

中科院国家授时中心:
210.72.145.44

香港:
stdtime.gov.hk

 台湾:
time.stdtime.gov.tw
clock.stdtime.gov.tw

查看更多...

Tags: sntp ntpdate acl

分类:网络相关 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 109

c# 的一些正则表达式

excel 单元格(A-IV列,共256列,1-65536行):

"^((([a-zA-Z])|([a-hA-H][a-zA-Z])|([iI][a-vA-V]))((6553[0-6])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|(\\d{1,4})))$"

excel 单元格范围(A1:IV65536):

"^((([a-zA-Z])|([a-hA-H][a-zA-Z])|([iI][a-vA-V]))((6553[0-6])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|(\\d{1,4})))(:(([a-zA-Z])|([a-hA-H][a-zA-Z])|([iI][a-vA-V]))((6553[0-6])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|(\\d{1,4})))?$"

Tags: c# 正则

分类:网页制作 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 143

关闭 ubuntu 关机警告声

  夜猫对于 ubuntu 关机的警告声绝对是厌恶,因为太响了,现在来关掉它。

sudo echo blacklist pcspkr  >> /etc/modprobe.d/blacklist

Tags: 关机 blacklist

分类:Ubuntu | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 221

c# 查找目录下的所有子目录和文件

1.vs.net 2005 ,在 winform 中添加2个控件buttonSearch、textBoxFileList

2.以下是代码:

//递归实现查找目录下的所有子目录和文件  

public void FindFile(string dir)                           //参数为指定的目录  
{
    //在指定目录及子目录下查找文件,在listBox1中列出子目录及文件  
    DirectoryInfo Dir = new DirectoryInfo(dir);
    try
    {
        foreach (DirectoryInfo d in Dir.GetDirectories())     //查找子目录    
        {
            FindFile(Dir + d.ToString() + "\\");
            textBoxFileList.Text += (Dir + d.ToString() + "\\") + "\r\n";       //添加目录名  
        }
        foreach (FileInfo f in Dir.GetFiles("*.*"))             //查找文件  
        {
            textBoxFileList.Text += (Dir + f.ToString()) + "\r\n";     //添加文件名  
        }
    }
    catch (Exception e)
    {
        MessageBox.Show(e.Message);
    }
}

查看更多...

Tags: c# 递归 查找

分类:微软系统 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 273

为 firefox 和 opera 添加 flash 插件

先去 http://www.adobe.com/go/getflash 下载 .tar.gz for linux 。这里是 install_flash_player_10_linux.tar.gz

tar xvf install_flash_player_10_linux.tar.gz
cd install_flash_player_10_linux
sudo cp libflashplayer.so /usr/lib/mozilla/plugins/


64bit firefox 3.0.10
sudo apt-get install nspluginwrapper
nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

这时会在当前目录下生成 npwrapper.libflashplayer.so
sudo cp npwrapper.libflashplayer.so /usr/lib/nspluginwrapper/plugins/
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-addons/plugins/
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-3.0.10/plugins/

重启 firefox 就搞掂。

opera 9.64
确认 ~/.opera/pluginpaht.ini 中是否有 /usr/lib/mozilla/plugins=1 这行,没有可以自行添加。重启 opera 就搞掂。
可能我这里是 ubuntu 9.04 64 bit ,但使用的是 32bit 的 flash 插件,opera 非常慢。

查看:
nspluginwrapper -l
/usr/lib/mozilla/plugins/npwrapper.libflashplayer.so
  original plugin: /usr/lib/mozilla/plugins/libflashplayer.so
  Wrapper version string: 1.2.2
/usr/lib64/mozilla/plugins/npwrapper.libflashplayer.so
  original plugin: /usr/lib/mozilla/plugins/libflashplayer.so
  Wrapper version string: 1.2.2
/usr/lib/firefox/plugins/npwrapper.libflashplayer.so
  original plugin: /usr/lib/mozilla/plugins/libflashplayer.so
  Wrapper version string: 1.2.2
/usr/lib64/firefox/plugins/npwrapper.libflashplayer.so
  original plugin: /usr/lib/mozilla/plugins/libflashplayer.so
  Wrapper version string: 1.2.2

Tags: firefox opera flash

分类:Ubuntu | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 206

带宽性能测试工具 iperf

Iperf was developed by NLANRDAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss. 

翻译:由 NLANR/DAST 开发的 Iperf 是一个流行的能测量最大 TCP 和 UDP 带宽性能的工具。 Iperf 可以调整各种参数和具有 UDP 的特性。 Iperf 可以报告带宽,时延抖动,数据损失。

安装:

sudo apt-get install iperf

查看更多...

Tags: iperf tcp udp

分类:Ubuntu | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 231

IIS 未能创建 Mutex 问题的解决

有时浏览.aspx 页时会出现以下错误:
“/WebSite”应用程序中的服务器错误。 
   -------------------------------------------------------------------------------- 
  
   未能创建    Mutex。   
   说明:    执行当前    Web    请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。   
  
   异常详细信息:    System.InvalidOperationException:    未能创建    Mutex。
   源错误:   
  
   执行当前    Web    请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

关于这个问题给出以下解决方案:
1) 关闭VS.NET 和 IIS
2) net stop iisadmin
3) C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i -enable
4) iisreset

Tags: iis aspx mutex

分类:微软系统 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 240

解决 Windows XP iis 500 错误

1.在控制面板->管理工具->服务 中确认 "Distributed Transaction Coordinator" 服务有没有启动,没有启动就启动它,并设置成自动。
如果在启动时出现错误提示,请在开始菜单运行中输入 msdtc -resetlog  即可。 重启动"Distributed Transaction Coordinator"服务。

2.2.在命令行状态下输入以下命令:

cd c:\windows\system32\inetsrv\          

rundll32 wamreg.dll,CreateIISPackage   (注意大小写)

查看更多...

Tags: xp iis msdtc

分类:微软系统 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 286