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
| var start = function(route) { | |
| // sets up the server | |
| http.createServer(function(request, response) { | |
| var pathName = url.parse(request.url).pathname; | |
| console.log("Request for " + pathName + " Recieved"); | |
| route(pathName); |
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
| dim nextLesson = (From l In lessons | |
| Where l.Order = currentLesson.Order + 1 | |
| Select l).FirstOrDefault() | |
| if not nextLesson is nothing then | |
| Me.NextSong = nextLesson.Id | |
| end if | |
| If (currentLesson.Order > 1) Then | |
| dim previousLesson = (From l In lessons |
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
| public sealed class ErrorController : Controller | |
| { | |
| readonly IResponse response; | |
| public ErrorController(IResponse response) | |
| { | |
| this.response = response; | |
| } | |
| public ActionResult Error(HttpStatusCode statusCode, Exception exception) |
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
| <?php | |
| class WebTest extends PHPUnit_Extensions_Selenium2TestCase | |
| { | |
| protected function setUp() | |
| { | |
| $this->setBrowser('firefox'); | |
| $this->setBrowserUrl('http://www.example.com/'); | |
| } | |
| public function testTitle() |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Example</title> | |
| <link href="CSS/smoothness/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" /> | |
| <style> | |
| /* css for timepicker */ |
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
| using System; | |
| using System.Diagnostics; | |
| using System.Threading.Tasks; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| namespace WebRequest | |
| { | |
| [TestClass] | |
| public class AttackTheServer | |
| { |
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
| var greeter = function greet(people) { | |
| if (people.length > 0) { | |
| console.log("hola " + people.pop()); | |
| greet(people); | |
| } | |
| } | |
| greeter(["Hotrod", "Cup", "Grimlock", "Blaster"]); |
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
| //some sort of request | |
| { | |
| consoleId: '0c84f45c-b7e4-4d88-9efd-2a3e62acda55' | |
| userId: 'affc5de4-cc3f-4e3f-9dec-0b4af26cc2cd' | |
| gameId: 'dbb4c1dd-3f29-4f5f-b993-5f09d36659db' | |
| } | |
| //some sort of response |
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
| function addTwoNumbers(x, y) { | |
| var oldX = x, oldY = y; | |
| if (typeof oldY === "undefined") { | |
| return function(newY) { | |
| return oldX + newY; | |
| }; | |
| } | |
| return x + y; |
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
| namespace CSharpEquiv | |
| { | |
| public static class Recursion | |
| { | |
| public static int Fib1(int x) | |
| { | |
| return (x == 1 || x == 2) ? 1 : Fib1(x - 1) + Fib1(x - 2); | |
| } | |
| public static int Fib2(int x) |