Archive for April, 2013
Posted by jpluimers on 2013/04/10
For my research queue:
I should look at the below ConnectionStrings to access dBase with ADO from Delphi, If I ever need to do that.
Thanks Cromulent for asking, Nelson for editing and Pieter for answering:
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;OLE DB Services = -1;Extended Properties=dBase IV;Dbq=c:\mypath
doing operations like ADOTable1.Open are very fast (good) but GetIndexNames returns nothing (bad).
Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=dBASE IV;OLE DB Services=-1;Data Source=c:\mypath
doing operations like ADOTable1.Open are exceedingly slow (bad) while GetIndexNames does return index names the way it should (good).
How do I get both speed and the index info via ADO for the dBase tables?
“We use the following connection string which works really well.”
Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="Driver={Microsoft Visual FoxPro Driver};UID=;SourceDB=c:\mypath;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
–jeroen
via Delphi + ADO + dBase – Stack Overflow.
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 8 Comments »
Posted by jpluimers on 2013/04/09
A few interesting links for my archive:
–jeroen
Posted in Delphi, Development, FreePascal, Pascal, Software Development | 3 Comments »
Posted by jpluimers on 2013/04/08
Last quarter, 11 issues of Micro Cornucopia appeared on BitSavers including the final May 1990 issue.
This month, another 7 issues appeared, most of which cover a form of Pascal in one or more of the articles and advertisements:
A fun thing to notice are the advertisements for Modula-2. Logitech Modula-2. Yes though the Logitech Wikipedia page does not mention it at all, Logitech didn’t only sell mice, keyboards and web-cams. They had more products. Being Swiss, they were big in Modula-2. And Bitsavers has a PDF of that too: Logitech_Modula-2_86_1.0_Feb84.pdf
The only issues still to be scanned are #28 till #32.
–jeroen
via: New Micro Cornucopia issues on BitSavers including the Final May 1990 issue « The Wiert Corner – irregular stream of stuff.
Posted in Assembly Language, BitSavers.org, C, C++, Delphi, Development, History, Pascal, Software Development, Turbo Assembler, Turbo Pascal, x86 | Tagged: computer, Media, research, science, technology | 2 Comments »
Posted by jpluimers on 2013/04/08
In the steps at how to block someone in google plus, replace the word “block” with “mute” to stop receiving posts from certain sources.
–jeroen
via: how to block google plus users – Google Search.
Posted in G+: GooglePlus, Google, Power User, SocialMedia | Leave a Comment »
Posted by jpluimers on 2013/04/05
On my brand new Google Nexus 4, I had this problem that some contacts were merged based on their last name.
They were merged only on the phone: at the Google Contacts web page, they still were separate.
The issue was very much “in my face”, as one of the merges was my brother and mother. For which I am pretty sure they are separate entities, both alive and kicking.
Browsing for a solution, I found these links (the first one got me to the others):
The issue is still there (I synced 3 weeks ago).
The solution is per device (the sync breaks on your device, not on Google Contacts).
The steps of the solution were not completely clear, so below are screenshots. Click on each screenshot to get a larger crisp 768×1280 HD image. Read the rest of this entry »
Posted in Android Devices, Google, Nexus 4, Power User | Tagged: gadgets, google, technology | Leave a Comment »
Posted by jpluimers on 2013/04/05
Interesting answer on SO, not only for developers:
You can check out the wavesurfer program:
WaveSurfer is an Open Source tool for sound visualization and manipulation. It has been designed to suit both novice and advanced users. WaveSurfer has a simple and logical user interface that provides functionality in an intuitive way and which can be adapted to different tasks. It can be used as a stand-alone tool for a wide range of tasks in speech research and education. Typical applications are speech/sound analysis and sound annotation/transcription. WaveSurfer can also serve as a platform for more advanced/specialized applications. This is accomplished either through extending the WaveSurfer application with new custom plug-ins or by embedding WaveSurfer visualization components in other applications.
It can perform many different types of analysis, I have only used it for practicing Chinese tone pronunciation.
Thanks hlovdal!
–jeroen
via delphi – component or code for wave analyzer – Stack Overflow.
Posted in Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »
Posted by jpluimers on 2013/04/04
Thanks Jeb for answering this:
You can solve it with delayed expansion, because delayed expansion works different than percent expansion.
:START
setlocal EnableDelayedExpansion
@echo What folder do you want to process? (Provide a path without a closing backslash)
set /p datapath=
::Is string empty?
IF X!datapath! == X GOTO:START
::Does string have a trailing slash? if so remove it
IF !datapath:~-1!==\ SET "datapath=!datapath:~0,-1!"
echo !datapath!
It expands later than the percent expansion, and after the delayed expansion no more parsing is done, so even spaces or special characters have any effect.
–jeroen
via:
Posted in Batch-Files, Development, Power User, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2013/04/03
Just found this great answer by vcldeveloper to autoscroll a readonly logging memo in Delphi which works from Delphi 1 and up (:
For such a simple task, you don’t need to buy a commercial component! All you need to do is to send an EM_LINESCROLL message to that memo control, to make it scroll to the last line:
procedure ScrollToLastLine(Memo: TMemo);
begin
SendMessage(Memo.Handle, EM_LINESCROLL, 0,Memo.Lines.Count);
end;
If your memo is read-only to users and is updated automatically by the application, you can put a call to the above procedure in its OnChange event-handler, so that whenever the text inside the memo is changed, it is automatically scrolled down to the last line.
–jeroen
via: autoscrolling memo in delphi – Stack Overflow.
Posted in Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 9 Comments »
Posted by jpluimers on 2013/04/02

IGrouping interface diagram (click to enlarge)
One of the things most people find hard to use in LINQ is GroupBy or the LINQ expression group … by (they are mostly equivalent).
When starting to use that, I was also confused, mainly because of two reasons:
- GroupBy returns a IGrouping<TKey, TElement> generic interface, but the classes that implement it are internal and not visble from outside the BCL (although you could artificially create your own).
This interface extends the IEnumerable<TElement> in a full “is a” fashion adding a Key member.
This has two consequences:
- Because it is a “is a” extension of the IEnumerable<TElement>, you can use foreach to enumerate the
TElement members for the current group inside the grouping.
No need to search for a Value that has the Elements, as the Group is the Elements.
- The Key member is indeed the current instance of what you are grouping over. Which means that Count<TElement>, are for the current group in the grouping.
- The LINQ expression syntax for grouping on multiple columns is not straightforward:
- Grouping on multiple columns uses a bit different syntax than you are used from SQL.
(Another difference is that SQL returns a set, but groups are IEnumerable)
- You also need to be a bit careful to make sure the group keys are indeed distinct.
Most people don’t see the IGrouping<TKey, TElement> because they use the var keyword to implicitly the LINQ result.
Often – when using any anonymous type – var is the only way of using that result.
That is fine, but has the consequence that it hides the actual type, which – when not anonymous – is a good way of seeing what happens behind the scenes.
David Klein gave an example for the multi column grouping and also shows that if you use LINQPad, you can actually see the IGrouping<TKey, TElement> in action.
Mike Taulty skipped the Group By Syntax for Grouping on Multiple Columns in his Grouping in LINQ is weird (IGrouping is your friend). So my examples include that.
Note that I don’t cover all the LINQ group by stuff, here, for instance, I skipped the into part.
There are some nice examples on MSDN covering exactly that both using Method based and Expression based LINQ.
The examples are based on these two classes, similar to what Mike did. Read the rest of this entry »
Posted in .NET, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, Development, LINQ, Software Development | Leave a Comment »
Posted by jpluimers on 2013/04/02
If you thought the 2007 Welcome to Google TiSP (Toilet Internet Service Provider) and the Google TiSP ACTUAL Installation – YouTube formed a great April 1st joke, then you have miscounted the futurists.
Found out a while ago, that in The Netherlands, a variation of TiSP was used to provide internet through the sewage system:
- July 18th, 2012, in the province Friesland, a glas fiber cable was put through the sewer system:
Frisian: Glêsfezelkabel troch rioel | Omrop Fryslân – Alle dagen nij!.
Dutch: Glasvezelkabel door riool | Omrop Fryslân – Alle dagen nij!.
- Late 2012, plans were revealed to connect a few farms to glassfiber using the sewing system in early 2013:
Twents dorp krijgt glasvezel via het riool | IT Pro | Tweakers.
The Belgians and Germans seem to favour the water pipes over the sewer though:
–jeroen
Posted in Internet, Power User | Leave a Comment »