On Friday, 11 December 2015 at 06:28:09 UTC, Shriramana Sharma
wrote:
Hello. I'm trying to figure out how to use
FloatingPointControl.enableExceptions. Upon enabling
severeExceptions I would expect the division by zero to be
signaled, but neither do I get a SIGFPE nor does ieeeFlags show
the e
Hello. I'm trying to figure out how to use
FloatingPointControl.enableExceptions. Upon enabling severeExceptions I
would expect the division by zero to be signaled, but neither do I get a
SIGFPE nor does ieeeFlags show the exception having been signaled. What am I
doing wrong?
import std.stdio
Basile B. wrote:
> You should rather use std.traits.EnumMembers to iterate the
> members of an enum:
Wow this is great! I was thinking that enum.max + 1 is not really befitting
D's elegant approach to programming. Ali should really update that section
of his book to use EnumMembers. This will
On Friday, 11 December 2015 at 04:09:19 UTC, Chris Wright wrote:
On Fri, 11 Dec 2015 03:20:29 +, J Smith wrote:
How do I make it so that I can import and use the contents of
lib.d inside of testlib.d.
If you are not compiling everything in one step, the -I flag
allows you to specify path
On Fri, 11 Dec 2015 03:20:29 +, J Smith wrote:
> How do I make it so that I can import and use the contents of lib.d
> inside of testlib.d.
If you are not compiling everything in one step, the -I flag allows you
to specify paths to look for imports. For instance:
$ dmd -lib src/package_name
On Friday, 11 December 2015 at 03:20:29 UTC, J Smith wrote:
Say I have a project with the files structured like this.
package-name/
src/
package-name/
lib.d
test/
testlib.d
How do I make it so that I can import and use the contents of
lib.d inside of testlib
Say I have a project with the files structured like this.
package-name/
src/
package-name/
lib.d
test/
testlib.d
How do I make it so that I can import and use the contents of
lib.d inside of testlib.d.
As you can tell I'm very new to D, and kind of new to
On 12/10/2015 02:07 PM, Entity325 wrote:
> Both threads need to be able to run asynchronously themselves, so message
> passing using std.concurrency isn't an option.
I can still imagine a case where the receiver checks the message queue
with a timeout of 0, which is non-blocking.
> My problem
Usually the DMD compiler errors are very helpful, but I guess
nothing can be perfect. In this case, I have a class I'm trying
to declare. The class is intended to be a transport and storage
medium, to allow information to be passed and updated
asynchronously between two threads. One of the thre
On Thursday, 10 December 2015 at 14:46:26 UTC, Basile B. wrote:
On Thursday, 10 December 2015 at 14:24:43 UTC, Shriramana
Sharma wrote:
Hello. I'm using DMD 2.069.2. As per
http://ddili.org/ders/d.en/enum.html the following code is
supposed to output the *names* of the suits:
import std.stdio
On Thursday, 10 December 2015 at 14:24:43 UTC, Shriramana Sharma
wrote:
Hello. I'm using DMD 2.069.2. As per
http://ddili.org/ders/d.en/enum.html the following code is
supposed to output the *names* of the suits:
import std.stdio;
void main()
{
enum Suit { spades, hearts, diamonds, clubs }
V Thu, 10 Dec 2015 19:54:43 +0530
Shriramana Sharma via Digitalmars-d-learn
napsáno:
> Hello. I'm using DMD 2.069.2. As per
> http://ddili.org/ders/d.en/enum.html the following code is supposed
> to output the *names* of the suits:
>
> import std.stdio;
> void main()
> {
> enum Suit { spades
V Thu, 10 Dec 2015 19:54:43 +0530
Shriramana Sharma via Digitalmars-d-learn
napsáno:
> Hello. I'm using DMD 2.069.2. As per
> http://ddili.org/ders/d.en/enum.html the following code is supposed
> to output the *names* of the suits:
>
> import std.stdio;
> void main()
> {
> enum Suit { spades
On Thursday, 10 December 2015 at 13:46:19 UTC, Suliman wrote:
because set return void, and get return T?
No, it has nothing to do with the return type declarations. It's
about whether or not the compiler has enough information to
deduce the types.
V get(V, K)(K key, V defaultVal);
auto i
Hello. I'm using DMD 2.069.2. As per http://ddili.org/ders/d.en/enum.html
the following code is supposed to output the *names* of the suits:
import std.stdio;
void main()
{
enum Suit { spades, hearts, diamonds, clubs }
foreach (suit; Suit.min .. Suit.max + 1) { writefln("%s", suit); }
}
On Thursday, 10 December 2015 at 13:43:58 UTC, Suliman wrote:
On Thursday, 10 December 2015 at 13:34:02 UTC, Mike Parker
wrote:
On Thursday, 10 December 2015 at 13:23:29 UTC, Suliman wrote:
But question about why I need to get session info like:
writeln("USER Session: ", req.session.get!stri
On Thursday, 10 December 2015 at 13:34:02 UTC, Mike Parker wrote:
On Thursday, 10 December 2015 at 13:23:29 UTC, Suliman wrote:
But question about why I need to get session info like:
writeln("USER Session: ", req.session.get!string("username"));
is still actual.
When you have a template t
On Thursday, 10 December 2015 at 13:23:29 UTC, Suliman wrote:
But question about why I need to get session info like:
writeln("USER Session: ", req.session.get!string("username"));
is still actual.
When you have a template that looks like this:
V get(V, K)(K key) {...}
The compiler is abl
Oh, my issue. Right variant of setting session is:
if(dbuser == "admin") // admin name hardcoded
{
_auth.isAuthorizated = true;
req.session.set("username", "admin");
}
else
{
req.session.set("username", dbuser); //set current
username in parameter of ses
On Thursday, 10 December 2015 at 12:30:51 UTC, Suliman wrote:
On Thursday, 10 December 2015 at 12:21:40 UTC, Adrian Matoga
wrote:
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote:
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set user
On Thursday, 10 December 2015 at 12:21:40 UTC, Adrian Matoga
wrote:
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote:
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set user name for session like this:
req.session.set("username", "admin
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote:
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set user name for session like this:
req.session.set("username", "admin");
But I can't understand how to get user name from it:
abstract s
Vibed have method get for user session
http://vibed.org/api/vibe.http.session/SessionStore
I set user name for session like this:
req.session.set("username", "admin");
But I can't understand how to get user name from it:
abstract std.variant.VariantN!(20) get(
string id,
string name,
laz
Yes, exactly. Some people even use static if it is not needed because it is
harmless. And remove it only when enclosing context is demand.
Dne 9. 12. 2015 22:40 napsal uživatel "Jon D via Digitalmars-d-learn" <
digitalmars-d-learn@puremagic.com>:
> On Wednesday, 9 December 2015 at 21:23:03 UTC, Da
24 matches
Mail list logo