CQ-CSER

计算机爱好者

启动控制面板各选项:c#

private void button1_Click(object sender, EventArgs e) {//启动控制面板Internet选项 System.Diagnostics.Process.Start(“inetcpl.cpl”);//.cpl文件。看来其实没什么 }

读写WIN.INI配置文件:c#

[DllImport("kernel32")] private static extern bool GetProfileString(string lpApplicationName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize); [DllImport("kernel32")] private static extern bool WriteProfileString(string lpApplicationName, string lpKeyName, string lpString);

阶乘运算c#

转自博客园

内网渗透案例

目录 一.          本次目标的环境. 1.1 内网网络拓图以及平台介绍. 1.2 渗透测试的目的. 1.3 此次渗透目标内容和范围. 1.4 规避的风险.

Windows 7库(Library

 作者: 麒麟 发表于 2010-03-21 22:27 原文链接 如果你对windows7库的概念不了解,请先看这篇介绍:Windows 7新功能:库(Library) 以下是一些常见的Windows 7库功能的一个快速参考,使用了Windows API Code Pack。 这篇文章中的代码来自Alon和Sela工作小组的成员。 每个Windows 7库用一个XML文件表示,扩展名为.library-ms。 通用库文件通常存储在:C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Libraries\。 例如,我们现在使用图片库,如以下代码: 1 libraryName = Pictures  2 locationPath = C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Libraries\ 注意:您可以在任何地方创建库文件,不一定是在上述文件夹中。 功能: 创建一个新库: 1 ShellLibrary shellLibrary =  2     new ShellLibrary(libraryName, locationPath, overwriteExisting); 添加文件夹到现有库: 1 using (ShellLibrary shellLibrary = 2     ShellLibrary.Load(libraryName, folderPath, isReadOnly)) 3 { 4     shellLibrary.Add(folderToAdd); 5 } 从库中删除文件夹: 1 using (ShellLibrary shellLibrary = 2     ShellLibrary.Load(libraryName, folderPath, isReadOnly)) 3 { 4     shellLibrary.Remove(folderToRemove); 5 } 枚举库文件夹: 1 using (ShellLibrary shellLibrary =  2     ShellLibrary.Load(libraryName, folderPath, isReadOnly)) 3 { 4     foreach (ShellFileSystemFolder folder in shellLibrary) 5     { 6         Debug.WriteLine(folder.Path); 7     } 8 } 更改默认保存位置:  1 using (ShellLibrary shellLibrary =  2     ShellLibrary.Load(libraryName, folderPath, isReadOnly)) 3 { 4     shellLibrary.DefaultSaveFolder = newSaveLocation; 5 } 更改库图标: 1 using (ShellLibrary shellLibrary =  2     ShellLibrary.Load(libraryName, folderPath, isReadOnly)) [...]

多叉树 JSON:C#

转自CNBLOGS 当时想这个算法的时候,是先想好了extjs的格式转换方法后才写的,写完后也没有考虑extjs是不是可以直接用{ ‘id’:’’,’pid’:’’,’text’:’’}格式的方式来表示呢?呵呵,如果是的话那就郁闷了~~,不管了。为了使用Extjs实现在客户端 显示树形节点,需要获得节点的孩子节点集合。于是,花了三个小时时间写出了一个遍历算法(囧,代码编写能力还有待提高啊,有时候这中间的关系搞得我晕头转 向的,不得不一边画图以便写代码~~),由children字段为空的List<TreeNode> 分析并返回一个包含children的根节点树以便生成json数据。

epoll

[font id="TopicDetail_DataList1__ctl0_lblPostBody"]Q:网络服务器的瓶颈在哪? A:IO效率。 在大家苦苦的为在线人数的增长而导致的系统资源吃紧上的问题正在发愁的时候,Linux 2.6内核中提供的System Epoll为我们提供了一套完美的解决方案。传统的select以及poll的效率会因为在线人数的线形递增而导致呈二次乃至三次方的下降,这些直接导致 了网络服务器可以支持的人数有了个比较明显的限制。 自从Linux提供了/dev/epoll的设备以及后来2.6内核中对/dev/epoll 设备的访问的封装(System Epoll)之后,这种现象得到了大大的缓解,如果说几个月前,大家还对epoll不熟悉,那么现在来说的话,epoll的应用已经得到了大范围的普及。 那么究竟如何来使用epoll呢?其实非常简单。

名人博客

   经济学界: Gary Becker & Richard Posner(世界著名经济学家,Gary Becker为诺贝尔经济学奖得主):  http://becker-posner-blog.com

wCF笔记3

wcf学习笔记2

1.5. Hosting The WCF service class cannot exist in a void. Every WCF service must be hosted in a Windows process called the host process. A single host process can host multiple services, and the same service type can be hosted in multiple host processes. WCF makes no demand on whether or not the host [...]

  • Archives

  • SUNSHINE

  • About

    本博客采用创作共用版权协议,要求署名、非商业用途和保持一致. 转载本博客内容也遵循“署名-非商业用途-保持一致”的创作共用协议.

    订阅

    Search

    Admin