(apply (eval
(cadr (macroexpand-1 '(def-neo4j-fun create-node (properties)
:post
(:uri-spec (format nil "node"))
(:encode properties :string)
(:status-handlers
(201 (decode-neo4j-json-output body))
(400 (error 'invalid-data-sent-error
:uri uri :json json)))))))
(ql:quickload :cl-neo4j.tests)
(cl-neo4j.tests:run-all-tests)
Running test suite CL-NEO4J
Running test suite RESTAPI
Running test CREATE-DELETE-NODE X
Running test GET-NODE X
Running test NODE-PROPERTIES X
(cl-neo4j.tests:run-all-tests)
Running test suite CL-NEO4J Running test suite RESTAPI Running test CREATE-DELETE-NODE X Running test GET-NODE X Running test NODE-PROPERTIES X Running test CREATE-DELETE-RELATIONSHIP X Running test GET-RELATIONSHIP X Running test RELATIONSHIP-PROPERTIES X
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
----------------------------- -- 001 | |
-- Simple Functional Language -- 002 | |
----------------------------- -- 003 | |
-- variables are just names -- 006 | |
type Var = String -- 007 | |
-- 008 | |
-- values are integers and functions -- 009 | |
data Value = ValInt Integer -- 010 | |
| ValFunc (Value -> Value) -- 011 |
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
(defun call-get-method (url &key parameters) | |
"Alternative to CALL-REST-METHOD that uses a stream; this is more | |
memory efficient, but it may cause problems if YASON:PARSE takes | |
too long to parse the stream and the stream may be cut due to | |
timeout." | |
(with-open-stream (s (drakma:http-request url | |
:parameters parameters | |
:external-format-out :utf-8 | |
:method :get | |
:connection-timeout 120 |
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
(let ((continuation (drakma:http-request "http://localhost:8983/solr/gettingstarted/update" | |
:method :post | |
:content :continuation))) | |
(funcall continuation "id" t) | |
(funcall continuation "0553573403" t) | |
(funcall continuation "author" t) | |
(funcall continuation "add" t) | |
(funcall continuation "Paulo Coelho" t)) |
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
var elasticsearch = require('elasticsearch') | |
var client = new elasticsearch.Client({ | |
host: 'localhost:9200', | |
log: 'trace' | |
}); | |
client.ping({ | |
requestTimeout:30000, | |
hello:"elasticsearch" | |
}, function(error) { |
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
void imprimeMinusculasMaiusculas(char* cad) | |
{// caso base | |
if (cad[0] == '\0') | |
return; | |
// passo indutivo | |
if (cad[0] >= 'a' && cad[0] <= 'z') | |
// transforma de minuscula pra maiuscula | |
cad[0] = cad[0] - ('a'-'A'); | |
else if (cad[0] >= 'A' && cad[0] <= 'Z') |
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
(defun proj (n k list) | |
(if (equal n (list-length list)) | |
(nth k list))) | |
(defun zero (n) | |
(* 0 n)) | |
(defun primrec (g h) | |
(labels ((f (&rest args) | |
(if (zerop (cadr 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
(defun lattes-to-bibtex (filename) | |
"Transform the given filename to bibtexml and then parse it" | |
(let ((xml (lattes-to-bibtexml filename)) | |
(i (make-instance 'lattes-handler))) | |
(cxml:parse xml i) | |
(print-hash (lh-hash i)) | |
(loop for entry being each hash-value in (lh-hash i) do | |
(bibtex-runtime:write-bib-entry entry)))) |
NewerOlder