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
| <!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
| <?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
| 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
| 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
| 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
| $.getJSON("/Lookups/SomeLookupAPIEndpoint", "", function(data) { | |
| //do something with data.... | |
| //if data is a collection.. | |
| $(data).each(function() { | |
| // .... | |
| }) | |
| }); |
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 class ClientsController : BaseApiController | |
| { | |
| private readonly IClientManagement clientManagement; | |
| public ClientsController(IClientManagement clientManagement) | |
| { | |
| this.clientManagement = clientManagement; | |
| } | |
| public IEnumerable<ClientViewModel> Get() |
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
| protected void CreateReportButton_Click(object sender, EventArgs e) | |
| { | |
| DateTime startDate, endDate; | |
| if (FormValid(out startDate, out endDate)) | |
| { | |
| this.GenerateReport(startDate, endDate); | |
| } | |
| } |
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 Domain.Repositories.Database | |
| { | |
| public sealed class DbGateway : IDbGateway | |
| { | |
| public DataSet DataSetQueryFromStoredProcedure(string storedprocedure, Dictionary<string, object> paramaters) | |
| { | |
| var dataSet = new DataSet(); | |
| var connectionString = ConfigurationManager.ConnectionStrings.GetConnectionString("Connection"); | |
| using (var sqlConnection = new SqlConnection(connectionString)) |