http://dlang.org/phobos/std_datetime.html#StopWatch shows the use of
TickDuration to measure the time elapsed, but
http://dlang.org/phobos/core_time.html#TickDuration says TickDuration is due
to be deprecated and MonoTime should be used. It is possible to measure the
duration between two
On Tuesday, October 20, 2015 13:18:12 Shriramana Sharma via Digitalmars-d-learn
wrote:
> http://dlang.org/phobos/std_datetime.html#StopWatch shows the use of
> TickDuration to measure the time elapsed, but
> http://dlang.org/phobos/core_time.html#TickDuration says TickDuration is due
> to be
You can write a helper:
XmlNode selectSingleNode(XmlNode src, string path)
{
XmlNode[] nodes = src.parseXPath(path);
return nodes.length==0 ? null : nodes[0];
}
Then:
string test1 = node.selectSingleNode(`//instanceId`).getCData();
On Tue, 2015-10-20 at 02:19 -0700, Jonathan M Davis via Digitalmars-d-
learn wrote:
> […]
>
> auto before = MonoTime.currTime;
> // do stuff
> auto diff = MonoTime.currTime - before;
What import statement do you use to get MonoTime. I tried the above
and got an error with all the things I
On Tue, 2015-10-20 at 15:16 +0100, Russel Winder wrote:
>
[…]
> What import statement do you use to get MonoTime. I tried the above
> and got an error with all the things I tried.
Hummm… I am now not worried about the import, I tried compiling a
different way and it worked. The upshot is that I
In std.uni (D Lib 2.068.2) I can no longer see how to get the general
category code for a character. Does anyone know what the currently
supported way to do that is?
On 10/20/2015 08:48 AM, Andrea Fontana wrote:
It happens I need to perform an operation just one time (inside a
function, a loop...)
An idea that uses a function pointer where the first step does its task
and then sets the stage for the following steps:
import std.stdio;
import std.range;
On Tuesday, 20 October 2015 at 15:55:47 UTC, John Colvin wrote:
Be aware that there will be one instance of val per thread, so
you are detecting the first run in each thread, not in the
program overall.
This is the kind of thing I'm interested in.
What happens if I call isFirstTime!"test"
It happens I need to perform an operation just one time (inside a
function, a loop...)
I wonder if doing this it's a good idea or not.
bool isFirstTime(alias T)()
{
static val = true;
if (val)
{
val = false;
return true;
}
On Tuesday, 20 October 2015 at 15:48:47 UTC, Andrea Fontana wrote:
It happens I need to perform an operation just one time (inside
a function, a loop...)
I wonder if doing this it's a good idea or not.
bool isFirstTime(alias T)()
{
static val = true;
if (val)
{
On Tuesday, 20 October 2015 at 16:01:58 UTC, Andrea Fontana wrote:
On Tuesday, 20 October 2015 at 15:55:47 UTC, John Colvin wrote:
Be aware that there will be one instance of val per thread, so
you are detecting the first run in each thread, not in the
program overall.
This is the kind of
On Tuesday, 20 October 2015 at 13:23:47 UTC, opticron wrote:
I think part of the issue here is that holo isn't quite sure of
what information [s]he needs out of the XML reply and how to do
that with XPath. The first post mentioned getting instanceId
and launchTime, so I'll start there using
On Monday, 19 October 2015 at 14:51:29 UTC, Stewart Moth wrote:
I'm working with a library that has template structs of
mathematical vectors that can sometimes be the type of an array
I'm passing to a function.
The definition of the struct is like this:
struct Vector(type, int dimension_){
I think part of the issue here is that holo isn't quite sure of
what information [s]he needs out of the XML reply and how to do
that with XPath. The first post mentioned getting instanceId and
launchTime, so I'll start there using the AWS example XML found
here:
14 matches
Mail list logo