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 |
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
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
#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 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
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
using System; | |
using System.Collections.Generic; | |
namespace ConsoleApplication4 | |
{ | |
public class Program | |
{ | |
private struct Vector | |
{ | |
private int x, y, z; |
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
Deployment | |
- Code for real-time measurements & logging | |
- Instrumentation for testing / benchmarking | |
- Runtime tools | |
Use cases (with examples) | |
- Benchmarking impact of new or updated features (regression testing) | |
- Realtime monitoring to create alerts when performance lowers | |
- Analysing production logs to find bottlenecks / memoryleaks |
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 static void main(String[] args){ | |
Model schema = FileManager.get().loadModel("test_ontology.xml"); | |
Model data = FileManager.get().loadModel("royal92.owl"); | |
Reasoner reasoner = ReasonerRegistry.getRDFSReasoner(); | |
reasoner = reasoner.bindSchema(schema); | |
InfModel infmodel = ModelFactory.createInfModel(reasoner, data); | |
final String NS = "http://www.daml.org/2001/01/gedcom/royal92#"; |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
namespace CompilerGeneratedEnhancement | |
{ | |
// Token: 0x02000002 RID: 2 |
NewerOlder