This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Patient | |
{ | |
protected string Name; | |
protected MedicalRecords MedicalRecords; | |
protected List<Surgery> ScheduledSurgeries; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local classes = {} | |
local registry = {} | |
function classes.createClass(classname) | |
local class = {} | |
class.__views = {} | |
registry[classname] = class | |
return class | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __CONSUMER_H__ | |
#define __CONSUMER_H__ | |
#include <algorithm> | |
#include <iostream> | |
#include <vector> | |
typedef int TimeSlot; | |
class Consumer { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local hooks = require("hooks") -- loads hooks.lua from same dir | |
hooks.add("test", "a", function(num) print("a", num) end) | |
hooks.add("test", "b", function(num) print("b", num + 2) end) | |
hooks.call("test", 4) | |
hooks.remove("test", "a") | |
hooks.call("test", 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local intercept = {} | |
function intercept.before(func, callback) | |
return function(...) | |
callback(...) | |
return func(...) | |
end | |
end | |
function intercept.after(func, callback) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Button { | |
void Click(); | |
} | |
public interface Label { | |
void setText(string text); | |
string getText(); | |
} | |
// TRADITIONAL |
OlderNewer