Designing with data modules

Designing with data modules

by Mark Cashman

Data modules are a specialized type of form descended from TDataModule. Normally, you place components that descend from TDataSet and TDataSource on a data module (TTable and TQuery, for example), but data modules can contain any non-visual component.

繼續閱讀文章 »

對頁面的源代碼進行加密,使源代碼變成亂碼,沒法讀取

第一步:把如下代碼加入<head>區域中
繼續閱讀文章 »

多线程idhttp下载文件源代码

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, IdBaseComponent, IdAntiFreezeBase, IdAntiFreeze,
IdThreadComponent, IdFTP ,IdException;
type
MyException1 = class(exception)//自定义的异常类
end;

繼續閱讀文章 »

Multithreading in Database Applications

In most scenarios, database applicationsyou create with Delphi are single threaded – a query you run against the database needs to finish (processing of the query results) before you can fetch another set of data.

To speed up data processing, for example, fetching data from the database to create reports, you can add an additional thread to fetch and operate on the result (recordset).

繼續閱讀文章 »

我的10個開發原則

英文原文:My ten development principles

在從事軟件開發若干年之後,我已經對“軟件應該如何設計”有些心得。實際上,我有了這樣一個結論:所有的事情最後都濃縮成10個原則,如果我們很好地執行這些原則,任何軟件開發都應該會取得成功。

繼續閱讀文章 »

為什麼編程是獨一無二的職業

本文翻譯自Nalaka Gamage的《Why is programming unique profession》的演講稿。

1. 簡介

* 有些人說編程很難,有些人認為很容易。
* 編程不僅依賴於你的能力,而且還取決於你工作的態度。
* 編程的確很難,但比起那些需要偽裝、欺騙和表演來生活的惡棍或者小醜來說,真的一點也不難。
* 作為一個程序員,知道你在做什麼,會讓生活變得更加有趣和快樂。

繼續閱讀文章 »

Delphi 7 使用 JSON

JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。易于人阅读和编写,
同时也易于机器解析和生成。它基于JavaScript(Standard ECMA-262 3rd Edition - December 1999)的一个子集。 JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等)。
这些特性使JSON成为理想的数据交换语言。
Delphi7中不支持JSON文件的解析,可以下载LkJSON(一个JSON的解析文件),然后进行解析。例如

繼續閱讀文章 »

Multi Thread Delphi Example

Illustrates how to use Absolute Database in multithreaded application.

繼續閱讀文章 »

Ext js 4 Layout 自己布局

index.html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8″>
<title>PLEO CORP.</title>

<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css"/>
<script type="text/javascript" src="extjs/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="extjs/bootstrap.js"></script>
<script>
if (Ext.BLANK_IMAGE_URL.substr(0, 5) != ‘data:’) {
Ext.BLANK_IMAGE_URL = ‘resources/images/default/s.gif’;
}
</script>
<script type="text/javascript"
src="app.js">
</script>
</head>

<body>
</body>
</html>

繼續閱讀文章 »