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 2,388 other followers

Archive for June 9th, 2021

(nullable) rowversion (Transact-SQL) – SQL Server | Microsoft Docs

Posted by jpluimers on 2021/06/09

I was not aware there could be a nullable [WayBack] rowversion (Transact-SQL) – SQL Server | Microsoft Docs, but it is possible:

Duplicate rowversion values can be generated by using the SELECT INTO statement in which a rowversioncolumn is in the SELECT list. We do not recommend using rowversion in this manner.

A nonnullable rowversion column is semantically equivalent to a binary(8) column. A nullable rowversion column is semantically equivalent to a varbinary(8) column.

You can use the rowversion column of a row to easily determine whether the row has had an update statement ran against it since the last time it was read. If an update statement is ran against the row, the rowversion value is updated. If no update statements are ran against the row, the rowversion value is the same as when it was previously read. To return the current rowversion value for a database, use @@DBTS.

You can add a rowversion column to a table to help maintain the integrity of the database when multiple users are updating rows at the same time. You may also want to know how many rows and which rows were updated without re-querying the table.

For example, assume that you create a table named MyTest. You populate some data in the table by running the following Transact-SQL statements.

–jeroen

Posted in Database Development, Development, Software Development, SQL, SQL Server | Leave a Comment »

The state of text reading robots a few years back; I doubt it has improved much since: AI often still is Algorithmic Irresponsibility

Posted by jpluimers on 2021/06/09

The state of text reading robots and AI a few years back; I doubt it has improved much since: [WayBack] Thread by @JFBonnefon: “It’s a big day today: I had a scientific manuscript rejected by a robot. Thread. The bot detected ❝a high level of textual overlap with previous literature […]”.

Basically, it detected all duplicates to be in non-relevant pieces.

Via: [WayBack] Michael Bolton on Twitter: “Thread. Machines read strings. They don’t understand context or intentions. This is how AI comes to stand for Anti-Intellectualism and Algorithmic Irresponsibility (the latter coined by @jamesmarcusbach).… “

Although I could not find that reference through [Archive.is] “Algorithmic Irresponsibility” – Google Search. I could only find two:

–jeroen

Read the rest of this entry »

Posted in AI and ML; Artificial Intelligence & Machine Learning, Development, Software Development | Leave a Comment »

Delphi: .dproj TargetedPlatforms bit flags in main PropertyGroup, and Platform values in other elements/attributes

Posted by jpluimers on 2021/06/09

For cleanup of .dproj files, I want to know the bit flags that TargetPlatforms can have.

TL;DR: .dproj content management in Delphi is a mess

For future reference empiric values for the flags that build the TargetedPlatforms (not to be confused with PlatformTargets) element content in the main PropertyGroup of a .dproj file in a table.

This might help creating an XSD for a .dproj file (Source: Reminder to self: make a start for an XSD that validates Delphi dproj files).

Absent cells means I have no idea if the values are relevant or what they could be.

Input for those is more than welcome.

Bit# TargetedPlatforms bit flag value Platform and $(Platform)value Meaning (dropdown value of “Select Platform” dialog)
0 1 Win32 32-bit Windows
1 2 Win64 64-bit Windows
2 4
3 8
4 16
5 32
6 64
7 128
8 256
9 512
10 1024 iOSDevice64 iOS Device 64-bit
11 2048
12 4096

($Platform) values still to cover:

  • Android
  • Linux64
  • OSX32
  • iOSDevice32
  • iOSSimulator

There is only one place for TargetedPlatforms in the .dproj file: at the XPath /Project/PropertyGroup/TargetedPlatforms.

For getting the XPath, I used Notepad++ as described in my earlier blog post Getting the path of an XML node in your code editor.

It has the combined flags, so:

  • 3 means Win32 and Win64 are enabled
  • 1025 means Win32 and iOSDevice64 are enabled

The Platform value (and thus $(Platform) value) is the one used in for example these elements or attributes:

  • /Project/PropertyGroup/Platform as currently selected platform
  • /Project/PropertyGroup/@Condition as selectivity expression, for instance
    •  <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
    • <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
  • /Project/ProjectExtensions/BorlandProject/Platforms/Platform (all having for the value property with the Platform value) having a content of either True or False.
    • This allows a .dproj file to contain information for platforms that are not visible yet.

The actual values of Platform also play a role in these places:

  • /Project/PropertyGroup/Base_Win64 containing the base settings for the Win64 platform so they can be derived for the Debug or Release builds.
  • /Project/PropertyGroup/@Condition for instance <PropertyGroup Condition="'$(Base_Win64)'!=''">
  • /Project/ProjectExtensions/BorlandProject/Deployment/DeployFile/Platform/@Name for instance <Platform Name="iOSSimulator">

Even worse: there are unneeded  nodes present for bits in TargetPlatforms and /Project/ProjectExtensions/BorlandProject/Platforms/Platform being absent or having a content False for /Project/ProjectExtensions/BorlandProject/Platforms/Platform/@value other than the enabled bits in TargetPlatforms, for instance:

  • nodes matched by /Project/ProjectExtensions/BorlandProject/Deployment/DeployFile/Platform
  • nodes matched by /Project/ProjectExtensions/BorlandProject/Deployment/ProjectRoot/@Platform
  • nodes matched by /Project/ProjectExtensions/BorlandProject/Deployment/DeployClass/Platform/@Name (and the parent DeployClass subtrees)
  • nodes matched by /Project/ProjectExtensions/BorlandProject/Platforms/Platform@value

Some examples of superfluous nodes when TargetPlarforms has a value of 1 (corresponding to Platform having a value of Win32:

<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>

Also, non relevant platforms are included in this node:

<Platforms>
    <Platform value="Win32">True</Platform>
    <Platform value="Win64">False</Platform>
</Platforms>

The Deployment section is even worse; see for instance [WayBack] delphi – How manage or clean deploy section in dproj files? – Stack Overflow.

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 1 Comment »

 
%d bloggers like this: