A cautionary tale on time zones, and the big warning on using a unix timestamp (only 18 years to go on that one…)
–jeroen
Posted by jpluimers on 2020/01/30
A cautionary tale on time zones, and the big warning on using a unix timestamp (only 18 years to go on that one…)
–jeroen
Posted in Algorithms, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/01/30
For my link archive as it contains some interesting ideas on how to use DataSnap as a conversion later between two systems: [WayBack] I need to write some DataSnap “middleware” between Google Glass and a SwissLog ERP system, and I am trying to figure out if there are significant differ… – Lars Fosdal – Google+
The ideas is basically a session based protocol converter.
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/01/29
When migrating to a new machine, or syncing settings between machines, I hoped these are useful steps (in reverse order: export, then import, just like to reset a machine you turn it off first, then on): [WayBack] Import and Export Registered SQL Servers To Other Machines.
TL;DR: don’t bother exporting the SQL Server login passwords over: doing so will break your registered servers list.
Trying this myself between co-workers, exporting from one person, then importing for another can cause a very unstable SSMS environment giving errors like these during startup even using SSMS 2017:
TITLE: Registered Servers ------------------------------ Sleutel is niet geldig voor gebruik in opgegeven status. (System.Security) ------------------------------ BUTTONS: OK ------------------------------ =================================== Sleutel is niet geldig voor gebruik in opgegeven status. (System.Security) ------------------------------ Program Location: at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.ProtectData(String input, Boolean encrypt) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_SecureConnectionString() at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_ConnectionString() at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_ServerName() at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServerTree.AddRegisteredServerNode(RegisteredServer regSrv, TreeNodeCollection nodes)
and errors like these when exporting information:
TITLE: Export Registered Servers ------------------------------ The operation 'Export' failed. (Microsoft.SqlServer.Management.RegisteredServers) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: Serialization operation on RegisteredServer[@Name='servername'] has failed. (Microsoft.SqlServer.Management.Sdk.Sfc) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476 ------------------------------ Sleutel is niet geldig voor gebruik in opgegeven status. (System.Security) ------------------------------ BUTTONS: OK ------------------------------ =================================== The operation 'Export' failed. (Microsoft.SqlServer.Management.RegisteredServers) ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476 ------------------------------ Program Location: at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.Export(SfcInstance obj, String file, CredentialPersistenceType cpt) at Microsoft.SqlServer.Management.RegisteredServers.Utils.Export(Object obj, String filename, Boolean includeUserNames, ServerType serverType) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersContextMenuManager.ContextExport(Object sender, EventArgs e) =================================== Serialization operation on RegisteredServer[@Name='SQLServerName'] has failed. (Microsoft.SqlServer.Management.Sdk.Sfc) ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476 ------------------------------ Program Location: at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces) at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.WriteAllInstances() at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter xmlWriter) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.Export(SfcInstance obj, String file, CredentialPersistenceType cpt) =================================== Sleutel is niet geldig voor gebruik in opgegeven status. (System.Security) ------------------------------ Program Location: at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.ProtectData(String input, Boolean encrypt) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_SecureConnectionString() at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.GetConnectionStringWithEncryptedPassword(CredentialPersistenceType cpt) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.FilterProperty(SfcSerializer serializer, FilterPropertyEventArgs propertyArgs) at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.WriteInternal(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces) at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces)
%APPDATA%\Microsoft\Microsoft SQL Server\140\Tools\Shell\RegSrvr.xml,You cannot import SQL Server credentials exported on another machine. It will break your server registrations list, and you cannot repair them.
See:
More background:
–jeroen
Posted in Database Development, Development, SQL Server | Leave a Comment »
Posted by jpluimers on 2020/01/29
Via [WayBack] As far as I can tell (and documentation on that is reaaaaaaly hard to find), dcc64 can link in .obj files in OMF and COFF format. Bcc64 uses LLVM chain and therefore produces ELF .o files… – Primož Gabrijelčič – Google+:
David Heffernan:
dcc32doescoffandomf,dcc64onlycoffand later he commented:
One of the difficulties with linking objects is the handling of exceptions. The 64 bit exception model is table based, in contrast to the stack based 32 bit model.
I don’t think that the exception tables are written correctly for code linked in objects. If exceptions are raised then this can lead to abnormal process termination. Process just disappears. Poof!
One common way that this happens is floating point exceptions that are by default unmasked by the Delphi RTL. I have found it necessary to mask them when calling into any linked object code to avoid exceptions being raised.
And compiling with cl can be a bit of a game. It’s stack checking options need to be disabled. And there are a few other key switches that help. And then there’s the forward declaration trick to help the one pass compiler cope with C objects that are expected to be linked in a separate step.
Anyway, it can be quite a challenge at times, but I’ve yet to find a plain self contained C library that has defeated me!
–jeroen
Posted in C++, C++ Builder, Delphi, Delphi x64, Development, Software Development, Visual Studio C++ | 2 Comments »
Posted by jpluimers on 2020/01/28
ODBC stores the DSN information in an ODBC.INI tree in the registry.
These posts explain how to export/import individual DSN entries:
regedit /e c:\backup\odbc-system-x86.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI"
regedit /e c:\backup\odbc-system-x64.reg "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI"
regedit /e c:\backup\odbc-user.reg "HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI"
I recently found myself needing to do some Crystal Reports testing on a virtual machine. The tests were successful on my laptop but we use a virtual machine running Windows Server 2008 R2 and…
–jeroen
Posted in Database Development, Development, ODBC, Power User | Leave a Comment »
Posted by jpluimers on 2020/01/28
For my link archive: [WayBack] Do you want to produce DPI aware Vcl applications and use Vcl Styles?… – Kiriakos Vlahos – Google+
Source at [WayBack] pyscripter/VCL.Styles.DPIAware.pas at master · pyscripter/pyscripter · GitHub
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/01/28
Last week in Delphi developer switching to C# – Stack Overflow « The Wiert Corner – irregular stream of stuff I wrote about having a broad toolset.
Having such a toolset however does not mean you should stuff your project with dependencies. Choosing a limited set of tools is a very important part of building solid projects.
It does not mean you should avoid dependencies, just that you need to be aware on them and how they add up.
To get a feel for that, the comics on the right and below.
Sources:
Posted in Comics, Conference Topics, Conferences, Development, Event, Fun, Software Development | Leave a Comment »
Posted by jpluimers on 2020/01/27
Learn how to run Hardware, Audio, Power Network, Windows Update, System Maintenance, App, Sound, etc, Troubleshooters in Windows 10/8/7 from the command line using MSDT.exe.
From:
Summary:
To invoke built-in Troubleshooters, use this command:
msdt.exe /id <diagnostic_id>
To run a custom-built troubleshooter stored locally use this command line:
msdt.exe /path <path_to_troubleshooter>
To run a troubleshooter which is in a .diagcab file format, use this:
msdt.exe /cab <path_to_diagcab>
List of diagnostic IDs:
Troubleshooting Pack ID Description Application or Feature Dependency AeroDiagnostic Troubleshoots problems displaying Aero effects like transparency. Aero Display Theme installed NetworkDiagnosticsDA Troubleshoots problems connecting to a workplace network over the Internet using Direct Access. Direct Access installed DeviceDiagnostic Troubleshoots problems using hardware and access devices connected to the computer. HomeGroupDiagnostic Troubleshoots problems viewing computers or shared files in a homegroup. HomeGroup installed NetworkDiagnosticsInbound Troubleshoots problems with allowing other computers to communicate with the target computer through Windows Firewall. NetworkDiagnosticsWeb Troubleshoots problems connecting to the Internet or to a specific Web site. IEDiagnostic Helps the user prevent add-on problems and optimize temporary files and connections. Internet Explorer installed IESecurityDiagnostic Helps the user prevent malware, pop-ups, and online attacks. Internet Explorer installed NetworkDiagnosticsNetworkAdapter Troubleshoots problems with Ethernet, wireless, or other network adapters. PerformanceDiagnostic Helps the user adjust settings to improve operating system speed and performance. AudioPlaybackDiagnostic Troubleshoots problems playing sounds and other audio files. Audio output device installed PowerDiagnostic Helps the user adjust power settings to improve battery life and reduce power consumption. PrinterDiagnostic Troubleshoots problems printing. PCWDiagnostic Helps the user configure older programs so that they can run in the current version of Windows. AudioRecordingDiagnostic Troubleshoots problems recording audio from a microphone or other input source. Audio input device installed SearchDiagnostic Troubleshoots problems with search and indexing using Windows Search. Search enabled NetworkDiagnosticsFileShare Troubleshoots problems accessing shared files and folders on other computers over the network. MaintenanceDiagnostic Helps the user clean up unused files and shortcuts and perform other maintenance tasks. WindowsMediaPlayerDVDDiagnostic Troubleshoots problems playing a DVD using Windows Media Player. Windows Media Player installed WindowsMediaPlayerLibraryDiagnostic Troubleshoots problems with adding media files to the Windows Media Player library. Windows Media Player installed WindowsMediaPlayerConfigurationDiagnostic Helps the user reset Windows Media Player settings to the default configuration. Windows Media Player installed WindowsUpdateDiagnostic Troubleshoots problems that prevent Windows Update from performing update tasks.
–jeroen
Posted in Power User, Windows | Leave a Comment »
Posted by jpluimers on 2020/01/27
Not all fonts have Unicode character ☰ [WayBack] Unicode Character ‘TRIGRAM FOR HEAVEN’ (U+2630) as it is in a less common block.
More fonts have Unicode character ≡ [WayBack] Unicode Character ‘IDENTICAL TO’ (U+2261)
The latter is slightly shorter and slightly narrower than the former, but works in way more places.
Via [WayBack] html – Unicode ☰ hamburger not displaying in Android & Chrome – Stack Overflow
I’ve worked around this problem by using the UNICODE character UNICODE U+2261 (8801), ≡ IDENTICAL TO as illustrated below rather than the UNICODE U+2630 (9776) ☰ TRIGRAM FOR HEAVEN which
–jeroen
Posted in Development, Encoding, LifeHacker, Power User, Software Development, Unicode | Leave a Comment »