The only image library that could be found for the SML programming language.
- Fairly standard design.
- Uses signature to place reading of a PNG on to an input stream.
The only image library that could be found for the SML programming language.
/// https://en.wikipedia.org/wiki/Activation_function | |
module stage2.nn.activationfunctions; | |
import std.math : exp, pow, E, tanh, atan, abs, sqrt, log, sin, cos, PI; | |
struct ActivationFunction { | |
double function(double x, double arg) activation; | |
double function(double x, double arg) derivative; | |
double arg; | |
} |
Field | Value |
---|---|
DIP: | (number/id -- assigned by DIP Manager) |
Review Count: | 0 (edited by DIP Manager) |
Author: | Richard Andrew Cattermole [email protected] |
Implementation: | (links to implementation PR if any) |
Status: | Will be set by the DIP manager (e.g. "Approved" or "Rejected") |
enum AllKeyModifiers = [KeyModifiers.LAlt, KeyModifiers.RAlt, KeyModifiers.LControl, KeyModifiers.RControl, | |
KeyModifiers.LShift, KeyModifiers.RShift, KeyModifiers.Capslock, KeyModifiers.Numlock, | |
KeyModifiers.LSuper, KeyModifiers.RSuper]; | |
enum AllVirtualKeyModifiers = [VK_LMENU, VK_RMENU, VK_LCONTROL, VK_RCONTROL, VK_LSHIFT, | |
VK_RSHIFT, VK_CAPITAL, VK_NUMLOCK, VK_LWIN, VK_RWIN]; | |
uint addKeyModifiersStart(INPUT[] inputs, ushort modifiersToDown, ushort modifiersToUp, ushort currentState) { | |
uint count; | |
// we should only press a key down if it already isn't pressed |
import std.stdio; | |
void main() | |
{ | |
auto a = HeadConst!(int*)(new int); | |
a = 3; | |
assert(a == 3); | |
auto b = HeadConst!(int[])(new int[3]); | |
b[0] = 1; |
struct MyRange<Type> { | |
@property { | |
Type delegate() front; | |
bool delegate() empty; | |
} | |
void delegate() popFront; | |
@implicit static auto opCall(T)(T from) { | |
MyRange!(Type: T.Type) ret; |
From 5d08d297b12a2d4374a22e1515f72e68b6f990ba Mon Sep 17 00:00:00 2001 | |
From: rikki cattermole <[email protected]> | |
Date: Mon, 18 Dec 2017 00:40:09 +1300 | |
Subject: [PATCH] Windows & X11 support for drag&drop | |
--- | |
examples/window/main.d | 25 +++- | |
gui/dplug/gui/graphics.d | 10 ++ | |
window/dplug/window/win32window.d | 59 ++++++++- | |
window/dplug/window/window.d | 6 + |
/// | |
module engine.math.vector; | |
import std.traits : isBasicType, isFloatingPoint; | |
struct Vector(Type, size_t Dimension) | |
if ((isBasicType!Type || isFloatingPoint!Type) && Dimension > 0) { | |
nothrow: | |
private { | |
import simd = core.simd; |