Let's say we have the following yaml configuration file:
foo:
apis:
-
name: Happy Api
path: /happyApi.json?v=bar
'use strict'; | |
// simple express server | |
var express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
app.use(express.static('public')); | |
app.get('/', function(req, res) { | |
// res.sendfile('./public/index.html'); |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
YouTube link: https://www.youtube.com/watch?v=e687bFp2FT4
Our guest is Martin Odersky, the creator of Scala. We invited him on specifically to discuss Dotty, a new compiler for Scala.
Your hosts this episode: Josh Suereth,
function Add-EnvPath { | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $Path, | |
[ValidateSet('Machine', 'User', 'Session')] | |
[string] $Container = 'Session' | |
) | |
if ($Container -ne 'Session') { |
If you are using Spring Boot with MongoDB, then a MongoDB connection is required even if you are unit testing a function. | |
Spring creates a connection to mongoDB during start up, because of Autowired beans in your code. This slows down your unit tests, and | |
also means your unit tests require access to the MongoDB server. | |
Here is what you need to do: | |
1. Mock the beans created by org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration: | |
@Bean | |
public MongoDbFactory mongoDbFactory(){ | |
return null; | |
} |
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var uglify = require('gulp-uglify'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var livereload = require('gulp-livereload'); |
from selenium import webdriver | |
from selenium.webdriver.support import expected_conditions as EC | |
driver = webdriver.Firefox() | |
driver.get('http://google.com') | |
# Log in to the developer console. | |
driver.find_element_by_id('Email').send_keys(args.google_email) | |
driver.find_element_by_id('Passwd').send_keys(args.google_password) | |
driver.find_element_by_id('Passwd').send_keys(Keys.RETURN) |
Selectize.prototype.search = function (query) { | |
return { | |
query: query, | |
tokens: [], // disable highlight | |
items: $.map(this.options, function (item, key) { | |
return {id: key} | |
}) | |
} | |
} |