Anyone use such things effectively?
if arr is a single array the follow code works(removing [i]) but
if it is a double array it fails. arr as type double[A][B].
arr[i] has type double[A].
v ~= arr[i].map!(a=>to!string(a)~",").join;
with `Range = double[21]`
must satisfy the following constraint:
` isInputRange!(Unqua
I've tried 10 different ways with split and splitter, I've used
all the stuff that people have said online but nothing works. I
always get a template mismatch error.
Why is something so easy to do so hard in D?
auto toks = std.regex.split(l, Regex("s"));
auto toks = std.regex.splitter(l, Regex
On Saturday, 15 February 2020 at 14:35:59 UTC, Steven
Schveighoffer wrote:
On 2/15/20 6:32 AM, AlphaPurned wrote:
I've tried 10 different ways with split and splitter, I've
used all the stuff that people have said online but nothing
works. I always get a template mismatch error.
Why is someth
template AA(string[] S)
{
auto _do() { int[string] d; foreach(s; S) d[s] = 0; return d; }
enum AA = _do;
}
if (t in AA!(["a", "and", "mp4", "mp3", "the", "with", "live",
"no", "&", "of", "band"])) continue;
The if statement literally causes a 50x slow down of the code.
(LD
On Sunday, 16 February 2020 at 13:50:49 UTC, evilrat wrote:
On Sunday, 16 February 2020 at 12:57:43 UTC, AlphaPurned wrote:
template AA(string[] S)
{
auto _do() { int[string] d; foreach(s; S) d[s] = 0; return d;
}
enum AA = _do;
}
My best guess is that enum arrays(except strings) a
json has two issues, it doesn't work with tuple:
(isArray!T)
goes to
(isArray!T || (T.stringof.length > 4 && T.stringof[0..5] ==
"Tuple"))
and right below
else
{
static assert(false, text(`unable to convert type "`,
T.Stringof, `" to json`));
}
and it
On Tuesday, 18 February 2020 at 22:00:25 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 18 February 2020 at 18:05:43 UTC, AlphaPurned wrote:
json has two issues, it doesn't work with tuple:
(isArray!T)
goes to
(isArray!T || (T.stringof.length > 4 && T.stringof[0..5] ==
"Tuple"))
and righ
On Wednesday, 19 February 2020 at 08:47:04 UTC, Petar Kirov
[ZombineDev] wrote:
On Wednesday, 19 February 2020 at 08:14:34 UTC, AlphaPurned
wrote:
The first is std.json. It is broke. Doesn't work with tuples.
The change above fixes it by treating tuple as an array(same
code). It works fine.
std.regex.split(l, ctRegex!`[\s-\)\(\.]`);
I'm trying too split a string on spaces and stuff... but it is
returning empty strings and other matches(e.g., ()).
I realize I can delete afterwards but is there a direct way from
split or ctRegex?
10 matches
Mail list logo