This file contains hidden or 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
# load url and packages | |
url <- "http://www2.idrottonline.se/UppsalaLK/KungBjorn-loppet/KungBjorn-loppet2012/Resultat2012/" | |
require(plyr) | |
require(XML) | |
require(RCurl) | |
# get & format the data | |
doc <- getURL(url) | |
doc2 <- htmlTreeParse(doc, asText = TRUE, useInternalNodes = TRUE) |
This file contains hidden or 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
<script> | |
var hello = 'Hello from the outer space'; | |
var aObject = { | |
hello : 'Hello from the earth' | |
} | |
var sayHello = function(){ | |
console.log(this.hello); | |
} |
This file contains hidden or 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
<script> | |
var aObject = { | |
aFunction: function(){ | |
console.log(this); | |
var anotherFunction = function(){ | |
console.log(this); | |
var yetAnotherFunction = function(){ | |
console.log(this); | |
}(); |
This file contains hidden or 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
<script> | |
var aObject = { | |
aFunction: function(){ | |
console.log(this); | |
var that = this; | |
var anotherFunction = function(){ | |
console.log(that); | |
var yetAnotherFunction = function(){ | |
console.log(that); |
This file contains hidden or 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
<script> | |
var Country = function(name){ | |
this.name = name; | |
} | |
var catalunya = new Country('Catalunya'); | |
console.log(catalunya.name); |
This file contains hidden or 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
<script> | |
var monica = {}; | |
var setLocation = function(location){ | |
this.location = location; | |
} | |
setLocation.apply(monica, ['London']); |
This file contains hidden or 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 FizzBuzz.Tests |
This file contains hidden or 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
open NUnit.Framework |
This file contains hidden or 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
[<Test>] | |
let ``the number 1 is returned as is`` () = | |
Assert.That ("1" = fizzBuzz 1) |
This file contains hidden or 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
let fizzBuzz input = "" |
OlderNewer