On Friday, 22 January 2016 at 11:53:11 UTC, Andrea Fontana wrote:
If you declare a JSONValue like this:
JSONValue json;
then:
assert(json.type() == JSON_TYPE.NULL);
Documentation at
https://dlang.org/phobos/std_json.html#.JSONValue.type.2
suggests not to change type but to assign a new valu
On Tuesday, 19 January 2016 at 15:25:58 UTC, wobbles wrote:
On Tuesday, 19 January 2016 at 14:07:50 UTC, Borislav Kosharov
wrote:
On Monday, 18 January 2016 at 12:46:31 UTC, Jonathan M Davis
wrote:
[...]
I want to use float time in a game where I call the update
method passing the delta
On Monday, 18 January 2016 at 12:46:31 UTC, Jonathan M Davis
wrote:
In general, using floating point values with time is an
incredibly bad idea. It can certainly make sense when printing
stuff out, but using it in calculations is just asking for
trouble given all of the unnecessary imprecision
On Sunday, 17 January 2016 at 18:57:13 UTC, biozic wrote:
On Sunday, 17 January 2016 at 14:43:26 UTC, Borislav Kosharov
wrote:
Seeing that TickDuration is being deprecated and that I should
use Duration instead, I faced a problem. I need to get total
seconds like a float. Using .total!"se
Seeing that TickDuration is being deprecated and that I should
use Duration instead, I faced a problem. I need to get total
seconds like a float. Using .total!"seconds" returns a long and
if the duration is less than 1 second I get 0. My question is
whats the right way to do it. Because I saw t
I want to split a string using multiple separators. In std.array
the split function has a version where it takes a range as a
separator, but it works differently than what I want. Say if I
call it with " -> " it will search for the whole thing together.
I want to pass split a list of separators
Thanks guys that was I was looking for!
I'm using std.json for parsing json. I need to check if a
specific string key is in JSONValue.object. The first thing I
tried was:
JSONValue root = parseJSON(text);
if(root["key"].isNull == false) {
//do stuff with root["key"]
}
But that code doesn't work, because calling root["key"] will
On Tuesday, 20 August 2013 at 19:33:25 UTC, John Colvin wrote:
On Tuesday, 20 August 2013 at 19:25:56 UTC, Jonathan M Davis
wrote:
On Tuesday, August 20, 2013 20:38:52 John Colvin wrote:
On Tuesday, 20 August 2013 at 17:02:07 UTC, Jonathan M Davis
wrote:
> On Tuesday, August 20, 2013 12:54:29
How do I know which functions are CTFE? I mean from the ones in
std. I think there should be some icon or marker in the docs that
indicates which function can be called during compilation.
I remember that there was a compile time bool that checks if the
current function is called during compil
So if I want to have a string constant it is a lot better to
declare it as:
static immutable string MY_STRING = "Some string";
Because it won't be duplicated?
On Wednesday, 7 August 2013 at 22:06:16 UTC, Ali Çehreli wrote:
On 08/07/2013 08:12 AM, Borislav Kosharov wrote:
I want to send a pause command to the system like in C++:
system("pause");
Or like in Ruby: `pause`
Something like that. I searched the library, but I haven't
fo
On Thursday, 8 August 2013 at 21:49:31 UTC, Ali Çehreli wrote:
On 08/08/2013 02:45 PM, Borislav Kosharov wrote:
If I have any enum in a class is it one for all instances or
one per
instance? Also are enums one per thread or only one?
More than that. :) enums are manifest constants.
Imagine
If I have any enum in a class is it one for all instances or one
per instance? Also are enums one per thread or only one?
On Wednesday, 7 August 2013 at 15:21:43 UTC, Dicebot wrote:
On Wednesday, 7 August 2013 at 15:12:09 UTC, Borislav Kosharov
wrote:
I want to send a pause command to the system like in C++:
system("pause");
Or like in Ruby: `pause`
Something like that. I searched the library, but
I want to send a pause command to the system like in C++:
system("pause");
Or like in Ruby: `pause`
Something like that. I searched the library, but I haven't found
it. I tough that it might be std.system, but it was only to check
the OS at runtime.
16 matches
Mail list logo