Perfect, thank you! :-) Works like a charm.
On Wednesday, 22 June 2016 at 22:41:24 UTC, H. S. Teoh wrote:
On Wed, Jun 22, 2016 at 09:57:04PM +, Andrew Chapman via
Digitalmars-d-learn wrote:
Maybe try:
if (buffer[] in myHash) { ... }
? Does that make a difference?
T
On Wednesday, 22 June 2016 at 14:17:42 UTC, Jonathan M Davis
wrote:
Well, that particular value should probably work thanks to VRP
(value range propagation), since 10 can fit into float with no
loss of precision. However, what's far more disconcerting is
that
real x = real.max;
float y = x;
On Wed, Jun 22, 2016 at 10:49:54PM +, TheDGuy via Digitalmars-d-learn wrote:
> On Wednesday, 22 June 2016 at 22:25:21 UTC, lmpo wrote:
> > On Wednesday, 22 June 2016 at 22:10:09 UTC, TheDGuy wrote:
> > > Hi,
> > >
> > > i am currently programming a small game with GTKD and i have to
> > > use
On Wed, Jun 22, 2016 at 10:25:21PM +, lmpo via Digitalmars-d-learn wrote:
> On Wednesday, 22 June 2016 at 22:10:09 UTC, TheDGuy wrote:
> > Hi,
> >
> > i am currently programming a small game with GTKD and i have to use
> > a Dlist because an array is static
>
> Static ? An array is not static
On Wednesday, 22 June 2016 at 22:25:21 UTC, lmpo wrote:
On Wednesday, 22 June 2016 at 22:10:09 UTC, TheDGuy wrote:
Hi,
i am currently programming a small game with GTKD and i have
to use a Dlist because an array is static
Static ? An array is not static. a DList is only interesting
when you
On Wed, Jun 22, 2016 at 09:57:04PM +, Andrew Chapman via
Digitalmars-d-learn wrote:
> Hi everyone, just wanting some help with optimisation if anyone is
> kind enough :-)
>
> I have a loop that iterates potentially millions of times, and inside
> that loop I have code that appends some string
On Wednesday, 22 June 2016 at 22:10:09 UTC, TheDGuy wrote:
Hi,
i am currently programming a small game with GTKD and i have to
use a Dlist because an array is static
Static ? An array is not static. a DList is only interesting when
you have to insert or remove inside the list i.e not at the
On 06/22/2016 02:57 PM, Andrew Chapman wrote:
> Code such as:
>
> if(buffer in myHash) {
>
> }
>
> throws an access violation. A string value works without error.
Does it throw an exception? Can you reproduce the issue with a short
program?
Ali
Hi,
i am currently programming a small game with GTKD and i have to
use a Dlist because an array is static but i want to add user
inputs dynamically to a list. Now i am wondering how i can get a
specific item from that list? I read that this isn't possible but
is it possible to convert that D
Hi everyone, just wanting some help with optimisation if anyone
is kind enough :-)
I have a loop that iterates potentially millions of times, and
inside that loop I have code that appends some strings together,
e.g.:
string key = s1 ~ "_" ~ s2;
I discovered that due to the memory allocation
On Wednesday, 22 June 2016 at 09:27:01 UTC, cym13 wrote:
what i meant is that "{}" should be fully equivalent to
"Struct()" ctor in terms of calling postblits, and it isn't.
On Wednesday, 22 June 2016 at 09:27:01 UTC, cym13 wrote:
On the other hand I don't see why you'd expect {} to call
postblit at
all.
'cause it essentially makes a copy. i gave the sample in
bugreport. it worth me a hour of debugging to find why my
refcounted struct keep crashing with invalid
On Wednesday, 22 June 2016 at 17:50:53 UTC, Mike Wey wrote:
"Type T wraps should match the type of the data"
Does string match the type of the data? What is the type of
the data?
How do i tell the function that i want the Array as a string
array? I am
not familiar with Types and what 'TC' or
On Wednesday, 22 June 2016 at 17:52:26 UTC, Ali Çehreli wrote:
On 06/22/2016 10:07 AM, Andre Pany wrote:
> Hi,
>
> I thought a mixin template is copied into the place where the
mixin
> statement
> exists and then the coding is evaluated.
> This seems not to be true for __FILE__
Apparently its th
On Wednesday, 22 June 2016 at 05:34:33 UTC, Mike Parker wrote:
On Wednesday, 22 June 2016 at 03:06:29 UTC, moe wrote:
I meant like this:
- PluginContract // not a dub project, just some folder
-- iplugin.d
- TestApp // all files for the app (separate project)
-- packages
DerelictUtil-mas
On 06/22/2016 10:07 AM, Andre Pany wrote:
> Hi,
>
> I thought a mixin template is copied into the place where the mixin
> statement
> exists and then the coding is evaluated.
> This seems not to be true for __FILE__
Apparently its the whole template that supports that. Is moving the
'file' param
On 06/22/2016 05:16 PM, TheDGuy wrote:
On Wednesday, 22 June 2016 at 13:47:01 UTC, Gerald wrote:
On Wednesday, 22 June 2016 at 12:57:51 UTC, TheDGuy wrote:
widget.getStyleContext().listClasses() to get a list of all classes
assigned to the widget. If you just want to see if a specific class
is
On Wednesday, 22 June 2016 at 13:36:54 UTC, Marc Schütz wrote:
On Tuesday, 21 June 2016 at 19:21:01 UTC, Gary Willoughby wrote:
Right ok, thanks! It doesn't seem to help though as the
compiler complains about it being not @nogc.
You probably need to declare the delegate and opApply() itself
a
Hi,
I thought a mixin template is copied into the place where the
mixin statement
exists and then the coding is evaluated.
This seems not to be true for __FILE__
I have a module form, which has a class Form. This module also
contains
following mixin template
mixin template formTemplate()
{
On Wednesday, 22 June 2016 at 15:46:15 UTC, Thalamus wrote:
On Wednesday, 22 June 2016 at 15:43:08 UTC, Basile B. wrote:
On Wednesday, 22 June 2016 at 15:15:51 UTC, Thalamus wrote:
[...]
No need for a constructor. typeid() returns a static instance
that's pre-allocated.
[...]
Thanks Basi
On Wednesday, 22 June 2016 at 15:43:08 UTC, Basile B. wrote:
On Wednesday, 22 June 2016 at 15:15:51 UTC, Thalamus wrote:
[...]
No need for a constructor. typeid() returns a static instance
that's pre-allocated.
[...]
Thanks Basile.
On Wednesday, 22 June 2016 at 15:15:51 UTC, Thalamus wrote:
Hi everyone,
My project includes lots of .Net interop via C linkage. One of
the things I need to do is refer in C# to an interface declared
in the D code, and then to actually work with the interface
concretely in the D layer. So, I
On Wednesday, 22 June 2016 at 13:47:01 UTC, Gerald wrote:
On Wednesday, 22 June 2016 at 12:57:51 UTC, TheDGuy wrote:
widget.getStyleContext().listClasses() to get a list of all
classes assigned to the widget. If you just want to see if a
specific class is assigned to the widget you can use
wid
Hi everyone,
My project includes lots of .Net interop via C linkage. One of
the things I need to do is refer in C# to an interface declared
in the D code, and then to actually work with the interface
concretely in the D layer. So, I need to get a TypeInfo_Interface
object from a string passed
On Tuesday, June 21, 2016 19:17:00 Joerg Joergonson via Digitalmars-d-learn
wrote:
> Stopwatch depends on TickDuration and TickDuration is depreciated
> yet Stopwatch isn't and hasn't been converted to MonoTime...
> makes sense?
TickDuration does have a note in its documentation about how it's _g
On Wednesday, June 22, 2016 05:04:42 Tofu Ninja via Digitalmars-d-learn wrote:
> Is this intended behavior? I can't seem to find it documented
> anywhere, I would think the loss in precision would atleast be a
> warning.
>
> real x = 10;
> float y = x; // No error or warning
>
> real to double and
On Wednesday, 22 June 2016 at 12:57:51 UTC, TheDGuy wrote:
widget.getStyleContext().listClasses() to get a list of all
classes assigned to the widget. If you just want to see if a
specific class is assigned to the widget you can use
widget.getStyleContext().hasClass()
Thanks a lot for your an
On Tuesday, 21 June 2016 at 19:21:01 UTC, Gary Willoughby wrote:
Right ok, thanks! It doesn't seem to help though as the
compiler complains about it being not @nogc.
You probably need to declare the delegate and opApply() itself as
@nogc, too:
int opApply(scope int delegate(int) @nogc dg) @n
On Wednesday, 22 June 2016 at 13:24:47 UTC, vladdeSV wrote:
On Wednesday, 22 June 2016 at 12:47:31 UTC, TheDGuy wrote:
On Wednesday, 22 June 2016 at 12:45:29 UTC, TheDGuy wrote:
I have an array of buttons:
class Window : MainWindow{
private Button[4] bArr;
this(){
Button btn_1
On Wednesday, 22 June 2016 at 12:47:31 UTC, TheDGuy wrote:
On Wednesday, 22 June 2016 at 12:45:29 UTC, TheDGuy wrote:
I have an array of buttons:
class Window : MainWindow{
private Button[4] bArr;
this(){
Button btn_1 = new Button();
Button btn_2 = new Button();
On Wednesday, 22 June 2016 at 08:57:38 UTC, Guillaume Piolat
wrote:
On Wednesday, 22 June 2016 at 05:04:42 UTC, Tofu Ninja wrote:
Is this intended behavior? I can't seem to find it documented
anywhere, I would think the loss in precision would atleast be
a warning.
real x = 10;
float y = x; /
On Wednesday, 22 June 2016 at 12:47:31 UTC, TheDGuy wrote:
On Wednesday, 22 June 2016 at 12:45:29 UTC, TheDGuy wrote:
I have an array of buttons:
class Window : MainWindow{
private Button[4] bArr;
this(){
Button btn_1 = new Button();
Button btn_2 = new Button();
widget.getStyleContext().listClasses() to get a list of all
classes assigned to the widget. If you just want to see if a
specific class is assigned to the widget you can use
widget.getStyleContext().hasClass()
Thanks a lot for your answer. Do you know how i can get the first
classname as stri
On Wednesday, 22 June 2016 at 12:45:29 UTC, TheDGuy wrote:
I have an array of buttons:
class Window : MainWindow{
private Button[4] bArr;
this(){
Button btn_1 = new Button();
Button btn_2 = new Button();
Button btn_3 = new Button();
Button btn_4 = new Butt
I have an array of buttons:
class Window : MainWindow{
private Button[4] bArr;
this(){
Button btn_1 = new Button();
Button btn_2 = new Button();
Button btn_3 = new Button();
Button btn_4 = new Button();
Button[4] bArr = [btn_1,btn_2,btn_3,btn_4];
On Wednesday, 22 June 2016 at 08:08:20 UTC, TheDGuy wrote:
Hello,
i would like to know if it possible to get the CSS-class which
is asigned to a button (for example)? I didn't find any
documentation about this, just the function
"getStyleContext().getProperty()", my current attempt:
Value va
On Wednesday, 22 June 2016 at 08:06:26 UTC, ketmar wrote:
On Wednesday, 22 June 2016 at 06:43:12 UTC, Paul wrote:
Why is initialisation via {} bad (in simple terms please :D)?
first, it is buggy. i.e. it doesn't always call postblit[1].
second, it's syntax is the same as the syntax of argumen
On Wednesday, 22 June 2016 at 05:04:42 UTC, Tofu Ninja wrote:
Is this intended behavior? I can't seem to find it documented
anywhere, I would think the loss in precision would atleast be
a warning.
real x = 10;
float y = x; // No error or warning
real to double and double to float also work.
On Wednesday, 22 June 2016 at 08:07:51 UTC, David Nadlinger wrote:
What about
http://dlang.org/phobos/std_algorithm_searching.html#.canFind.canFind.2?
My mistake. The reason for the template error message was another
than I though of. Thanks.
On Wednesday, 22 June 2016 at 08:04:34 UTC, Nordlöw wrote:
Is there now algorithm (similar to `canFind`) that can search
for a `T` in a `T[]`? Existing `canFind` only supports
sub-sequence needles.
I'm aware of `std.string.indexOf` but that's only for strings.
I don't see why canFind isn't g
On Wednesday, 22 June 2016 at 06:43:12 UTC, Paul wrote:
Why is initialisation via {} bad (in simple terms please :D)?
first, it is buggy. i.e. it doesn't always call postblit[1].
second, it's syntax is the same as the syntax of argument-less
lambda, which makes it context-dependent -- so read
Hello,
i would like to know if it possible to get the CSS-class which is
asigned to a button (for example)? I didn't find any
documentation about this, just the function
"getStyleContext().getProperty()", my current attempt:
Value value;
bArr[0].getStyleContext().getProperty("Class",StateFlag
On Wednesday, 22 June 2016 at 08:04:34 UTC, Nordlöw wrote:
Is there now algorithm (similar to `canFind`) that can search
for a `T` in a `T[]`? Existing `canFind` only supports
sub-sequence needles.
What about
http://dlang.org/phobos/std_algorithm_searching.html#.canFind.canFind.2?
— David
Is there now algorithm (similar to `canFind`) that can search for
a `T` in a `T[]`? Existing `canFind` only supports sub-sequence
needles.
I'm aware of `std.string.indexOf` but that's only for strings.
I am wondering if it is possible to get the name of the current
CSS-class the button is asigned to?
45 matches
Mail list logo