On Wednesday, July 22, 2015 04:29:23 Taylor Gronka via Digitalmars-d-learn
wrote:
> I have a template function, and I want it to do something if the
> input variable is a list of structs, and something else if the
> input is a struct.
If you want a template to be different for different types, th
On Wednesday, July 22, 2015 02:19:52 antropod via Digitalmars-d-learn wrote:
> I want my coverage analysis to be 100%, how do I skip lines like
> assert(0);
> from being counted?
AFAIK, there is no way to so, and I've mentioned that problem to Walter
before, so I would have expected him to mention
On Wednesday, 22 July 2015 at 05:02:59 UTC, Timon Gehr wrote:
template Uks(T){
T query(string q){
T result;
static if(is(T==S[],S)){
ulong test=result.length;
// append
S newResult;
result~=newResult;
}else{
/
On 07/22/2015 06:29 AM, Taylor Gronka wrote:
Hi,
I have a template function, and I want it to do something if the input
variable is a list of structs, and something else if the input is a struct.
1) What's the best way to test this? I suppose I can call
__traits(identifier, results) and look at
Hi,
I have a template function, and I want it to do something if the
input variable is a list of structs, and something else if the
input is a struct.
1) What's the best way to test this? I suppose I can call
__traits(identifier, results) and look at the last two characters.
2) If `T` is a l
I want my coverage analysis to be 100%, how do I skip lines like
assert(0);
from being counted?
On Tuesday, 21 July 2015 at 16:34:35 UTC, Spacen Jasset wrote:
On Tuesday, 21 July 2015 at 15:17:13 UTC, Alex Parrill wrote:
On Tuesday, 21 July 2015 at 14:51:47 UTC, John Colvin wrote:
Isn't glu considered legacy these days? I think it's entirely
OpenGL 2.x. For the maths stuff see
http://cod
On Tuesday, 21 July 2015 at 21:44:07 UTC, rsw0x wrote:
On Sunday, 19 July 2015 at 17:12:07 UTC, rsw0x wrote:
[...]
wow, I don't even remember posting this.
This is (mostly) wrong, but I'm unsure if a pointer to another
pointer on the stack would correctly keep its object alive(but,
I believ
On Sunday, 19 July 2015 at 17:12:07 UTC, rsw0x wrote:
On Sunday, 19 July 2015 at 17:04:07 UTC, Frank Pagliughi wrote:
[...]
Oh, yes, pointer. Ha! I didn't even think of that. Thanks.
I'm not familiar with how garbage collection works in D. If
the initial reference goes out of scope, and you
On Sunday, 19 July 2015 at 17:12:07 UTC, rsw0x wrote:
a pointer to a pointer(or in this case, a reference) does not
keep it alive.
Interesting. If you de-reference the pointer and assign it back,
do you get back the keep-alive? Like, in the receiving thread:
void threadFunc()
{
receive
thx
On Tuesday, 21 July 2015 at 18:55:53 UTC, ddos wrote:
On Tuesday, 21 July 2015 at 17:58:55 UTC, Gary Willoughby wrote:
On Tuesday, 21 July 2015 at 17:23:30 UTC, ddos wrote:
How do i sanitize a string for database query?
Is there some builtin function?
thx :)
Use prepared statements instead.
On Tuesday, 21 July 2015 at 18:55:53 UTC, ddos wrote:
On Tuesday, 21 July 2015 at 17:58:55 UTC, Gary Willoughby wrote:
On Tuesday, 21 July 2015 at 17:23:30 UTC, ddos wrote:
How do i sanitize a string for database query?
Is there some builtin function?
thx :)
Use prepared statements instead.
On Tuesday, 21 July 2015 at 17:58:55 UTC, Gary Willoughby wrote:
On Tuesday, 21 July 2015 at 17:23:30 UTC, ddos wrote:
How do i sanitize a string for database query?
Is there some builtin function?
thx :)
Use prepared statements instead.
https://en.wikipedia.org/wiki/Prepared_statement
thx
On Tuesday, 21 July 2015 at 17:23:30 UTC, ddos wrote:
How do i sanitize a string for database query?
Is there some builtin function?
thx :)
Use prepared statements instead.
https://en.wikipedia.org/wiki/Prepared_statement
On Tuesday, 21 July 2015 at 17:23:30 UTC, ddos wrote:
How do i sanitize a string for database query?
You generally shouldn't even try, instead use the database
functions that bind parameters to the procedure.
Is there some builtin function?
It is different for each database target.
How do i sanitize a string for database query?
Is there some builtin function?
thx :)
On Tuesday, 21 July 2015 at 15:17:13 UTC, Alex Parrill wrote:
On Tuesday, 21 July 2015 at 14:51:47 UTC, John Colvin wrote:
Isn't glu considered legacy these days? I think it's entirely
OpenGL 2.x. For the maths stuff see
http://code.dlang.org/packages/gl3n
Yep. It still uses immediate mode, G
On 2015-07-21 14:24, yawniek wrote:
done, https://github.com/jacob-carlborg/dstep/issues/40
i was under the impression that there is already a ticked as
https://github.com/jacob-carlborg/dstep/issues/8
looks very similar (but was closed).
Yeah, looks very similar. Issue 8 i still open and has
On Tuesday, 21 July 2015 at 14:51:47 UTC, John Colvin wrote:
Isn't glu considered legacy these days? I think it's entirely
OpenGL 2.x. For the maths stuff see
http://code.dlang.org/packages/gl3n
Yep. It still uses immediate mode, GL matrix functions, and all
sorts of other stuff removed in Op
On Tuesday, 21 July 2015 at 12:26:30 UTC, Spacen Jasset wrote:
It seems that Derelict3 contains GLUT whereas derelict2
containss GLU.
It appears I need GLU but I am somewhat confused as to what the
diffrence is.
Whoops, yes you are right, my mistake.
Isn't glu considered legacy these days?
On Tuesday, 21 July 2015 at 12:40:37 UTC, Daniel Kozák wrote:
static:
char[size] buf;
somefun(param1, buf.ptr, buf.length);
still works there too. That's the form I prefer to use.
On Tue, 21 Jul 2015 12:27:55 +
"yawniek" wrote:
> whats the proper way to use/wrap C functions that expect a error
> string buffer
> e.g.:
> somefun(T param1, char* errstr, size_t errstr_size)
> in D ?
>
dynamic:
auto buf = new char[size];
somefun(param1, buf.ptr, buf.length);
or
some
On Tuesday, 21 July 2015 at 11:08:00 UTC, Rikki Cattermole wrote:
On 21/07/2015 10:36 p.m., Baz wrote:
[...]
I'll summarize what my friend is saying.
netsh is potentially going away. Don't use it if you can.
Since you are using a localized system it, it may be causing
issues for the interfac
It seems that Derelict3 contains GLUT whereas derelict2 containss
GLU.
It appears I need GLU but I am somewhat confused as to what the
diffrence is.
whats the proper way to use/wrap C functions that expect a error
string buffer
e.g.:
somefun(T param1, char* errstr, size_t errstr_size)
in D ?
On Tuesday, 21 July 2015 at 06:12:53 UTC, Jacob Carlborg wrote:
what the correct way to bind these?
Please report an issue for this. In this case
"rd_kafka_metadata_t" should be used for the struct name.
done, https://github.com/jacob-carlborg/dstep/issues/40
i was under the impression that
On Tuesday, 21 July 2015 at 11:08:00 UTC, Rikki Cattermole wrote:
Lastly, this is half good news and half bad news. We have found
a way[2] through WMI/COM to enable/disable them. Although I've
never gone the path of COM let alone WMI which could be a
rather mess to deal with in D. May be easier
http://forum.dlang.org/post/oyzgbvdzyjmupkduz...@forum.dlang.org
- maybe related
On Tuesday, 21 July 2015 at 11:03:47 UTC, Baz wrote:
Mmmmh i see, you think that t will be on TLS like this ?
I thought it passes some weird value, that sleep doesn't like.
But i'll test later, actually the cras
On Tuesday, 21 July 2015 at 11:23:23 UTC, John Colvin wrote:
On Tuesday, 21 July 2015 at 11:08:13 UTC, Spacen Jasset wrote:
Hello,
Can anyone tell me if the GLU functions, gluSpehere etc are
availble in DerelictOrg or have they been removed. I can
replace these with my own versions, but was h
On Tuesday, 21 July 2015 at 11:08:13 UTC, Spacen Jasset wrote:
Hello,
Can anyone tell me if the GLU functions, gluSpehere etc are
availble in DerelictOrg or have they been removed. I can
replace these with my own versions, but was hoping to do a
quick port to DerelictOrg
They are not availa
On 21/07/2015 11:08 p.m., Spacen Jasset wrote:
Hello,
Can anyone tell me if the GLU functions, gluSpehere etc are availble in
DerelictOrg or have they been removed. I can replace these with my own
versions, but was hoping to do a quick port to DerelictOrg
https://github.com/DerelictOrg?utf8=%E
On 21/07/2015 10:36 p.m., Baz wrote:
On Tuesday, 21 July 2015 at 10:28:27 UTC, Rikki Cattermole wrote:
On 21/07/2015 10:14 p.m., Baz wrote:
---
import std.process;
import core.thread;
import std.random;
void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au r
Hello,
Can anyone tell me if the GLU functions, gluSpehere etc are
availble in DerelictOrg or have they been removed. I can replace
these with my own versions, but was hoping to do a quick port to
DerelictOrg
On Tuesday, 21 July 2015 at 10:41:54 UTC, Kagamin wrote:
try this:
import std.process, std.stdio;
import core.thread;
import std.random;
void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au
réseau local\" Enable";
string off = "netsh interface set interf
try this:
import std.process, std.stdio;
import core.thread;
import std.random;
void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au
réseau local\" Enable";
string off = "netsh interface set interface \"Connexion au
réseau local\" Disable";
while(t
On Tuesday, 21 July 2015 at 10:28:27 UTC, Rikki Cattermole wrote:
On 21/07/2015 10:14 p.m., Baz wrote:
---
import std.process;
import core.thread;
import std.random;
void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au
réseau
local\" Enable";
string o
On 21/07/2015 10:14 p.m., Baz wrote:
---
import std.process;
import core.thread;
import std.random;
void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au réseau
local\" Enable";
string off = "netsh interface set interface \"Connexion au réseau
local\" Dis
---
import std.process;
import core.thread;
import std.random;
void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au
réseau local\" Enable";
string off = "netsh interface set interface \"Connexion au
réseau local\" Disable";
while(true)
{
39 matches
Mail list logo