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 repeat = function(c,max,floop,fend,env) { | |
if(arguments.length===4) { env = {}; } | |
if(c<max) { | |
env._i = c; | |
floop(function(floop,env){ | |
repeat(c+1, max, floop, fend, env); | |
},env); | |
} else { | |
fend(env); | |
} |
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
-- monadic evalution because reading the job offer is impure code | |
-- with important side effects | |
do | |
laugh_or_cry <- (discard . acept_or_reject . read ) spanish_it_offer_for_ninjas | |
return laugh_or_cry |
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
;; Previous window | |
(global-set-key (kbd "C-x p") | |
(lambda () | |
(interactive) | |
(other-window -1))) |
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
(ns clj-r2rml.web.jetty-foaf-ssl | |
"Adapter for the Jetty webserver handling FOAF-SSL authentications." | |
(:import (org.mortbay.jetty.handler AbstractHandler) | |
(org.mortbay.jetty Server Request Response) | |
(org.mortbay.jetty.bio SocketConnector) | |
;; Modified version of SSLSocketConnector accepting | |
;; client certificates not associated to a valid authority | |
(cljr2rml.web FOAFSSLSocketConnector) | |
(javax.servlet.http HttpServletRequest HttpServletResponse) | |
(com.hp.hpl.jena.rdf.model ModelFactory) |
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
(ns jobim.examples.philosophers | |
(:use [jobim])) | |
;;;;;;;;;;;;; | |
;;; Forks | |
;;;;;;;;;;;; | |
(defn do-forks | |
([forks-list] | |
(loop [forks-list forks-list] |
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
pstDelIn = (PTMX_DEL_IN)&pCMMIda->stDelIn; | |
pstDelOut = (PTMX_DEL_OUT)&pCMMIda->stDelOut; | |
strcpy(pCMMIda->stDelIn.stTmDel.szSource, pstExtOut->stTmExt.szSource ); | |
strcpy(pCMMIda->stDelIn.stTmDel.szTarget, pstExtOut->stTmExt.szTarget ); | |
strcpy(pCMMIda->stDelIn.stTmDel.szSourceLanguage, pCMMIda->szSourceLng); | |
strcpy(pCMMIda->stDelIn.stTmDel.szTargetLanguage, pstExtOut->stTmExt.szTargetLanguage ); | |
pCMMIda->stDelIn.stTmDel.fMachineTranslation = pstExtOut->stTmExt.fMachineTranslation; | |
strcpy(pCMMIda->stDelIn.stTmDel.szFileName, pstExtOut->stTmExt.szFileName ); | |
strcpy(pCMMIda->stDelIn.stTmDel.szLongName, pstExtOut->stTmExt.szLongName ); |
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
(ns backend.levenshtein-command | |
(:use [somnium.congomongo :only [get-coll]]) | |
(:use [somnium.congomongo.coerce :only [coerce]]) | |
(:import [com.mongodb BasicDBObjectBuilder BasicDBObject])) | |
(defn- build-bson-object | |
([collection-object source field threshold level separators limit output-field] | |
(let [level (if (nil? level) "word" level) | |
builder (BasicDBObjectBuilder/start)] | |
(doto builder |
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
print("connected"); | |
var mapFn = function(){ | |
var minSim = 0.1; | |
var fieldName = "text"; | |
var queryText = "ola"; | |
var maxSimilarity = function(a,b) { | |
var aSize = a.length; | |
var bSize = b.length; | |
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
<script type='text/javascript'> | |
jQuery(document).ready(function(){ | |
rdfstore.create(function(store) { | |
var myLocLat = 0; | |
var myLocLng = 0; | |
var nearbyRadius = 0.5; // in km | |
// extracts data from remote SPARQL endpoint | |
var queryStr2 = 'PREFIX lgdo:<http://linkedgeodata.org/ontology/>\ |
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
jQuery(document).ready(function(){ | |
rdfstore.create(function(store) { | |
var myLocLat = 0; | |
var myLocLng = 0; | |
var nearbyRadius = 0.5; // in km | |
// extracts data from remote SPARQL endpoint | |
var queryStr2 = 'PREFIX lgdo:<http://linkedgeodata.org/ontology/>\ | |
CONSTRUCT {\ |