Re: D need an ORM library!

2018-08-22 Thread binghoo dang via Digitalmars-d-learn
On Tuesday, 21 August 2018 at 08:22:34 UTC, Russel Winder wrote: If there was a D version of SQLAlchemy, that would be wonderful. Feel free to s/TBA/Russel Winder/ Great! there are many people waiting for this! ^_^

Re: D need an ORM library!

2018-08-22 Thread binghoo dang via Digitalmars-d-learn
On Tuesday, 21 August 2018 at 10:48:30 UTC, bauss wrote: Currently (When I get time again) working on implementing PostgreSQL and Sqlite support for Diamond. Mysql and Mssql should work out the box. https://github.com/DiamondMVC/Diamond Some examples will come later, unless you use the

Re: D need an ORM library!

2018-08-20 Thread binghoo dang via Digitalmars-d-learn
On Monday, 20 August 2018 at 23:24:04 UTC, Matthias Klumpp wrote: On Monday, 20 August 2018 at 15:58:37 UTC, Jesse Phillips wrote: [...] There are a number of things out there, but personally don't know there state or simplicity. 2016 there was a talk: http://dconf.org/2016/talks/nowak.html

D need an ORM library!

2018-08-19 Thread binghoo dang via Digitalmars-d-learn
hi, I thinks D need an ORM library for Sqlite/Mysql/PostgreSQL, entity currently support all the three targets, but entity's API is too complex and cumbersome for using. Is there a more light-weight and simpler implementation like ActiveAndroid ? Thanks! --- Binghoo Dang

Re: could someone test support for Asian languages in nanogui port?

2018-05-05 Thread Binghoo Dang via Digitalmars-d-learn
On Friday, 4 May 2018 at 10:40:52 UTC, drug wrote: I port nanogui, but besides porting I'd like to improve it using great capabilities of D language provides. One of them is utf support, so I added support for Asian languages to nanogui.TextBox. But I'm not sure I've did it well and so I'd

Re: Error: non-shared method Node.~this is not callable using a shared object

2018-01-06 Thread Binghoo Dang via Digitalmars-d-learn
On Saturday, 6 January 2018 at 11:23:13 UTC, ChangLong wrote: This code is not working. --- shared struct Stack { Node n = void ; } struct Node { ~this() {} } --- Error: non-shared method test.Node.~this is not callable using a shared

Re: I want to transmit the class name and the member name in the method

2018-01-05 Thread Binghoo Dang via Digitalmars-d-learn
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote: I think code style like: ~~ struct User { int id; string name; string email; } class ORM { } auto db = new ORM; auto users =

Re: How to pack a struct to a ubyte[] in a more "The D way" style ?

2017-12-21 Thread Binghoo Dang via Digitalmars-d-learn
wrote: On Monday, December 18, 2017 08:45:32 Binghoo Dang via Digitalmars-d-learn wrote: hi Davis, I read the std.bitmanip, and I tried to test the code like below: ``` import std.stdio; import std.array; import std.bitmanip; void main(string[] args) { align(1) struct c { ushort

Re: How to pack a struct to a ubyte[] in a more "The D way" style ?

2017-12-18 Thread Binghoo Dang via Digitalmars-d-learn
hi Davis, I read the std.bitmanip, and I tried to test the code like below: ``` import std.stdio; import std.array; import std.bitmanip; void main(string[] args) { align(1) struct c { ushort c1; uint c2; //ubyte[8] c3; } ubyte[] buffer; auto ap =

Re: Write native GUI applications for Windows

2017-12-18 Thread Binghoo Dang via Digitalmars-d-learn
On Monday, 18 December 2017 at 07:55:25 UTC, Andrey wrote: Hello! I have a question about creating native GUI applications for Windows 7 or/and Windows 10. I know that exist DWT, DlangUI and other... But I'm interesting in native GUI. If it will be C++ then I would use WinAPI from SDK. And

Re: How to pack a struct to a ubyte[] in a more "The D way" style ?

2017-12-17 Thread Binghoo Dang via Digitalmars-d-learn
Thanks for your idea. On Monday, 18 December 2017 at 05:08:24 UTC, Jonathan M Davis wrote: ubyte[] makeCMDPacket(RCPCmd cmd, in ubyte[] data) { this.preamble = RCPPKT_PRE; this.hdr.msgtype = RCPMSG_CMD; this.hdr.cmdcode = cast (ubyte)

How to pack a struct to a ubyte[] in a more "The D way" style ?

2017-12-17 Thread Binghoo Dang via Digitalmars-d-learn
hi, I'm a dlang newbie, and I recently made a program that interacts with an RFID Reader, it's basically a Serial-Port communication model. And after 2 days, I finally got a working code like these: ``` enum RCPCmd{ RCPCMD_GET_REGION = 0x06, RCPCMD_SET_REGION = 0x07,