Skip to content

Instantly share code, notes, and snippets.

View margusmartsepp's full-sized avatar
😇
It is that simple

Margus Martsepp margusmartsepp

😇
It is that simple
  • Gunvor SA
  • Tallinn
View GitHub Profile
@margusmartsepp
margusmartsepp / Gamedisplayer.pas
Created May 26, 2011 11:43
Delphi stick game
unit Gamedisplayer;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Math;
type
TGamedisplay = class(TForm)
unit TextToSpeech;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, AppEvnts, StdCtrls, ClipBrd, SpeechLib_TLB, ComObj,
AsyncCalls, ComCtrls, shellapi, Menus;
type
unit DataUI;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, DBClient, StdCtrls, DataUnit, DB,
DBTables;
type
@margusmartsepp
margusmartsepp / DataLogic.pas
Created June 14, 2011 11:20
Data Updater 1.1
unit DataLogic;
interface
uses
SysUtils, Classes, DB, DBClient;
type
Tmm = class(TDataModule)
private
@margusmartsepp
margusmartsepp / gist:1030630
Created June 17, 2011 00:18
Hypergeometric Distribution
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import test.csMM;
/**
* Class to find Hypergeometric Distribution.
*
@margusmartsepp
margusmartsepp / gist:1107877
Created July 26, 2011 20:09
insertion sort
/**
* Method sorts a list ascendingly using insertion sort algorithm.
*
* @param <T>
* Non null class, that implements comparable interface.
* @param data
* List of T type elements, to be sorted ascendingly.
* @throws java.lang.NullPointerException
* If any element in the list is 'null'.
* @throws java.lang.UnsupportedOperationException
@margusmartsepp
margusmartsepp / gist:1108645
Created July 27, 2011 03:58
insertion sort
/// <summary>
/// Method sorts a list ascendingly using insertion sort algorithm.
/// </summary>
/// <typeparam name="T"> Non null class, that implements comparable interface.
/// </typeparam>
/// <param name="data">List of T type elements, to be sorted ascendingly.</param>
/// <exception cref="System.NullReferenceException">
/// If any element in the list is 'null'. (Other then first one)
/// </exception>
/// <exception cref="System.NotSupportedException">
@margusmartsepp
margusmartsepp / gist:1108647
Created July 27, 2011 04:01
insertion sort
/// <summary>
/// Method sorts a list ascendingly using insertion sort algorithm.
/// </summary>
/// <typeparam name="T"> Non null class, that implements comparable interface.
/// </typeparam>
/// <param name="data">List of T type elements, to be sorted ascendingly.</param>
/// <exception cref="System.NullReferenceException">
/// If any element in the list is 'null'. (Other then first one)
/// </exception>
/// <exception cref="System.NotSupportedException">
/**
* Method sorts a list ascendingly using merge sort algorithm.
*
* @param <T>
* Non null class, that implements comparable interface.
* @param data
* List of T type elements, to be sorted ascendingly.
* @throws java.lang.NullPointerException
* If any element in the list is 'null'.
* @throws java.lang.UnsupportedOperationException
/// <summary>
/// Method sorts a list ascendingly using merge sort algorithm.
/// </summary>
/// <typeparam name="T"> Non null class, that implements comparable interface.
/// </typeparam>
/// <param name="data">List of T type elements, to be sorted ascendingly.</param>
/// <exception cref="System.NullReferenceException">
/// If any element in the list is 'null'. (Other then first one)
/// </exception>
/// <exception cref="System.NotSupportedException">