The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘Conferences’ Category

Speaking at Delphi Live 2010 USA and EKON 14 Germany

Posted by jpluimers on 2010/08/18

Next week, I’ll be speaking at Delphi Live 2010 in San Jose, California., USA.
At the end of september, I’ll be speaking at EKON 14, in Darmstadt, Germany. My 14th appearance at EKON!

Delphi Live (sessions in English):

EKON 14 (Sessions auf Deutsch / in German):

Hope tho see some of you people at one of those events.

I will bring some USB audio equipment, so I might do a bit of geek stuff doing ASIO audio on those events too.

–jeroen

Posted in Conferences, Delphi, DelphiLive, Development, EKON, Event, Software Development | 5 Comments »

Bookmarklets: empower your webbrowser

Posted by jpluimers on 2010/06/02

Next to Greasemonkey – the script engine that empowers FireFox and Chrome, there is another very powerful way to enhance your browser:
Bookmarklets.

Bookmarklets are like shortcuts, but they don’t point to a static URL: they add action, usually by some JavaScript.

If the bookmarklet returns a string, then the browser will follow that as a URL.
But the since bookmarklet  has access to the current page, it can also perform just a local action.

The cool thing is that most bookmarklets work on almost any popular browser.

These are a few bookmarklets that I use on a regular base, most are from bookmarklets.com: Read the rest of this entry »

Posted in Bookmarklet, Conference Topics, Conferences, Development, Event, Power User, Software Development, Web Browsers, Web Development | Leave a Comment »

Windows 7: new shortcut keys (windows hotkeys and more)

Posted by jpluimers on 2010/05/06

In the past there were already a lot of shortcuts, including a few including the windows key.

SEO Consultants has a good overview of both lists.

Microsoft has the classic list.

Windows 7 introduced quite a few more, which I’ll list below.
Read the rest of this entry »

Posted in Conference Topics, Conferences, Event, Keyboards and Keyboard Shortcuts, Power User | 5 Comments »

C# / Delphi – getting the right parameter and function result order for SOAP

Posted by jpluimers on 2010/01/05

Getting different architectures to talk can be a pain, even when using standards like SOAP.

In this case, the .NET WSDL imports Delphi generated WSDL in a different manner than you’d expect at first sight: when having both an ‘out’ parameter and a function ‘result’, the ‘result’ is not imported well.

But alas: SOAP didn’t accommodate for this situation in the past, and now SOAP now has some additions to solve this.

