On 01-10-17 01:56, Psychological Cleanup wrote:
I have to display images with a few controls: alpha channel, rotation,
scaling, cropping. Generally it should be png but I want to be able to
handle many images. The images will be memory based(I'll load the file
in to memory then) and will be dis
On Saturday, 30 September 2017 at 12:42:17 UTC, Steven
Schveighoffer wrote:
[...]
https://issues.dlang.org/show_bug.cgi?id=17870
Replace
arrayT ~= rowT;
with
arrayT ~= rowT.dup;
Also, you may want to look into ndslice package [1].
[1] https://github.com/libmir/mir-algorithm
Best regards,
Ilya Yaroshenko
Works! Thanks Ilya. I'll take a look on the difference. Also soon
will get bit familiar with the mir-algorithm...
B
On Sunday, 1 October 2017 at 14:23:54 UTC, thorstein wrote:
[...]
Sorry, I'm still really confused with the results from my
function:
[...]
Replace
arrayT ~= rowT;
with
arrayT ~= rowT.dup;
Also, you may want to look into ndslice package [1].
[1] https://github.com/libmir/mir-algorith
Bes
Guyes, I obviously made a mistake. Forget my post!
Sorry, I'm still really confused with the results from my
function:
double[][] transp(double[][] array)
{
double[][] arrayT;
double[] rowT;
// initialize rowT
foreach(i; 0..array.length)
{
rowT ~= 0;
}
foreach(col; 0..arra
On Sunday, 1 October 2017 at 13:53:57 UTC, thorstein wrote:
Why is that
Thanks!
Guyes, I obviously made a mistake. Forget my post!
They are not alternatives. They are the only way of doing
things.
Yes, sounds logic - static arrays require a size before
compilation.
However, I tried another variation with a totally unexpected
result:
double[][] transp3(double[][] array)
{
double[][] arrayT;
double[] rowT;
// initi
On Sunday, 1 October 2017 at 10:07:40 UTC, thorstein wrote:
Hi,
assumed, I need the size of a dynamic array for further
processing, which is unknown at compile time. Below are my
example, which doesn't work and two alternatives.
[...]
They are not alternatives. They are the only way of doin
Hi,
assumed, I need the size of a dynamic array for further
processing, which is unknown at compile time. Below are my
example, which doesn't work and two alternatives.
Alternative1: may create large rowT-arrays depending on original
array size.
Alternative2: overrides rowT after exiting the
On Sunday, 1 October 2017 at 07:11:14 UTC, bitwise wrote:
On Sunday, 1 October 2017 at 05:57:53 UTC, Tony wrote:
"@property functions can only have zero, one or two parameters"
I am looking for an example of an @property function defined
with two parameters and the syntax for how it is accesse
On Sunday, 1 October 2017 at 06:34:56 UTC, Jonathan M Davis wrote:
On Sunday, October 01, 2017 05:57:53 Tony via
Digitalmars-d-learn wrote:
"@property functions can only have zero, one or two parameters"
I am looking for an example of an @property function defined
with two parameters and the s
On Sunday, October 01, 2017 06:32:53 Nicholas Wilson via Digitalmars-d-learn
wrote:
> On Sunday, 1 October 2017 at 06:27:21 UTC, Nicholas Wilson wrote:
> > And am getting
> > util.d(72,12): Error: template instance helper!(foo) cannot use
> > local 'foo' as parameter to non-global template
> > hel
On Sunday, 1 October 2017 at 07:21:57 UTC, ag0aep6g wrote:
else static if (is(typeof(Fields[0]) : ArrayAccesssor!(ptr,len),
alias ptr, alias len))
Ah, so close. Thanks!
On 10/01/2017 09:03 AM, Nicholas Wilson wrote:
struct ArrayAccesssor(alias ptr, alias len) {}
char * p;
size_t len;
ArrayAccesssor!(p,len) aa;
template helper(Fields...)
{
static if (Fields.length == 0)
enum helper = "";
else static if (is(typeof(Fields[0]) :
ArrayAccessso
On Sunday, 1 October 2017 at 05:57:53 UTC, Tony wrote:
"@property functions can only have zero, one or two parameters"
I am looking for an example of an @property function defined
with two parameters and the syntax for how it is accessed
without ().
And also this, which probably shouldn't ac
struct ArrayAccesssor(alias ptr, alias len) {}
char * p;
size_t len;
ArrayAccesssor!(p,len) aa;
template helper(Fields...)
{
static if (Fields.length == 0)
enum helper = "";
else static if (is(typeof(Fields[0]) :
ArrayAccesssor!(ptr,len),ptr, len)) //13
{
pragma(m
16 matches
Mail list logo