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
logLevel := Level.Warn | |
scalaVersion := "2.10.4" | |
// The Typesafe repository | |
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/" | |
// Use the Play sbt plugin for Play projects | |
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3") |
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
trait BinaryTree[+T] | |
case object Leaf extends BinaryTree[Nothing] | |
case class Node[T](x: T, left: BinaryTree[T], right: BinaryTree[T]) extends BinaryTree[T] | |
object BinaryTree { | |
def height(t: BinaryTree[Any]): Int = t match { | |
case Leaf => 0 | |
case Node(_, l, r) => { | |
val lHeight = height(l) |
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
:- module(add, | |
[add_all/2, | |
add_some/3]). | |
:- meta_predicate add_some(`, 1, -). | |
add_all(L, S) :- add_all(L, 0, S). | |
add_all([], A, A). | |
add_all([H|T], A, S) :- | |
NewA is A + H, | |
add_all(T, NewA, S). |
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
?- use_module(add). | |
ERROR: /home/tim/workspace/prolog/swi-prolog-class/week4/modules/add.pl:1: | |
Domain error: `module_file' expected, found `'/home/tim/workspace/prolog/swi-prolog-class/week4/modules/add.pl'' | |
In: | |
[27] throw(error(domain_error(module_file,'/home/tim/workspace/prolog/swi-prolog-class/week4/modules/add.pl'),_6272)) | |
[25] '$first_term'(module(add,[...|...]),term_position(0,51,0,6,[...|...]),'/home/tim/workspace/prolog/swi-prolog-class/week4/modules/add.pl',state(true,_6346,true,false,'/home/tim/workspace/prolog/swi-prolog-class/week4/modules/add.pl',-),[if(not_loaded),...]) at /home/tim/.swivm/versions/7.7.15/lib/swipl-7.7.15/boot/init.pl:2661 | |
[24] '$load_file'('/home/tim/workspace/prolog/swi-prolog-class/week4/modules/add.pl','/home/tim/workspace/prolog/swi-prolog-class/week4/modules/add.pl',_6398,[if(not_loaded),...]) at /home/tim/.swivm/versions/7.7.15/lib/swipl-7.7.15/boot/init.pl:2598 | |
[23] setup_call_catcher_cleanup(system:true,system:'$load_file'('/home/tim/workspace/prolog/swi- |
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
2 ?- check_installation. | |
% Checking your SWI-Prolog kit for common issues ... | |
% | |
% Version: ............. 7.7.15 | |
% Address bits: ........ 64 | |
% Architecture: ........ x86_64-linux | |
% Installed at: ........ /home/tim/.swivm/versions/7.7.15/lib/swipl-7.7.15 | |
% Cores: ............... 4 | |
% | |
% Checking gmp ................................. ok |
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
tim@tim-HP-EliteBook-850-G2:~/workspace/solid/node-solid-server$ docker run -p 8443:8443 --name solid tmciver/node-solid-server | |
npm info it worked if it ends with ok | |
npm info using npm@3.10.10 | |
npm info using node@v6.11.1 | |
npm info lifecycle solid-server@4.0.13~presolid: solid-server@4.0.13 | |
npm info lifecycle solid-server@4.0.13~solid: solid-server@4.0.13 | |
> solid-server@4.0.13 solid /usr/src/app | |
> node ./bin/solid "start" |
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
openapi: '3.0.1' | |
info: | |
description: some docs for a bug | |
title: test title | |
version: '1.0.0' | |
servers: | |
- url: https://example.com/api/vi | |
paths: |
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
$ curl -v -d "@auth-post-data.json" https://apiqa.jemstep.com/api/v1/oauth/token --header "Content-Type: application/json" --header "Accepttype: application/json" --header "Cache-control: no-cache" --header "Accept: application/json" | |
* Trying 54.183.159.14... | |
* Connected to apiqa.jemstep.com (54.183.159.14) port 443 (#0) | |
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt | |
* found 597 certificates in /etc/ssl/certs | |
* ALPN, offering http/1.1 | |
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 | |
* server certificate verification OK | |
* server certificate status verification SKIPPED | |
* common name: *.jemstep.com (matched) |
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
openapi: "3.0.1" | |
info: | |
title: Sourcery Todo API | |
description: 'Create, view and edit todos.' | |
version: '0.0.1' | |
servers: | |
- url: http://localhost:8081 | |
description: Local testing environment |
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
$ java -jar ~/.m2/repository/io/swagger/swagger-codegen-cli/3.0.0-rc0/swagger-codegen-cli-3.0.0-rc0.jar generate -i ./openapi.yaml -l html | |
[Thread-1] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No .swagger-codegen-ignore file found. | |
[Thread-1] WARN io.swagger.codegen.DefaultCodegen - Empty operationId found for path: get /. Renamed to auto-generated operationId: rootGet | |
Exception in thread "Thread-1" java.lang.RuntimeException: Could not generate supporting file 'SupportingFile: | |
templateFile: index.mustache | |
folder: | |
destinationFilename: index.html | |
' | |
at io.swagger.codegen.DefaultGenerator.generateSupportingFiles(DefaultGenerator.java:609) | |
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:729) |