Bruneau Babet explains this here: [WayBackSOAP inconsistency? Delphi 2010 (Win32) Server and .NET Client swapping ‘out-parameter’ and ‘result’. – Stack Overflow.

There he explains how to use the parameterOrder attribute, which the Delphi WSDL importer and exporter still do not support.

–jeroen

Posted in .NET, ASP.NET, Conference Topics, Conferences, Delphi, Development, Event, SOAP/WebServices, Software Development | Leave a Comment »

Delphi – for … in on enumerated data types

Posted by jpluimers on 2009/10/27

I like [Wayback/Archive] enumerated type a lot.
The allow you to perfectly describe what the members of such a type actually mean, much more readable than a bunch of integer constants!

Given an enumerated type like TTraphicLightColors

type
  TTraphicLightColors = (Red, Orange, Green);

I always wondered why  – since the for ... in statement was added to the [Wayback/Archivestructured statements part of the Delphi language – it is not possible to use a for … in statement like the this:

</span>
<pre>var
  TraphicLightColor: TTraphicLightColors;
begin
  try
    for TraphicLightColor in TraphicLightColor do
      ShowValueAsTraphicLightColor(Ord(Value));
    // [DCC Error] EnumerationEnumeratorDemoProcedures.dpr(63): E2430 for-in statement cannot operate on collection type 'TTraphicLightColors'
end;

Somehow, for ... in [Wayback/Archiveexpects a collection type.
A request for [WayBack/Archive] the for … in do on enumerated types compiler feature is in QC, but it is closed with reason “Won’t do”.

Back in Delphi 2007, I tried working around this by writing a type implementing the GetEnumerator pattern myself, but got [WayBack/Archive] Internal Errors when compiling anything but the most basic sample.

Until today, where I found how I could get that most basic sample to work!
It is an example on how you could implement this: it is research, so you decide if you find the result practical enough to use yourself.

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, F2084, QC, Software Development | 20 Comments »

Delphi operator overloading: table of operators, names, and some notes on usage and ‘glitches’

Posted by jpluimers on 2009/10/19

Operator overloading is a very nice feature of the Delphi language.
However. the Delphi documentation on Operator overloading is not completely right.

Below is my table of what I found out so far, and some notes.

It is part of my “Nullable types in Delphi” session that I gave on some conferences.
The downloads for that session contain more detailed information.

This is just an abstract to get you going and a try to answer this operator overloading question on Stackoverflow.
Download the full presentation to get more in depth information.

Let me know if you need more information.

Notes

Operator overloading

Add your own “behaviour” to operators

  • Win32: Works only for records, not classes!
  • An operator and the operand(s)
    are being implemented worden by a “class operator”;
    this is a kind of class method with name and argumen(s)

Example:

  • Multiplication X : = A * B;
  • Operator: *
  • Name: Multiply
  • Operands: 2 -> two parameters
type
  TMyRecord = record
    class operator Multiply(A, B: TMyRecord): TMyRecord;
  end;

Documentation is not correct!

Combining the rules of operator and result types, you can do magical things like Dances with XML | Australian Delphi User Group Members.

Do not use Delphi 2006 with operator overloading

Delphi 2007 fixed a number of bugs including this one: Delphi 2006 wont allow const parameters of type record within record method? – Stack Overflow.

10+ years later: maybe assignment operator?

It might be that in 2019, a new Delphi version gets assignment operator overloading: [WayBack] Operator Overloading Explained – Code Partners

Watch the result type of comparison operators!

Tips:

  • Some operators should be overloaded pair-wise
    = and <>
    shl and shr
    < and >=
    > and <=
    dec and inc
    + and –
    / and *
    div and mod
  • Prefer Explicit over Implicit operators
    • Beware of the built-in type coercion (implicit operators)
    • e.g
      • Byte to Integer;
      • Integer to Double;
      • Variants from/to anything!

Table of operators

operator # usage name cagetory *
and 2 R := A and B; BitwiseAnd bit
not 1 R := not A; //BitwiseNot bit glitch: does not exist!
or 2 R := A or B; BitwiseOr bit
xor 2 R := A xor B; BitwiseXor bit
() cast 1 R := TValue(A); Explicit conversion
:= 1 R := A; Implicit conversion
operator # usage name category *
round 1 R := Round(A); Round function
trunc 1 R := Trunc(A); Trunc function
and 2 R := A and B; LogicalAnd logical
not 1 R := not A; LogicalNot logical
or 2 R := A or B; LogicalOr logical
xor 2 R := A xor B; LogicalXor logical
operator # usage name category *
+ 2 R := A + B; Add binary
/ 2 R := A / B; Divide binary
div 2 R := A div B; IntDivide binary
mod 2 R := A mod B; Modulus binary
* 2 R := A * B; Multiply binary
2 R := A – B; Subtract binary
operator # usage name category *
shl 2 R := A shl B; LeftShift binary name is confusing
shr 2 R := A shr B; RightShift binary name is confusing
1 R := -A; Negative binary
+ 1 R := +A; Positive binary
dec 1 Dec(A); Dec self
inc 1 Inc(A); Inc self
operator # usage name category *
= 2 R := A = B; Equal comparison
> 2 R := A > B; GreaterThan comparison
>= 2 R := A >= B; GreaterThanOrEqual comparison
< 2 R := A < B; LessThan comparison
<= 2 R := A <= B; LessThanOrEqual comparison
<> 2 R := A <> B; NotEqual comparison
operator # usage name category *
in 2 R := A in B; In set

–jeroen

Posted in Conferences, Delphi, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Event, Software Development | 6 Comments »

Delphi – hardcore debugging the intialization of your app, dlls and packages

Posted by jpluimers on 2009/10/15

Recently we got involved with a client having a large and complex application that (historically) consists of

  1. A main .EXE that loads
  2. Many DLLs
  3. Underlying BPLs

One of the biggest problems is debugging the startup sequence.
Somehow, when the Delphi IDE loads DLLs in the initialization sequences of units, it looses its ability symbol tables.

This article describes a few tips on how to debug those, especially where to put breakpoints.
Read the rest of this entry »

Posted in Conference Topics, Conferences, Debugging, Delphi, Development, Event, Software Development | 3 Comments »

Delphi – record and class helpers: an overview of useful links

Posted by jpluimers on 2009/09/28

At the EKON13 conference, I will be presenting a talk about record and class helpers.

This morning, my laptop did “beeeeeeep beep beep” followed by a deadly silence.
It will take a while before my spare laptop arrives at the hotel and my Vista and VM’s are working again.
So I needed to redo some of my preparations to make sure that I can do a ‘plan B’ if restoring on the spare laptop fails.

Hence below a list of useful links, not yet in a particular order, but it saves you browsing through search engine results sifting the good from the not so good info.

Posted in .NET, .NET CF, Conferences, Delphi, Development, EKON, Event, Software Development | Leave a Comment »

SQL Server notes

Posted by jpluimers on 2009/09/25

Sitting in on Maciej Pilecki’s BASTA! 2009 session on “Advanced SQL Server Troubleshooting” is fun.

First of all it gives a good overview of many topics for which information usually is spreaded.

And there are many new things, for instance some of them about login failures:

Understanding “login failed” – the “state” part is important!

State=16 is undocumented, it can mean that the Administrator Studio is not being run with “Administrative Privileges” (UAC!) under Vista or Windows 7, or you are not allowed to login to the particular database.

Some other useful links

How to use Kerberos authentication in SQL Server (KB 319723).

Cannot create SSPI context (KB 811889).

DMV: Dynamic Management Views.
Sample:

select *
from sysobjects
where name like 'dm_%'
order by name

select *
from sys.dm_os_sys_info

When a LOG file is missing, state_desc in the below query will show ‘RECOVERY_PENDING’

select *
from sys.databases

If you have a database backup and all the log files since that instant in time, you can restore your data.

Last resort: You can try open a database in EMERGENCY mode now (but your DB might be inconsistent because some of the transactions might be open):

ALTER DATABASE Northwind SET EMERGENCY

DBCC CHECKDB('Northwind') -- now (wrongly!) indicates no errors

Trick to loose your SQL SERVER log file. The two most important commands there:

SET DATABASE DemoSuspect SET EMERGENCY
GO
SET DATABASE DemoSuspect SET SINGLE_USER
GO
DBCC CHECKDB ('DemoSuspect', REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS, ALL_ERRORMSGS;
GO
SET DATABASE DemoSuspect SET MULTI_USER
GO

Note that because of the repair, you lost ‘transactional consistency’!

Memory usage:

Page life expectancy should not fall below 300 seconds for a longer period of time.

When in doubt: Reboot!

Manually geneate a BSOD in order to be able to debug a hung system.
It can now also be done with USB keyboards in Windows Server 2003 SP2 and up, and Windows 7.
See also thishttp://support.microsoft.com/kb/972110.

Some more interesting links:

Encryption Hierarchy / Encryption Hierarchy

– Book: SQL Server 2005 Practical Troubleshooting (by the late Ken Henderson)

Security in SQL Server 2005

SQL Server 2005 Data Encryption and data length limitations

–jeroen

Posted in BASTA!, Conferences, Database Development, Development, Event, SQL Server | Leave a Comment »

CodeRage 4 session material download locations changed – CodeCentral messed up

Posted by jpluimers on 2009/09/18

Somehow, CodeCentral managed to not only delete my uploaded CodeRage 4 session materials (the videos are fine!), but also newer uploads with other submissions.

Since I’m in crush mode to get the BASTA! and DelphiLive 2009 Germany sessions done, and all Embarcadero sites having to do with their membership server perform like a dead horse, I have temporary moved the downloads, and corrected my earlier post on the downloads.

I have notified Embarcadero of the problems, so I’m pretty sure they are being addressed on their side as well.
Edit 20090919: Embarcadero indicated that between 20090913 and 20090914 there has been a database restore on CodeCentral. Some entries therefore have been permanently lost.

When I get back from the conferences, and CodeCentral is more responsive, I’ll retry uploading it there, and correct the posts.
In the mean time, be sure not to save shortcuts to the current locations, as they are bound to change.

The are the new download locations can all be found in my xs4all temporary CodeRage 4 2009 download folder.

This is the full list of my CodeRage 4 sessions and places where you can download everything: Read the rest of this entry »

Posted in .NET, ASCII, CodeRage, CommandLine, Conferences, CP437/OEM 437/PC-8, Database Development, Debugging, Delphi, Development, Encoding, Event, Firebird, InterBase, ISO-8859, ISO8859, Prism, Software Development, SQL Server, Unicode, UTF-8, UTF8, Windows-1252 | 1 Comment »