On Thursday, 1 May 2014 at 22:23:22 UTC, Ga wrote:
And I am getting a "error LNK2019: unresolved external symbol
GetDeviceCaps referenced in function _Dmain"
have you linked gdi32.lib?
On 05/02/14 00:24, "Nordlöw" via Digitalmars-d-learn wrote:
> How can I make `join` variadic (by filling in njoin) in the following code?
import std.array, std.range, std.algorithm;
import std.stdio;
template Njoin(ES...) {
mixin({
string r = "enum Njoin { ";
fore
Nordlöw:
How can I make `join` variadic (by filling in njoin) in the
following code?
When you have a D tuple (not Phobos tuple), and it contains
values all of the same type, you can turn it into an array with
just:
[mytuple]
Once you have an array of strings, you can use the normal phobos
How can I make `join` variadic (by filling in njoin) in the
following code?
import std.stdio: writeln;
import std.traits;
string enumsHelper(S...)(S s)
{
typeof(return) r;
foreach (i, e; s)
{
if (i >= 1)
r ~= ", ";
r ~= e;
}
return r;
}
/** Join/
I have the following code:
import std.stdio;
version(Windows)
{
extern(Windows)
{
nothrow
{
alias void *HANDLE;
alias HANDLE HDC;
int GetDeviceCaps(HDC, int);
}
Here you go, https://github.com/yazd/elf-d.
Thanks!
On Thursday, 1 May 2014 at 13:10:33 UTC, Nordlöw wrote:
again, it is quite simplistic). If you specify what you need a
bit more, I might be able to provide that.
Please, post :)
Here you go, https://github.com/yazd/elf-d.
On Thursday, 1 May 2014 at 08:08:37 UTC, Tim wrote:
... the CPU usage goes up. I think that SocketShutdown.BOTH
causes Socket.select to fail which results in an endless loop.
Any suggestions how to handle that problem?
It shouldn't be here, disconnect would affect the new socket, and
you're c
again, it is quite simplistic). If you specify what you need a
bit more, I might be able to provide that.
Please, post :)
I have some simple proof of concept code. It is currently able
to read elf64 (can be easily adjusted to read elf32 too)
headers, extract sections and read string tables. If this is
what you need, then I'll upload my code somewhere (although
again, it is quite simplistic). If you specify what yo
On Thursday, 1 May 2014 at 11:38:50 UTC, Nordlöw wrote:
Have anybody put together some D code for reading out tables
from ELF files?
A range/slice based version would be nice.
I have some simple proof of concept code. It is currently able to
read elf64 (can be easily adjusted to read elf32 t
Jonathan M Davis:
If you want it to be guaranteed, you'd do something like
template foo(string s)
{
enum foo = s ~ " betty";
}
A more general solution is to wrap the concatenation with a call
to:
alias ctEval(alias expr) = expr;
Use:
string bar() { return ctEval!(s ~ " betty"); }
By
On Thu, 01 May 2014 11:12:41 +
anonymous via Digitalmars-d-learn
wrote:
> On Thursday, 1 May 2014 at 10:42:36 UTC, Unwise wrote:
> > In the following example from the documentation, are strings
> > concatenated at compile time?
> >
> > template foo(string s) {
> > string bar() { return s ~
On Thursday, 1 May 2014 at 11:38:50 UTC, Nordlöw wrote:
Have anybody put together some D code for reading out tables
from ELF files?
A range/slice based version would be nice.
I don't know this though, in the morning Ubuntu has showed
updates. One of them was "libelf" which says in its descr
Have anybody put together some D code for reading out tables from
ELF files?
A range/slice based version would be nice.
On Thursday, 1 May 2014 at 10:42:36 UTC, Unwise wrote:
In the following example from the documentation, are strings
concatenated at compile time?
template foo(string s) {
string bar() { return s ~ " betty"; }
}
void main() {
writefln("%s", foo!("hello").bar()); // prints: hello betty
}
I
In the following example from the documentation, are strings
concatenated at compile time?
template foo(string s) {
string bar() { return s ~ " betty"; }
}
void main() {
writefln("%s", foo!("hello").bar()); // prints: hello betty
}
On Thu, 01 May 2014 09:56:49 +0100, FrankLike <1150015...@qq.com> wrote:
On Monday, 14 April 2014 at 17:13:56 UTC, FrankLike wrote:
My advice - use ODBC, it is the fastest way you may connect to the SQL
server, and you already have everything you need for that. :)
Regards
I have test the
On Monday, 14 April 2014 at 17:13:56 UTC, FrankLike wrote:
My advice - use ODBC, it is the fastest way you may connect to
the SQL server, and you already have everything you need for
that. :)
Regards
I have test the d\dmd2\windows\lib\odbc32.lib,the size is 4.5kb,
I test it by test.d(build
On Thursday, 1 May 2014 at 08:08:37 UTC, Tim wrote:
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the
operating system will put your th
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the operating
system will put your thread on hold until a new connection
comes in. Withou
21 matches
Mail list logo