<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8086487757411504228</id><updated>2026-09-07T05:35:44.720+02:00</updated><category term="to-be-moved"/><category term="fxgqlc"/><category term="windows"/><category term="c++"/><category term="linux"/><category term="powershell"/><category term="sqlserver"/><category term="git"/><category term="c#"/><category term="gource"/><category term="aws"/><category term="gps"/><category term="jenkins/hudson"/><category term="libreoffice/openoffice"/><category term="office"/><category term="subversion"/><category term="tfs"/><category term="visualstudio"/><category term=".net framework"/><category term="analytics"/><category term="antlr"/><category term="btrieve"/><category term="chocolatey"/><category term="chrome"/><category term="future"/><category term="mono"/><category term="netbeans"/><category term="picasa"/><category term="python"/><category term="sip"/><category term="technology"/><category term="telecom"/><category term="tomtom"/><category term="tools"/><title type='text'>My Computer Adventures</title><subtitle type='html'>This blog is being moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be&quot;&gt; http://mycomputeradventures.foxinnovations.be&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>66</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-3669200474023975078</id><published>2016-02-10T20:43:00.000+01:00</published><updated>2016-06-15T23:06:56.113+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chocolatey"/><category scheme="http://www.blogger.com/atom/ns#" term="fxgqlc"/><title type='text'>FxGqlC Chocolatey package</title><content type='html'>Good News! FxGqlC is now also accepted as official &lt;a href=&quot;https://chocolatey.org/packages/fxgqlc&quot; target=&quot;_blank&quot;&gt;Chocolatey package&lt;/a&gt;.&lt;br /&gt;
So, from now on, the easiest way to install FxGqlC on Windows is:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Open a PowerShell window &lt;u&gt;as administrator&lt;/u&gt;&lt;/li&gt;
&lt;li&gt;If you&#39;re not already using Chocolatey, install it by running:&lt;br /&gt;
&lt;code&gt;iex ((new-object net.webclient).DownloadString(&#39;https://chocolatey.org/install.ps1&#39;))&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Install FxGqlC by running:&lt;br /&gt;&lt;code&gt;choco install fxgqlc&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2016/02/10/fxgqlc-chocolatey/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2016/02/10/fxgqlc-chocolatey/&lt;/a&gt; .
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/3669200474023975078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2016/02/good-news-fxgqlc-is-now-also-accepted.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3669200474023975078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3669200474023975078'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2016/02/good-news-fxgqlc-is-now-also-accepted.html' title='FxGqlC Chocolatey package'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-506741631990766888</id><published>2015-11-22T20:00:00.000+01:00</published><updated>2016-06-15T23:06:56.128+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="aws"/><title type='text'>Amazon Glacier pricing example - Updated with latest price reduction</title><content type='html'>&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC-E-bnqR9paChkGEfuZQxm3eGr25rWyNrA5uCSgLxOqUHlBz0VJYMOWYgSwpdu1XpEiWiBFeyMtFGNBtxSO64qqI7eC-XheF3gdB0Y4BLnDTnVIB-TyzK36MOfKDBugxMuQbvI_1px7I/s1600/2000px-Amazon_Glacier.svg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC-E-bnqR9paChkGEfuZQxm3eGr25rWyNrA5uCSgLxOqUHlBz0VJYMOWYgSwpdu1XpEiWiBFeyMtFGNBtxSO64qqI7eC-XheF3gdB0Y4BLnDTnVIB-TyzK36MOfKDBugxMuQbvI_1px7I/s320/2000px-Amazon_Glacier.svg.png&quot; width=&quot;320&quot;&gt;&lt;/a&gt;&lt;/div&gt;
Let&#39;s say you want to backup 100 GB (= +/- 25 DVDs), e.g. 1000 files of 100 MB.&lt;/div&gt;
&lt;div&gt;
(Prices for e.g. Ireland are 10% higher than the ones used in this example)&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
To back up your data:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Backup:&lt;br /&gt;To back up your data&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Incoming Transfers: free&lt;/li&gt;
&lt;li&gt;Upload requests: 1000 x (0.050$&amp;nbsp; / 1000 requests) = 0.05$ is virtually free&lt;/li&gt;
&lt;li&gt;&lt;u&gt;&lt;b&gt;Total Backup cost: 0.05$, so virtually free&lt;/b&gt;&lt;/u&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Storage:&lt;br /&gt;To keep your data at Amazon Glacier&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;100 GB x (0.007$ / GB / month) = 0.7$ / month&lt;/li&gt;
&lt;li&gt;&lt;u&gt;&lt;b&gt;Total storage cost: 8.4$ / year&lt;/b&gt;&lt;/u&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Restore: (let&#39;s say you want to download 10GB of 100GB, spread over a month: 3 files per day)&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Restore: 5% of 100GB free, remainder:&lt;br /&gt; 5GB x 0.010$ = 0.05$&lt;/li&gt;
&lt;li&gt;Outgoing Transfers: 1GB for free, remainder: &lt;br /&gt;9 GB x 0.09$ = 0.81$&lt;/li&gt;
&lt;li&gt;Requests: 100 x 0.05$ / 1000 requests = 0.005$&lt;/li&gt;
&lt;li&gt;&lt;u&gt;&lt;b&gt;Total restore cost = 0.87$&lt;/b&gt;&lt;/u&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
And for 1 TB of data:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Backup: 0.50$&lt;/li&gt;
&lt;li&gt;Storage: 10$/month or &lt;u&gt;&lt;b&gt;84$/year&lt;/b&gt;&lt;/u&gt;&lt;/li&gt;
&lt;li&gt;Restore of 10%: 9.46$ &lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
It doesn&#39;t matter if you use Amazon Glacier directly, or via the &quot;Glacier storage class&quot; in Amazon S3. In the latter case, the Glacier costs are advertised under S3.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
To have the cheapest costs, you should optimize between:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;The number of objects: LESS objects is BETTER, since many objects cost more than less objects (both for backup and restore).&amp;nbsp; &lt;br /&gt;E.g. if you use files of 100 KB instead of 100 MB, the cost for backup is 50$ instead of 0.05$.&lt;/li&gt;
&lt;li&gt;The size of the objects: SMALLER objects is BETTER.&amp;nbsp; To be able to spread the download over a month, you should keep the size of the objects below 1/30th of 5% of your total size.&amp;nbsp; So, at least 600 files if they are equal in size.&lt;br /&gt;E.g. if you use 10 files of 10 GB instead of 100MB, the cost for restoring 10% (1 file) is 0.78$ instead of 0.05$&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;So, the only thing you need to prevent is storing many small objects on Glacier.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Some more remarks: &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The easiest way to get started with Glacier, is using the Glacier storage class in Amazon S3.&amp;nbsp; This gives you an easy to use GUI to store and retrieve files to/from Glacier, with a small extra temporary S3 cost.&amp;nbsp; Transfers from S3 to Glacier are free of charge, so the biggest extra cost is the storage cost while the data is on S3 instead of Glacier.&lt;/li&gt;
&lt;li&gt;For a restore, you need to be patient: it takes 4 hours until your data is available.&amp;nbsp; Not instantly available, but also 10 times cheaper than S3.&lt;/li&gt;
&lt;li&gt;And the fault tolerance is remarkable: 11 nines (99.999999999%).&amp;nbsp; This is huge.&amp;nbsp; Especially compared with portable harddisks (99%?) or DVDs (99.999%?)...&lt;/li&gt;
&lt;li&gt;The cost of certain datacenters (e.g. Frankfurt) is higher.&amp;nbsp; Ireland has now the same costs as the US locations.&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2015/11/22/amazon-glacier-pricing-example/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2015/11/22/amazon-glacier-pricing-example/&lt;/a&gt; .</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/506741631990766888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/11/amazon-glacier-pricing-example-updated.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/506741631990766888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/506741631990766888'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/11/amazon-glacier-pricing-example-updated.html' title='Amazon Glacier pricing example - Updated with latest price reduction'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC-E-bnqR9paChkGEfuZQxm3eGr25rWyNrA5uCSgLxOqUHlBz0VJYMOWYgSwpdu1XpEiWiBFeyMtFGNBtxSO64qqI7eC-XheF3gdB0Y4BLnDTnVIB-TyzK36MOfKDBugxMuQbvI_1px7I/s72-c/2000px-Amazon_Glacier.svg.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-267362435708733392</id><published>2015-11-03T21:50:00.001+01:00</published><updated>2016-06-15T23:06:56.099+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="picasa"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>Download pictures from Picasa Webalbums</title><content type='html'>A simple but very useful tool to download one or all (public) Picasa Web Albums of a user.  Especially since it is still not clear what the future of Picasa Web Albums will be... 

&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7Pe4mWAMrVrSNKdeeOo3uRJKfj2SCbQZkXO5u1ip1AzUpiqKb0hZT4PnfjkyYNCKSw8fRKQTTuBrionrQ_7L7azpoePRBDIbTJQbC2gYvk5bcgoQKCYPdxhly_f7CdeTFXNT5KoVT4SU/s1600/Screenshot+from+2015-11-05+22-29-04.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7Pe4mWAMrVrSNKdeeOo3uRJKfj2SCbQZkXO5u1ip1AzUpiqKb0hZT4PnfjkyYNCKSw8fRKQTTuBrionrQ_7L7azpoePRBDIbTJQbC2gYvk5bcgoQKCYPdxhly_f7CdeTFXNT5KoVT4SU/s1600/Screenshot+from+2015-11-05+22-29-04.png&quot;&gt;&lt;/a&gt;

Download on Github:&lt;br/&gt;
&lt;a href=&quot;https://github.com/WimObiwan/FxPicasaWebAlbumDownloader/releases/latest&quot;&gt;https://github.com/WimObiwan/FxPicasaWebAlbumDownloader/releases/latest&lt;/a&gt;

&lt;a href=&quot;https://travis-ci.org/WimObiwan/FxPicasaWebAlbumDownloader&quot;&gt;&lt;img src=&quot;https://travis-ci.org/WimObiwan/FxPicasaWebAlbumDownloader.svg?branch=master&quot;&gt;&lt;/a&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2015/11/03/download-pictures-from-picasa-webalbums/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2015/11/03/download-pictures-from-picasa-webalbums/&lt;/a&gt; .</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/267362435708733392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/11/download-pictures-from-picasa-webalbums.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/267362435708733392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/267362435708733392'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/11/download-pictures-from-picasa-webalbums.html' title='Download pictures from Picasa Webalbums'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7Pe4mWAMrVrSNKdeeOo3uRJKfj2SCbQZkXO5u1ip1AzUpiqKb0hZT4PnfjkyYNCKSw8fRKQTTuBrionrQ_7L7azpoePRBDIbTJQbC2gYvk5bcgoQKCYPdxhly_f7CdeTFXNT5KoVT4SU/s72-c/Screenshot+from+2015-11-05+22-29-04.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-4823801146929120966</id><published>2015-08-11T20:00:00.000+02:00</published><updated>2016-06-15T23:06:56.122+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="visualstudio"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Visual C++ Code Analysis fatal error &quot;Compiler is out of heap space&quot;</title><content type='html'>
When running Visual C++ code analysis (in the Visual Studio IDE or command line) on a big project, you can get this fatal error: C1060 compiler is out of heap space.

E.g.:
&lt;pre&gt;
Running Code Analysis for C/C++...
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\locale(70): fatal error C1060: compiler is out of heap space [C:\YourPath\YourProject.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\locale(65) : while compiling class template member function &#39;size_t std::collate&lt;wchar_t&gt;::_Getcat(const std::locale::facet **,const std::locale *)&#39;
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xlocale(607) : see reference to function template instantiation &#39;size_t std::collate&lt;wchar_t&gt;::_Getcat(const std::locale::facet **,const std::locale *)&#39; being compiled
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\locale(140) : see reference to class template instantiation &#39;std::collate&lt;wchar_t&gt;&#39; being compiled
&lt;/pre&gt;

On a 64-bit machine, the solution is to run the code analysis from the command line &lt;b&gt;using the 64-bit version of MSBuild.exe&lt;/b&gt;:
&lt;pre&gt;
&quot;C:\Program Files (x86)\MSBuild\12.0\Bin\amd64\MSBuild.exe&quot; /p:Configuration=Release /p:Platform=&quot;x64&quot; /p:RunCodeAnalysis=true &quot;C:\YourPath\YourProject.vcxproj&quot;
&lt;/pre&gt;

So, use the one in the subdirectory &lt;pre&gt;amd64&lt;/pre&gt;. You need to replace the configuration/platform/project according to your needs.

By default, even when releasing 64-bit executables, the 32-bit version of the compiler is used.

This error was also the reason that certain compilations were hanging on our Jenkins/Hudson build servers: after this error, the MSBuild.exe process never terminated until it was killed (in Windows Task Manager) or aborted (in the Jenkins Web GUI.
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2015/08/11/visual-cpp-code-analysis-out-of-heap-space/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2015/08/11/visual-cpp-code-analysis-out-of-heap-space/&lt;/a&gt; .
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/4823801146929120966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/08/visual-c-code-analysis-fatal-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/4823801146929120966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/4823801146929120966'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/08/visual-c-code-analysis-fatal-error.html' title='Visual C++ Code Analysis fatal error &quot;Compiler is out of heap space&quot;'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-9056539460111797465</id><published>2015-08-03T21:57:00.000+02:00</published><updated>2016-06-15T23:06:56.159+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="btrieve"/><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><title type='text'>Extracting data from BTrieve files</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
The procedure below works with BTrieve 6.15,&amp;nbsp; but probably works with older and more recent releases of BTrieve.&amp;nbsp; Even for PervasiveSQL deployments that - for legacy reasons - use BTrieve as their backend, it should work.&amp;nbsp; But in the latter case, you should use the SQL interface (ODBC connector).&lt;br /&gt;
&lt;a href=&quot;http://wikiimages.qwika.com/thumb/en/a/ad/Btrieve_living_legend_tshirt.png/180px-Btrieve_living_legend_tshirt.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://wikiimages.qwika.com/thumb/en/a/ad/Btrieve_living_legend_tshirt.png/180px-Btrieve_living_legend_tshirt.png&quot;&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;First, you need to extract the binary information from the BTrieve file.&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Download:&lt;br /&gt;&lt;a href=&quot;https://s3-eu-west-1.amazonaws.com/wimobiwan-public/blog/BtrieveFileSaver.zip&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;BTrieveFileSaver.zip&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Run: &lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;code class=&quot;java plain&quot;&gt;BtrieveFileSaver.exe -btrin MYTABLE.BTV -btrout c:\temp\MyTable.txt &lt;/code&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The BTrieve file only contains the &lt;i&gt;data&lt;/i&gt;, and no information about the &lt;i&gt;model&lt;/i&gt;. &lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When you have the source, that reads or writes the data, then you can extract the model.&lt;br /&gt;e.g.:&lt;/span&gt;
&lt;pre class=&quot;java plain&quot;&gt;             typedef struct _MyRecord
 OFF  LEN    {
   4    4       long  id;
   8   32       char  name[32];
 (40)        } MyRecord;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;The lengths are derived from the datatypes (C++ in this case). The cumulative lenths are determine the offset of each field. For some reason, there is an initial offset of 4 bytes.&lt;/li&gt;
&lt;li&gt;If you don&#39;t have the source code, you can possibly &quot;reverse engineer&quot; the data from the table.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li value=&quot;3&quot;&gt;Using a PowerShell script, you can extract, filter and format the data.&amp;nbsp; In this case, we extract the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;code class=&quot;java plain&quot;&gt;id&lt;/code&gt;&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;code class=&quot;java plain&quot;&gt;name&lt;/code&gt;&lt;/span&gt; fields of all records, and show them as a table.
&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;A helper function to make it easier to parse the strings
&lt;pre class=&quot;java plain&quot;&gt;Add-Type -AssemblyName &quot;System.Text.Encoding&quot;
 
function GetString([byte[]] $buffer, [int] $start, [int] $maxlen) {
   $i = $start
   for ($i = $start; ($i -lt $buffer.Length) -and ($i -lt ($start + $maxlen)); $i++) {
      if ($buffer[$i] -eq 0) {
         break
      }
   }

   $len = $i - $start
   [System.Text.Encoding]::ASCII.GetString($buffer, $start, $len)
}

&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;The actual extraction is simple:
&lt;pre class=&quot;java plain&quot;&gt;$lines = Get-Content c:\temp\MyTable.txt
$table = $lines | foreach {
   $line = $_
 
   $id = [bitconverter]::ToInt32($line, 16)
   $name = GetString $line 26 48
 
   $obj = New-Object psobject
   $obj | Add-Member -MemberType NoteProperty -Name &#39;id&#39; -Value $id
   $obj | Add-Member -MemberType NoteProperty -Name &#39;name&#39; -Value $name
   $obj
}
 
$table | Where-Object { $_.name-ne &#39;&#39; } | Sort-Object id | Format-Table -AutoSize
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2015/08/03/extracting-btrieve-data/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2015/08/03/extracting-btrieve-data/&lt;/a&gt; .
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/9056539460111797465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/08/extracting-data-from-btrieve-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/9056539460111797465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/9056539460111797465'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/08/extracting-data-from-btrieve-files.html' title='Extracting data from BTrieve files'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-114016406294476975</id><published>2015-08-02T20:00:00.000+02:00</published><updated>2018-04-04T22:17:16.544+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="jenkins/hudson"/><category scheme="http://www.blogger.com/atom/ns#" term="visualstudio"/><title type='text'>Running Visual Studio code analysis in Jenkins/Hudson</title><content type='html'>Code analysis can be extremely useful to detect certain errors that are difficult to find. One example is errors in the &#39;printf&#39; format specifier, e.g.
&lt;br /&gt;
&lt;pre&gt;int iValue = 17; 
printf(&quot;%s&quot;, iValue);
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUap1fjIrArw7G8bwovztu5_WLrcOjYbZp1xzeZODNDhB0f-eatyWnOeWYtELHZj3-jrcMIFwQ94zq9lgHk_5xInrM88-eyd3T1MGaaaX8H1nAsSgDSMHVLdimE4nHEDlrO7VRD3rIr_s/s1600/images.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUap1fjIrArw7G8bwovztu5_WLrcOjYbZp1xzeZODNDhB0f-eatyWnOeWYtELHZj3-jrcMIFwQ94zq9lgHk_5xInrM88-eyd3T1MGaaaX8H1nAsSgDSMHVLdimE4nHEDlrO7VRD3rIr_s/s1600/images.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;Since code analysis takes a long time, it is a good example of something that could be done on the build server, e.g. every night. &lt;br /&gt;
First make sure that the &lt;a href=&quot;http://wiki.hudson-ci.org/display/HUDSON/PowerShell+Plugin&quot; target=&quot;_blank&quot;&gt;PowerShell plugin&lt;/a&gt; is installed.&lt;br /&gt;
&lt;br /&gt;
Create a new project, add a Powershell build step, and paste this script:
&lt;br /&gt;
&lt;pre&gt;$sln=&#39;.\MySolution.sln&#39;    # path based on the workspace root
$configuration=&#39;/p:Configuration=Release&#39;
$platform=&#39;/p:Platform=&quot;Win32&quot;&#39;

#only take these warnings into account
$severe_warnings_list = @(
    4789 #: Destination of memory copy is too small
    6053 #: Call to function may not zero-terminate string
    6057 #: Buffer overrun due to number of characters/bytes mismatch
    6059 #: Incorrect length parameter
    6063 #: Missing string argument
    6064 #: Missing integer argument
    6066 #: Non-pointer passed as parameter when pointer is required
    6067 #: Parameter in call must be the address of the string
    6066 #: Non-pointer passed as parameter when pointer is required
    6209 #: Using sizeof when a character count might be needed.
    6269 #: Possible incorrect order of operations: dereference ignored
    6270 #: Missing float argument to varargs function
    6271 #: Extra argument: parameter not used by the format string
    6272 #: Non-float passed as argument &lt;number&gt; when float is required
    6273 #: Non-integer passed as a parameter when integer is required
    6278 #: array new [] paired with scalar delete
    6281 #: relational/bitwise operator precedence problem
    6282 #: Incorrect operator: assignment of constant in Boolean context
    6283 #: array new [] paired with scalar delete
    6284 #: Object passed as a parameter when string is required
    6290 #: Bitwise operation on logical result: precedence error
    6302 #: Format string mismatch: char* when wchar_t* needed
    6303 #: Format string mismatch:  wchar_t* when char* needed
    6306 #: Incorrect call to &#39;fprintf*&#39;: consider using &#39;vfprintf*&#39;
    6328 #: Wrong parameter type passed
    6334 #: Sizeof operator applied to an expression with an operator
    6336 #: Arithmetic/question operator precedence problem
    6522 #: Invalid size specification: expression must be of integral type
    6523 #: &quot;Invalid size specification: parameter &#39;size&#39; not found
)

$a = $(C:\PROGRA~2\MSBuild\12.0\Bin\MSBuild.exe $configuration $platform /p:RunCodeAnalysis=true $sln)

# Take out certain link and BSC compiler warnings
$b = $a | where { $_.Contains(&#39;warning&#39;) -and $_ -match &#39;^  &#39; -and $_ -notmatch &#39;warning LNK&#39; -and $_ -notmatch &#39;warning BK&#39; }
# Take out 3rd-party libraries
$b = $b | where { ($_ -replace (&#39;^\s*&#39; + [regex]::Escape($env:WORKSPACE) + &#39;(.*?)\(\d+\)\: .*$&#39;), &#39;$1&#39;) -notmatch &#39;^\\libraries\\(?:boost|x(?:un)?zip\.cpp|xmlite\.cpp)&#39; }
# Only keep warnings from the severe_warnings_list
$severe = @($b | where { ($_ -replace &#39;^.*\: warning C(\d+)\:.*$&#39;, &#39;$1&#39;) -in $severe_warnings_list })

# Show the warnings
$severe

if ($severe.Length -gt 0) { 
    Write-Warning &quot;Found $($severe.Length) severe code analysis warnings!&quot;
    exit 1
} else {
    ($b -replace &#39;^.*\: warning (C\d+)\:.*$&#39;, &#39;$1&#39;) | group | sort -Descending Count
}

exit 0
&lt;/number&gt;&lt;/pre&gt;

&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;https://mycomputeradventures.foxinnovations.be/2015/08/02/running-visual-studio-code-analysis-in-jenkins-hudson/&quot;&gt;https://mycomputeradventures.foxinnovations.be/2015/08/02/running-visual-studio-code-analysis-in-jenkins-hudson/&lt;/a&gt; .
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/114016406294476975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/08/running-visual-studio-code-analysis-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/114016406294476975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/114016406294476975'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/08/running-visual-studio-code-analysis-in.html' title='Running Visual Studio code analysis in Jenkins/Hudson'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUap1fjIrArw7G8bwovztu5_WLrcOjYbZp1xzeZODNDhB0f-eatyWnOeWYtELHZj3-jrcMIFwQ94zq9lgHk_5xInrM88-eyd3T1MGaaaX8H1nAsSgDSMHVLdimE4nHEDlrO7VRD3rIr_s/s72-c/images.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-4278473867294289712</id><published>2015-07-14T22:53:00.002+02:00</published><updated>2016-06-15T23:06:56.119+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gps"/><category scheme="http://www.blogger.com/atom/ns#" term="tomtom"/><title type='text'>TomTom very slow GPS lock</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfeXXAseSbqjbWScipGswRRwF3OxiEiFH5C08iwZ2isACECxeWK6Qa17M5MW1JT2n2mYXeC0kUoRoZhztVRARIk-BFu8GxRvUbGyONHe5s8q5jPJN9evZGcC9n0Ul15MfV2Qsi0UtMjiw/s1600/1355739068.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfeXXAseSbqjbWScipGswRRwF3OxiEiFH5C08iwZ2isACECxeWK6Qa17M5MW1JT2n2mYXeC0kUoRoZhztVRARIk-BFu8GxRvUbGyONHe5s8q5jPJN9evZGcC9n0Ul15MfV2Qsi0UtMjiw/s320/1355739068.jpeg&quot; width=&quot;320&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
During the last few weeks, my TomTom Live 825M Europe was extremely slow in finding the GPS location.&amp;nbsp; Sometimes more than 15 minutes, which is totally unacceptable.&amp;nbsp; TomTom support proposed to bring the device up-to-date, which I already did without better results.&lt;br /&gt;
&lt;br /&gt;
The &quot;drum roll reset&quot; as proposed on a few forums as a solution for other issues, solved all problems!&amp;nbsp; Hold the power button for up to 30 seconds until you here the drum roll.&amp;nbsp; A GPS location lock is now achieved in a few seconds after power on.
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2015/07/14/tomtom-very-slow-gps-lock/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2015/07/14/tomtom-very-slow-gps-lock/&lt;/a&gt; .</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/4278473867294289712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/07/tomtom-very-slow-gps-lock.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/4278473867294289712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/4278473867294289712'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/07/tomtom-very-slow-gps-lock.html' title='TomTom very slow GPS lock'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfeXXAseSbqjbWScipGswRRwF3OxiEiFH5C08iwZ2isACECxeWK6Qa17M5MW1JT2n2mYXeC0kUoRoZhztVRARIk-BFu8GxRvUbGyONHe5s8q5jPJN9evZGcC9n0Ul15MfV2Qsi0UtMjiw/s72-c/1355739068.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-7266433770390356786</id><published>2015-07-12T22:41:00.000+02:00</published><updated>2016-06-15T23:06:56.146+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Copying symbolic links as regular files</title><content type='html'>By default, symbolic links (symlinks) are copyied as they are.  If you want to copy the destination file of the symlink (&quot;follow&quot; the symlink), you need to add the argument &quot;-L&quot;.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;cp -L /mnt/data/archive/Documents /mnt/backup&lt;/span&gt;&lt;/blockquote&gt;
This is necessary when copying files from a git-annex repository, which uses symlinks to an internal filestore.&lt;br /&gt;
&lt;br /&gt;
A good explanation between hard and soft links on linux can be found here:&lt;br /&gt;
&lt;a href=&quot;http://linuxg.net/the-linux-and-unix-links-the-symbolic-link-vs-the-hard-link/&quot; target=&quot;_blank&quot;&gt;http://linuxg.net/the-linux-and-unix-links-the-symbolic-link-vs-the-hard-link/&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://linuxg.net/wp-content/uploads/2012/07/symlink-vs-hardlink.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://linuxg.net/wp-content/uploads/2012/07/symlink-vs-hardlink.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2015/07/12/copying-symbolic-links-as-regular-files/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2015/07/12/copying-symbolic-links-as-regular-files/&lt;/a&gt; .</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/7266433770390356786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/07/copying-symbolic-links-as-regular-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7266433770390356786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7266433770390356786'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/07/copying-symbolic-links-as-regular-files.html' title='Copying symbolic links as regular files'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-2702357569651272728</id><published>2015-07-11T22:31:00.000+02:00</published><updated>2016-06-15T23:06:56.102+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Dependency on Visual Basic 5 of legacy applications </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbAMfJb67nxBZp3vA_gKlsiVJymmgydtDCs1CxlaFzuU6zziJLgMLHoswZ2QW284HJkEuGIJc1O0heDz0FZJCENbpf8GJdiX182uP6oyIJ0SPVPDwyTiYNhrfBhUQUKSlKxtyCgLzSIu0/s1600/5.0-sp3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;183&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbAMfJb67nxBZp3vA_gKlsiVJymmgydtDCs1CxlaFzuU6zziJLgMLHoswZ2QW284HJkEuGIJc1O0heDz0FZJCENbpf8GJdiX182uP6oyIJ0SPVPDwyTiYNhrfBhUQUKSlKxtyCgLzSIu0/s320/5.0-sp3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It sounds impossible, but there are still applications distributed that need the runtime of Visual Basic 5...&amp;nbsp; (released Februari 1997)&amp;nbsp; The runtime files are not available in recent versions of Windows, so you get an error like this:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
This application failed to start because msvbvm50.dll was not found. Re-installing the application may fix this problem. &lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB407V5DjB9MX1loHTGOkd4KIXfqR92MTF_cstvX9ZsR5cAQGkZLHdnpVDGW1UlNn3mKuPD52b43Afe9LFV0yyeMz-EtoWHKw5mZ76ygvo8P86u4EqO_KWH88C1AQceBxTqTNj4RLliaA/s1600/msvbvm50.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;143&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB407V5DjB9MX1loHTGOkd4KIXfqR92MTF_cstvX9ZsR5cAQGkZLHdnpVDGW1UlNn3mKuPD52b43Afe9LFV0yyeMz-EtoWHKw5mZ76ygvo8P86u4EqO_KWH88C1AQceBxTqTNj4RLliaA/s400/msvbvm50.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The solution is simple: download and run this installer from Microsoft: &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
http://download.microsoft.com/download/vb50pro/utility/1/win98/EN-US/Msvbvm50.exe&lt;/blockquote&gt;
More information can be found on this knowledge base article: &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
https://support.microsoft.com/en-us/kb/180071 &lt;/blockquote&gt;
Originally, I encountered the problem when starting a Flemish/Dutch CD from the kids, called &quot;Vakantieblaadjes&quot;:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Deze toepassing kan niet worden gestart omdat msvbvm50.dll niet is gevonden. Opnieuw installeren van de toepassing kan dit probleem oplossen.&lt;/blockquote&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/2702357569651272728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/07/dependency-on-visual-basic-5-of-legacy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/2702357569651272728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/2702357569651272728'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2015/07/dependency-on-visual-basic-5-of-legacy.html' title='Dependency on Visual Basic 5 of legacy applications '/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbAMfJb67nxBZp3vA_gKlsiVJymmgydtDCs1CxlaFzuU6zziJLgMLHoswZ2QW284HJkEuGIJc1O0heDz0FZJCENbpf8GJdiX182uP6oyIJ0SPVPDwyTiYNhrfBhUQUKSlKxtyCgLzSIu0/s72-c/5.0-sp3.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-2822237445106966525</id><published>2013-07-05T22:08:00.003+02:00</published><updated>2016-06-15T23:06:56.104+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jenkins/hudson"/><title type='text'>Jenkins GIT polling blocked </title><content type='html'>&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;We were experiencing this error on our Windows Hudson/Jenkins build servers multiple times a week:
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;There are more SCM polling activities scheduled than handled, so the threads are not keeping up with the demands. Check if your polling is hanging, and/or increase the number of threads if necessary.&lt;/span&gt;

We are using GIT, and apparently, the cause of the blocked GIT pollings was a hanging SSH.exe process.

A few posts indicated that others are experiencing the same or similar problems:
&lt;a href=&quot;https://issues.jenkins-ci.org/browse/JENKINS-14046&quot; target=&quot;_blank&quot;&gt;Jenkins-14046: git operations occasionally hang in Jenkins on Windows&lt;/a&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/10732940/git-operations-occasionally-hang-in-jenkins-on-windows&quot; target=&quot;_blank&quot;&gt;StackOverflow: git operations occasionally hang in Jenkins on Windows&lt;/a&gt;

The proposed solutions didn&#39;t help me:
* Reinstalled Jenkins and GIT.&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;* Installed plink.exe/pageant.exe, and set GIT_SSH.
* Played around with the temporary directory.

As a workaround, the only thing I could to make everything run again (besides rebooting) was killing the blocked ssh.exe process. So currently, I&#39;m running a Windows Scheduled task that kills blocked SSH.exe processes every 5 minutes:

&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Get-Process | where { $_.ProcessName -eq &#39;SSH&#39; -and $_.StartTime -lt (Get-Date).AddMinutes(-2) } | Stop-Process -Force&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Configuration of the Windows Scheduled task:&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipkXygDsyElpITZa9RsAH4zTOzOlpz7FNBIVSZ4y90sjtnAd3ED9I09FAPhDSbBx7RQatoOaKmXhB8YFX3X_fP4NcrHktjntISANGpdgdu6Y1Kinp7gDogCImvL52PWKExOsE_W481FYE/s1600/meubuild01+-+Remote+Desktop+Connection_2013-07-05_09-40-34.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipkXygDsyElpITZa9RsAH4zTOzOlpz7FNBIVSZ4y90sjtnAd3ED9I09FAPhDSbBx7RQatoOaKmXhB8YFX3X_fP4NcrHktjntISANGpdgdu6Y1Kinp7gDogCImvL52PWKExOsE_W481FYE/s1600/meubuild01+-+Remote+Desktop+Connection_2013-07-05_09-40-34.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjynkG37kTOgTiFoa_5Zbj_d-PLECvwkMj-bqdL7HsoSTUkjHebe8PCeK0vq5DXMOiy-X8QZWP4OErujHAtMT2IaZic7QT2tUZhDKxuMK8ILQrREaV4ptBRhDVPeOeSmcXtxKUJpwesHng/s1600/meubuild01+-+Remote+Desktop+Connection_2013-07-05_09-41-54.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjynkG37kTOgTiFoa_5Zbj_d-PLECvwkMj-bqdL7HsoSTUkjHebe8PCeK0vq5DXMOiy-X8QZWP4OErujHAtMT2IaZic7QT2tUZhDKxuMK8ILQrREaV4ptBRhDVPeOeSmcXtxKUJpwesHng/s1600/meubuild01+-+Remote+Desktop+Connection_2013-07-05_09-41-54.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;As argument, you can specify:&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-Command &quot;&amp;amp; { Get-Process | where { $_.ProcessName -eq &#39;SSH&#39; -and $_.StartTime -lt (Get-Date).AddMinutes(-2) } | Stop-Process -Force }&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;With Powershell 3 (as administrator), you can use the built-in support for ScheduledJobs:
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$trigger = New-JobTrigger -At (get-date) -Once -RepetitionInterval (New-TimeSpan -Minutes 5) -RepetitionDuration ([TimeSpan]::MaxValue)
Register-ScheduledJob -Name Jenkins-Workaround-BlockedSsh -ScriptBlock { Get-Process | where { $_.ProcessName -eq &#39;SSH&#39; -and $_.StartTime -lt (Get-Date).AddMinutes(-2) } | Stop-Process -Force } -Trigger $trigger
# that&#39;s all you need to do!
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Output:&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Id         Name            JobTriggers     Command                                  Enabled
--         ----            -----------     -------                                  -------
40         Jenkins-Work... 1                Get-Process | where { $_.ProcessName... True
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Get list of all ScheduledJobs:&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Get-ScheduledJob *   # gets a list of all jobs
&lt;/span&gt;&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Output:&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Id         Name            JobTriggers     Command                                  Enabled
--         ----            -----------     -------                                  -------
...
40         Jenkins-Work... 1                Get-Process | where { $_.ProcessName... True

&lt;/span&gt;&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Get properties of the newly created ScheduledJob:&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Get-ScheduledJob -Id 40 | Format-Custom -Depth 1  # replace id 40 with the correct one
class ScheduledJobDefinition
{
  ...
  Definition =
    class JobDefinition
    {
      Name = Jenkins-Workaround-BlockedSsh
      JobSourceAdapterType = Microsoft.PowerShell.ScheduledJob.ScheduledJobSourceAdapter
      ModuleName = PSScheduledJob
      JobSourceAdapterTypeName = ScheduledJobSourceAdapter
      Command =  Get-Process | where { $_.ProcessName -eq &#39;SSH&#39; -and $_.StartTime -lt (Get-Date).AddMinutes(-2) } | Sto
      p-Process -Force
      InstanceId = dd6cfd1d-5cc1-4ecc-8172-93f09ff0beda
      CommandInfo =
    }
  Options =
    class ScheduledJobOptions
    {
      StartIfOnBatteries = False
      StopIfGoingOnBatteries = True
      WakeToRun = False
      StartIfNotIdle = True
      StopIfGoingOffIdle = False
      RestartOnIdleResume = False
      IdleDuration = 00:10:00
      IdleTimeout = 01:00:00
      ShowInTaskScheduler = True
      RunElevated = False
      RunWithoutNetwork = True
      DoNotAllowDemandStart = False
      MultipleInstancePolicy = IgnoreNew
      JobDefinition = Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition
    }
  Credential =
  JobTriggers =
    [
      Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger
    ]
  Id = 40
  GlobalId =
    class Guid
    {
      Guid = 22ef5ef5-06b6-41de-99dc-6fc5b6fee6b6
    }
  Name = Jenkins-Workaround-BlockedSsh
  Command =  Get-Process | where { $_.ProcessName -eq &#39;SSH&#39; -and $_.StartTime -lt (Get-Date).AddMinutes(-2) } | Stop-Pr
  ocess -Force
  ExecutionHistoryLength = 32
  Enabled = True
  ...
}
&lt;/span&gt;
After about 5 minutes, the first Job will be created: 
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Get-Job | where { $_.Name -match &#39;Jenkins&#39; }
Get-Job -Id 481 | Format-Custom -Depth 1&lt;/span&gt;&lt;/pre&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2013/07/05/jenkins-git-polling-blocked/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2013/07/05/jenkins-git-polling-blocked/&lt;/a&gt; .</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/2822237445106966525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/07/jenkins-git-polling-blocked.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/2822237445106966525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/2822237445106966525'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/07/jenkins-git-polling-blocked.html' title='Jenkins GIT polling blocked '/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipkXygDsyElpITZa9RsAH4zTOzOlpz7FNBIVSZ4y90sjtnAd3ED9I09FAPhDSbBx7RQatoOaKmXhB8YFX3X_fP4NcrHktjntISANGpdgdu6Y1Kinp7gDogCImvL52PWKExOsE_W481FYE/s72-c/meubuild01+-+Remote+Desktop+Connection_2013-07-05_09-40-34.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-8611482748612041426</id><published>2013-01-25T08:00:00.000+01:00</published><updated>2016-06-16T23:05:08.564+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><title type='text'>GIT Merge conflict solving with kdiff3</title><content type='html'>&lt;br /&gt;
First we will create a test repository and a test file on which we will create a merge conflict later on.&lt;br /&gt;
(in this example, the commands are executed with PowerShell in Windows, but the GIT commands are exactly the same on any other shell or OS) &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Creation of test repository&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; cd \temp&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;md mergetest&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cd mergetest&lt;br /&gt;&amp;gt; git init&lt;/span&gt; &lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Creation of test file&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; &#39;Original line&#39; | Out-File file.txt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Commit into repository&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git add file.txt&lt;br /&gt;&amp;gt; git commit -m &quot;Original checkin&quot;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Current repository state: (using the tool &lt;a href=&quot;http://code.google.com/p/gitextensions/&quot; target=&quot;_blank&quot;&gt;GIT Extensions&lt;/a&gt;)&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQyt9raKp2dHuuqeOdT_0zmZVAmWcFU5W9wXr-6V-Rs3kVoaq-Of0hmw3aS9Vz9prkWPBETfI9QCDbfnvr08P5np0I56tiGgK-3zlzy24qjGqJpxl4lUZl9fxC-vq_bpWbTeap6dQ4Es/s1600/mergetest1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQyt9raKp2dHuuqeOdT_0zmZVAmWcFU5W9wXr-6V-Rs3kVoaq-Of0hmw3aS9Vz9prkWPBETfI9QCDbfnvr08P5np0I56tiGgK-3zlzy24qjGqJpxl4lUZl9fxC-vq_bpWbTeap6dQ4Es/s1600/mergetest1.png&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Now we will create a new branch A, and update the file.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Create new branch&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git branch branch-A&lt;br /&gt;&amp;gt; git checkout branch-A&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Update file&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; &#39;Branch A line&#39; | Out-File file.txt&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Commit into repository&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git add file.txt&lt;br /&gt;&amp;gt; git commit -m &quot;Branch A change&quot;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Current repository state:&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9FHP0Yeef2tEBkM-wWqXhpRoLj6Dm2KOoYtX4yLVWAqTlkrD-CJa-MXa1HrRBJ3zrtlPEBNJ0qYb8vaJqPTxKjFMr0RUx1eS5NeTY7kd9J86_h6w9xXzoVqvCf6u9GqyyKtb999UUJ3s/s1600/mergetest2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9FHP0Yeef2tEBkM-wWqXhpRoLj6Dm2KOoYtX4yLVWAqTlkrD-CJa-MXa1HrRBJ3zrtlPEBNJ0qYb8vaJqPTxKjFMr0RUx1eS5NeTY7kd9J86_h6w9xXzoVqvCf6u9GqyyKtb999UUJ3s/s1600/mergetest2.png&quot; /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
Now we will create a new branch B, and update the file with a conflicting change.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Create new branch, starting from the original master branch&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git checkout master&lt;br /&gt;&amp;gt; git branch branch-B&lt;br /&gt;&amp;gt; git checkout branch-B&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Update file&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; &#39;Branch B line&#39; | Out-File file.txt&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Commit into repository&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git add file.txt&lt;br /&gt;&amp;gt; git commit -m &quot;Branch B change&quot;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Current repository state:&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS6KIvTwB_5kdNrJkk9zuxNl3ixDpZ3lh_AYL-HCUyJaleokyQB04FjOmiUq_NEcfxvKyar60EeguE9UlshXv2q3qt5k6gDXrBzQJchG-DGNDYCPubsMYmvK9ADmG0I21TbO8yU4PBJ4c/s1600/mergetest3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS6KIvTwB_5kdNrJkk9zuxNl3ixDpZ3lh_AYL-HCUyJaleokyQB04FjOmiUq_NEcfxvKyar60EeguE9UlshXv2q3qt5k6gDXrBzQJchG-DGNDYCPubsMYmvK9ADmG0I21TbO8yU4PBJ4c/s1600/mergetest3.png&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
All this was a preparation for what we will do now: merge the conflicting change of branch-B into branch-A.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Select the target branch (in this case branch A)&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git checkout branch-A&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Merge the source branch (in this case branch B)&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git merge branch-B&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;This results in a merge conflict:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
Auto-merging file.txt&lt;br /&gt;
CONFLICT (content): Merge conflict in file.txt&lt;br /&gt;
Automatic merge failed; fix conflicts and then commit the result.&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;This conflict can be resolved by starting your mergetool&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git mergetool&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;It gives you a message before it launches your mergetool (in my case &lt;a href=&quot;http://kdiff3.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;kdiff3&lt;/a&gt;):&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
Merging:&lt;br /&gt;
file.txt&lt;br /&gt;
&lt;br /&gt;
Normal merge conflict for &#39;file.txt&#39;:&lt;br /&gt;
&amp;nbsp; {local}: modified file&lt;br /&gt;
&amp;nbsp; {remote}: modified file&lt;br /&gt;
Hit return to start merge resolution tool (kdiff3):&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;You get a window containing 4 versions of the same file:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Top left: &quot;&lt;u&gt;&lt;b&gt;Base&lt;/b&gt;&lt;/u&gt;&quot;.&amp;nbsp; This is the original version of the file, the last shared version between what became later branch-A and branch-B.&lt;/li&gt;
&lt;li&gt;Top Middle: &quot;&lt;u&gt;&lt;b&gt;Local&lt;/b&gt;&lt;/u&gt;&quot;. This is the target branch version of the file.&amp;nbsp; It is called &quot;Local&quot;, because this is the currently selected branch (using the last git checkout command).&lt;/li&gt;
&lt;li&gt;Top Right: &quot;&lt;u&gt;&lt;b&gt;Remote&lt;/b&gt;&lt;/u&gt;&quot;. This is the source branch version of the file. It is called &quot;Remote&quot;, as apposed to &quot;Local&quot;.&lt;/li&gt;
&lt;li&gt;Bottom: &quot;&lt;u&gt;&lt;b&gt;Output&lt;/b&gt;&lt;/u&gt;&quot;. This is the merged version of the file. After successful completion of the merge, this will become the new version of the target branch.&amp;nbsp; In this pane, you can edit the text, or you can right click on any merged part and select what version(s) of the original file you want to include in the output.&amp;nbsp; In this case, I decide to include the changes done in both branch-A and branch-B.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0YbGfgOVNl_7SuGkB7u9Hc9wO2DUd14T3QS3mISvaD2SCRHVk0N36wTHjbOqdAHzioPVwMaczuhEKUOOJrO97ufpK8KL31N-czn2IwIYyfOfYVNTzIz3BuYZ0DHfsEYDT0ZjTCyDUmeI/s1600/mergetest4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0YbGfgOVNl_7SuGkB7u9Hc9wO2DUd14T3QS3mISvaD2SCRHVk0N36wTHjbOqdAHzioPVwMaczuhEKUOOJrO97ufpK8KL31N-czn2IwIYyfOfYVNTzIz3BuYZ0DHfsEYDT0ZjTCyDUmeI/s400/mergetest4.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK8qDAE3ArQCKJGhgdZU5AYPekzEqXJtIm8cIPRobvg9l8JkoiXw_qxWNIi91QAoybnKi7kL7_wZ0T83AaEYm9OVW_OOqT7pzbfd9P-Zb0LW7dLFI1okdJpkarsxyluqRpfXaT66SZO7c/s1600/mergetest5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK8qDAE3ArQCKJGhgdZU5AYPekzEqXJtIm8cIPRobvg9l8JkoiXw_qxWNIi91QAoybnKi7kL7_wZ0T83AaEYm9OVW_OOqT7pzbfd9P-Zb0LW7dLFI1okdJpkarsxyluqRpfXaT66SZO7c/s400/mergetest5.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Close the kdiff3 application (saving the file), and commit the merge:&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; git commit&lt;/span&gt;&lt;br /&gt;
(accept the default commit message)&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;This brings us to the following repository state:&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkDzw1dlnfqHTA-lNbXRJa5psgnlO_VzZoKKg1G3IYN6CGZLvqmcYX6Yb6rpiuRR_9LheRkFuPvZB-GDoXV3HZ20qsvZfryYGdxA6qD3k6nhMMK_Cseikdz1-fV4n0ACcp79UoT1ETj4/s1600/mergetest6.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXkDzw1dlnfqHTA-lNbXRJa5psgnlO_VzZoKKg1G3IYN6CGZLvqmcYX6Yb6rpiuRR_9LheRkFuPvZB-GDoXV3HZ20qsvZfryYGdxA6qD3k6nhMMK_Cseikdz1-fV4n0ACcp79UoT1ETj4/s320/mergetest6.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We can check if the content of the test-file is what we need:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;gt; Get-Content file.txt&lt;/span&gt;&lt;br /&gt;
Branch A line&lt;br /&gt;
Branch B line&lt;/blockquote&gt;
&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2013/01/25/git-merge-conflict-solving-with-kdiff3/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2013/01/25/git-merge-conflict-solving-with-kdiff3/&lt;/a&gt; .
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/8611482748612041426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/01/git-merge-conflict-solving-with-kdiff3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/8611482748612041426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/8611482748612041426'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/01/git-merge-conflict-solving-with-kdiff3.html' title='GIT Merge conflict solving with kdiff3'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQyt9raKp2dHuuqeOdT_0zmZVAmWcFU5W9wXr-6V-Rs3kVoaq-Of0hmw3aS9Vz9prkWPBETfI9QCDbfnvr08P5np0I56tiGgK-3zlzy24qjGqJpxl4lUZl9fxC-vq_bpWbTeap6dQ4Es/s72-c/mergetest1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-7310699236137050406</id><published>2013-01-17T22:34:00.005+01:00</published><updated>2016-06-15T23:06:56.149+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fxgqlc"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>FxGqlC: Added new function &#39;PREFIX&#39;</title><content type='html'>Added (non-aggregation) text function PREFIX to return the common prefix of two strings.&lt;br /&gt;
An aggregation function PREFIX (with 1 argument) was already added in v2.4.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;SELECT PREFIX(&#39;0032478123456&#39;, &#39;0032478654321&#39;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;-- returns &#39;0032478&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This feature is added to &lt;a href=&quot;https://sites.google.com/site/fxgqlc/home/fxgqlc-manual/changes-in-fxgqlc-25&quot; target=&quot;_blank&quot;&gt;FxGqlC in v2.5-alpha5&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/7310699236137050406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/01/fxgqlc-added-new-function-prefix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7310699236137050406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7310699236137050406'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/01/fxgqlc-added-new-function-prefix.html' title='FxGqlC: Added new function &#39;PREFIX&#39;'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-578831000558536911</id><published>2013-01-17T22:34:00.002+01:00</published><updated>2016-06-15T23:06:56.131+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fxgqlc"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>FxGqlC: Added aggregation functions ENLIST and ENLISTDISTINCT</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
Added aggregation functions ENLIST and ENLISTDISTINCT.&lt;br /&gt;
ENLIST creates a string value containing the list of all string values in their original order.&lt;br /&gt;
ENLISTDISTINCT creates a similar list, but the dupplicate values are removed, and the list is ordered.&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;SELECT [Winner], COUNT(*), &lt;u&gt;&lt;b&gt;ENLIST&lt;/b&gt;&lt;/u&gt;([Tournament])&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; FROM [&#39;SampleFiles/Tennis-ATP-2011.csv&#39; -Heading=On]&lt;br /&gt;&amp;nbsp;&amp;nbsp; GROUP BY [Winner] ORDER BY 2 DESC&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;&lt;span style=&quot;font-family: courier new,monospace;&quot;&gt;SELECT [Winner], COUNT(*), &lt;u&gt;&lt;b&gt;ENLISTDISTINCT&lt;/b&gt;&lt;/u&gt;([Tournament])&lt;br /&gt;&amp;nbsp;&amp;nbsp; FROM [&#39;SampleFiles/Tennis-ATP-2011.csv&#39; -Heading=On]&lt;br /&gt;&amp;nbsp;&amp;nbsp; GROUP BY [Winner] ORDER BY 2 DESC&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This feature is added to &lt;a href=&quot;https://sites.google.com/site/fxgqlc/home/fxgqlc-manual/changes-in-fxgqlc-25&quot; target=&quot;_blank&quot;&gt;FxGqlC in v2.5-alpha5&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/578831000558536911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/01/fxgqlc-added-aggregation-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/578831000558536911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/578831000558536911'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2013/01/fxgqlc-added-aggregation-functions.html' title='FxGqlC: Added aggregation functions ENLIST and ENLISTDISTINCT'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-3024910785169850065</id><published>2012-10-28T19:55:00.000+01:00</published><updated>2016-06-15T23:06:56.107+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>Ubuntu Server distribution upgrade</title><content type='html'>Doing a distribution upgrade is easy in the graphical user interface.&amp;nbsp; On a &quot;headless&quot; Ubuntu Server, you probably don&#39;t have a graphical user interface available, and you need to perform a few easy steps.&lt;br /&gt;
&lt;br /&gt;
First you need to check 2 things:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The package &quot;update-manager-core&quot; needs to be installed.&amp;nbsp; Just run the following command: (it will install it, if it is not already)&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;sudo apt-get install update-manager-core&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;On Ubuntu Server, the update channel is usually &quot;LTS&quot; (Long Time Support) which will upgrade only to the major release of Ubuntu Server.&amp;nbsp; Probably, you want to set this to &quot;normal&quot;, to allow an upgrade to every distribution upgrade.&amp;nbsp; To do this open the file &quot;/etc/update-manager/release-upgrades&quot;, and change the line &quot;Prompt=lts&quot; to &quot;Prompt=normal&quot;.&lt;br /&gt;For example, with pico:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;sudo pico /etc/update-manager/release-upgrades&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;Change the Prompt setting to &quot;normal&quot;.&lt;br /&gt;&lt;br /&gt;Press Ctrl-X, press &quot;Y&quot; to confirm and press enter to confirm the filename.&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Then the distribution upgrade can be started by running this command:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;sudo do-release-upgrade -d&lt;/span&gt;&amp;nbsp; &lt;/blockquote&gt;
&lt;br /&gt;
It is not &quot;recommended&quot; to do a distribution upgrade remotely over ssh.&amp;nbsp; The &quot;do-release-upgrade&quot; command above checks on this, and gives a warning.&amp;nbsp; However, I didn&#39;t have any problem doing the upgrade remotely over ssh.</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/3024910785169850065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/10/ubuntu-server-distribution-upgrade.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3024910785169850065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3024910785169850065'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/10/ubuntu-server-distribution-upgrade.html' title='Ubuntu Server distribution upgrade'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-6453764173106164940</id><published>2012-10-18T21:00:00.000+02:00</published><updated>2016-06-15T23:06:56.141+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="fxgqlc"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlserver"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>Converting a date/time to time_t using FxGqlC (or SQL)</title><content type='html'>The time_t is used in C++ to represent a date/time. &amp;nbsp;It is expressed in seconds since Januari 1st, 1970.&lt;br /&gt;
&lt;br /&gt;
To get the current date/time as a time_t value, you can run this query in FxGqlC (or SQL):&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select datediff(second, &#39;1970-01-01&#39;, getutcdate())&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You need to use getutcdate() because time_t defines the UTC time.&lt;br /&gt;
&lt;br /&gt;
Or for any arbitrary date/time (in UTC):&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select datediff(second, &#39;1970-01-01&#39;, &#39;2012-10-18 22:33&#39;)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-- Returns&amp;nbsp;1350599580&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The other way around is also easy: run this query to convert a time_t to a date/time&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select dateadd(second, 1234567890, &#39;1970-01-01&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-- Returns&amp;nbsp;13/02/2009 23:31:30&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/6453764173106164940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/10/converting-datetime-to-timet-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/6453764173106164940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/6453764173106164940'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/10/converting-datetime-to-timet-using.html' title='Converting a date/time to time_t using FxGqlC (or SQL)'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-629101458244745712</id><published>2012-10-15T20:27:00.000+02:00</published><updated>2016-06-15T23:06:56.136+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="libreoffice/openoffice"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>LibreOffice doesn&#39;t appear in alt-tab view</title><content type='html'>I have an annoying problem with Unity on Ubuntu: it often happens that LibreOffice/OpenOffice Calc or Writer windows don&#39;t appear in the alt-tab application switching. &lt;br /&gt;
Googling the problem learned me that it is a known problem: &lt;a href=&quot;https://bugs.launchpad.net/bamf/+bug/1026426&quot;&gt;https://bugs.launchpad.net/bamf/+bug/1026426&lt;/a&gt;&lt;br /&gt;
The good news is that it is solved in Ubuntu 12.10, and a patch will be available for 12.04 LTS.  A workaround is to restart Unity:
&lt;ul&gt;
&lt;li&gt;Start a command window (Ctrl-Alt-T)&lt;/li&gt;
&lt;li&gt;Run:&lt;br /&gt;&lt;code&gt;unity --replace &amp;amp; disown&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/629101458244745712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/10/libreoffice-doesnt-appear-in-alt-tab.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/629101458244745712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/629101458244745712'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/10/libreoffice-doesnt-appear-in-alt-tab.html' title='LibreOffice doesn&#39;t appear in alt-tab view'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-1273672736123420983</id><published>2012-09-05T20:00:00.000+02:00</published><updated>2016-06-15T23:06:56.096+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Python scripts inside PowerShell window</title><content type='html'>&lt;br /&gt;
After installing Python on Windows, you can start a Python script by executing the script file-name.&lt;br /&gt;
E.g.:&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;./MyScript.py&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
However, the command is not executed in the same PowerShell window. &amp;nbsp;It opens a &lt;b&gt;new&lt;/b&gt;&amp;nbsp;command window to start &quot;python.exe&quot;, which executes the command (and immediately closes the window).&lt;br /&gt;
&lt;br /&gt;
This behavior can be changed, and the script can be executed within the current PowerShell window.&lt;br /&gt;
&lt;br /&gt;
Just add the &quot;.py&quot; file extension to the PATHEXT environment variable. &amp;nbsp;This can be done by executing this command:&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$env:PATHEXT += &quot;;.py&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can add this command to your &quot;$profile&quot; file, so you don&#39;t need to execute this command in every newly started PowerShell window. &amp;nbsp;Run the next command to add this line to your $profile automatically:&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&quot;`n&quot; + &#39;$env:PATHEXT += &quot;;.py&quot; # Transparent execution of Python scripts&#39; |Out-File $profile -Append -Encoding Default&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
You can test it by creating and running a small script:&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&#39;print(&quot;Hello, World!&quot;)&#39; | Out-File MyScript.py -Encoding Default&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;.\MyScript.py&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOFpVC58oNf616beGEbWIw18p0HW0BC211pER-HHSTW4frHk-YEpwjZ6eEyfEjC_HhSKaqLlMiIASePKnuR0kpg4cY22TzQfS1c4pLLiHCeWcxFctlxgAGVsRlgO5dATQYXIzZ1iCFwKk/s1600/Windows+PowerShell_2012-09-05_11-55-06.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOFpVC58oNf616beGEbWIw18p0HW0BC211pER-HHSTW4frHk-YEpwjZ6eEyfEjC_HhSKaqLlMiIASePKnuR0kpg4cY22TzQfS1c4pLLiHCeWcxFctlxgAGVsRlgO5dATQYXIzZ1iCFwKk/s320/Windows+PowerShell_2012-09-05_11-55-06.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2012/09/05/python-scripts-inside-powershell-window/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2012/09/05/python-scripts-inside-powershell-window/&lt;/a&gt; .
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/1273672736123420983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/09/python-scripts-inside-powershell-window.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/1273672736123420983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/1273672736123420983'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/09/python-scripts-inside-powershell-window.html' title='Python scripts inside PowerShell window'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOFpVC58oNf616beGEbWIw18p0HW0BC211pER-HHSTW4frHk-YEpwjZ6eEyfEjC_HhSKaqLlMiIASePKnuR0kpg4cY22TzQfS1c4pLLiHCeWcxFctlxgAGVsRlgO5dATQYXIzZ1iCFwKk/s72-c/Windows+PowerShell_2012-09-05_11-55-06.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-6212478070424547188</id><published>2012-08-30T21:12:00.000+02:00</published><updated>2016-06-15T23:06:56.133+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="aws"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>Uploading a file to Amazon Glacier using PowerShell</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
For my own convenience, I created a PowerShell module to upload backup files to Amazon&#39;s new backup service &quot;Glacier&quot;. &lt;br /&gt;
&lt;br /&gt;
The module is contained in this file:&lt;br /&gt;
&lt;a href=&quot;http://www.obiwan.be/redirect-blog.php?url=http://dl.dropbox.com/u/2350654/blog/FxAWS.zip&quot; target=&quot;_blank&quot;&gt;http://dl.dropbox.com/u/2350654/blog/FxAWS.zip&lt;/a&gt;&lt;br /&gt;
(including the Amazon AWS SDK library)&lt;br /&gt;
Extract it into your Powershell module directory, e.g.&lt;br /&gt;
C:\Users\&amp;lt;your name&amp;gt;\Documents\WindowsPowerShell\Modules.&lt;br /&gt;
(this will create a directory FxAWS under the directory Modules)&lt;br /&gt;
&lt;br /&gt;
Start powershell and run:&lt;br /&gt;
Import-Module FxAWS&lt;br /&gt;
&lt;br /&gt;
C:\Users\wim devos.GENOFFICE&amp;gt; Write-AWSGlacier -AWSAccessKey &#39;&amp;lt;access key&amp;gt;&#39; -AWSSecretKey &#39;&amp;lt;secret key&amp;gt;&#39; -AWSRegion &amp;lt;some region&amp;gt; -&lt;br /&gt;
GlacierVault &amp;lt;vault name&amp;gt;&amp;nbsp;-Filename &amp;lt;filename&amp;gt; -Description &amp;lt;description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
Write-AWSGlacier -AWSAccessKey &#39;[your access key]&#39; -AWSSecretKey &#39;
[your secret key]&amp;nbsp;&#39; -AWSRegion us-east-1&amp;nbsp;-GlacierVault &quot;backup&quot;&amp;nbsp;-Filename &quot;backup-20120830.7z&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The parameters are:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;AWSAccessKey and AWSSecretKey.&lt;br /&gt;These are NOT your login and password to log on to the Amazon.com web site.&lt;br /&gt;You can find the access key and secret key in your Amazon.com account:&lt;br /&gt;&lt;a href=&quot;https://portal.aws.amazon.com/gp/aws/securityCredentials&quot;&gt;https://portal.aws.amazon.com/gp/aws/securityCredentials&lt;/a&gt;&lt;br /&gt;Extra credentials can be created and they can be removed individually.&lt;/li&gt;
&lt;li&gt;AWSRegion.&lt;br /&gt;The region where your Glacier Vault has been created.&lt;/li&gt;
&lt;li&gt;GlacierVault&lt;br /&gt;The name of the Vault that you created in the Glacier administration website.&lt;/li&gt;
&lt;li&gt;FileName&lt;br /&gt;The file that you want to upload.&lt;/li&gt;
&lt;li&gt;Description (optional)&lt;br /&gt;A description used in the&amp;nbsp;Glacier administration website. &amp;nbsp;When none is specified, the last part of the filename path is used.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
You can create 3 (global) PowerShell variabled $AWSAccessKey_Default, $AWSSecretKey_Default and $AWSRegion_Default, in which case you can omit the -AWS* parameters.&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/6212478070424547188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/uploading-file-to-amazon-webservices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/6212478070424547188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/6212478070424547188'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/uploading-file-to-amazon-webservices.html' title='Uploading a file to Amazon Glacier using PowerShell'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-6632793476168223468</id><published>2012-08-30T21:00:00.000+02:00</published><updated>2016-06-15T23:06:56.144+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>GIT External Diff / Merge tools</title><content type='html'>Occording to &lt;a href=&quot;http://git-scm.com/documentation&quot; target=&quot;_blank&quot;&gt;the GIT book&lt;/a&gt;, GIT supports these external Diff / Merge tools:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;[araxis]&amp;nbsp;&lt;a href=&quot;http://www.araxis.com/merge/&quot; target=&quot;_blank&quot;&gt;Araxis Merge&lt;/a&gt; - Commercial&lt;/li&gt;
&lt;li&gt;[bc3]&amp;nbsp;&lt;a href=&quot;http://www.scootersoftware.com/moreinfo.php&quot; target=&quot;_blank&quot;&gt;Beyond Compare 3&lt;/a&gt; - Commercial&lt;/li&gt;
&lt;li&gt;[diffuse]&amp;nbsp;&lt;a href=&quot;http://diffuse.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;Diffuse&lt;/a&gt; - Open source&lt;/li&gt;
&lt;li&gt;[ecmerge]&amp;nbsp;&lt;a href=&quot;http://www.elliecomputing.com/products/merge_overview.asp&quot; target=&quot;_blank&quot;&gt;ECMerge&lt;/a&gt; - Commercial&lt;/li&gt;
&lt;li&gt;[emerge]&amp;nbsp;&lt;a href=&quot;http://www.nongnu.org/emacsdoc-fr/manuel/emerge.html&quot; target=&quot;_blank&quot;&gt;Emerge (Emacs)&lt;/a&gt; - Open source&lt;/li&gt;
&lt;li&gt;[gvimdiff] gvimdiff - Open source&lt;/li&gt;
&lt;li&gt;[kdiff3]&amp;nbsp;&lt;a href=&quot;http://kdiff3.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;KDiff3&lt;/a&gt; - Open source&lt;/li&gt;
&lt;li&gt;[meld]&amp;nbsp;&lt;a href=&quot;http://meldmerge.org/&quot; target=&quot;_blank&quot;&gt;Meld merge&lt;/a&gt; - Open source&lt;/li&gt;
&lt;li&gt;[opendiff]&amp;nbsp;&lt;a href=&quot;https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/opendiff.1.html&quot; target=&quot;_blank&quot;&gt;opendiff&lt;/a&gt; - OS X Developer Tools&lt;/li&gt;
&lt;li&gt;[p4merge]&amp;nbsp;&lt;a href=&quot;http://www.perforce.com/product/components/perforce_visual_merge_and_diff_tools&quot; target=&quot;_blank&quot;&gt;P4Merge&lt;/a&gt; - Commercial&lt;/li&gt;
&lt;li&gt;[tkdiff]&amp;nbsp;&lt;a href=&quot;http://tkdiff.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;TkDiff&lt;/a&gt; - Open source&lt;/li&gt;
&lt;li&gt;[tortoisemerge]&amp;nbsp;&lt;a href=&quot;http://tortoisesvn.tigris.org/TortoiseMerge.html&quot; target=&quot;_blank&quot;&gt;TortoiseMerge&lt;/a&gt; - Open source - [ Merge tool only ]&lt;/li&gt;
&lt;li&gt;[vimdiff] vimdiff - Open source&lt;/li&gt;
&lt;li&gt;[xxdiff]&amp;nbsp;&lt;a href=&quot;http://furius.ca/xxdiff/&quot; target=&quot;_blank&quot;&gt;xxdiff&lt;/a&gt; - Open source&lt;/li&gt;
&lt;li&gt;[kompare]&amp;nbsp;&lt;a href=&quot;http://www.caffeinated.me.uk/kompare/&quot; target=&quot;_blank&quot;&gt;Kompare&lt;/a&gt; - Open source
- [ Diff tool only ]&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
You can choose your prefered diff / merge tool by executing this command (Windows or Linux), in this case for my favorite kdiff3.&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
git config --global diff.tool kdiff3&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
git config --global merge.tool kdiff3&lt;/blockquote&gt;
The external diff is started using this command:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
git difftool&lt;/blockquote&gt;
You will probably get the error &quot;The diff
tool kdiff3 is not available as &#39;kdiff3&#39;.&amp;nbsp;external
diff died, stopping at &amp;lt;filename&amp;gt;.&quot;, because GIT doesn&#39;t find your tool.&lt;br /&gt;
This can be resolved by adding your tool to the environment PATH variable, or by telling GIT where to find your tool(s):&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
git config --global difftool.kdiff3.path &quot;C:/Program Files (x86)/KDiff3/kdiff3.exe&quot;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
git config --global mergetool.kdiff3.path &quot;C:/Program Files (x86)/KDiff3/kdiff3.exe&quot;&amp;nbsp;&lt;/blockquote&gt;
Any configuration can be undone by executing:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
git config --global &amp;lt;config item&amp;gt; --unset&lt;/blockquote&gt;
e.g.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
git config --global mergetool.kdiff3.path --unset&lt;/blockquote&gt;
&lt;hr /&gt;
This post has been moved to &lt;a href=&quot;http://mycomputeradventures.foxinnovations.be/2012/08/30/git-external-diff-merge-tools_30/&quot;&gt;http://mycomputeradventures.foxinnovations.be/2012/08/30/git-external-diff-merge-tools_30/&lt;/a&gt; .</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/6632793476168223468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/git-external-diff-merge-tools_30.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/6632793476168223468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/6632793476168223468'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/git-external-diff-merge-tools_30.html' title='GIT External Diff / Merge tools'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-4909176205420123405</id><published>2012-08-27T20:13:00.000+02:00</published><updated>2016-06-15T23:06:56.125+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="antlr"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>Solving ANTLR errors using ANTLRWorks</title><content type='html'>&lt;br /&gt;
Solving &lt;a href=&quot;http://www.antlr.org/&quot; target=&quot;_blank&quot;&gt;ANTLR&lt;/a&gt;&amp;nbsp;grammar errors can be very difficult, especially in complex grammar files.&lt;br /&gt;
&lt;br /&gt;
Below is a simple example, based on the GQL ANTLR-grammar used in &lt;a href=&quot;https://sites.google.com/site/fxgqlc/&quot; target=&quot;_blank&quot;&gt;FxGqlC&lt;/a&gt;.&lt;br /&gt;
(reduced to illustrate the problem. &amp;nbsp;A complete grammar can be found &lt;a href=&quot;https://github.com/WimObiwan/FxGqlC/blob/master/FxGql/FxGqlLib/Parser/GqlAntlrOutput/gql.g&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. &amp;nbsp;GQL is a domain language similar to SQL / T-SQL)&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;grammar sql;&lt;br /&gt;select_command&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: SELECT (WS top_clause)? WS column_list EOF&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;top_clause&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: TOP expression&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;column_list&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression (WS? &#39;,&#39; WS? expression)*&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;expression&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression_3&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;expression_3&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression_2 (WS? op_3 WS? expression_2)*&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;op_3&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;+&#39; | &#39;-&#39; | &#39;&amp;amp;&#39; | &#39;|&#39; | &#39;^&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;expression_2&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression_1 (WS? op_2 WS? expression_1)*&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;op_2&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;*&#39; | &#39;/&#39; | &#39;%&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;expression_1&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: op_1 WS? expression_1&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;| expression_atom&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;op_1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;~&#39; | &#39;+&#39; | &#39;-&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;expression_atom&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: NUMBER&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;| &#39;(&#39; WS? expression WS? &#39;)&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;select&#39; ;&lt;br /&gt;TOP&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;top&#39; ;&lt;br /&gt;NUMBER &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: DIGIT+;&lt;br /&gt;WS&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: (&#39; &#39;|&#39;\t&#39;|&#39;\n&#39;|&#39;\r&#39;|&#39;\u000C&#39;)+&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;fragment DIGIT&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&#39;0&#39;..&#39;9&#39;;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
The 3 expression &quot;levels&quot; are used to handle operator precedence. The grammar is designed to be able to parse expressions like:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;SELECT 17&lt;/li&gt;
&lt;li&gt;SELECT 17 * 14 + 3&lt;/li&gt;
&lt;li&gt;SELECT 17 + 14 + 3&lt;/li&gt;
&lt;li&gt;SELECT - 17&lt;/li&gt;
&lt;li&gt;SELECT 17 * - 14 + 3&lt;/li&gt;
&lt;li&gt;SELECT 17 + 14 + - 3&lt;/li&gt;
&lt;li&gt;SELECT TOP 3 17&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
When trying to &#39;compile&#39; or &#39;Interpret&#39; the grammar in &lt;a href=&quot;http://www.antlr.org/works/index.html&quot; target=&quot;_blank&quot;&gt;ANTLRWorks&lt;/a&gt;, you get this error:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
[11:36:44] error(211): &amp;lt;notsaved&amp;gt;:21:43: [fatal] rule expression_3 has non-LL(*) decision due to recursive rule invocations reachable from alts 1,2. &amp;nbsp;Resolve by left-factoring or using syntactic predicates or using backtrack=true option.&lt;br /&gt;[11:36:44] warning(200): &amp;lt;notsaved&amp;gt;:21:43:&lt;br /&gt;Decision can match input such as &quot;WS {&#39;+&#39;, &#39;-&#39;} WS NUMBER&quot; using multiple alternatives: 1, 2&lt;br /&gt;As a result, alternative(s) 2 were disabled for that input&lt;/blockquote&gt;
&lt;br /&gt;
Solving this error just by analyzing the grammar is quite a challenge, even for this very simple example. When using a large&amp;nbsp;grammar file it is nearly impossible.&lt;br /&gt;
But ANTLRWorks has a very useful tool to show what&#39;s going wrong.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The error message indicates that there is a problem with expression_3 (expression_3 is also indicated in red in the list of rules/tokens in the left pane).&lt;/li&gt;
&lt;li&gt;Put your cursor in expression_3, and select the tab &quot;Syntax Diagram&quot; in the lower pane.&lt;/li&gt;
&lt;li&gt;First, in the lower pane, select &quot;Alternatives &#39;1&#39;&quot; in the upper right corner.&lt;br /&gt;==&amp;gt; In green you see how the grammar matches &quot;WS &#39;+&#39; WS NUMBER&quot;, which is exactly what we want.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBRjZwgAlIRtR19X_Btte-YpQwafx_SuVusXEQz6aAKiMZrgd9Kk7wp7tqIo86JkZbig955XqnDQY1gSr35EqbO3jPixIZYfwvTH4eoeCZ_Z-PLe3tqCM-qNDVqHuPA0qFp3IPDA5_W2k/s1600/ANTLRWorks+1.4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBRjZwgAlIRtR19X_Btte-YpQwafx_SuVusXEQz6aAKiMZrgd9Kk7wp7tqIo86JkZbig955XqnDQY1gSr35EqbO3jPixIZYfwvTH4eoeCZ_Z-PLe3tqCM-qNDVqHuPA0qFp3IPDA5_W2k/s640/ANTLRWorks+1.4.png&quot; width=&quot;100%&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Next, select &quot;Alternatives &#39;2&#39;&quot; in the upper right corner.&lt;br /&gt;==&amp;gt; In red you see how the grammar matches &quot;WS &#39;+&#39; WS NUMBER&quot;.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWJVWus1Zp2Rnmlog1UVs7HvFzcU9FsEOau0AMv2jrRyUaM8DnS5UfTHm77_1RRn8vNAlhzvfbEZNwpzRnb9ABbyZphFzyKIqfroh8YbFLhZGcJrZHaF9aV-khl0Js11MvebTIRZaKTGE/s1600/ANTLRWorks+1.4+-+2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWJVWus1Zp2Rnmlog1UVs7HvFzcU9FsEOau0AMv2jrRyUaM8DnS5UfTHm77_1RRn8vNAlhzvfbEZNwpzRnb9ABbyZphFzyKIqfroh8YbFLhZGcJrZHaF9aV-khl0Js11MvebTIRZaKTGE/s640/ANTLRWorks+1.4+-+2.png&quot; width=&quot;100%&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In the latter case, you can see that the matching starts in the TOP-clause.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
This is what&#39;s happening: there can be an ambiguity when parsing &quot;SELECT TOP 1 + 2 + 20&quot;.&lt;br /&gt;
It is not clear where the top-clause ends and the column-list starts. &amp;nbsp;Both &#39;+&#39; signs can be unary or binary.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;It can be: &quot;SELECT [TOP 1] [+ 2 + 20]&quot;, being equivalent to &quot;SELECT TOP 1 22&quot;&lt;/li&gt;
&lt;li&gt;Or it can be: &quot;SELECT [TOP 1 + 2] [+ 20]&quot;, being equivalent to &quot;SELECT TOP 3 20&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
This ambiguity must be resolved, because only one interpretation should be valid.&lt;br /&gt;
In this specific case, the grammar could be changed in a way that the top-clause expression should always have parentheses surrounding it when it is not a simple number.&lt;br /&gt;
This can easily be achieved by changing:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;top_clause&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: TOP &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;expression&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;/span&gt;&lt;/blockquote&gt;
to:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;top_clause&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: TOP &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;expression_atom&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
This solves the ambiquity. The text &quot;SELECT TOP 1 + 2 + 20&quot; is now parsed as &quot;SELECT [TOP 1] [+ 2 + 20]&quot;. &lt;br /&gt;
And if somebody wants to use &quot;1 + 2&quot; in the TOP-clause, he should use: &quot;SELECT TOP (1 + 2) + 20&quot;, which is parsed as: &quot;SELECT [TOP (1 + 2)] [+ 20]&quot;&lt;br /&gt;
&lt;br /&gt;
Below you find the complete example, with the TOP-clause corrected:&lt;br /&gt;
&lt;div&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;grammar sql;&lt;br /&gt;select_command&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: SELECT (WS top_clause)? WS column_list EOF&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;top_clause&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: TOP &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;expression_atom&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;column_list&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression (WS? &#39;,&#39; WS? expression)*&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;expression&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression_3&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;expression_3&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression_2 (WS? op_3 WS? expression_2)*&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;op_3&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;+&#39; | &#39;-&#39; | &#39;&amp;amp;&#39; | &#39;|&#39; | &#39;^&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;expression_2&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: expression_1 (WS? op_2 WS? expression_1)*&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;op_2&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;*&#39; | &#39;/&#39; | &#39;%&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;expression_1&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: op_1 WS? expression_1&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;| expression_atom&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;op_1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;~&#39; | &#39;+&#39; | &#39;-&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;expression_atom&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: NUMBER&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;| &#39;(&#39; WS? expression WS? &#39;)&#39;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;select&#39; ;&lt;br /&gt;TOP&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: &#39;top&#39; ;&lt;br /&gt;NUMBER &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: DIGIT+;&lt;br /&gt;WS&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;: (&#39; &#39;|&#39;\t&#39;|&#39;\n&#39;|&#39;\r&#39;|&#39;\u000C&#39;)+&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;fragment DIGIT&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&#39;0&#39;..&#39;9&#39;;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/4909176205420123405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/solving-antlr-errors-using-antlrworks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/4909176205420123405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/4909176205420123405'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/solving-antlr-errors-using-antlrworks.html' title='Solving ANTLR errors using ANTLRWorks'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBRjZwgAlIRtR19X_Btte-YpQwafx_SuVusXEQz6aAKiMZrgd9Kk7wp7tqIo86JkZbig955XqnDQY1gSr35EqbO3jPixIZYfwvTH4eoeCZ_Z-PLe3tqCM-qNDVqHuPA0qFp3IPDA5_W2k/s72-c/ANTLRWorks+1.4.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-7621100616584878491</id><published>2012-08-21T21:37:00.000+02:00</published><updated>2016-06-15T23:06:56.152+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fxgqlc"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>FxGqlC v2.3</title><content type='html'>A new version of FxGqlC has been released.&lt;br /&gt;
&lt;br /&gt;
The major changes are documented here:&lt;br /&gt;
&lt;a href=&quot;https://sites.google.com/site/fxgqlc/home/fxgqlc-manual/changes-in-fxgqlc-2-3&quot;&gt;https://sites.google.com/site/fxgqlc/home/fxgqlc-manual/changes-in-fxgqlc-2-3&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can download FxGqlC v2.3 here:&lt;br /&gt;
&lt;a href=&quot;https://sites.google.com/site/fxgqlc/home/downloads&quot;&gt;https://sites.google.com/site/fxgqlc/home/downloads&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/7621100616584878491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/fxgqlc-v23.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7621100616584878491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7621100616584878491'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/fxgqlc-v23.html' title='FxGqlC v2.3'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-7670947524246319584</id><published>2012-08-18T20:00:00.000+02:00</published><updated>2016-06-15T23:06:56.154+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>Regular expression matching in C++11</title><content type='html'>&lt;br /&gt;
A part of the boost (&lt;a href=&quot;http://www.boost.org/&quot;&gt;http://www.boost.org/&lt;/a&gt;) functionality regarding regular expressions has been included in the new C++11/C++0x standard. &lt;br /&gt;
&lt;br /&gt;
This code works on GCC and even on Visual C++ 10 (Visual Studio 2010) and above:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; std::regex rgx(&quot;(\S+@\S+)&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; std::smatch result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; std::string str = std::regex_replace(std::string(&quot;please send an email to my@mail.com for more information&quot;), rgx, std::string(&quot;&amp;lt;$1&amp;gt;&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // str contains the same text, but with the e-mail address enclosed between &amp;lt;...&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
More information on regular expressions can be found here:&amp;nbsp;&lt;a href=&quot;http://www.regular-expressions.info/&quot;&gt;http://www.regular-expressions.info/&lt;/a&gt;&amp;nbsp;.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/7670947524246319584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/regular-expression-matching-in-c11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7670947524246319584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/7670947524246319584'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/regular-expression-matching-in-c11.html' title='Regular expression matching in C++11'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-3453743015402256471</id><published>2012-08-17T20:00:00.000+02:00</published><updated>2016-06-15T23:06:56.110+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>Replace all occurrences of a character in a std::string with another character</title><content type='html'>&lt;br /&gt;
in one line of C++ code, using C++11/C++0x:&lt;br /&gt;
&lt;br /&gt;
std::string str = &quot;my#string&quot;;&lt;br /&gt;
std::for_each(str.begin(), str.end(), &lt;span style=&quot;background-color: yellow;&quot;&gt;[] (char &amp;amp;ch) { if (ch == &#39;#&#39;) ch = &#39;\\&#39;; }&lt;/span&gt; &amp;nbsp;);&lt;br /&gt;
// str now contains my\string&lt;br /&gt;
&lt;br /&gt;
The for_each function code calls the lambda expression (indicated in yellow) for every character, and the lambda expression replaces the &#39;#&#39; with a &#39;\&#39;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/3453743015402256471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/replace-all-occurrences-of-character-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3453743015402256471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3453743015402256471'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/replace-all-occurrences-of-character-in.html' title='Replace all occurrences of a character in a std::string with another character'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-3824080051612170239</id><published>2012-08-14T22:09:00.000+02:00</published><updated>2016-06-15T23:06:56.116+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="future"/><category scheme="http://www.blogger.com/atom/ns#" term="technology"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>The future of technology?</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Click the image to make it bigger:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://michellzappa.com/map/envisioning-technology-2011-03-07.png&quot; imageanchor=&quot;1&quot; target=&quot;_new&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://michellzappa.com/map/envisioning-technology-2011-03-07.png&quot; width=&quot;100%&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Source: &lt;a href=&quot;http://envisioningtech.com/&quot;&gt;http://envisioningtech.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2012
2013
2014
2015
2016
2017
2018
2019
2020
2030
2040
2012
2013
2014
2015
2016
2017
2019
2020
2030
2040
ROBOTICS BIOTECH MATERIALS ENERGY
ARTIFICIAL
INTELLIGENCE
SENSORS GEOENGINEERING
QUANTITATIVE FORECASTS
INTERNET INTERFACES UBICOMP SPACE
BITS ATOMS
RELATIVE IMPORTANCE CONSUMER IMPACT CLUSTER OF TECHNOLOGIES
The node size indicates the predicted
importance of a technology.
The outline of a node indicates a consumer 
impact larger than the technological novelty.
A jagged outline indicates a cluster of 
similar technologies grouped together.
World population: 8 billion
Source: U.N. – http://bit.ly/7nqQkS
World population: 7 billion
BRICs GDP overtakes the G7
Source: Goldman Sachs – http://bit.ly/nc9Wqj
Petabyte storage standard
Source: http://bit.ly/r9BYQc
Exabyte storage standard
Source: http://bit.ly/kPMKMb
Terabit internet speed standard
Source: http://bit.ly/kPMKMb
World population: 9 billion
Source: U.N. – http://bit.ly/7nqQkS
Source: http://bit.ly/6MoQJc
Sources:
Intel – http://intel.ly/pWbH04
Ericsson – http://bit.ly/avvVok
Alan Conroy – http://bit.ly/pofHp5
FutureTimeline – http://bit.ly/qz4ben
Sources:
Intel – http://intel.ly/pWbH04
InternetWorldStats – http://bit.ly/AKbO5
Source: U.N. – http://bit.ly/7nqQkS
Global online population: ± 2 billion
Connected devices: ±10 billion
Global online population: 4-5 billion
Connected devices: 30-50 billion
$150 Hard disk: ±200 Tb
Standard RAM: ±750Gb
Global online population: ± 2.5 billion
Connected devices: ±15 billion
$ 1.000 computer reaches the
capacity of the human brain
(± 10
15
 calculations per second)
Vertical
farming
Weather
engineering
Seasteading
Desalination
Carbon
sequestration
Climate
engineering
Arcologies
Commercial
spaceﬂight
Sub-orbital
spaceﬂight
Lunar
outpost
Mars
mission
Solar
sail
Space
elevator
Space
tourism
Inductive
chargers
Thorium
reactor
Traveling
wave reactor
Fuel cells
Multi-segmented
smart grids
Biomechanical
harvesting
Bio-enhanced
fuels
Artiﬁcial
photosynthesis
Space-based
solar power
Piezoelectricity
Photovoltaic
glass
Nanogenerators
Enernet
Tidal turbines
Programmable
matter
Personal
fabricators
Molecular
assembler
Metamaterials
Additive
manufacturing
Graphene
Optical
invisibility cloaks
Biomaterials
Carbon
nanotubes
Self-healing
materials
Nanowires
Antiaging
drugs
Stem-cell 
treatments
In-vitro
meat
Nanomedicine
Artiﬁcial
retinas
Rapid personal
gene sequencing
Synthetic
biology
Personalized
medicine
Gene therapy 
Hybrid
assisted limbs
Smart drugs
Synthetic
blood
Organ
printing
Smart
toys
Robotic
surgery
Telematics
Appliance
robots
Self-driving
vehicles
Domestic
robots
Powered
 exoskeleton
Embodied
avatars
Swarm
robotics
Utility
fog
Commercial
UAVs
Fabric-embedded
screens
Reprogrammable
chips
Picoprojectors
Volumetric
(3D) screens
Flexible screens
Skin-embedded
screens
Modular computers
Tablets
Boards
Retinal
screens
Eyewear-embedded
screens
Context-aware
computing 
Smart
power meters
Biometric
sensors
Machine
vision
Optogenetics
Depth
imaging
Biomarkers
Neuroinformatics
Near-ﬁeld
communication
Pervasive
video
capture
Computational
photography
Speech
recognition
Haptics
4K
Augmented
reality
Gesture
recognition
Multi
touch
Immersive
virtual reality
Holography
Telepresence
4G
5G
Cloud
computing
Interplanetary
internet
Exocortex
Photonics
Virtual
currencies
Cyberwarfare
Mesh
networking
Reputation
economy
Remote
presence
VR-only
lifeforms
Machineaugmented
cognition
Software
agents
High-frequency
trading
Natural language
interpretation
Procedural
storytelling
Machine
translation
Research &amp;amp; visualization
by Michell Zappa
mz@envisioningtech
mz@envisioningtech.com
mz@envisioningtech.com
Envisioning emerging technology
for 2012 and beyond
Last updated:
2012-02-10
Understanding where technology is heading is more than guesswork. Looking at emerging trends
and research, one can predict and draw conclusions about how the technological sphere is developing,
and which technologies should become mainstream in the coming years. Envisioning technology is meant
to facilitate these observations by taking a step back and seeing the wider context.
By speculating about what lies beyond the horizon we can make better decisions of what to create today.
BY SA</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/3824080051612170239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/the-future-of-technology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3824080051612170239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3824080051612170239'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/the-future-of-technology.html' title='The future of technology?'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8086487757411504228.post-3583013395932355305</id><published>2012-08-10T20:30:00.000+02:00</published><updated>2016-06-12T20:07:21.075+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fxgqlc"/><category scheme="http://www.blogger.com/atom/ns#" term="office"/><category scheme="http://www.blogger.com/atom/ns#" term="to-be-moved"/><title type='text'>Export of Office Outlook contacts to GMail</title><content type='html'>&lt;br /&gt;
To import your Microsoft Office Outlook contacts to GMail or Google Apps, you need to export them first to a CSV file.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;In Outlook, go to the &quot;File&quot; tab in the ribbon menu, and click &quot;Options&quot; in the left sidebar.&lt;/li&gt;
&lt;li&gt;In the Outlook Options dialog, click on &quot;Advanced&quot; in the sidebar, and click the &quot;Export&quot; button.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In the first step of the Import and Export wizard, select &quot;Export to a file&quot;, and click &quot;Next&quot;.&lt;/li&gt;
&lt;li&gt;In the second step, select &quot;Comma Separated Values (Windows)&quot;, and click &quot;Next&quot;.
&lt;/li&gt;
&lt;li&gt;In the third step, select your Contacts folder that you want to export (normally &quot;Contacts&quot;), and click &quot;Next&quot;.
&lt;/li&gt;
&lt;li&gt;In the fourth step, enter or select the filename, e.g. &quot;contacts.csv&quot;.&lt;/li&gt;
&lt;li&gt;Click &quot;Finish&quot; to start the export.&lt;/li&gt;
&lt;/ul&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5C6EpwYV0wPw90gxaTCniC0ErcglErnWldMoBnbVOb1cenYEyLTjluv1PCOANbXSoM3_Np4pHC0s_7x8bXCQTNw93cjI-qhfcdzNL-Dr5zbg4l2ZSMm-nNN0VlugGQoTrA0gtct0Aa3g/s1600/Outlook+Options_2012-08-10_14-37-30.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;521&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5C6EpwYV0wPw90gxaTCniC0ErcglErnWldMoBnbVOb1cenYEyLTjluv1PCOANbXSoM3_Np4pHC0s_7x8bXCQTNw93cjI-qhfcdzNL-Dr5zbg4l2ZSMm-nNN0VlugGQoTrA0gtct0Aa3g/s640/Outlook+Options_2012-08-10_14-37-30.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you import this file in GMail, and you are a member of a Windows Active Directory domain, the e-mail addresses are not imported. &amp;nbsp;Instead, the e-mail address field in GMail contains the&amp;nbsp;&quot;distinguished name&quot; of your contact as known to your ActiveDirectory. &amp;nbsp;E.g. &quot;cn=jsmith,ou=promotions,ou=marketing,dc=noam,dc=reskit,dc=com&quot;. &lt;br /&gt;
The real e-mail address is however included in the CSV file, as part of the column &quot;E-mail Display Name&quot;, which contains the full name and the regular e-mail address between parentheses, but this column isn&#39;t used by the GMail import.&lt;br /&gt;
&lt;br /&gt;
You could replace all E-Mail Addresses in the file using an Excel formula, or manually in a text-editor.&lt;br /&gt;
Or you can simply use this FxGqlC command to replace all e-mail address columns with the e-mail address taken from the display name:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select replaceregex($line, &#39;\&quot;/o=.*?\&quot;,\&quot;EX\&quot;,(\&quot;.*?\((.*?)\)\&quot;)&#39;, &#39;&quot;$2&quot;,&quot;EX&quot;,$1&#39;) into [contacts2.csv] from [contacts&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;.csv]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The same method can be used to replace national telephone numbers into an international format:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select replaceregex($line, &#39;\+?(32\d{8,9})&#39;, &#39;+$1&#39;)&amp;nbsp;into [meucci3.csv] from [meucci2.csv]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;You need to adopt the regular expression to a format appropriate for your contacts.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Import the resulting file in GMail, and that&#39;s it.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycomputeradventures.blogspot.com/feeds/3583013395932355305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/export-of-office-outlook-contacts-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3583013395932355305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8086487757411504228/posts/default/3583013395932355305'/><link rel='alternate' type='text/html' href='http://mycomputeradventures.blogspot.com/2012/08/export-of-office-outlook-contacts-to.html' title='Export of Office Outlook contacts to GMail'/><author><name>Wim</name><uri>http://www.blogger.com/profile/09938310156156862748</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5C6EpwYV0wPw90gxaTCniC0ErcglErnWldMoBnbVOb1cenYEyLTjluv1PCOANbXSoM3_Np4pHC0s_7x8bXCQTNw93cjI-qhfcdzNL-Dr5zbg4l2ZSMm-nNN0VlugGQoTrA0gtct0Aa3g/s72-c/Outlook+Options_2012-08-10_14-37-30.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>