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 MoviesController < ApplicationController | |
def show | |
id = params[:id] # retrieve movie ID from URI route | |
@movie = Movie.find(id) # look up movie by unique ID | |
# will render app/views/movies/show.<extension> by default | |
end | |
def index | |
redirect =false |
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.ServiceModel; | |
using proxy = AcmeSOAClient.AcmeServices; | |
namespace AcmeSOAClient | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
//snip | |
//Overloaded constructor | |
public PutFileToWmeMessage(string filePath, string folder) | |
{ | |
FilePath = filePath; | |
Folder = folder; | |
} | |
//snip |
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 static List<string> GetSubCombinations(List<string> letters) | |
{ | |
if(letters.Count() == 1) return letters; | |
var combinations = new List<string>(); | |
for(int i=0; i< letters.Count; i++) | |
{ | |
var letterToInterleave = letters[i]; | |
var remainder = letters.Where(x => x != letterToInterleave).ToList(); |
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
How to respect yourself and your application with End to End Testing | |
Learn to write fast and reliable automated browser tests | |
You may have heard of the testing pyramid. The conventional wisdom suggests 70% unit tests, 20% integration tests and 10% end-to-end tests. | |
End-to-end tests are slow, unreliable and brittle. With unit tests, each part may work individually, but how can we know if they fit together? | |
Let's explore real-world implementations of end-to-end testing and build a test suite that is fast AND reliable. | |
We will go over some examples using nightwatchjs and use |
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
# ---------- | |
# User Instructions: | |
# | |
# Define a function, search() that returns a list | |
# in the form of [optimal path length, row, col]. For | |
# the grid shown below, your function should output | |
# [11, 4, 5]. | |
# | |
# If there is no valid path from the start point | |
# to the goal, your function should return the string |
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
# ---------- | |
# User Instructions: | |
# | |
# Define a function, search() that returns a list | |
# in the form of [optimal path length, row, col]. For | |
# the grid shown below, your function should output | |
# [11, 4, 5]. | |
# | |
# If there is no valid path from the start point | |
# to the goal, your function should return the string |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> | |
</head> | |
<body> | |
<p>Web Components Demo | |
<div> | |
<button is="hey-there-button" name="World">Howdy</button> | |
</div> |
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
# Simple SAM template with CORS configuration for an image processor lambda | |
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
test | |
Sample SAM Template for test | |
Globals: | |
Function: |
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
<html> | |
<body> | |
<button type="submit" onclick="submit();">Submit</button> | |
</body> | |
<script> | |
function submit(){ | |
fetch("<api_url>", { |
OlderNewer