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
namespace :build do | |
build_configs = ["Debug", "Release"] | |
desc "build debug" | |
task "debug" do | |
sh build_cmd() | |
end | |
desc "build release" | |
task "release" do |
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
(defun shut-up () | |
(interactive) | |
(setq warning-minimum-level :error)) |
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
[TestCase("abcdefgH", Result = false)] | |
[TestCase("@Bcdefgh", Result = true)] | |
[TestCase("#Bcdefgh", Result = true)] | |
[TestCase("$Bcdefgh", Result = true)] | |
[TestCase("%Bcdefgh", Result = true)] | |
[TestCase("^Bcdefgh", Result = true)] | |
[TestCase("&Bcdefgh", Result = true)] | |
[TestCase("+Bcdefgh", Result = true)] | |
[TestCase("=Bcdefgh", Result = true)] | |
[TestCase("!Bcdefgh", Result = true)] |
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
{exec} = require 'child_process' | |
task "default", "build the files", (options) -> | |
exec "coffee --compile --output app/ src/" | |
exec "coffee --compile --output spec/ spec/" |
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
describe("jQuery", function() { | |
it("should return correct type for null", function(){ | |
expect($.type(null)).toBe("null"); | |
}); | |
it("should see an empty string as an empty object", function(){ | |
expect($.isEmptyObject("")).toBeTruthy(); | |
}); |
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
describe("affirmation create view", function(){ | |
var a_view, values, div, affs; | |
beforeEach(function(){ | |
div = $('<div class="_surface"></div>'); | |
$('body').append(div); | |
affs = new App.Collections.Affirmations(); | |
values = new App.Collections.Values([new App.Models.Value({description: 'x'})]); | |
a_view = new App.Views.NewAffirmation({ | |
el: '._surface', |
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
describe("affirmation create view", function(){ | |
var a_view, values, div, affs; | |
beforeEach(function(){ | |
div = $('<div class="_surface"></div>'); | |
$('body').append(div); | |
affs = new App.Collections.Affirmations(); | |
values = new App.Collections.Values([new App.Models.Value({description: 'x'})]); | |
a_view = new App.Views.NewAffirmation({ | |
el: '._surface', |
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.Linq; | |
using Kryptos.Model; | |
using Kryptos.Model.Tests; | |
using Kryptos.Presentation.Property; | |
using NUnit.Framework; | |
using Rhino.Mocks; | |
using Should.Fluent; | |
namespace Kryptos.Presentation.Test.Property | |
{ |
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
package week2 | |
object product { | |
def mapReduce(map:Int=>Int, reduce:(Int,Int)=>Int, init:Int)(a:Int, b:Int): Int = { | |
if(a>b) init | |
else reduce(map(a), mapReduce(map,reduce,init)(a+1,b)) | |
} //> mapReduce: (map: Int => Int, reduce: (Int, Int) => Int, init: Int)(a: Int, b | |
//| : Int)Int | |
def product(f: Int => Int)(a: Int, b: Int): Int = mapReduce(f,(x,y) => x*y,1)(a,b) |
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 partial class AdminHomePage : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
if (IsPostBack) //note removal of ! | |
{ | |
try | |
{ | |
Login sourcePage = Context.PreviousHandler as Login; | |
Label1.Text = sourcePage.Property1; |
OlderNewer