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; | |
using System.Linq; | |
public sealed class Container | |
{ | |
private Dictionary<Type, Type> concreteTypes = new Dictionary<Type, Type>(); | |
private Dictionary<Type, object> objects = new Dictionary<Type, object>(); |
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
rem konversi satu directory | |
for %%i in (*.mp4) do call conv "%%i" |
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 ISubscriber<T> | |
{ | |
void Receive(T message); | |
} | |
internal class SubscriberList : IEnumerable<object> | |
{ | |
private Dictionary<Type, List<object>> subscription = new Dictionary<Type, List<object>>(); |
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
class Orderable : IOrderable | |
{ | |
private int order; | |
private string name; | |
public Orderable(int order, string name) | |
{ | |
this.order = order; | |
this.name = name; |
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
/* | |
Composable 3x3 matrix module. | |
Exported functions: | |
- createIdentity (): Matrix | |
- createTranslation (tx: Number, ty: Number): Matrix | |
- createScaling (sx: Number, sy: Number): Matrix | |
- createRotation (a: Number): Matrix | |
- toRadians (d: Number): Number | |
- createRotationDegrees (a: Number): Matrix |
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; | |
/// <summary> | |
/// Implements a pool of T. | |
/// </summary> | |
public interface IPool<T> | |
where T : class, new() | |
{ | |
T Use(); |
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 OpenTK; | |
using SkiaSharp; | |
using System; | |
class SKGameWindow : GameWindow | |
{ | |
private GRContext context; | |
protected override void OnLoad(EventArgs e) | |
{ |
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
node -e "const e=require('express');e().use(e.static('.')).listen(80)" |
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
<?php | |
abstract class SimpleDbQueryBuilder { | |
protected function tablesQuery() { | |
return array( | |
'sql' => "SELECT name FROM sqlite_master WHERE type = 'table';", | |
'args' => array(), | |
); | |
} |
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
/** | |
* @typedef {{(sender: object, eventArgs: object): void}} EventHandler | |
*/ | |
/** | |
* Represents an event. | |
*/ | |
export class Event { | |
/** |