Monthly Archives: 十月 2009

asp转换日期格式大全

在字段的设计视图中,将该字段“数据类型”设置为“日期/时间”,然后将该字段的格式设置为你需要的格式,比如常规日期。然后将它的默认值设置为now()即可实现添加记录的时候自动的添加时间了。

至于ASP中显示格式呢,给你举个例子:
<%=formatdatetime(now(),0)%><br>
<%=formatdatetime(now(),1)%><br>
<%=formatdatetime(now(),2)%><br>
<%=formatdatetime(now(),3)%><br>
<%=formatdatetime(now(),4)%><br>

显示的日期形式为:
2006-1-22 14:03:36
2006年1月22日
2006-1-22
14:03:36
14:03

Category: 技术 TAG: , , , , ,

特殊的拳皇2009(KOF2009)争霸赛

拳皇

Category: 技术 TAG: , , , , , ,

未命名文章

 [password=3434-=fc]今天我们俩登记了,属于正式夫妻了[/password]

Category: 似水流年 TAG: , ,

Google操作系统-Chrome OS i686-0.4.220 下载

124

 

Chrome OS的特色软件:
GNOME 2.24桌面环境
Google Chrome 4.0.207 浏览器
OpenOffice.org 3.0 Office套件
Flash Player 10.0 插件

Chrome OS 系统配置要求:(现在一般机器都能达到要求)
处理器:Intel Pentium、Xeon或更新的;AMD Duron、Athlon、Sempron、Opteron或更新的
内存:最低 256MB(建议分配512MB,越大速度越快)
硬盘:最小 1GB
显卡:支持现在大多数的显卡

推荐硬盘安装或者虚拟机安装    user  root

528 MB tar.gz, MD5: da320dd0e411c4e28bdec8e95358fe3c
Hosted by Wuala – Download by BitTorrent
The tarball is containing vmdk and vmx files. You need a free VMware Player or VirtualBox in order to run this appliance.
Now you can also install Chrome OS on your hard disk using this Live CD image:
518 MB iso, MD5: 7ae6466558e699e8bd5f079029c41450
Hosted by Wuala – Download by BitTorrent
Download the iso file and burn it into CD-R. Boot the computer from it and when Chrome OS is loaded, click Live Installer on the desktop. Follow the instructions.
Warning: Google Chrome does not work in Live CD mode, you have to install it to the hard disk at first!
User password: user
Root password: root
Category: 技术 TAG: , , , , , , , , , ,

修改照片的拍摄日期

| | COMMENTS:No Comments »

 在日常的图片处理的过程.我们可能要修改一些照片的拍摄日期.作者在近日的操作中,就遇到过这样的问题.现将方法公布一下,希望对大家有所帮助..

如果一..图像的拍摄日期为2006-6-13一般的处理软件只能修改创建日期及最后修改日期..那如果修改这个拍照日期呢.?
现在我们就要用到我们的工具了..
 
这个软件叫UE…软件的具体介绍,大家可以到网上去找下…
 
 
我们现在用这个工具把图像文件载入….然后下拉…很快我们就会发现..如图…
现在我们只需要修改这个地方就可以实现..修改拍摄日期了…如果有问题请联系.谢谢~~~

Category: 技术 TAG: , , , , , , , ,

C#/ASP.NET应用程序配置文件app.config/web.config的增、删、改操作()

 应用程序配置文件,对于asp.net是 web.config,对于WINFORM程序是 App.Config(ExeName.exe.config)。

配置文件,对于程序本身来说,就是基础和依据,其本质是一个xml文件,对于配置文件的操作,从.NET 2.0 开始,就非常方便了,提供了 System [.Web] .Configuration 这个管理功能的NameSpace,要使用它,需要添加对 System.configuration.dll的引用。

对于WINFORM程序,使用 System.Configuration.ConfigurationManager;

对于ASP.NET 程序, 使用 System.Web.Configuration.WebConfigurationManager;

对于配置文件内容的读取,真是太普遍不过了,如果你的程序里,没有读取配置文件内容的方面,你都不好意思拿出来用 

我们以最常见的 AppSettings 小节来作为例子:

假设有如下的配置文件内容:

<?xml version="1.0" encoding="utf-8" ?><configuration>  <appSettings>    <add key="y" value="this is Y"/>  </appSettings></configuration>

