<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Ilya Gorodnyanskiy - IT-Blog</title>
	
	<link>http://i-gorod.org/itblog</link>
	<description>Personal web site of Ilya Gorodnyanskiy</description>
	<lastBuildDate>Mon, 01 Mar 2010 17:51:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/i-gorod-feed" /><feedburner:info uri="i-gorod-feed" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Statistics for Programming Languages in February 2010.</title>
		<link>http://feedproxy.google.com/~r/i-gorod-feed/~3/v9avrnbgzaQ/</link>
		<comments>http://i-gorod.org/itblog/2010/03/01/statistics-for-programming-languages-in-february-2010/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 17:51:18 +0000</pubDate>
		<dc:creator>Ilya G.</dc:creator>
				<category><![CDATA[General topics]]></category>
		<category><![CDATA[SW Technologies]]></category>

		<guid isPermaLink="false">http://i-gorod.org/itblog/?p=126</guid>
		<description><![CDATA[Today I found a nice article  with the overview over modern programming languages and general tendencies in February 2010. I was pleasantly surprise, that Delphi is still in Top 10. So it is to be expected, the Delphi and IDEs for it will be supported also in the future.   
]]></description>
			<content:encoded><![CDATA[<p>Today I found a nice <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">article </a> with the overview over modern programming languages and general tendencies in February 2010. I was pleasantly surprise, that Delphi is still in Top 10. So it is to be expected, the Delphi and IDEs for it will be supported also in the future.   </p>
]]></content:encoded>
			<wfw:commentRss>http://i-gorod.org/itblog/2010/03/01/statistics-for-programming-languages-in-february-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://i-gorod.org/itblog/2010/03/01/statistics-for-programming-languages-in-february-2010/</feedburner:origLink></item>
		<item>
		<title>Blackle – Google’s Green Face.</title>
		<link>http://feedproxy.google.com/~r/i-gorod-feed/~3/YBZOTdweueo/</link>
		<comments>http://i-gorod.org/itblog/2010/03/01/blackle-googles-green-face/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 17:18:37 +0000</pubDate>
		<dc:creator>Ilya G.</dc:creator>
				<category><![CDATA[Web sites]]></category>

		<guid isPermaLink="false">http://i-gorod.org/itblog/?p=123</guid>
		<description><![CDATA[Go Green &#8211; Earth Friendly! This is the motto of the website Blackle. Powered by &#8220;Google Custom Search&#8221; Blackle aims to save energy by displaying google&#8217;s start page with a black background and using white font color for search results. According to particular studies computer monitors consume less energy by displaying much darker colors. On [...]]]></description>
			<content:encoded><![CDATA[<p>Go Green &#8211; Earth Friendly! This is the motto of the website <a href="http://www.blackle.com/">Blackle</a>. Powered by &#8220;Google Custom Search&#8221; <a href="http://www.blackle.com/">Blackle</a> aims to save energy by displaying google&#8217;s start page with a black background and using white font color for search results. According to particular studies computer monitors consume less energy by displaying much darker colors. On the <a href="http://www.blackle.com/">Blackle</a>&#8217;s website there is a field indicating how much energy has been already saved.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-gorod.org/itblog/2010/03/01/blackle-googles-green-face/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://i-gorod.org/itblog/2010/03/01/blackle-googles-green-face/</feedburner:origLink></item>
		<item>
		<title>ArcGIS Server Workshop in Bonn.</title>
		<link>http://feedproxy.google.com/~r/i-gorod-feed/~3/_JGL5CXo9gk/</link>
		<comments>http://i-gorod.org/itblog/2010/02/25/arcgis-server-workshop-in-bonn/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 05:02:39 +0000</pubDate>
		<dc:creator>Ilya G.</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[General topics]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[ESRI]]></category>

		<guid isPermaLink="false">http://i-gorod.org/itblog/?p=117</guid>
		<description><![CDATA[Last two days I attended an ArcGIS Server workshop. It was organized by our ESRI colleagues in Bonn. The focus of the workshop was ArcGIS Server technology: use cases, architecture, interfaces, features etc. All in all it was a very interesting and informative course, which gave a very good overview over ESRI vision of a [...]]]></description>
			<content:encoded><![CDATA[<p>Last two days I attended an ArcGIS Server workshop. It was organized by our ESRI colleagues in Bonn. The focus of the workshop was ArcGIS Server technology: use cases, architecture, interfaces, features etc. All in all it was a very interesting and informative course, which gave a very good overview over ESRI vision of a GIS system.<span id="more-117"></span></p>
<p>ArcGIS Server related links:</p>
<p>- ArcGIS Server product page: <a href="http://www.esri.com/software/arcgis/arcgisserver/index.html">ESRI -&gt; Software -&gt; ArcGIS -&gt; ArcGIS Server</a><br />
- Wiki <a href="http://en.wikipedia.org/wiki/ArcGIS_Server">article</a><br />
- <a href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=The_ArcGIS_Server_and_Image_Server_architecture">Architecture</a><br />
- <a href="http://resources.esri.com/arcgisserver">Development </a>: SDKs, samples, support etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-gorod.org/itblog/2010/02/25/arcgis-server-workshop-in-bonn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://i-gorod.org/itblog/2010/02/25/arcgis-server-workshop-in-bonn/</feedburner:origLink></item>
		<item>
		<title>TNotifyEvent. OnClick Example for Delphi.</title>
		<link>http://feedproxy.google.com/~r/i-gorod-feed/~3/e-kZ55wcs38/</link>
		<comments>http://i-gorod.org/itblog/2010/02/17/tnotifyevent-onclick-example-delphi/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 04:59:29 +0000</pubDate>
		<dc:creator>Ilya G.</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[OnClick]]></category>
		<category><![CDATA[TNotifyEvent]]></category>

		<guid isPermaLink="false">http://i-gorod.org/itblog/?p=110</guid>
		<description><![CDATA[Listening to events in Delphi is pretty easy. In following I&#8217;d like to introduce two ways to list to events. Consider following example:


type
  TForm1 = class(TForm)
    MyButton1: TButton;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
    procedure MyBtnClick(Sender: TObject);
  public
  [...]]]></description>
			<content:encoded><![CDATA[<p>Listening to events in Delphi is pretty easy. In following I&#8217;d like to introduce two ways to list to events. Consider following example:<span id="more-110"></span></p>
<pre>
<code>
type
  TForm1 = class(TForm)
    MyButton1: TButton;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
    procedure MyBtnClick(Sender: TObject);
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.MyButtonClick(Sender: TObject);
begin
  ShowMessage('Button is clicked!');
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  MyButton1 := TButton.Create(Form1);
  MyButton1.Parent := Form1;
  MyButton1.OnClick := MyButtonClick;
end;
</code>
</pre>
<p>In this simple case MyButtonClick is a class method. The way it&#8217;s used in the example above is quite usual. But what to do if you need to use some method to handle  OnClick event, which is defined outside the class(external function)? In this situation you have to wrap up your method by a record:</p>
<pre>
<code>
type
  TMethodPointer = packed record
    pMethod: Pointer;
    pObject: TObject;
end;
</code>
</pre>
<p>After this you can add your event handler, using casting to <strong>TNotifyEvent</strong> like this:</p>
<pre>
<code>
methodPointer.pMethod := @MyOnClickMethod;
methodPointer.pObject := nil;
MyButton1.OnClick :=  TNotifyEvent(methodPointer);
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://i-gorod.org/itblog/2010/02/17/tnotifyevent-onclick-example-delphi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://i-gorod.org/itblog/2010/02/17/tnotifyevent-onclick-example-delphi/</feedburner:origLink></item>
		<item>
		<title>PDFCreator Parameters.</title>
		<link>http://feedproxy.google.com/~r/i-gorod-feed/~3/A7CkTxBCbGo/</link>
		<comments>http://i-gorod.org/itblog/2010/02/16/pdfcreator-parameters/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 19:41:54 +0000</pubDate>
		<dc:creator>Ilya G.</dc:creator>
				<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://i-gorod.org/itblog/?p=115</guid>
		<description><![CDATA[PDFCreator is a free tool for printing PDF documents. After installation on your system it can be used as any other printer. In the project I&#8217;m currently involved in, we use PDFCreator calls within Delphi code to generate PDF documents. PDFCreator has a number of parameters, which can be set before printing a document. These [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pdfforge.org/">PDFCreator</a> is a free tool for printing PDF documents. After installation on your system it can be used as any other printer. In the project I&#8217;m currently involved in, we use PDFCreator calls within Delphi code to generate PDF documents. PDFCreator has a number of parameters, which can be set before printing a document. These parameters are summarized under the following <a href="http://www.scribd.com/doc/6174702/PDF-Creator-Options">link</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://i-gorod.org/itblog/2010/02/16/pdfcreator-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://i-gorod.org/itblog/2010/02/16/pdfcreator-parameters/</feedburner:origLink></item>
		<item>
		<title>Threading in Delphi.</title>
		<link>http://feedproxy.google.com/~r/i-gorod-feed/~3/6mCnw6nw138/</link>
		<comments>http://i-gorod.org/itblog/2010/02/09/threading-in-delphi/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 05:26:35 +0000</pubDate>
		<dc:creator>Ilya G.</dc:creator>
				<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://i-gorod.org/itblog/?p=105</guid>
		<description><![CDATA[Yesterday I had to realize a simple task: Load data from the database into a ComboBox in a separate thread. Threading in Delphi turned out to be quite easy. But still I faced several difficulties, i.e. weird effects. My thread looks pretty simple:


type
  TDataLoaderThread = class(TThread)
    myDBConnection: TADOConnection;
    [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I had to realize a simple task: Load data from the database into a ComboBox in a separate thread. Threading in Delphi turned out to be quite easy. But still I faced several difficulties, i.e. weird effects. My thread looks pretty simple:<span id="more-105"></span></p>
<pre>
<code>
type
  TDataLoaderThread = class(TThread)
    myDBConnection: TADOConnection;
    query1: TADOQuery;
    query2: TADOQuery;
  private
  protected
    procedure InitData;
    procedure Execute; override; 

implementation

procedure TDataLoaderThread.Execute;
begin
  inherited;
  FreeOnTerminate:=True;
  Priority := tpLower;
  Synchronize(InitData);
end;

procedure TDataLoaderThread.InitData();
begin
   // code for retrieving data from the DB
   // and filling the ComboBox of the Form object
end;
<code>
</pre>
<p>I start this thread within my GUI, i.e. Form1. Method InitData is called by means of Synchronize()-method, which allows DataLoaderThread to continue execution in the context of the main thread. InitData sets the items of the ComboBox. Important issues:</p>
<p>1. There should be one DB connection per thread!<br />
2. Calling Form1 by ShowModal blocks DataLoaderThread.<br />
3. Inserting Sleep into DataLoaderThread blocks the main thread, i.e. Form1 for X ms.</p>
]]></content:encoded>
			<wfw:commentRss>http://i-gorod.org/itblog/2010/02/09/threading-in-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://i-gorod.org/itblog/2010/02/09/threading-in-delphi/</feedburner:origLink></item>
		<item>
		<title>Remove Read Only Property of a File.</title>
		<link>http://feedproxy.google.com/~r/i-gorod-feed/~3/MLVei1pp46I/</link>
		<comments>http://i-gorod.org/itblog/2010/02/04/remove-read-only-property-of-a-file/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 05:27:21 +0000</pubDate>
		<dc:creator>Ilya G.</dc:creator>
				<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://i-gorod.org/itblog/?p=97</guid>
		<description><![CDATA[Recently I wrote a custom installer program and burned it to a CD together with particular files. After coping the files from the CD to the hard drive some files were set by Windows to read only. Below is the function to remove read only property of a file:



procedure RemoveFileAttributes(const FileName: String);
begin
  try
  [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I wrote a custom installer program and burned it to a CD together with particular files. After coping the files from the CD to the hard drive some files were set by Windows to read only. Below is the function to remove read only property of a file:<br />
<span id="more-97"></span></p>
<pre>
<code>
procedure RemoveFileAttributes(const FileName: String);
begin
  try
    if FileExists(FileName) then
      Windows.SetFileAttributes(PChar(FileName),
                    FILE_ATTRIBUTE_NORMAL);
  except
    ShowMessage('Datei ' + FileName +
          #10#13 + 'konnte nicht zum Lesen freigegeben werden!');
  end;
end;
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://i-gorod.org/itblog/2010/02/04/remove-read-only-property-of-a-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://i-gorod.org/itblog/2010/02/04/remove-read-only-property-of-a-file/</feedburner:origLink></item>
	</channel>
</rss>
