Re: Reversing a string

2019-01-11 Thread Mike James via Digitalmars-d-learn
On Friday, 11 January 2019 at 09:41:30 UTC, bauss wrote: On Friday, 11 January 2019 at 08:25:41 UTC, Seb wrote: On Friday, 11 January 2019 at 08:05:39 UTC, AndreasDavour wrote: Hi. I've just started to learn some D, so maybe this question is extremely stupid, but please bear with me. [...]

Re: GTKD for android?

2018-09-09 Thread James via Digitalmars-d-learn
On Saturday, 8 September 2018 at 02:59:48 UTC, Josphe Brigmo wrote: I have an app I'm writing using GtkD on windows. Eventually I'd like to port it to android. Since I have never been able to actually get anything to work on android I'm curious if there are any demos with gtkD for android? I'm

Buy Real passport, drivers license, IELTS, ID Cards (http://buyrealfakedocument.com)

2018-01-03 Thread james via Digitalmars-d-learn
Get Registered IELTS certificates without attending the Exam ( http://buyrealfakedocument.com ) We are a unique manufacturer of high-quality registered citizenship documents with the best machines and holograms that duplicate as database database driver's license, passports, biometric

Re: ffmpeg

2017-08-19 Thread Jolly James via Digitalmars-d-learn
On Saturday, 19 August 2017 at 02:50:44 UTC, Johnson Jones wrote: Trying to get it to work. You could just try to use/call the ffmeg executable as wrapper. For sure, not the best, but proabably the easiest solution. Afaik it also supports pipes.

Re: Remove instance from array

2017-07-06 Thread Jolly James via Digitalmars-d-learn
On Thursday, 6 July 2017 at 08:15:10 UTC, Andrea Fontana wrote: On Wednesday, 5 July 2017 at 16:17:29 UTC, Jolly James wrote: On Wednesday, 5 July 2017 at 16:04:16 UTC, Jolly James wrote: [...] Part of CoreCLR's 'List': [...] If there isn't already, maybe something similar to this

Re: dub + local dependencies

2017-07-06 Thread Jolly James via Digitalmars-d-learn
On Thursday, 6 July 2017 at 00:12:25 UTC, Mike Parker wrote: On Thursday, 6 July 2017 at 00:09:46 UTC, Mike Parker wrote: You have a few options: * Use a path dependency: "dependencies": { "xyz": { "path": "path/to/xyz" } } * Use add-local with a version on the command

Re: unittest-cov - results?

2017-07-05 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 19:01:06 UTC, Jonathan M Davis wrote: On Wednesday, July 05, 2017 18:50:32 Jolly James via Digitalmars-d-learn wrote: On Wednesday, 5 July 2017 at 18:46:38 UTC, Jolly James wrote: > On Wednesday, 5 July 2017 at 18:09:46 UTC, Seb wrote: >> [...] > >

Re: unittest-cov - results?

2017-07-05 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 18:46:38 UTC, Jolly James wrote: On Wednesday, 5 July 2017 at 18:09:46 UTC, Seb wrote: On Wednesday, 5 July 2017 at 17:46:01 UTC, Jolly James wrote: [...] For every file a `.lst` file is generated (it's the same how `-cov` behaves at DMD). These .lst files

Re: unittest-cov - results?

2017-07-05 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 18:09:46 UTC, Seb wrote: On Wednesday, 5 July 2017 at 17:46:01 UTC, Jolly James wrote: [...] For every file a `.lst` file is generated (it's the same how `-cov` behaves at DMD). These .lst files contain the original source code with number of hits of a

unittest-cov - results?

2017-07-05 Thread Jolly James via Digitalmars-d-learn
How does unit testing with dub work? dub build --arch=x86_64 --build=unittest-cov --force --compiler=ldc2 After execution, there is no result output in the command line.

Re: Remove instance from array

2017-07-05 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 16:55:43 UTC, bachmeier wrote: On Wednesday, 5 July 2017 at 16:04:16 UTC, Jolly James wrote: Here in D everything looks like climbing mount everest. When you ask how to use D's containers you are recommended to use dynamic arrays instead. When you look at the docs

Re: Remove instance from array

2017-07-05 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 16:04:16 UTC, Jolly James wrote: On Wednesday, 5 July 2017 at 15:56:45 UTC, Igor Shirkalin wrote: [...] Thank you! :) But why a containers so complicated in D? [...] Part of CoreCLR's 'List': public bool Remove(T item) { int index

Re: Remove instance from array

2017-07-05 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 15:56:45 UTC, Igor Shirkalin wrote: On Wednesday, 5 July 2017 at 15:48:14 UTC, Jolly James wrote: On Wednesday, 5 July 2017 at 15:44:47 UTC, Igor Shirkalin wrote: On Wednesday, 5 July 2017 at 15:30:08 UTC, Jolly James wrote: WhatEver[] q = []; [...] auto i = new

Re: Remove instance from array

2017-07-05 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 5 July 2017 at 15:44:47 UTC, Igor Shirkalin wrote: On Wednesday, 5 July 2017 at 15:30:08 UTC, Jolly James wrote: WhatEver[] q = []; [...] auto i = new WhatEver(); q[] = i; How does one remove that instance 'i'? What exactly do you want to remove? After a[]=i your array

dub + local dependencies

2017-07-05 Thread Jolly James via Digitalmars-d-learn
WARNING: A deprecated branch based version specification is used for the dependency xyz. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead. The problem is: xyz is a local package and

Remove instance from array

2017-07-05 Thread Jolly James via Digitalmars-d-learn
WhatEver[] q = []; [...] auto i = new WhatEver(); q[] = i; How does one remove that instance 'i'?

Re: Linking external *.lib files

2017-06-21 Thread Jolly James via Digitalmars-d-learn
*push*

Re: Linking external *.lib files

2017-06-16 Thread Jolly James via Digitalmars-d-learn
On Saturday, 17 June 2017 at 00:33:01 UTC, Jolly James wrote: On Saturday, 17 June 2017 at 00:09:41 UTC, Jolly James wrote: Let's assume, I have the following 2 dub packages: pkgBASE: (depends on public DUB package) source/ lib/ pkgAPP: (depends on pkgBASE) source/ I

Re: Linking external *.lib files

2017-06-16 Thread Jolly James via Digitalmars-d-learn
On Saturday, 17 June 2017 at 00:09:41 UTC, Jolly James wrote: Let's assume, I have the following 2 dub packages: pkgBASE: (depends on public DUB package) source/ lib/ pkgAPP: (depends on pkgBASE) source/ I have added pkgBASE via add-path. This wasn't a problem at all.

Re: Linking external *.lib files

2017-06-16 Thread Jolly James via Digitalmars-d-learn
Let's assume, I have the following 2 dub packages: pkgBASE: (depends on public DUB package) source/ lib/ pkgAPP: (depends on pkgBASE) source/ I have added pkgBASE via add-path. This wasn't a problem at all. Unfortunately, the public DUB package requires to be linked with

Linking external *.lib files

2017-06-16 Thread Jolly James via Digitalmars-d-learn
Let's assume, I have the following 2 dub packages: pkgBASE: source/ lib/ pkgAPP:

String Comparison Operator

2017-04-30 Thread Jolly James via Digitalmars-d-learn
Is there a String Comparison Operator in D?

Re: Howto catch SocketOSException?

2017-03-27 Thread Jolly James via Digitalmars-d-learn
On Sunday, 26 March 2017 at 21:57:29 UTC, Jolly James wrote: On Sunday, 26 March 2017 at 18:50:13 UTC, bauss wrote: [...] If you want try to help me, mabye this helps you: https://github.com/CyberShadow/ae/blob/master/net/asockets.d#L1237 Finally found the bug: I had a logical error in the

Re: Howto catch SocketOSException?

2017-03-26 Thread Jolly James via Digitalmars-d-learn
On Sunday, 26 March 2017 at 18:50:13 UTC, bauss wrote: On Sunday, 26 March 2017 at 11:46:39 UTC, Jolly James wrote: [...] Chances are it's invoked in another thread and thus you can't catch it like that. To sum it up. Ex. void thisFunctionThrows() { ... } void ableToCatch() { try {

Re: Howto catch SocketOSException?

2017-03-26 Thread Jolly James via Digitalmars-d-learn
On Sunday, 26 March 2017 at 11:35:00 UTC, Jolly James wrote: On Sunday, 26 March 2017 at 02:41:46 UTC, Adam D. Ruppe wrote: On Sunday, 26 March 2017 at 02:24:56 UTC, Jolly James wrote: You can ignore the loop()-method. It is not called as the application will never reach this statement,

Re: Howto catch SocketOSException?

2017-03-26 Thread Jolly James via Digitalmars-d-learn
On Sunday, 26 March 2017 at 02:41:46 UTC, Adam D. Ruppe wrote: On Sunday, 26 March 2017 at 02:24:56 UTC, Jolly James wrote: You can ignore the loop()-method. It is not called as the application will never reach this statement, because it cannot, because it crashes already in the

Re: Howto catch SocketOSException?

2017-03-25 Thread Jolly James via Digitalmars-d-learn
On Sunday, 26 March 2017 at 01:22:24 UTC, bauss wrote: On Sunday, 26 March 2017 at 00:34:03 UTC, Jolly James wrote: [...] This part: catch (std.socket.SocketOSException e) [...] [...] I know that inheritance stuff, but none (!) of them catches that strange exception either. You can

Howto catch SocketOSException?

2017-03-25 Thread Jolly James via Digitalmars-d-learn
How do you catch an std.socket.SocketOSException? The following does not work, as the exception occurs anyway and leads to a crash: import ae.net.asockets; void main(string[] args) { TcpServer tcp = new TcpServer(); try { tcp.listen(2345,

Re: About void[] and asockets

2017-02-22 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 22 February 2017 at 17:57:31 UTC, Adam D. Ruppe wrote: On Wednesday, 22 February 2017 at 17:53:21 UTC, Jolly James wrote: No matter how I try, I am always getting: Error: none of the overloads of '__ctor' are callable using argument types (Data*), candidates are: (my-project) I

Re: About void[] and asockets

2017-02-22 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 22 February 2017 at 17:06:51 UTC, Jolly James wrote: On Wednesday, 22 February 2017 at 17:01:11 UTC, Adam D. Ruppe wrote: On Wednesday, 22 February 2017 at 16:55:03 UTC, Jolly James wrote: Well, what are these void-arrays for real? I mean, they contain data what does not make

Re: About void[] and asockets

2017-02-22 Thread Jolly James via Digitalmars-d-learn
On Wednesday, 22 February 2017 at 17:01:11 UTC, Adam D. Ruppe wrote: On Wednesday, 22 February 2017 at 16:55:03 UTC, Jolly James wrote: Well, what are these void-arrays for real? I mean, they contain data what does not make them really void, does it? They represent an array of anything; the

Re: Class Order Style

2017-02-22 Thread Jolly James via Digitalmars-d-learn
On Tuesday, 21 February 2017 at 23:06:23 UTC, Jonathan M Davis wrote: On Tuesday, February 21, 2017 22:41:40 Lenny Lowood via Digitalmars-d-learn wrote: [...] It's completely a stylistic preference. There are a number of different ways to order your member variables and functions, and there

About void[] and asockets

2017-02-22 Thread Jolly James via Digitalmars-d-learn
For sure, some might know ae. I am trying to use it as TcpServer. I got almost everything working fine concerning connection establishment and disconnecting. But there is one thing that makes it hard for me to understand, how to handle data.

Re: Class Order Style

2017-02-20 Thread Jolly James via Digitalmars-d-learn
On Monday, 20 February 2017 at 13:50:26 UTC, ketmar wrote: just add ddoc documentation to 'em, and then it doesn't matter in which order they are declared: people will generate documentation to find out how to use your code. ;-) ah okay, thx But what about this? class A { private: int

Class Order Style

2017-02-20 Thread Jolly James via Digitalmars-d-learn
How to sort the members of a class? like: 1. properties then 2. private 3. methods 4. ctors ... and so on. are there any recommendations? And what is better? class A { private: int a; int b; public: int c; int d; } or class A { private { int a; int b; }

Re: Hello World Example with Glade?

2015-09-11 Thread Mike James via Digitalmars-d-learn
On Friday, 11 September 2015 at 06:45:07 UTC, Mike McKee wrote: On Friday, 11 September 2015 at 06:00:39 UTC, Mike McKee wrote: [...] I think the start of this probably looks like the following, but I'm not certain: import gtk; import gobject.Type; import std.stdio; import std.c.process;

Re: Hello World Example with Glade?

2015-09-11 Thread Mike James via Digitalmars-d-learn
On Friday, 11 September 2015 at 07:13:22 UTC, Mike McKee wrote: On Friday, 11 September 2015 at 06:53:07 UTC, Mike James wrote: There's a Glade example in the demos/builder directory... I'm having trouble installing GtkD on Ubuntu Linux 14.04. I did the apt steps from here:

Re: Hello World Example with Glade?

2015-09-11 Thread Mike James via Digitalmars-d-learn
On Friday, 11 September 2015 at 07:29:23 UTC, Mike McKee wrote: On Friday, 11 September 2015 at 07:20:57 UTC, Mike James wrote: It looks last keep you're missing an import path (-Ipath_to_source). Check out http://dlang.org/dmd-linux.html#switches I tried this just now: # dmd test1.d

Re: Hello World Example with Glade?

2015-09-11 Thread Mike James via Digitalmars-d-learn
On Friday, 11 September 2015 at 07:47:15 UTC, Mike McKee wrote: [...] The undefined references mean you haven't provided a linker path to the GtkD libs. Have you built the GtkD libraries? Check out https://github.com/gtkd-developers/GtkD

Re: Reading and converting binary file 2 bits at a time

2015-08-29 Thread Mike James via Digitalmars-d-learn
On Saturday, 29 August 2015 at 20:15:53 UTC, Marc Schütz wrote: Just cast to `Crumbs[]` directly: import std.bitmanip; import std.stdio; import std.file; struct Crumbs { mixin(bitfields!( ubyte, one, 2, ubyte, two, 2, ubyte,

Re: Reading and converting binary file 2 bits at a time

2015-08-27 Thread Mike James via Digitalmars-d-learn
On Thursday, 27 August 2015 at 09:00:02 UTC, Andrew Brown wrote: Hi, I need to read a binary file, and then process it two bits at a time. But I'm a little stuck on the first step. So far I have: import std.file; import std.stdio; void main(){ auto f = std.file.read(binaryfile); auto g

Converting Java code to D

2015-04-20 Thread Mike James via Digitalmars-d-learn
Here is a fragment of Java code from an SWT program... public enum LineStyle { NONE(None), SOLID(Solid), DASH(Dash), DOT(Dot), DASHDOT(Dash Dot), DASHDOTDOT(Dash Dot Dot); public final String label; private LineStyle(String label) { this.label = label;

Re: Converting Java code to D

2015-04-20 Thread Mike James via Digitalmars-d-learn
On Monday, 20 April 2015 at 17:28:27 UTC, John Colvin wrote: On Monday, 20 April 2015 at 17:24:30 UTC, bearophile wrote: John Colvin: struct LineStyle { enum NONE = None; enum SOLID = Solid; enum DASH = Dash; enum DOT = Dot; enum DASHDOT = Dash Dot; enum DASHDOTDOT = Dash Dot Dot;

Re: Beginner ?. Why does D suggest to learn java

2014-10-18 Thread Mike James via Digitalmars-d-learn
On Friday, 17 October 2014 at 08:44:00 UTC, Paulo Pinto wrote: On Friday, 17 October 2014 at 01:05:37 UTC, ketmar via Digitalmars-d-learn wrote: On Fri, 17 Oct 2014 00:52:14 + MachineCode via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I don't understand. If at least it

Re: Initialising multidimensional dynamic arrays

2014-10-01 Thread Mike James via Digitalmars-d-learn
On Tuesday, 30 September 2014 at 17:22:32 UTC, Steven Schveighoffer wrote: On 9/30/14 12:40 PM, Mike James wrote: On Tuesday, 30 September 2014 at 16:07:28 UTC, ketmar via Digitalmars-d-learn wrote: auto a = new int[][](42, 69); ... You'll notice that it's actually a dynamic array of

Re: Initialising multidimensional dynamic arrays

2014-10-01 Thread Mike James via Digitalmars-d-learn
On Tuesday, 30 September 2014 at 15:57:58 UTC, Mike James wrote: Hi, How do I initialise a dynamic array of dynamic arrays? struct MyData { SysTime stamp; short[] data; this(size_t size) { data = new short[size]; } } MyDataArray mda; how to initialise mda? mda = new MyDataArray

Re: Initialising multidimensional dynamic arrays

2014-10-01 Thread Mike James via Digitalmars-d-learn
On Wednesday, 1 October 2014 at 08:08:06 UTC, ketmar via Digitalmars-d-learn wrote: On Wed, 01 Oct 2014 07:45:48 + Mike James via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: so in the constructor... this(size_t x, size_t y) { mda = new MyDataArray[](x

Initialising multidimensional dynamic arrays

2014-09-30 Thread Mike James via Digitalmars-d-learn
Hi, How do I initialise a dynamic array of dynamic arrays? struct MyData { SysTime stamp; short[] data; this(size_t size) { data = new short[size]; } } MyDataArray mda; how to initialise mda? mda = new MyDataArray ? Thanks. Regards, -=mike=-

Re: Initialising multidimensional dynamic arrays

2014-09-30 Thread Mike James via Digitalmars-d-learn
On Tuesday, 30 September 2014 at 16:07:28 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 30 Sep 2014 15:57:57 + Mike James via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: How do I initialise a dynamic array of dynamic arrays? do you mean something like this: `int

linux ipv4 multicast

2014-09-18 Thread james via Digitalmars-d-learn
I just started doing D networking today, so I may just be doing something wrong / stupid but I can not find the ip_mreq struct anywhere. I ended up just making my own in my module struct ip_mreq { in_addr imr_multiaddr; in_addr imr_interface; } And then I was able to

Re: dgui - Button continually repainting

2014-09-15 Thread Mike James via Digitalmars-d-learn
Hi Andre, I've found a solution to the repainting problem. If you tick the Disable visual themes in the compatibility tab of the program properties (associated with the program icon) the button is only repainted when the mouse cursor enters and exits the button area. Regards, -=mike=- On

Re: dgui - Button continually repainting

2014-09-10 Thread Mike James via Digitalmars-d-learn
// Please file this issue also on the dgui bibucket home page. Kind regards Andre // Done. Regards, -=mike=-

dgui - Button continually repainting

2014-09-09 Thread Mike James via Digitalmars-d-learn
Hi. I've created a graphic button as per this example on the dgui website: import dgui.all; class MyForm: Form { this() { text = An Exception was thrown...; size = Size(130, 100); // Or use `Bitmap.fromFile`:

DMD Compiler - lexer

2014-08-29 Thread Mike James via Digitalmars-d-learn
Hi, Looking at the DMD Source Guide it says The lexer transforms the file into an array of tokens. Why is this step taken instead of, say, just calling a function that returns the next token (or however many required for the look-ahead)? Regards, -=mike=-

Re: Command Line Application in D

2014-08-05 Thread Mike James via Digitalmars-d-learn
On Monday, 4 August 2014 at 22:03:24 UTC, TJB wrote: On Monday, 4 August 2014 at 21:58:09 UTC, maarten van damme via Digitalmars-d-learn wrote: I am a little bit confused as to what you want. There is a command line example at dlang.org, and there exists a program (rdmd) that compiles several