BLOG zzy.my

合抱之木, 生于毫末; 九层之台, 起于累土; 千里之行, 始于足下。

Javascript 隐藏 禁用 控件

隐藏
方法一:
document.all["PanelSMS"].style.visibility="hidden";
document.all["PanelSMS"].style.visibility="visible";
方法二:
document.all["PanelSMS"].style.display="none";
document.all["PanelSMS"].style.display="inline";
方法一隐藏后 页面的位置还被控件占用 只是不显示 类似于.net验证控件的Display=Static
方法二隐藏后 页面的位置不被占用 类似于.net验证控件的Display=Dynamic


禁用

[更多...]

SharePoint List 列表添加只读(Read Only) 字段

We had a requirement to add a read only column to one of our document library. Using Create column it isn’t possible to add a read only column. One option could be to create the new column and then using SharePoint designer we can make use of JavaScript and modify the NewForm.aspx and EditForm.aspx to display that field as read only.

We thought of adding it as a Site Column making use of ReadOnly property of field.

 

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Field ID="{0B8A5574-80BF-4d5e-99B9-9A25D8E8D21E}"
        Name="_IsApproved"
        DisplayName="Is Document Approved?"
        Group="Custom Columns"
        Type="Text" 
        Required="FALSE"
        ReadOnly="TRUE">
    </Field>
</Elements>

 

[更多...]

ArrayList Sort 排序

1、建一个结构雇员的结构
private struct Eployee{
public string name;
public int age;
public string sex;
}


2、新建3个"雇员"
Eployee ep1=new Eployee();
ep1.name="小张";
ep1.age=21;
ep1.sex="男";
Eployee ep2=new Eployee();
ep2.name="老李";
ep2.age=43;
ep2.sex="男";
Eployee ep3=new Eployee();
ep3.name="施施";
ep3.age=18;
ep3.sex="男";

 

[更多...]

Sharepoint 字段计算

提出问题:

我在wss3.0有一个自定义列表,里面要根据一个存在的列[出生日期],来计算[年龄],本来想用公式 =DATEDIF([出生日期],Today,"Y")来计算,但是保存时发现,today或者Me这种函数无法用在计算列。

不知道有什么方法可以计算当前的年龄呢?

 

这个问题一直困扰了很多朋友吧,但解决办法非常搞笑,好像是骗了一下SharePoint就行了。

 

具体步骤:

 

[更多...]

Diskpart 命令行实用工具介绍

Diskpart 与许多命令行实用工具不同,原因是它不以单行模式操作。相反,当您启动该实用工具后,命令是从标准输入/输出 (I/O) 读取的。您可以将这些命令定向到任何磁盘、分区或卷。

与磁盘管理的比较

Diskpart 启用“磁盘管理”管理单元所支持的操作的超集。“磁盘管理”管理单元禁止您无意中执行可能会导致数据丢失的操作。建议您应谨慎使用 Diskpart 实用工具,因为 Diskpart 支持显式控制分区和卷。

可以使用 Diskpart 将基本磁盘转换为动态磁盘。基本磁盘可以为空,也可以包含主分区或逻辑驱动器。基本磁盘可以是数据磁盘、系统驱动器或启动驱动器。基本磁盘不能包含容错磁盘驱动程序 (FtDisk) 集,如带区或镜像等。要转换包含有 FtDisk 驱动程序集的基本磁盘,请使用 Windows 2000 上的“磁盘管理”,或者在升级到 Windows XP 之前转换磁盘。

 

[更多...]

注册表 禁用IPv6

Vista、 Server2008、 windows7默认启动ipv6的组件服务,在运维系统读取ip的时候会读取ipv6的地址,程序就会出错,解决:关闭ipv6的所有组件服务,方法如下,
打开注册表
找到并单击下面的注册表子项:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\

双击“DisabledComponents”以修改
如果“DisabledComponents”项不存在,必须创建此项。
在“编辑”菜单上,指向“新建”,然后单击“DWORD (32 位)值”。
键入 DisabledComponents,然后按 Enter。

 

[更多...]