Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MrJaba's full-sized avatar

Tom Crinson MrJaba

View GitHub Profile
class A
self << class
private
def private_method_test
end
end
import scala.io.Source
object ListComparer{
def main( args: Array[String] ){
if( args.length == 2 ){
println( listDifferences( args(0), args(1) ) )
}
else
Console.err.println( "Needs two filenames")
Minimech.Mechs = function(){
//private methods and variables
var canvas = null;
function drawLine(x1 ,y1, x2, y2){
var line = canvas.path({stroke: "#036"}).moveTo(x1, y1).lineTo(x2, y2);
}
//public ones
return {
//Supplier Payments Specific Javascript
VTG.SupplierPayments = {
//Method which identifies the currently selected suppliers and hides the others
addOnChangeToSupplierFilter: function(){
$("#supplier_filter").change( function () {
var selectedSupplier = $("select#supplier_filter option:selected").attr('value');
VTG.SupplierPayments.showAllBookingRows();
VTG.SupplierPayments.hideAllExceptSelectedSupplier( selectedSupplier );
VTG.SupplierPayments.showTableHeader();
//Supplier Payments Specific Javascript
VTG.SupplierPayments = {
//Method which identifies the currently selected suppliers and hides the others
addOnChangeToSupplierFilter: function(){
$("#supplier_filter").change( function () {
var selectedSupplier = $("select#supplier_filter option:selected").attr('value');
VTG.SupplierPayments.showAllBookingRows();
VTG.SupplierPayments.hideAllExceptSelectedSupplier( selectedSupplier );
VTG.SupplierPayments.showTableHeader();
import scala.io.Source;
import scala.collection.mutable;
class Anagrams(file:String){
private val combinations = mutable.Map.empty[String, List[String]];
def run() : List[List[String]] = {
for( word <- Source.fromFile(file).getLines ){
val characterStr = sortByChars(word.trim);
import scala.io.Source;
import scala.collection.mutable;
class Bloom( file : String ){
private val words = mutable.Map.empty[Int, Int];
def initialize() : Unit = {
populateBitmap();
}
def populateBitmap() : Unit = {
import scala.io.Source;
import scala.collection.mutable;
class Bloom( file : String, hashFunctions : List[(String) => Int] ){
private val words = mutable.Map.empty[Int, Int];
def initialize() : Unit = {
populateBitmap();
}
def populateBitmap() : Unit = {
module BoardsHelper
def render_board( board )
BoardPresenter.new( self, board ).render
end
def render_map( map )
MapPresenter.new( self, map ).render
end
#!/bin/bash
function rtest
{
ignore=${1:?'file not set'}
#locate test file name(s)
local test_file
local test_type
#are they unit / functionals?