Can't read mongo result back to structs with vibe.d Bson serializer

2019-12-10 Thread tirithen via Digitalmars-d-learn
How can I cast Bson (vibe.d) to various struct types? The best would be to get rid of the switch statement as well. It works fine deserializing when casting directly collection.findOne!UserCreate(), but when I try from a Bson object I get below error directly. What to do? The error I get

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the exemple code of spec. Or is is possible add version file by

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread ShadoLight via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 14:33:41 UTC, Marcone wrote: On Tuesday, 10 December 2019 at 09:48:11 UTC, ShadoLight wrote: On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: [...] To add to Rumbo's comment: to compile a *.rc to *.res file you will need a resource compiler. [...]

Re: Using map result type

2019-12-10 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 07:23:56 UTC, AA wrote: Would the second solution of declaring a template constraint like that be considering strange/out of place in D? e.g. do people normally try and declare the template constraints on a function or just rely on compile time failure from to

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 09:48:11 UTC, ShadoLight wrote: On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: [...] To add to Rumbo's comment: to compile a *.rc to *.res file you will need a resource compiler. [...] Hi, I compile resource using windres.exe of MinGW, Can you

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the

Blog Post #93: Window Stats - An Alternate Way to Gather Info

2019-12-10 Thread Ron Tarrant via Digitalmars-d-learn
Today's post takes a different approach to gathering the same info we've been working with over the last two posts. It's right here: https://gtkdcoding.com/2019/12/10/0093-window-stats-iii-alt.html

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread ShadoLight via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the