It would be nice if that cast was made implicit though.
Just realizing now that DateTime doesn't have sub-second accuracy
=/
On Wednesday, 31 December 2014 at 06:31:13 UTC, ketmar via
Digitalmars-d-learn wrote:
On Wed, 31 Dec 2014 06:03:04 +
bitwise via Digitalmars-d-learn
wrote:
How do you get the current DateTime?
Why doesn't DateTime have DateTime.now?
but it has! ;-)
auto now = cast(DateTime)Clock.currTi
On Wed, 31 Dec 2014 06:03:04 +
bitwise via Digitalmars-d-learn
wrote:
> How do you get the current DateTime?
> Why doesn't DateTime have DateTime.now?
but it has! ;-)
auto now = cast(DateTime)Clock.currTime;
signature.asc
Description: PGP signature
On Wednesday, 31 December 2014 at 06:03:06 UTC, bitwise wrote:
How do you get the current DateTime?
Why doesn't DateTime have DateTime.now?
import std.stdio;
import std.datetime;
void main()
{
writeln(Clock.currTime);
}
Frank
How do you get the current DateTime?
Why doesn't DateTime have DateTime.now?
On Friday, 26 December 2014 at 16:31:48 UTC, Nordlöw wrote:
On Friday, 26 December 2014 at 16:29:56 UTC, Nordlöw wrote:
See my update at
https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L1602
which tries to merge all the ideas into one adapting algorithm
:)
Destroy!
BTW:
1. Is
On Saturday, 27 December 2014 at 07:34:43 UTC, Tobias Pankrath
wrote:
On Friday, 26 December 2014 at 16:31:48 UTC, Nordlöw wrote:
On Friday, 26 December 2014 at 16:29:56 UTC, Nordlöw wrote:
See my update at
https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L1602
which tries to merge
On Tuesday, 30 December 2014 at 21:23:53 UTC, Kiith-Sa wrote:
On Tuesday, 30 December 2014 at 21:19:52 UTC, jklp wrote:
On Tuesday, 30 December 2014 at 21:12:38 UTC, Kiith-Sa wrote:
A few weeks/months ago someone here mentioned that it'd be
good if DUB projects linked to code.dlang.org to help
On Tuesday, 30 December 2014 at 21:19:52 UTC, jklp wrote:
On Tuesday, 30 December 2014 at 21:12:38 UTC, Kiith-Sa wrote:
A few weeks/months ago someone here mentioned that it'd be
good if DUB projects linked to code.dlang.org to help anyone
who runs into such a project quickly discover other D p
On Tuesday, 30 December 2014 at 21:19:52 UTC, jklp wrote:
On Tuesday, 30 December 2014 at 21:12:38 UTC, Kiith-Sa wrote:
A few weeks/months ago someone here mentioned that it'd be
good if DUB projects linked to code.dlang.org to help anyone
who runs into such a project quickly discover other D p
On Tuesday, 30 December 2014 at 21:12:38 UTC, Kiith-Sa wrote:
A few weeks/months ago someone here mentioned that it'd be good
if DUB projects linked to code.dlang.org to help anyone who
runs into such a project quickly discover other D projects.
MAny GitHub projects have "badges"/"shields" on
A few weeks/months ago someone here mentioned that it'd be good
if DUB projects linked to code.dlang.org to help anyone who runs
into such a project quickly discover other D projects.
MAny GitHub projects have "badges"/"shields" on top of their
READMEs - little image strips showing things like
On Tuesday, 30 December 2014 at 19:05:23 UTC, Ali Çehreli wrote:
On 12/30/2014 09:42 AM, Basile Burg wrote:
> Can a descriptor be created using my "attribute" ? How ?
Here is a quick and dirty solution:
import std.string;
struct PropertyDescriptor
{
string type;
string name;
stri
On 12/30/2014 05:17 AM, Claude wrote:
> use templates to define several methods (property
> setters) within a class to avoid some code duplication.
I just saw this post, which is essentially the same question as Basile
Burg's. I hope that a college (in France?) is teaching D and that this
is a
On 12/30/2014 09:42 AM, Basile Burg wrote:
> Can a descriptor be created using my "attribute" ? How ?
Here is a quick and dirty solution:
import std.string;
struct PropertyDescriptor
{
string type;
string name;
string memberName() @property const
{
return name ~ "_";
I have a struct used to describe a property[1].
Its standard usage is represented in this simple example:
|class Bar {
|private uint fField0;
|private izPropDescriptor!uint descrField0;
|this() {
|descrField0.define(&field0, &field0, "field0");
|}
|public void field0(
Thanks Steven and Daniel for your explanations.
mixin template opAssign(alias Field) {
void opAssign(Tin)(auto ref Tin param) @property pure
@safe
{
Field = param;
m_matrixCalculated = false;
}
}
mixin opAssign!(m_pos) pos;
I tes
Do you have any idea about deleting exe's symbol table on
windows?
I know mingw for win32 is ok. do you have any other idea about
building by DMD or or LDC2 64 bit?
Thank you.
V Tue, 30 Dec 2014 13:17:08 +
Claude via Digitalmars-d-learn
napsáno:
> Hello, I'm trying to use templates to define several methods
> (property setters) within a class to avoid some code duplication.
> Here is an attempt:
>
> class Camera
> {
> private:
> Vector4 m_pos;
> float m
On 12/30/14 8:48 AM, Steven Schveighoffer wrote:
I think it has to do with the fact that when you are defining the
aliases, m_pos for example, is an *instance* member so requires an
instance to get an alias.
What you are probably better off doing is:
void SetProperty(Tin, string Field)(ref Tin
On 12/30/14 8:17 AM, Claude wrote:
Hello, I'm trying to use templates to define several methods (property
setters) within a class to avoid some code duplication.
Here is an attempt:
class Camera
{
private:
Vector4 m_pos;
float m_fov, m_ratio, m_near, m_far;
bool m_matrixCalculated
Hello, I'm trying to use templates to define several methods
(property setters) within a class to avoid some code duplication.
Here is an attempt:
class Camera
{
private:
Vector4 m_pos;
float m_fov, m_ratio, m_near, m_far;
bool m_matrixCalculated;
public:
void SetProperty(Tin, a
22 matches
Mail list logo