On Wednesday, 31 July 2019 at 06:30:03 UTC, BoQsc wrote:
This can be solved by using single quotes in the argument
content places
#!/usr/bin/env rdmd
import std.stdio;
void main()
{
writeln("Content-type: text/html");
writeln("");
writeln("CGI D
Example");
}
Does the job but is a b
On Wednesday, 31 July 2019 at 05:56:46 UTC, BoQsc wrote:
what causes the Internal Server Error.
Internal Server Error might as well appear when D language syntax
is not correct.
Considering this: this example has Internal Server Error, since
writeln argument and argument content cannot cont
On Tuesday, 30 July 2019 at 21:55:00 UTC, Adam D. Ruppe wrote:
the required blank line to separate headers from content.
That's exactly what causes the Internal Server Error.
This is a working example.d
#!/usr/bin/env rdmd
import std.stdio;
void main()
{
writeln("");
}
And this one,
On Tuesday, 30 July 2019 at 20:36:18 UTC, BoQsc wrote:
writeln("Hello, world with automated script running!");
You didn't follow the cgi protocol here - you didn't output the
content type and the required blank line to separate headers from
content.
echo "Content-type: text/html"
echo '
Hello, I would like to know how to setup D language project, so
that it would work with Apache httpd cgi.
Do I need some kind of cgi library for D language? Right now all
I'm getting is internal server error.
Btw. Unix Bash script examples seems to work well with with
Apache httpd cgi, they
On Tuesday, 30 July 2019 at 05:30:30 UTC, Jonathan M Davis wrote:
In principle, it's good to use const when you know that data
isn't going to change, but that gets far more complicated when
you're dealing with generic code or even with classes, since as
soon as you use const, everything used wi
On Tuesday, 30 July 2019 at 12:06:23 UTC, Martin Krejcirik wrote:
Just be advised, this was seriously broken in the past. Depends
on windows, ms libraries, whether it's stdout or stderr and
more. Current versions are probably ok, will check. Don't count
on this to work on older windows includin
On Tuesday, 30 July 2019 at 09:46:07 UTC, Andrea Fontana wrote:
Looking at its source code, it seems it's a way to force the
call of "destroy" method of wrapped object (Context in your
case) when the struct goes out of its scope (and d-tor is
called)
Andrea
Thanks, Andrea (and rikki). I ac
On Monday, 29 July 2019 at 22:31:01 UTC, kinke wrote:
Switching the console code page to UTF-8, and then restoring
the original one before termination. See
https://github.com/ldc-developers/ldc/pull/3086/commits/5915534530fa095e7e5d58bcfb4ad100d249bbca#diff-c59e7716a40a08ce42f141c738f2c311. You
Several months ago, someone asked if I'd be covering drawing
routines and after much preparation, today's post is the first in
a series on drawing with Cairo.
You can find it here:
http://gtkdcoding.com/2019/07/30/0057-cairo-i-the-basics.html
On Tuesday, 30 July 2019 at 10:08:55 UTC, Newbie2019 wrote:
foreach(int name_index, name; __traits(allMembers, S) ) static
if( isDelegateMember!(S, name, Type) ) {
enum Rules = getUDAs!( __traits(getMember, S, name) , Rule);
// handle the member is match this rules.
}
And one more qu
On Tuesday, 30 July 2019 at 10:06:21 UTC, Newbie2019 wrote:
template isDelegateMember(S, string name, D) if(is(S == struct)
&& __traits(hasMember, S, name) && is( D == delegate ) ) {
alias Fn= typeof( __traits(getMember, S.init, name) );
static assert( isFunction!Fn );
pragma(m
I need to check on struct members is match a delegate type. for
example;
alias Type = scope void delegate(int) @nogc ;
struct S {
void onMatch1(int) scope @nogc {
}
void onNotMatch2(int) scope {
}
void onNotMatch2(int, int) scope @nogc {
}
Type not_match3;
}
On Tuesday, 30 July 2019 at 09:33:04 UTC, Ron Tarrant wrote:
Some things are almost impossible to research. For instance, in
the GtkD wrapper code—specifically the Widget.d file—the
following function definition appears:
gulong addOnDraw(bool delegate(Scoped!Context, Widget) dlg,
ConnectFla
On 30/07/2019 9:33 PM, Ron Tarrant wrote:
Some things are almost impossible to research. For instance, in the GtkD
wrapper code—specifically the Widget.d file—the following function
definition appears:
gulong addOnDraw(bool delegate(Scoped!Context, Widget) dlg,
ConnectFlags connectFlags
Some things are almost impossible to research. For instance, in
the GtkD wrapper code—specifically the Widget.d file—the
following function definition appears:
gulong addOnDraw(bool delegate(Scoped!Context, Widget) dlg,
ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signa
16 matches
Mail list logo