Posted by jpluimers on 2019/10/29
When an ORM generates the SQL for a certain database back-end, it needs to use the right quoting.
Normally, the Spring4D Marshmallow project derives that from the back-end specific adapter used.
But if you use a generic TDriverConnectionAdapter, then you need to manually set the QueryLanguage property in your IDBConnection using a valid value from Spring.Persistence.SQL.Interfaces. This then uses the correct SQLGenerator from the TSQLGeneratorRegister to generate the SQL including correct quotes.
To quote identifiers, most back-ends use a double quote, but MySQL uses a backtick.
via:
You obviously already modified that code as the commented out code is the correct one.
I guess you already got that mistake when you started using MySQL via ADO as MySQL needs the backtick.
Set QueryLanguage of your IDBConnection properly (the valid values are in Spring.Persistence.SQL.Interfaces). Then the correct SQLGenerator will be used.
If you are using an adapter that is specific to a certain database then it sets the QueryLanguage properly but if you are using an adapter for components that can connect to multiple databases (like ADO or FireDAC) it does not, hence the need you specify it.
–jeroen
Posted in Delphi, Development, Software Development, Spring4D | Leave a Comment »
Posted by jpluimers on 2019/10/28
[WayBack] Delphi code completion fail with anonymous methods – Stack Overflow.
It also often fails by inserting end; inside if/then/else statements having a proper begin/end blocks.
The reason is that code completion uses a different parser than the regular Delphi compiler.
Chances of these issues to get fixed are close to zero, because another part of the problem is that there is no formalised Delphi language grammar, not even at Embarcadero itself.
I wish there was an Embarcadero sanctioned grammar (see [WayBack] “The arguments that won the day for us here were about strengthening the ecosystem and becoming the best tooled language on the planet. They were about … – Jeroen Wiert Pluimers – Google+). Actually I had that wish like in the end of the 1990s, but I cannot find my forum post archive back.
The best reverse engineered grammar is DelphiAST: a well maintained open source project implementing an Abstract Syntax Tree for Delphi.
Via: [WayBack] SO…/delphi-code-completion-fail-with-anonymous-methods I have seen this question and I am curious. There is an… – Alberto Miola – Google+
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2019/10/28
Interesting tool that I needed one day to figure out how to recover from a certain NTFS partition having become RAW [Archive.is/WayBack] TestDisk, Data Recovery:
TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software: certain types of viruses or human error(such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.
TestDisk can
- Fix partition table, recover deleted partition
- Recover FAT32 boot sector from its backup
- Rebuild FAT12/FAT16/FAT32 boot sector
- Fix FAT tables
- Rebuild NTFS boot sector
- Recover NTFS boot sector from its backup
- Fix MFT using MFT mirror
- Locate ext2/ext3/ext4 Backup SuperBlock
- Undelete files from FAT, exFAT, NTFS and ext2 filesystem
- Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions.
TestDisk has features for both novices and experts. For those who know little or nothing about data recovery techniques, TestDisk can be used to collect detailed information about a non-booting drive which can then be sent to a tech for further analysis. Those more familiar with such procedures should find TestDisk a handy tool in performing onsite recovery.
–jeroen
Posted in *nix, Apple, Mac, Mac OS X / OS X / MacOS, Power User, Windows | Leave a Comment »
Posted by jpluimers on 2019/10/27
[WayBack] Eef Meijerink op Twitter: “Krijg je binnenkort ongevraagd een anti-abortus folder in je brievenbus? Die kan gewoon retour afzender: Antwoordnummer 1139 3900 VB Veenendaal Ik zeg doen!”
Kosten antwoordnummer van [WayBack] Antwoordnummer | PostNL:
Tarieven antwoordnummer brieven
| Aantal stuks |
1-100 |
100-2500 |
2500-5000 |
Abonnement |
| Btw |
btw-vrij |
excl. btw |
excl. btw |
excl. btw |
| Gewicht |
|
|
|
|
| 0 – 20 g |
€ 0,88 |
€ 0,87 |
€ 0,86 |
209,50 per jaar |
| 20 – 50 g |
€ 1,76 |
€ 1,74 |
€ 1,72 |
|
| 50 – 100 g |
€ 2,64 |
€ 2,61 |
€ 2,57 |
|
| 100 – 350 g |
€ 3,52 |
€ 3,49 |
€ 3,43 |
|
| 350 g – 2 kg |
€ 4,40 |
€ 4,35 |
€ 4,29 |
|
| Let op: Als de locatie van bezorging van antwoordnummerpost meer dan vijftien kilometer van het antwoordnummer is verwijderd, wordt over de antwoordzendingen 15 procent toeslag in rekening gebracht. |
Tarieven antwoordnummer pakketten
| Gewicht |
Tarief per stuk (excl. btw) |
Abonnement (excl. btw) |
| 0 – 5 kg |
€ 7,74 |
€ 209,50 per jaar |
| 5 – 10 kg |
€ 10,11 |
|
| 10 – 20 kg |
€ 11,78 |
|
| 20 – 30 kg |
€ 14,09 |
|
|
| Let op: Als de locatie van bezorging van antwoordnummerpost meer dan vijftien kilometer van het antwoordnummer is verwijderd, wordt over de antwoordzendingen 15 procent toeslag in rekening gebracht. |
Ik ben trouwens verwonderd dat je voor een kleine anderhalve ton in EUR je alle Nederlanders kunt spammen: [WayBack] Anti-abortusfolder in de bus bij iedere Nederlander | Politiek | AD.nl
––jeroen
Posted in LifeHacker, Power User | Leave a Comment »
Posted by jpluimers on 2019/10/25
Today I found out I most likely have rectal cancer.
I got that result by following up on my changed bowel habits, eliminating causes one by one.
Soon I will know for sure and follow proper treatments.
So as part of cancer awareness month:
Please follow up on changes in your bowel habits.
–jeroen
Posted in About, Awareness, Personal | Leave a Comment »
Posted by jpluimers on 2019/10/25
By default, Chrome uses the same proxy server as Internet Explorer: the system one that your Chrome settings page accesses from chrome://settings/search#proxy through this command-line call:
"C:\Windows\system32\rundll32.exe" C:\Windows\system32\shell32.dll,Control_RunDLL C:\Windows\system32\inetcpl.cpl,,4
There is no GUI way inside Chrome to change this, but there is a command-line parameter: --proxy-server="ipaddress:port"
So create a new shortcut to Chrome, then you can change it.
This comes in very handy if you want to test
- some sessions through for instance Internet Explorer going through HTTP Fiddler (that defaults at localhost:8888)
- other sessions through Cntlm (that defaults to localhost:3128)
Some background information:
–jeroen
Posted in Chrome, Cntlm, NTLM, Power User, Web Browsers, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »
Posted by jpluimers on 2019/10/25
If you find out bookmarklets like the [WayBack] Press-This or [Archive.is] SubToMe do not work on some pages but to on others.
Often it’s not the bookmarklet, but a combination the site disabling CSP (Content Security Policy) and browsers not coping well with that, see for instance:
via:
Read the rest of this entry »
Posted in Bookmarklet, CSP, Power User, Security, Web Browsers | Leave a Comment »
Posted by jpluimers on 2019/10/24
For my link archive: [WayBack] Is there a way to use the JVCL’s TJvXxxAppStorage to store float values as strings (e.g. “10.152”) rather than hex dumps and also control the decimal separator… – Thomas Mueller (dummzeuch) – Google+ with a solution by Achim Kalwa:
+Thomas Mueller You may try this:
type
TMyStorage = class(TJvAppRegistryStorage)
protected
procedure DoWriteFloat(const Path: string; Value: Extended); override;
end;
TJvAppRegistryStorage = class(TMyStorage);
...
Implementation
{ TMyStorage }
procedure TMyStorage.DoWriteFloat(const Path: String; Value: Extended);
var
SValue : string;
FS : TFormatSettings;
begin
FS := TFormatSettings.Create;
FS.DecimalSeparator := '.';
FS.ThousandSeparator := #0;
SValue := FloatToStr(Value, FS);
DoWriteString(Path, SValue);
end;
And you need to set
StorageOptions.FloatAsString := False;
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »