On 01/12/2018 06:50 PM, Venkat wrote:
> Sorry about all these posts. Wish there were an edit button.
That's ok. :) These are actually newsgroups (see NNTP protocol).
Newsgroups don't have any edit functionality. The "forum" is just a web
interface to newsgroups.
Ali
Going beyond the connection, there are various other libpq
functions that use a similar pattern of values passed using
multiple parallel C arrays, e.g.,
PGresult *PQexecParams(PGconn *conn,
const char *command,
int nParams,
On Saturday, 13 January 2018 at 04:26:06 UTC, Adam D. Ruppe wrote:
If and only if the values are known at compile time, you can do:
const char** keywords = ["hostaddr".ptr, "port".ptr,
"dbname".ptr, null].ptr;
or even do it inline:
PQconnectdbParams(["hostaddr".ptr, "port".ptr,
On Saturday, 13 January 2018 at 04:17:02 UTC, Joe wrote:
It only compiled after I removed the second 'const' in the
first and second arguments.
Yeah, D's const applies down the chain automatically, so you
don't write it twice there.
string[] keywords = ["hostaddr", "port", "dbname"];
I'm trying to learn how to use D to connect (and send queries) to
Postgres, i.e., libpq in C. Postgres has three families of
connection functions: PQsetdbLogin which takes multiple
individual arguments (all as const char *), PQconnectdb which
takes a single connection string (which Postgres
On Saturday, 13 January 2018 at 01:07:24 UTC, Marc wrote:
On Friday, 12 January 2018 at 22:03:53 UTC, H. S. Teoh wrote:
On Fri, Jan 12, 2018 at 10:03:40PM +, Marc via
Digitalmars-d-learn wrote:
How do I use?
> static foreach(enum string member; members) {
>static
Sorry about all these posts. Wish there were an edit button. I
meant PreparedStatement in mysqlddbc driver, not HibernateD.
I think there is a bug with PreparedStatement class in
HibernateD. ddbc fails when I use a PreparedStatement. The code
below shows that. I will create an issue with HibernateD.
int main(string[] args) {
string url =
"mysql://localhost:3306/webmarx?user=webmarx_dev,password=webm@rx";
On Friday, 12 January 2018 at 22:03:53 UTC, H. S. Teoh wrote:
On Fri, Jan 12, 2018 at 10:03:40PM +, Marc via
Digitalmars-d-learn wrote:
How do I use?
> static foreach(enum string member; members) {
>static if(isFunction!(__traits(getMember, C, member))) {
>
On Friday, 12 January 2018 at 08:55:13 UTC, Rene Zwanenburg wrote:
Hard to guess what the issue is, I'd attach a debugger to see
where it crashes.
It fails at the sql() method in Command struct in
mysql-native-1.1.4/mysql-native/source/mysql/commands.d. This is
what gdb says when I do a disp
On Friday, 12 January 2018 at 12:41:34 UTC, Mike Parker wrote:
I see now. I glossed right over that execution output. On
Windows, I don't recall ever seeing a dub exception from dub
from a segfault. Just checked by accessing a null pointer and
there's nothing thrown from dub. Is that a Linux
On Fri, Jan 12, 2018 at 10:03:40PM +, Marc via Digitalmars-d-learn wrote:
> How do I use?
>
> > static foreach(enum string member; members) {
> > static if(isFunction!(__traits(getMember, C, member))) {
> > continue;
> > }
>
How do I use?
static foreach(enum string member; members) {
static if(isFunction!(__traits(getMember, C, m ember)))
{
continue;
}
give error:
must use labeled continue within static foreach
then I tried:
On Fri, Jan 12, 2018 at 08:46:50PM +, WhatMeWorry via Digitalmars-d-learn
wrote:
[...]
> I hate to keep being a bother, but my project with the below static
> this() now compiles fine, but aborts during runtime with a "a problem
> caused the program to stop working ..."
Is there a way to get
On Thursday, 11 January 2018 at 23:29:30 UTC, Adam D. Ruppe wrote:
On Thursday, 11 January 2018 at 23:20:44 UTC, WhatMeWorry wrote:
When I simply move the array out of main() but still in app.d,
the compiler returns
Error: expression ["SCRATCH":Track("scratch.wav",
cast(Sound)1, 0, null),...
On Fri, Jan 12, 2018 at 10:49:45AM -0800, H. S. Teoh via Digitalmars-d-learn
wrote:
> On Fri, Jan 12, 2018 at 11:09:47AM +, kdevel via Digitalmars-d-learn
> wrote:
> [...]
[...]
> > https://issues.dlang.org/show_bug.cgi?id=18232
>
> Yep, definitely a codegen bug. Apparently, local
On Friday, 12 January 2018 at 05:14:12 UTC, Jonathan M Davis
wrote:
On Thursday, January 11, 2018 14:07:18 Ali Çehreli via
Digitalmars-d-learn wrote:
[...]
And if all what you're doing is printing the value out, you
might as well just print the Duration directly rather than
calling total.
On Fri, Jan 12, 2018 at 11:09:47AM +, kdevel via Digitalmars-d-learn wrote:
[...]
> On Friday, 12 January 2018 at 02:16:39 UTC, Adam D. Ruppe wrote:
[...]
> > I'd file this as a compiler codegen bug.
>
> https://issues.dlang.org/show_bug.cgi?id=18232
Yep, definitely a codegen bug.
On Friday, 12 January 2018 at 18:50:10 UTC, Basile B. wrote:
On Friday, 12 January 2018 at 17:58:30 UTC, Stefan Koch wrote:
On Friday, 12 January 2018 at 14:13:22 UTC, Basile B. wrote:
I have a simple program that only compiles if the dependency
is not pre-compiled as a static library. It
On Friday, 12 January 2018 at 14:13:22 UTC, Basile B. wrote:
I have a simple program that only compiles if the dependency is
not pre-compiled as a static library. It worked fine before.
Please test this
---
if [ ! -d "iz" ]; then
git clone https://www.github.com/BBasile/iz.git
fi
cd
On Wednesday, 10 January 2018 at 20:53:24 UTC, Anonymouse wrote:
None of the (version specifiers in the) build configurations I
have touch upon the part of the fairly innocent code mentioned
in the error message, if I'm reading it right.
On Friday, 12 January 2018 at 13:04:30 UTC, aliak wrote:
On Friday, 12 January 2018 at 10:55:53 UTC, Seb wrote:
On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote:
Hi, so basically is there a way to:
void func(alias pred = null, Range)(Range range) {
// 1) check if
I have a simple program that only compiles if the dependency is
not pre-compiled as a static library. It worked fine before.
Please test this
---
if [ ! -d "iz" ]; then
git clone https://www.github.com/BBasile/iz.git
fi
cd iz/scripts
sh compile.sh
cd ../
#fails to link
dmd
On Friday, 12 January 2018 at 12:57:37 UTC, kdevel wrote:
On Friday, 12 January 2018 at 12:45:59 UTC, kdevel wrote:
suffix.d
```
void main ()
{
real r = 1.L;
float f = 1.f;
}
```
$ dmd suffix.d
suffix.d(3): Error: no property 'L' for type 'int'
suffix.d(4): Error: no property 'f' for
On Friday, 12 January 2018 at 10:55:53 UTC, Seb wrote:
On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote:
Hi, so basically is there a way to:
void func(alias pred = null, Range)(Range range) {
// 1) check if pred(ElementType!Range.init,
ElementType!Range.init) is equality
// 2)
On Friday, 12 January 2018 at 08:18:02 UTC, Simen Kjærås wrote:
On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote:
Hi, so basically is there a way to:
void func(alias pred = null, Range)(Range range) {
// 1) check if pred(ElementType!Range.init,
ElementType!Range.init) is equality
On Friday, 12 January 2018 at 12:45:59 UTC, kdevel wrote:
suffix.d
```
void main ()
{
real r = 1.L;
float f = 1.f;
}
```
$ dmd suffix.d
suffix.d(3): Error: no property 'L' for type 'int'
suffix.d(4): Error: no property 'f' for type 'int'
According to the grammar in
suffix.d
```
void main ()
{
real r = 1.L;
float f = 1.f;
}
```
$ dmd suffix.d
suffix.d(3): Error: no property 'L' for type 'int'
suffix.d(4): Error: no property 'f' for type 'int'
According to the grammar in dmd2/html/d/spec/lex.html both are
valid FloatLiterals. Any comments?
On Friday, 12 January 2018 at 08:55:13 UTC, Rene Zwanenburg wrote:
It looks to me like the program is being run through dub, and
dub is just reporting the program's exit code.
I see now. I glossed right over that execution output. On
Windows, I don't recall ever seeing a dub exception
On Sunday, 7 January 2018 at 02:17:02 UTC, Stefan Koch wrote:
On Sunday, 7 January 2018 at 01:08:44 UTC, H. S. Teoh wrote:
On Sun, Jan 07, 2018 at 12:55:27AM +, Stefan Koch via
Digitalmars-d-learn wrote:
On Saturday, 6 January 2018 at 23:25:58 UTC, Ali Çehreli
wrote:
> Is 'static foreach'
мinterest Ask. our service
https://reviews-up.com/android-app-reviews/ with the help of
specialists will help you in promoting your application and
solving this issue
Thanks for the quick answer!
On Friday, 12 January 2018 at 02:16:39 UTC, Adam D. Ruppe wrote:
On Friday, 12 January 2018 at 00:54:03 UTC, kdevel wrote:
$ dmd crash.d
$ ./crash
Nicholas Wilson is right that you can use = "" to work around
it, but with strings, null is supposed to behave the
On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote:
Hi, so basically is there a way to:
void func(alias pred = null, Range)(Range range) {
// 1) check if pred(ElementType!Range.init,
ElementType!Range.init) is equality
// 2) check if isUnary!pred
// 3) check if isBinary!pred
}
On Thursday, 11 January 2018 at 21:57:28 UTC, MrSmith wrote:
http://dpldocs.info/experimental-docs/std.experimental.allocator.makeArray.4.html
Thanks!
On Friday, 12 January 2018 at 07:33:37 UTC, Mike Parker wrote:
On Friday, 12 January 2018 at 05:24:52 UTC, Venkat wrote:
I get a SegFault with the main method below which uses
HibernateD . The second main method which uses ddbc just works
fine. What is wrong with the first main method ? I have
On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote:
Hi, so basically is there a way to:
void func(alias pred = null, Range)(Range range) {
// 1) check if pred(ElementType!Range.init,
ElementType!Range.init) is equality
// 2) check if isUnary!pred
// 3) check if isBinary!pred
}
36 matches
Mail list logo