Skip to content

Instantly share code, notes, and snippets.

module cmsed.test.models.book;
import cmsed.base;
import dvorm;
@dbName("Books3")
class Book3 {
@dbId
@dbName("")
Book3Id key = new Book3Id;
module cmsed.test.models.book;
import cmsed.base;
import dvorm;
@dbName("Books3")
class Book3 {
@dbId
@dbName("")
Book3Id key = new Book3Id;

Dakka is an actor based framework in the idea of Akka.

Descriptions

  • An actor can be located any where.
    An actor in of itself is unique per the location.
    Please note that any two are not the same but are very similar.
  • The closest actor to the present actor should be used when referencing.
    If this is local in the same location or in another it doesn't matter.
  • An actor knows who's near it (supervisor and children).
var Books3 = Class({
constructor: function(_id, edition) {
this._id = _id === undefined ? "" : _id;
this.edition = Number(edition === undefined ? "0" : edition);
},
save: function() {
var this_ = this;
new Ajax.Request("/.svc/Books3/" + this._id, {
method: "POST",
parameters: {
@rikkimax
rikkimax / book.d
Created April 18, 2014 13:03
Some of Cmsed's javascript generation capabilities
module cmsed.test.models.book;
import cmsed.base;
import dvorm;
@dbName("Books3")
class Book3 {
@dbId
@dbName("")
Book3Id key = new Book3Id;
@rikkimax
rikkimax / abstract_factory.d
Last active August 29, 2015 14:00
Design patterns examples
abstract class WidgetFactory {
ScrollBar createScrollBar();
Window createWindow();
}
class PMWidgetFactory : WidgetFactory {
override ScrollBar createScrollBar() {
return new PMScrollBar();
}
# Simple skeleton descriptor
rmdir test
mkdir test
return {
test = function() print("hi there!") end
}
YesNoSometimes assmtfdbkParse(string text) {
string[] stes = text.split(",");
foreach(ste; stes) {
switch(ste) {
case "Yes definately":
return YesNoSometimes.Yes;
case "Depends on the student":
return YesNoSometimes.Sometimes;
default:
return YesNoSometimes.No;
module devisualization.scenegraph.main;
import devisualization.scenegraph.scenegraph;
import devisualization.scenegraph.elements;
void main() {
import std.stdio;
SceneGraph3DOverlayed2D graph = new SceneGraph3DOverlayed2D;