1. 读取值:

  • Asp.Net:   System.Web.Configuration.WebConfigurationManager.AppSettings[“y”];
  • WinForm:  System.Configuration.ConfigurationManager.AppSettings[“y”];

2. 添加一项

  • ASP.NET(需要有写权限):
Configuration config = WebConfigurationManager.OpenWebConfiguration(null);AppSettingsSection app = config.AppSettings;app.Settings.Add("x", "this is X");config.Save(ConfigurationSaveMode.Modified);
  • WinForm:
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);AppSettingsSection app = config.AppSettings;app.Settings.Add("x", "this is X");config.Save(ConfigurationSaveMode.Modified);

 

3. 修改一项

  • Asp.Net
Configuration config = WebConfigurationManager.OpenWebConfiguration(null);AppSettingsSection app = config.AppSettings;//app.Settings.Add("x", "this is X"); app.Settings["x"].Value = "this is not Y";config.Save(ConfigurationSaveMode.Modified);
  • WinForm
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);AppSettingsSection app = config.AppSettings;//app.Settings.Add("x", "this is X"); app.Settings["x"].Value = "this is not Y";config.Save(ConfigurationSaveMode.Modified);

 

4. 删除一项

  • Asp.Net
Configuration config = WebConfigurationManager.OpenWebConfiguration(null);AppSettingsSection app = config.AppSettings;app.Settings.Remove("x");config.Save(ConfigurationSaveMode.Modified);
  • WinForm
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);AppSettingsSection app = config.AppSettings;app.Settings.Remove("x")
;config.Save(ConfigurationSaveMode.Modified);
 

 

Category: 技术 TAG: , , , , , , , , , , ,

C#导出数据到CSV和EXCEL文件时,过长的数值被转义的解决方法(2)

| | COMMENTS:No Comments »

EXCEL里面,默认的情况下,对于字段内容长度超过15位的数字,后面的内容会全部被搞成0,真是自作多情啊!
例如:常见的,我们输入18位的身份证号码:111111111111111111,就会变成 111111111111111000
而且,显示也用科学计数方式显示,真是太恶心了
最近有个需求,导出一些人的个人资料到 CSV 或者 EXCEL,在导出身份证时,就遇到了这个垃圾问题。
经过一番查找资料,找到了解决方法:
对于导出 CSV 文件,在禁止转义的内容前,加上一个TAB符号,C# 里面是 \t
对于EXCEL文件, 在禁止转义的内容前,加上一个半角单引号,’ 符号
如上就OK了,希望其他人少走弯路吧。

Category: 技术 TAG: , , , , , , , ,

将网页添加入收藏夹的JS脚本代码(兼容IE和Firefox)

| | COMMENTS:No Comments »

 对于IE,添加收藏夹,使用的是 window.external 这个IE特有的功能。

对于Firefox,可以使用 window.sidebar.addPanel 或者使用 Firefox 特有的 链接方式 rel=”sidebar”

一、 使用Js脚本的方式

function addBookmark(url, label) {    if (document.all)    {        window.external.addFavorite(url, label);    }    else if (window.sidebar)    {        window.sidebar.addPanel(label, url, '');    }}

使用方法: <a href=”javascript:addBookmark(‘http://www.zu14.cn/’, ‘真有意思’);”>加入收藏</a>

 

二、 使用链接的方式

<a href=”http://www.zu14.cn/” title=”真有意思” rel=”sidebar” onclick=”javascript:window.external.AddFavorite(’http://www.zu14.cn/’, ‘真有意思’);return false;”>加入收藏</a>


Category: 技术 TAG: , , , , , ,

我的学校

       离开学校3年了,看到这个视频内心还是很激动,突然想起了很多学校的往事,视频上的每个镜头也都是我们的真实经历。镜头上的每个地方,也都有我们的脚步,镜头上的每个老师也都是我的老师,尤其是第一个李强老师,真应该是我的恩师,是我WEB开发的启蒙老师。只是这个视频过于美好了,有空再回去和老师们同学们叙叙旧。

Category: 似水流年 TAG: ,

20091013

 [password=5340gfidf09g8df0g]

今天给彩礼

[/password]

Category: 似水流年 TAG: , , ,