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 A | |
self << class | |
private | |
def private_method_test | |
end | |
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
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") |
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
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 { |
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
//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(); |
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
//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(); |
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
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); |
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
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 = { |
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
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 = { |
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
module BoardsHelper | |
def render_board( board ) | |
BoardPresenter.new( self, board ).render | |
end | |
def render_map( map ) | |
MapPresenter.new( self, map ).render | |
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
#!/bin/bash | |
function rtest | |
{ | |
ignore=${1:?'file not set'} | |
#locate test file name(s) | |
local test_file | |
local test_type | |
#are they unit / functionals? |
OlderNewer