摘要:1. 求星期公式
星期=[5+a(实际天数)] mod 7
2. 干支计算公式
六十甲子干支序号,从1->59->0。
六十甲子干支序号=[23+a(实际天数)] mod 60
3. 二十八宿计算公式
二十八宿序号=[23+a(实际天数)] mod 28
4. 实际天数a的计算
a=b(基本天数)+c(闰日天数)
b=(计算年-1)*365+(要计算到年的月日天数)
例:1984......
摘要:netscape浏览器,显示出你指定的www地址的主页。下面这个程序能
够完成这一功能。
programnetscape;
usesddeman;
proceduregotourl(surl:string);
var
dde:tddeclientconv;
begin
dde:κtddeclientconv.create(nil);
withddedo
beg......
常用文件目录操作1-得到短文件名
function getshortfilename(const filename : string) : string; 【程序编程相关:
如何通过程序实现网卡的启用和禁止功能? 】 【推荐阅读:
如何用Delphi实现WINDOWS X】
var 【扩展信息:
hdsi2.0 sql注入部分抓包分析语】
atmp: array[0..255] of char;
begin
if getshortpathname(pchar(filename),atmp,sizeof(atmp)-1)=0 then
result:= filename
else
result:=strpas(atmp);
end;
2-长文件名
function getlongfilename(const filename : string) : string;
var
ainfo: tshfileinfo;
begin
if shgetfileinfo(pchar(filename),0,ainfo,sizeof(ainfo),shgfi_displayname)<>0 then
result:= string(ainfo.szdisplayname)
else
result:= filename;
end;
删除到回收站
uses shellapi;
procedure sendtorecyclebin(filename: string);
var
shf: tshfileopstruct;
begin
with shf do begin
wnd := application.handle;
wfunc := fo_delete;
pfrom := pchar(filename);
fflags := fof_silent or fof_allowundo;
end;
shfileoperation(shf);
end;
得到文件最后改动时间
procedure tform1.button1click(sender: tobject);
var
filehandle : thandle;
localfiletime : tfiletime; ...
下一页 摘要:作者:未名码头
在所开以的应用软件中,有时我们对某些文件进行拷贝(如对数据库进行备份、制作
安装程序),但是常用的一些语言却没有提供可直接进行文件拷贝的过程或函数。为此
,我曾利用delphi编制了可提供文件拷贝过程的动态连接库copy.dll,其输出过程为
copyfile。由于dll具有简化编程、运行速度快等诸多优点,且不受编程语言的限制,
用delphi编写的copf.dll同......