<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Bergatrollet&#039;s Tech Blog &#187; Delphi</title>
	<atom:link href="http://bergatrollet.se/blog/category/code/delphi/feed/" rel="self" type="application/rss+xml" />
	<link>http://bergatrollet.se/blog</link>
	<description>The troll&#039;s cave</description>
	<lastBuildDate>Thu, 26 Jan 2012 19:35:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Master the FRA challenge</title>
		<link>http://bergatrollet.se/blog/2011/05/master-the-fra-challenge/</link>
		<comments>http://bergatrollet.se/blog/2011/05/master-the-fra-challenge/#comments</comments>
		<pubDate>Wed, 04 May 2011 21:45:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://bergatrollet.se/blog/?p=266</guid>
		<description><![CDATA[If you seek work at FRA (the military unit handling signal intelligence, now also in cables) you need to pass a test. The challenge is in Swedish and you have to be a Swedish citizen in order to get the job, but anyway you need to deciper a piece of code (x86 assembler) which will [&#8230;] <a class="more-link" href="http://bergatrollet.se/blog/2011/05/master-the-fra-challenge/">&#8595; Read the rest of this entry...</a>]]></description>
			<content:encoded><![CDATA[<p>If you seek work at FRA (the military unit handling signal intelligence, now also in cables) you need to pass a test. The challenge is in Swedish and you have to be a Swedish citizen in order to get the job, but anyway you need to deciper a piece of code (x86 assembler) which will give you a string. It&#8217;s a quite nice lite stack excersise and even if you didn&#8217;t understand that, I guess you can tell the core part of the code anyway.</p>
<p><a title="Jobb hos FRA" href="http://fra.easycruit.com/vacancy/547834/58086?iso=se" target="_blank">http://fra.easycruit.com/vacancy/547834/58086?iso=se</a></p>
<p>Just to shhow off, please find my piece of Delphi code below. Create a form, throw in a button and an editbox. Add the code to the event handler of the button:</p>
<blockquote><p>procedure TForm1.Button1Click(Sender: TObject);<br />
const<br />
indata : Array[1..20] of Byte = ($76,$75,$74,$2a,$63,$74,$66,$26,$7a,$6f,$24,$6f,$65,$6f,$63,$7c,$74,$7c,$74,$71);</p>
<p>var<br />
outdata : string;<br />
counter : byte;<br />
begin</p>
<p>for counter := 1 to 20 do begin<br />
outdata := outdata +  Chr(indata[counter] XOR Counter)<br />
end;</p>
<p>Edit1.text := outdata;</p>
<p>end;</p></blockquote>
<p>Sorry &#8211; the editor f*cked up my indentation <img src='http://bergatrollet.se/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Well it starts there. With the URL you are supposed to go on  with phase 2 <img src='http://bergatrollet.se/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bergatrollet.se/blog/2011/05/master-the-fra-challenge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help for Delphi 2009</title>
		<link>http://bergatrollet.se/blog/2009/04/help-for-delphi-2009/</link>
		<comments>http://bergatrollet.se/blog/2009/04/help-for-delphi-2009/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 18:00:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://bergatrollet.se/blog/?p=134</guid>
		<description><![CDATA[I had problems with the helpfiles to Delphi 2009.  Found the help that did it for me here, thanks to Samir Shagavatov Try following: Go to &#8220;C:\Program Files\CodeGear\RAD Studio\5.0\Help\Doc\&#8221; directory and type these commands h2reg.exe -u h2reg.exe -r if h2reg.exe or h2reg.ini is empty, you can get them from here: h2reg.exe &#8211; http://www.helpware.net/mshelp2/h2reg.htm h2reg.ini &#8211; [&#8230;] <a class="more-link" href="http://bergatrollet.se/blog/2009/04/help-for-delphi-2009/">&#8595; Read the rest of this entry...</a>]]></description>
			<content:encoded><![CDATA[<p>I had problems with the helpfiles to Delphi 2009.  Found the help that did it for me <a href="https://forums.codegear.com/message.jspa?messageID=8149" target="_blank">here</a>, thanks to Samir Shagavatov</p>
<p><em>Try following:<br />
Go to &#8220;C:\Program Files\CodeGear\RAD Studio\5.0\Help\Doc\&#8221; directory<br />
and type these commands<br />
h2reg.exe -u<br />
h2reg.exe -r</p>
<p>if h2reg.exe or h2reg.ini is empty, you can get them from here:<br />
h2reg.exe &#8211; <a class="jive-link-external" href="http://www.helpware.net/mshelp2/h2reg.htm">http://www.helpware.net/mshelp2/h2reg.htm</a><br />
h2reg.ini &#8211; <a class="jive-link-external" href="http://www.box.net/shared/du2seak0s4">http://www.box.net/shared/du2seak0s4</a></p>
<p>Copy h2reg.exe and h2reg.ini to the &#8220;&#8230;doc\&#8221; directory and type the<br />
commands above.</em></p>
<p>I can add to his comment that in order to do the trick for Delphi 2009 the instructions only need to be adjusted to point to the 6.0 directory;</p>
<p><em>Go to &#8220;C:\Program Files\CodeGear\RAD Studio\6.0\Help\Doc\&#8221; directory<br />
and type these commands<br />
h2reg.exe -u<br />
h2reg.exe -r</em></p>
]]></content:encoded>
			<wfw:commentRss>http://bergatrollet.se/blog/2009/04/help-for-delphi-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rave 7.6.0 bug &#8230;</title>
		<link>http://bergatrollet.se/blog/2009/03/rave-760-bug/</link>
		<comments>http://bergatrollet.se/blog/2009/03/rave-760-bug/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 00:08:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[nevrona]]></category>
		<category><![CDATA[rave]]></category>

		<guid isPermaLink="false">http://bergatrollet.se/blog/?p=129</guid>
		<description><![CDATA[Rave is the reporting engine in Delphi (since long!). In Delphi 2009 they ship version 7.6.0 (7.6.1 is possible to download for registered users and I read on forums that version 8 is available, at least for pre-order). The Nevrona.com homepage is a huge piece of crap that works really poorly in Firefox, which of [&#8230;] <a class="more-link" href="http://bergatrollet.se/blog/2009/03/rave-760-bug/">&#8595; Read the rest of this entry...</a>]]></description>
			<content:encoded><![CDATA[<p>Rave is the reporting engine in Delphi (since long!). In Delphi 2009 they ship version 7.6.0 (7.6.1 is possible to download for registered users and I read on forums that version 8 is available, at least for pre-order). The Nevrona.com homepage is a huge piece of crap that works really poorly in Firefox, which of course adds a bit to the suspicion of their products in general.</p>
<p>Receiving an &#8220;AccessViolation in module rtl120.bpl&#8221; error while starting Rave 7.6.0 caused major irritation.</p>
<p>Found the answer; remove printers!</p>
<p>I deleted the Fax and Send to OneNote before I tried again and this did the trick. I can of course not say which one of them that was the magic key, but reading up on other forums I would propose OneNote as the prime suspect.</p>
]]></content:encoded>
			<wfw:commentRss>http://bergatrollet.se/blog/2009/03/rave-760-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi 2009</title>
		<link>http://bergatrollet.se/blog/2008/09/delphi-2009/</link>
		<comments>http://bergatrollet.se/blog/2008/09/delphi-2009/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 20:13:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Delphi2009]]></category>

		<guid isPermaLink="false">http://bergatrollet.se/blog/?p=51</guid>
		<description><![CDATA[I just downloaded the demo of Delphi 2009 and installed it. Watched a few demonstration videos. Quite a few to watch: http://dn.codegear.com/article/38478 A good pick: http://windemo1.codegear.com/Tiburon/LaunchReplays/Delphi2009Launch/Delphi2009Launch.htm Was reminded that the Logitech camera interferes with Delphi. I think it still does actually http://bdntv.borland.com/pix/nickhodges/Camtasia/Logitech/Logitech.html Did another piece of code that wouldn&#8217;t compile (here commented out) &#8211; The [&#8230;] <a class="more-link" href="http://bergatrollet.se/blog/2008/09/delphi-2009/">&#8595; Read the rest of this entry...</a>]]></description>
			<content:encoded><![CDATA[<p>I just downloaded the demo of Delphi 2009 and installed it. Watched a few demonstration videos.</p>
<p>Quite a few to watch:</p>
<p>http://dn.codegear.com/article/38478</p>
<p>A good pick:</p>
<p>http://windemo1.codegear.com/Tiburon/LaunchReplays/Delphi2009Launch/Delphi2009Launch.htm</p>
<p>Was reminded that the Logitech camera interferes with Delphi. I think it still does actually</p>
<p>http://bdntv.borland.com/pix/nickhodges/Camtasia/Logitech/Logitech.html</p>
<p>Did another piece of code that wouldn&#8217;t compile (here commented out) &#8211; The Pos wouldn&#8217;t work!</p>
<p>// PROBLEM WITH DELPHI 2009</p>
<p>//  with TCustomADODataSet(SelectGrid.DataSource.DataSet) do<br />
//  begin<br />
//    if (Pos(Column.Field.FieldName, Sort) = 1) and (Pos(&#8216; DESC&#8217;, Sort)= 0) then   //&lt;- It stops here!<br />
//      Sort := Column.Field.FieldName + &#8216; DESC&#8217;<br />
//    else<br />
//      Sort := Column.Field.FieldName + &#8216; ASC&#8217;;<br />
//<br />
//    If Column.Field.FieldName = &#8216;MCC&#8217; then<br />
//       ADO_Progress.Sort := &#8216;MCC ASC, MNC ASC&#8217;<br />
//    else<br />
//       ADO_Progress.IndexFieldNames := sort; /// TEST!<br />
//  end;</p>
<p>[EDIT]</p>
<p>&#8230; which I got to work using a RawByteString() typecast &#8230;</p>
<p>with TCustomADODataSet(SelectGrid.DataSource.DataSet) do<br />
begin<br />
if (Pos(RawByteString(Column.Field.FieldName), Sort) = 1) and (Pos(RawByteString(&#8216; DESC&#8217;), Sort)= 0) then<br />
Sort := Column.Field.FieldName + &#8216; DESC&#8217;<br />
else<br />
Sort := Column.Field.FieldName + &#8216; ASC&#8217;;</p>
<p>If Column.Field.FieldName = &#8216;MCC&#8217; then<br />
ADO_Progress.Sort := &#8216;MCC ASC, MNC ASC&#8217;<br />
else<br />
ADO_Progress.IndexFieldNames := sort; /// TEST!<br />
end;</p>
]]></content:encoded>
			<wfw:commentRss>http://bergatrollet.se/blog/2008/09/delphi-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

