2014年1月20日
摘要:
unit Form_MainU;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,MapWinGIS_TLB, DB, Grids, DBGrids, DBTables, OleCtrls, ComCtrls, StdCtrls ;type TForm1 = class(TForm) Button1: TButton; PageControl1: TPageControl; TabSheet1: TTabSheet; T... 阅读全文
摘要:
program main !sms网格转换成mike21网格 DIMENSION X(60000),Y(60000),H(60000),NDNN(110000,3),ncbd(10000) dimension NBS(50),NOBD(5000,50),NSED(5000,50),id0(80000),nbi(50) dimension x0(50000),y0(50000),h0(50000) character*2 a*2,b*2,gnn*3,demo*500 open(3,file='./2013.8.30(after).grd',status='o... 阅读全文
摘要:
subroutine basis_function_b_val ( tdata, tval, yval )!!*******************************************************************************!!! BASIS_FUNCTION_B_VAL evaluates the B spline basis function.!!! Discussion:!! The B spline basis function is a piecewise cubic which! has the properties tha... 阅读全文
2014年1月19日
摘要:
unit Unit3;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Grids, Vcl.DBGrids, Data.DB, Vcl.OleCtrls, MapWinGIS_TLB, Vcl.ComCtrls, Vcl.StdCtrls, Vcl.OleServer, Bde.DBTables;type TForm3 = cla... 阅读全文
2014年1月18日
摘要:
虽然版本号升的不大,但这也是一个重要的版本。作者发现了一个长期存在的bug,就是建立一个线程,如果不指定线程的优先级则默认设置为idle。(正确的应是Normal)看一下具体的改动情况:新功能:Added SetPriority function to the IOmniTaskConfig.Added indexed writers ([number] and [name]) to both TOmniValue and TOmniValueContainer. Bug修正:如果不指定线程优先级默认设置为Normal.Corrected swapped content of 'Sch 阅读全文
摘要:
interfaceuses Classes, SysUtils;type TParallelProc = reference to procedure(i: Integer; ThreadID: Integer); TParallel = class(TThread) private FProc: TParallelProc; FThreadID: Integer; //current thread ID protected procedure Execute; override; function GetNextValue: Integer; public... 阅读全文
2014年1月17日
摘要:
有如下循环体:hits:=0;for I:=0 to NumberOfIterations-1 dobegin {perform some calculations dependent on random number generation to determine a value x} if x>0 then hits:=hits+1;end;{For Loop}FailureProbability:=hits/NumberOfIterations;如果迭代次数非常大,如何用并行方法完成?答案如下:program loop;{$APPTYPE CONSOLE}const ... 阅读全文
摘要:
1) 删除文件: C:\documents and settings\\.borland\registry.slm,如果在win8或在win7下,即C:\Users\HiWin8\.borland2)运行 c:\program files\borland\delphi7\bin\D7Reg.exe3) 一路单击下一步即可...4)打开 Delphi7 阅读全文
2014年1月15日
摘要:
SetLength(glb_IndexConfig,0);FreeAndNil(glb_IndexConfig); 阅读全文
2014年1月14日
摘要:
Delphi的table的RecNum属性,可以用来定位记录,如:self.Table1.RecNum:=23;即可以让数据库记录移动到23号记录上,但这种作用仅限于Paradox数据库,而不是dBASE数据库。如何解决这个问题,可以如下处理:unit DBTables;...procedure TBDEDataSet.SetRecNo(Value: Integer);begin CheckBrowseMode; if (FRecNoStatus = rnParadox) and (Value RecNo) then begin DoBeforeScroll; if Dbi... 阅读全文
2014年1月12日
摘要:
OpenFileDialog OFD = new OpenFileDialog(); OFD.Title = "打开第一个文本文件"; OFD.FileName = "*.txt"; OFD.InitialDirectory = WorkSpacePath; if (OFD.ShowDialog() == DialogResult.OK) { FileInfo fi = new FileInfo(OFD.FileName); ... 阅读全文
摘要:
采用文件流方式来处理,StreamReader,StreamWriter:StreamReader sr = new StreamReader("c:\\a.txt"); while(!sr.EndOfStream) //读到文件流结尾退出 { string temp = sr.ReadLine(); // 一行一行的读 } sr.Close(); StreamWriter sw = new StreamWriter("c:\\a... 阅读全文
摘要:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); ... 阅读全文
摘要:
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure Button1Click... 阅读全文
摘要:
哈希表是通过哈希值来访问的,通过一定的内存浪费获取检索速度,在检索项时是不需要逐一检索。在编程中有一定的好处。unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedur... 阅读全文
2014年1月7日
摘要:
delphi 创建DBASE和FOXPRO两类DBF数据文件的差异,主要有几点:1、创建方法不同DBASE的创建方法:Self.Table1.Close; Self.Table1.Active :=False; Self.Table1.DisableControls; Self.Table1.DatabaseName:=Path; Self.Table1.TableName:=Fname; Self.Table1.TableType :=ttDBase;//与FoxPro的不同 Self.Table1.FieldDefs.Clear;... 阅读全文
2014年1月6日
摘要:
unit Form_ToChangCSVforDBFU;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, ComCtrls, DB, DBTables, Grids, DBGrids, ExtCtrls, StdCtrls;type TForm_ChangCSVToDBFF = class(TForm) PopupMenu1: TPopupMenu; DataSource1: TDataSource; DBGr... 阅读全文
摘要:
Edit1.Text:=ChangeFileExt(ExtractFileName(Application.ExeName),'') ; //获取到应用程序名后,将后缀名清空就可以啦。 阅读全文
2014年1月5日
摘要:
table2.Close; table2.Active:=false; table2.Exclusive:=true; table2.TableName:='h:\gzkd\sds'; table2.TableType:=ttFOXPRO; with table2.FieldDefs do begin clear; with addfielddef do begin name:='bh'; datatype:=FTSTRING; size:=6; end; with addfielddef do begin name:='xm'; ... 阅读全文
2014年1月1日
摘要:
如下:Real time_begin , time_end1 , time_end2Integer i , jcall CPU_TIME(time_begin)write(*,*) time_begindo j = 1 , 30 Do i = 1 , 300000000End Do call CPU_TIME(time_end1) write(*,*) j , time_end1 , time_end1 - time_beginend docall CPU_TIME(time_end2)write(*,*) 't' , time_end2 , time_end2 - time_ 阅读全文
|