_id stringlengths 64 64 | repository stringlengths 6 84 | name stringlengths 4 110 | content stringlengths 0 248k | license null | download_url stringlengths 89 454 | language stringclasses 7
values | comments stringlengths 0 74.6k | code stringlengths 0 248k |
|---|---|---|---|---|---|---|---|---|
6d79f14042d839b3839a60c52a2589bd1103e543aeb078e8d113c82d978293fa | cmsc430/www | let-x-y-plus-nontail-nontail.rkt | #lang racket
(define (double x) (+ x x))
(let ((x 2)) (let ((y 3)) (+ (double 2) (double 3))))
| null | https://raw.githubusercontent.com/cmsc430/www/23cf4e30e4bac377f656dc21fc7f2aea3005068a/langs/test-programs/jig/let-x-y-plus-nontail-nontail.rkt | racket | #lang racket
(define (double x) (+ x x))
(let ((x 2)) (let ((y 3)) (+ (double 2) (double 3))))
| |
62fccefefae37f914a3bf3597af8915e33632ee35715a02596dfffa8723ea0ee | emqx/emqx | emqx_prometheus_app.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_prometheus/src/emqx_prometheus_app.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_prometheus_app).
-behaviour(application).
-include("emqx_prometheus.hrl").
-expo... |
079d02d9310864b8c5f49b097863910dfa33ba94febad41cae8e831ea453d072 | yav/haskore-vintage | Monads.hs | -------------------
-- This module defines the following common monads:
--
-- SR - state reader monad
State - ( strict ) state transformer monad
-- IOS - IO monad with state
-- Output - output monad
CPS - continuation passing monad
--
Most of these monads can be found in 's papers about m... | null | https://raw.githubusercontent.com/yav/haskore-vintage/eceac0157a1509e3beb6a13e780de62c8f8a0150/src/Haskore/Monads.hs | haskell | -----------------
This module defines the following common monads:
SR - state reader monad
IOS - IO monad with state
Output - output monad
--------------------------------------------------------------
--------------------------------------------------------------
For each type defined in this modu... | State - ( strict ) state transformer monad
CPS - continuation passing monad
Most of these monads can be found in 's papers about monads .
module Haskore.Monads(
exports a Monad and Functor instance for each of these types :
SR, runSR, getSR,
State, runS, getS, set... |
7ee1fd24a29e1d5ef5fff61c4a29711d95f1c69a6fb3d0c6633b3e31d675fc82 | juspay/atlas | CallStatus.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Storage/Queries/CallStatus.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
7ab4fe2363089e01dd0c7ef7c92b25c335a1438a43181441e3df5250d08d5fa0 | cljfx/cljfx | stroke_transition.clj | (ns cljfx.fx.stroke-transition
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce]
[cljfx.fx.transition :as fx.transition])
(:import [javafx.animation StrokeTransition]))
(set! *warn-on-reflection* true)
(... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/stroke_transition.clj | clojure | (ns cljfx.fx.stroke-transition
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce]
[cljfx.fx.transition :as fx.transition])
(:import [javafx.animation StrokeTransition]))
(set! *warn-on-reflection* true)
(... | |
0d0d57024def81313b0d8e9c461b0d56ce5cd4d72cfbb5e852eacac856894604 | ocsigen/ocaml-eliom | length.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/basic-private/length.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type t = int;;
let make x =
if x >= 0 then x else
failwith (Printf.sprintf "cannot build negative ... |
c64c45e85f3190714a95dd891229a4aba41901880547b19a4d925555eb77382e | yuriy-chumak/ol | config.scm | ; Default OpenGL configuration
(define-library (OpenGL config)
(export config)
(import (scheme core) (owl ff))
(begin
(define config {})))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/OpenGL/config.scm | scheme | Default OpenGL configuration | (define-library (OpenGL config)
(export config)
(import (scheme core) (owl ff))
(begin
(define config {})))
|
409fabd29fde50ab88a1ccb65cad0d0d443af851f87e9ac587b1f2caa36aa674 | RefactoringTools/HaRe | C2_TokOut.hs | module C2 where
{-Unfold 'sq' should fail as 'pow', which is used in the definiton of 'sq'
is not in scope.
-}
import D2 hiding (main,pow)
sumSquares1 (x:xs) = sq x + sumSquares1 xs
sumSquares1 [] = 0
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/unfoldDef/C2_TokOut.hs | haskell | Unfold 'sq' should fail as 'pow', which is used in the definiton of 'sq'
is not in scope.
| module C2 where
import D2 hiding (main,pow)
sumSquares1 (x:xs) = sq x + sumSquares1 xs
sumSquares1 [] = 0
|
eb65128f01a6dd68f572763440636c17b3bc4ac178b667f12aadbcdcb41fa9f6 | CoNarrative/precept | sub.cljc | (ns precept.spec.sub
(:require [clojure.spec.alpha :as s]))
(s/def ::name keyword?)
(s/def ::request
(s/or :name-only (s/tuple ::name)
:name-and-params (s/tuple ::name ::params)))
(s/def ::params #(not (coll? %)))
(s/def ::response any?)
(s/def ::resonponse-id uuid?)
| null | https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/src/cljc/precept/spec/sub.cljc | clojure | (ns precept.spec.sub
(:require [clojure.spec.alpha :as s]))
(s/def ::name keyword?)
(s/def ::request
(s/or :name-only (s/tuple ::name)
:name-and-params (s/tuple ::name ::params)))
(s/def ::params #(not (coll? %)))
(s/def ::response any?)
(s/def ::resonponse-id uuid?)
| |
83c434e3d55baa2b993386c687939d0bbcab131d07ce6516f197d9423c5398d6 | coq/coq | stm.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/f84ff30980a923df5ad9cd344708927715550363/stm/stm.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
f2096852f6c231cae14b5626b981014a1dd2e1535605a2def85af2d3429c4669 | Clojure2D/clojure2d-examples | scene.clj | (ns rt4.the-next-week.ch05c.scene
(:require [fastmath.vector :as v]
[fastmath.core :as m]
[rt4.the-next-week.ch05c.hittable :as hittable]
[rt4.the-next-week.ch05c.interval :as interval]
[rt4.the-next-week.ch05c.material :as material]
[rt4.common :as common]
... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05c/scene.clj | clojure | (ns rt4.the-next-week.ch05c.scene
(:require [fastmath.vector :as v]
[fastmath.core :as m]
[rt4.the-next-week.ch05c.hittable :as hittable]
[rt4.the-next-week.ch05c.interval :as interval]
[rt4.the-next-week.ch05c.material :as material]
[rt4.common :as common]
... | |
d2b44ed3636b5bfc3c2cc2bb0cd1a9ac3e6652f1268cbc54215f7f2de45e25ef | borodust/notalone | packages.lisp | (cl:defpackage :notalone
(:use :cl :alexandria :trivial-gamekit)
(:shadowing-import-from :trivial-gamekit
:lerp)
(:export play-game))
| null | https://raw.githubusercontent.com/borodust/notalone/f914ec7b63618f917a976f49ff9fcd57b72a1b1d/packages.lisp | lisp | (cl:defpackage :notalone
(:use :cl :alexandria :trivial-gamekit)
(:shadowing-import-from :trivial-gamekit
:lerp)
(:export play-game))
| |
b1c8dabc58d5c66872961903babe150eddf38df4dd5107bc29c64c326d4bc3ac | brianium/clean-todos | spec.cljc | (ns todos.core.entity.todo.spec
(:require [todos.core.entity.spec :as es]
[todos.core.entity.todo :as todo]
#?(:clj [clojure.spec.alpha :as s]
:cljs [cljs.spec.alpha :as s])))
(s/def ::todo/title string?)
(s/def ::todo/complete? boolean?)
(s/def ::todo/created-at inst?)
(s/def... | null | https://raw.githubusercontent.com/brianium/clean-todos/fca2320fe3bca052787c4ace479ce69d23d58a12/src/todos/core/entity/todo/spec.cljc | clojure | (ns todos.core.entity.todo.spec
(:require [todos.core.entity.spec :as es]
[todos.core.entity.todo :as todo]
#?(:clj [clojure.spec.alpha :as s]
:cljs [cljs.spec.alpha :as s])))
(s/def ::todo/title string?)
(s/def ::todo/complete? boolean?)
(s/def ::todo/created-at inst?)
(s/def... | |
786216be5a16af879c50fec802da89c08f2ac9550e5fa610dbbfbd732acc1d1b | deadpendency/deadpendency | Repo.hs | # OPTIONS_GHC -fno - warn - orphans #
module Common.HtmlReport.Instances.Repo () where
import Common.HtmlReport.HtmlReport
import Common.HtmlReport.HtmlReportDecodeError
import Common.HtmlReport.Instances.QualifiedRepo ()
import Common.Model.Git.Repo
import Common.Parsing.RepoParsing
import Lucid
import Text.HTML.Tag... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/HtmlReport/Instances/Repo.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Common.HtmlReport.Instances.Repo () where
import Common.HtmlReport.HtmlReport
import Common.HtmlReport.HtmlReportDecodeError
import Common.HtmlReport.Instances.QualifiedRepo ()
import Common.Model.Git.Repo
import Common.Parsing.RepoParsing
import Lucid
import Text.HTML.Tag... | |
0eb81ba870d4f8b57ca27150710013ee7de840a578235dd72a0722026331673f | Soostone/hadron | WordCountAuto.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Main where
-------------------------------------------------------------------------------
import qualifie... | null | https://raw.githubusercontent.com/Soostone/hadron/d155ecbcdf0bb0dd442d6fc3e142bea75a312241/examples/WordCountAuto.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
----------------------------------------------------------------------------- | # LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE TupleSections #
module Main where
import qualified Data.ByteString.Char8 as B
import Data.Conduit ((=$=), yield)
import qualified Data.Conduit.List as C
import Data.CSV.Conduit
im... |
3b889bc04f5b16b2224763701b09ec20c2000d73b2453624101b54e6a34621f3 | soegaard/bracket | undefined.rkt | #lang racket/base
(provide undefined undefined?)
(define undefined 'undefined)
(define (undefined? e) (eq? e 'undefined))
| null | https://raw.githubusercontent.com/soegaard/bracket/3d0ace16cf0dbcee4952fd729796e4362e27faa0/bracket/undefined.rkt | racket | #lang racket/base
(provide undefined undefined?)
(define undefined 'undefined)
(define (undefined? e) (eq? e 'undefined))
| |
795464f6dd91f781af9ded073ddc21a0345f80abf3bc7167d84445829b90a213 | ronxin/stolzen | ex2.32.scm | #lang scheme
(define (remove-all el sequence)
(cond
((null? sequence) null)
((= (car sequence) el)
(remove-all el (cdr sequence)))
(else
(cons (car sequence) (remove-all el (cdr sequence))))
)
)
(remove-all 2 (list 1 2 3 4 2))
(remove-all 1 (lis... | null | https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/chapter2/2.2/ex2.32.scm | scheme | #Algorithms
| #lang scheme
(define (remove-all el sequence)
(cond
((null? sequence) null)
((= (car sequence) el)
(remove-all el (cdr sequence)))
(else
(cons (car sequence) (remove-all el (cdr sequence))))
)
)
(remove-all 2 (list 1 2 3 4 2))
(remove-all 1 (lis... |
06ee1c980d26d3633d473ae6c9a26f9e4386707de7d9e29d4686b66960c4f45c | nikita-volkov/refined | QuickCheck.hs | # language
, , ScopedTypeVariables
, TypeApplications
, TypeOperators
, ViewPatterns
#
DataKinds
, GeneralizedNewtypeDeriving
, ScopedTypeVariables
, TypeApplications
, TypeOperators
, ViewPatterns
#-}
module Main (main) where
import Test.QuickCheck
import Refined
main :: IO... | null | https://raw.githubusercontent.com/nikita-volkov/refined/53c9f7fa4556658e3ffbafe59f93754bee2b6466/test/QuickCheck.hs | haskell | expectFailure expects the error inside the property itself, not while
generating the argument to the property. So we need to hide generation from
it. | # language
, , ScopedTypeVariables
, TypeApplications
, TypeOperators
, ViewPatterns
#
DataKinds
, GeneralizedNewtypeDeriving
, ScopedTypeVariables
, TypeApplications
, TypeOperators
, ViewPatterns
#-}
module Main (main) where
import Test.QuickCheck
import Refined
main :: IO... |
0eeddd593c582e205677189fa9a2616947db58ad7afce735bc8bceedfc5d25b8 | ultralisp/ultralisp | packages-extractor.lisp | (defpackage #:ultralisp/packages-extractor
(:use #:cl)
(:export
#:get-packages))
(in-package #:ultralisp/packages-extractor)
(defvar *component-packages*)
(defvar *current-system*)
(defvar *orig-standard-output* *standard-output*)
(defvar *orig-error-output* *error-output*)
(defparameter *timeout* 60
"Pack... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/packages-extractor.lisp | lisp | (parent (asdf::missing-required-by c))
Probably, this is a package inferred system
then we need to load a parent system because
it can have some required dependencies, like ningle do.
А потом делать: | (defpackage #:ultralisp/packages-extractor
(:use #:cl)
(:export
#:get-packages))
(in-package #:ultralisp/packages-extractor)
(defvar *component-packages*)
(defvar *current-system*)
(defvar *orig-standard-output* *standard-output*)
(defvar *orig-error-output* *error-output*)
(defparameter *timeout* 60
"Pack... |
0afaf8e2e01c1501204f4bd6243efeeb464af24d81f89f38205e75a5fd10c06b | 2600hz/kazoo | kz_attachment.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc Account document
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one a... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kz_attachment.erl | erlang | -----------------------------------------------------------------------------
@doc Account document
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc
@end
-------------------------------------------... | ( C ) 2010 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kz_attachment).
-export([decode_base64/1]).
-include("kz_documents.hrl").
-spec decode_base... |
a628a01568a8f2297b5edb4f2b9e371251186c07f06b4052b3861401ca4823cb | RichiH/git-annex | View.hs | git - annex command
-
- Copyright 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.View where
import Command
import qualified Git
import qualified Git.Command
import qualified Gi... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/View.hs | haskell | A git repo can easily have empty directories in it,
- and this pollutes the view, so remove them. | git - annex command
-
- Copyright 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.View where
import Command
import qualified Git
import qualified Git.Command
import qualified Gi... |
6cebaa1fd7952fdfc8833f4bcd07f6608c95a8895dce29626564cd4795749381 | glennsl/bs-json | complex.ml | type line = {
start: point;
end_: point;
thickness: int option
}
and point = {
x: int;
y: int
}
module Decode = struct
let point json =
Json.Decode.{
x = json |> field "x" int;
y = json |> field "y" int
}
let line json =
Json.Decode.{
start = json |> field "start" point... | null | https://raw.githubusercontent.com/glennsl/bs-json/1350d3f416a7a6486950411bb5b09e6905d32f25/examples/complex.ml | ocaml | type line = {
start: point;
end_: point;
thickness: int option
}
and point = {
x: int;
y: int
}
module Decode = struct
let point json =
Json.Decode.{
x = json |> field "x" int;
y = json |> field "y" int
}
let line json =
Json.Decode.{
start = json |> field "start" point... | |
b5083bfb95d21f3256062ba9de9765e2e3a8f48f5e5428b51db9783079b5eae3 | ghc/packages-dph | Unlifted_Permutes.hs | import Testsuite
import Data.Array.Parallel.Unlifted
$(testcases [ "" <@ [t| ( (), Char, Bool, Int ) |]
, "acc" <@ [t| ( (), Int ) |]
, "num" <@ [t| ( Int ) |]
, "ord" <@ [t| ( (), Char, Bool, Int ) |]
, "enum" <@ [t| ( ... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-test/old/Unlifted_Permutes.hs | haskell | missing: permuteU
missing: bpermuteU
missing: bpermuteDftU | import Testsuite
import Data.Array.Parallel.Unlifted
$(testcases [ "" <@ [t| ( (), Char, Bool, Int ) |]
, "acc" <@ [t| ( (), Int ) |]
, "num" <@ [t| ( Int ) |]
, "ord" <@ [t| ( (), Char, Bool, Int ) |]
, "enum" <@ [t| ( ... |
28f18b09690f1dc3a13d3c718d9dccbe42d641dd5d9db486309412ec2cc4868b | haskell-game/bgfx | Hello.hs | # LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import BGFX
import Data.Bits
import Foreign.Ptr
import qualified SDL
import Unsafe.Coerce
foreign import ccall unsafe
"bgfx_sdl_set_window" bgfxSdlSetWindow :: Ptr a -> IO ()
main :: IO ()
main = do
let width = 1280
let... | null | https://raw.githubusercontent.com/haskell-game/bgfx/e54dfbbb1eedda0aa6b23583cc8f105422ce5d84/Hello.hs | haskell | # LANGUAGE OverloadedStrings #
done <- _processEvents width height debug reset
bgfxDbgTextClear
, bx::uint16_max(height/2/16, 6)-6
, s_logo
); | # LANGUAGE ForeignFunctionInterface #
module Main where
import BGFX
import Data.Bits
import Foreign.Ptr
import qualified SDL
import Unsafe.Coerce
foreign import ccall unsafe
"bgfx_sdl_set_window" bgfxSdlSetWindow :: Ptr a -> IO ()
main :: IO ()
main = do
let width = 1280
let height = 720
let debug = BGFX_DE... |
24bcbacaac1970a4a9eddbe89c6580ba4f3e569dbf51feb2b3f308e46a065072 | marcoheisig/adventofcode | day-07.lisp | (defpackage :adventofcode-2019-day-7
(:use :cl))
(in-package :adventofcode-2019-day-7)
The Intcode Computer .
(defun read-intcode-program (filename)
(with-open-file (stream filename :direction :input)
(map 'vector
#'parse-integer
(split-sequence:split-sequence #\, (read-line stream nil ni... | null | https://raw.githubusercontent.com/marcoheisig/adventofcode/e96a0da17cd79f424af984ed2648b49ffdacb893/2019/day-07/day-07.lisp | lisp | The instructions.
End of instructions.
A part-2 amplifier is different from an intcode machine, in that each
output instruction transfers control.
Run the loop. | (defpackage :adventofcode-2019-day-7
(:use :cl))
(in-package :adventofcode-2019-day-7)
The Intcode Computer .
(defun read-intcode-program (filename)
(with-open-file (stream filename :direction :input)
(map 'vector
#'parse-integer
(split-sequence:split-sequence #\, (read-line stream nil ni... |
15ef6d5bf4fcc942388ed2ad4444b48b50965135fe71945bb4fc44dc3de457c6 | ocsigen/ocsimore | wiki_syntax_types.mli | open Eliom_content
(* BB XXX why not type service_href = { a_link : ...; uri : Html5.F.uri } *)
module type Service_href = sig
val a_link :
?a:Html5_types.a_attrib Html5.F.attrib list ->
'a Html5.F.elt list ->
[> 'a Html5_types.a ] Html5.F.elt
val uri : Html5.F.uri
end
type service_href = (module ... | null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/wiki/server/wiki_syntax_types.mli | ocaml | BB XXX why not type service_href = { a_link : ...; uri : Html5.F.uri }
* [preparse_string wb content] does possibly some replacements in
[content] and may have arbitrary side effects in the process
(e.g. creating wikiboxes etc.).
* A wikicreole_parser is essentially a [Wikicreole.builder] object
but ... | open Eliom_content
module type Service_href = sig
val a_link :
?a:Html5_types.a_attrib Html5.F.attrib list ->
'a Html5.F.elt list ->
[> 'a Html5_types.a ] Html5.F.elt
val uri : Html5.F.uri
end
type service_href = (module Service_href)
type href =
| String_href of string
| Service_href of serv... |
f5d0acdc0044a7af47166740db0212fcc72b5e7b263802d1dbeb51afa2948ccd | toschoo/mom | push1.hs | module Main
where
import Network.Mom.Stompl.Client.Queue
import Network.Mom.Stompl.Patterns.Basic
import qualified Data.ByteString.Char8 as B
import System.Environment
import System.Exit
import Network.Socket
import Codec.MIME.Type (nullType)
main :: IO ()
main = do
os <- getArgs
case os of
... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/stomp-patterns/test/smoke/push1.hs | haskell | module Main
where
import Network.Mom.Stompl.Client.Queue
import Network.Mom.Stompl.Patterns.Basic
import qualified Data.ByteString.Char8 as B
import System.Environment
import System.Exit
import Network.Socket
import Codec.MIME.Type (nullType)
main :: IO ()
main = do
os <- getArgs
case os of
... | |
bdb0ca189cad0d9240ae88598b42d0f0416291e46157c5cfb635c0217ccd2ce6 | UBTECH-Walker/WalkerSimulationFor2020WAIC | EcatPidSrv.lisp | ; Auto-generated. Do not edit!
(cl:in-package servo_ctrl-srv)
;//! \htmlinclude EcatPidSrv-request.msg.html
(cl:defclass <EcatPidSrv-request> (roslisp-msg-protocol:ros-message)
((cmd
:reader cmd
:initarg :cmd
:type cl:string
:initform "")
(servo
:reader servo
:initarg :servo
:type ... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/servo_ctrl/srv/EcatPidSrv.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude EcatPidSrv-request.msg.html
//! \htmlinclude EcatPidSrv-response.msg.html |
(cl:in-package servo_ctrl-srv)
(cl:defclass <EcatPidSrv-request> (roslisp-msg-protocol:ros-message)
((cmd
:reader cmd
:initarg :cmd
:type cl:string
:initform "")
(servo
:reader servo
:initarg :servo
:type cl:string
:initform "")
(mode
:reader mode
:initarg :mode
... |
59936059162989d149606e754b1ec599ce9b06f706b70171e79e2888eb8ce8c9 | mzp/coq-ruby | inductive.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/kernel/inductive.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
raise Not_found if not an inductive... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : inductive.ml 1164... |
8fe5f53c2d53ce89435ab50907f75058aeac547e2efe3394ada9678290b72da3 | collaborativetrust/WikiTrust | page_factory.mli |
Copyright ( c ) 2007 - 2008 The Regents of the University of California
All rights reserved .
Authors : , , , and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the abo... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/analysis/page_factory.mli | ocaml | revision_id
page_id
timestamp
time
contributor
user_id
ip_addr
username
is_minor
comment
text
* [eval] evaluates the page. It must be called once and once
only, once all revisions have been read.
* [print_id_title] prints the page id and title.
* Returns an argument parser to proces... |
Copyright ( c ) 2007 - 2008 The Regents of the University of California
All rights reserved .
Authors : , , , and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the abo... |
f494fba6f9083dd13d43886c9456c6793daea7a14863771ef4d4b6264c0e5572 | tov/type-systems-seminar | stlc.rkt | #lang turnstile/lang
(provide (type-out ->)
(type-out Unit) void ignore begin
(type-out Bool) not if
(type-out Int) - zero? positive? negative? random
(type-out String) int->string string-append
(type-out Vec) vec vec-ref vec-set! build-vec vec-len
(type-out Record... | null | https://raw.githubusercontent.com/tov/type-systems-seminar/f9c45af743606bce4613dcf6fd4f63b2526d6aef/turnstile/stlc.rkt | racket | Functions can have 0 or more arguments: | #lang turnstile/lang
(provide (type-out ->)
(type-out Unit) void ignore begin
(type-out Bool) not if
(type-out Int) - zero? positive? negative? random
(type-out String) int->string string-append
(type-out Vec) vec vec-ref vec-set! build-vec vec-len
(type-out Record... |
f161a3c2eb9831a16622df89dbe134d3ca87223059ecb8273ad82a05a9acca0a | doomeer/kalandralang | http_request.ml | (* USES uri *)
(* USES tls *)
(* USES cohttp-lwt-unix *)
USES lwt
open Misc
let (let*) = Lwt.bind
let return = Lwt.return
let get ?(headers = Cohttp.Header.init ()) uri =
Lwt_main.run @@
let* (response, response_body) = Cohttp_lwt_unix.Client.get ~headers uri in
let* body = Cohttp_lwt.Body.to_string response... | null | https://raw.githubusercontent.com/doomeer/kalandralang/1c74cd662ffc0c365c95ae1f5d1a4410bde164d7/src/http_request.ml | ocaml | USES uri
USES tls
USES cohttp-lwt-unix
OK: Succuessful get request with body content.
Not-modified: Succuessful get request with no body content,
content has not been modified.
Else, report error. | USES lwt
open Misc
let (let*) = Lwt.bind
let return = Lwt.return
let get ?(headers = Cohttp.Header.init ()) uri =
Lwt_main.run @@
let* (response, response_body) = Cohttp_lwt_unix.Client.get ~headers uri in
let* body = Cohttp_lwt.Body.to_string response_body in
let code = response |> Cohttp.Response.status ... |
51f45a78e41086bb8249f513e3a154c3e36b7df6e7285e1d8d62e513296720ee | rodrigosetti/stamps | alpha.rkt | #lang s-exp stamps/lang
(define-shape shape
(circle
[saturation 1 ]
[hue 0 ]
[brightness 1 ]
[alpha -0.5])
(circle
[translate -0.3 -0.5]
[saturation 1 ]
[hue 120]
[brightness 1 ]
[alpha -0.5])
(circle
[translate 0.3 -0.5]
[saturation 1 ]
[hue ... | null | https://raw.githubusercontent.com/rodrigosetti/stamps/958938dd71fdaa64041ea13f1b491bda628bda9c/examples/alpha.rkt | racket | #lang s-exp stamps/lang
(define-shape shape
(circle
[saturation 1 ]
[hue 0 ]
[brightness 1 ]
[alpha -0.5])
(circle
[translate -0.3 -0.5]
[saturation 1 ]
[hue 120]
[brightness 1 ]
[alpha -0.5])
(circle
[translate 0.3 -0.5]
[saturation 1 ]
[hue ... | |
2ef96eccaefd55271459bd618b0ae5d1d06124a2ac16ea4ae57108a40fc3e94d | Helium4Haskell/helium | TooGenBug.hs | f :: a -> Int
f x = length x
g :: Bool -> Int
g = f
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/typeerrors/Examples/TooGenBug.hs | haskell | f :: a -> Int
f x = length x
g :: Bool -> Int
g = f
| |
0647d8fc23571ddb6b9f72808d11a4e036733f4f111d3b814df65fa2784e1a7c | elastic/eui-cljs | icon_logo_enterprise_search.cljs | (ns eui.icon-logo-enterprise-search
(:require ["@elastic/eui/lib/components/icon/assets/logo_enterprise_search.js" :as eui]))
(def logoEnterpriseSearch eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_logo_enterprise_search.cljs | clojure | (ns eui.icon-logo-enterprise-search
(:require ["@elastic/eui/lib/components/icon/assets/logo_enterprise_search.js" :as eui]))
(def logoEnterpriseSearch eui/icon)
| |
a0a0af5f9216e7a2cdc282275ad83e1cc72f2bef4a0b57ccdb8de9b632aa92b6 | cl-library-docs/common-lisp-libraries | functions.lisp | (in-package :cl-rtd)
This file gets the documentation of Functions , Macros and Generic Functions
(reader:enable-reader-syntax 'get-val)
(defun arglist-symbols (arg-list)
(let ((special-symbols '(&optional &key)))
(iter
(for elt in arg-list)
(for linear
initially nil
then (or... | null | https://raw.githubusercontent.com/cl-library-docs/common-lisp-libraries/5539265675421a607013b17e6e8030a17fc9c2fb/src/functions.lisp | lisp | TODO: This should only disable listing accessors separately
Usually, docstring contain symbols in upcase formats. However,
quoted-and-downcased symbols "look nicer".
A docstring-ed symbol cannot contain a space and '(', ')' characters.
Some also contain symbols in `format'. We want them to be in `format`.
Ideally... | (in-package :cl-rtd)
This file gets the documentation of Functions , Macros and Generic Functions
(reader:enable-reader-syntax 'get-val)
(defun arglist-symbols (arg-list)
(let ((special-symbols '(&optional &key)))
(iter
(for elt in arg-list)
(for linear
initially nil
then (or... |
c252e858dbbb6f6b44f21c5a4ef32df9558c1cc789e29dc35503ff973d98a6cb | zotonic/cowmachine | controller.erl | -module(controller).
-export([
execute/2,
process/4,
content_types_provided/1
]).
%% Cowmachine API
Middleware export , place this module in the request as controller .
execute(Req, Env) ->
{ok, Req, Env#{ cowmachine_controller => ?MODULE }}.
% Controller export
process(<<"GET">>, _Accep... | null | https://raw.githubusercontent.com/zotonic/cowmachine/6252b8cab6daa80f60dd40a5c8b0f6217d34b20d/examples/hello_world_rest/apps/main/src/controller.erl | erlang | Cowmachine API
Controller export
internal functions
| -module(controller).
-export([
execute/2,
process/4,
content_types_provided/1
]).
Middleware export , place this module in the request as controller .
execute(Req, Env) ->
{ok, Req, Env#{ cowmachine_controller => ?MODULE }}.
process(<<"GET">>, _AcceptedCT, {<<"text">>, <<"html">>, _}, Cont... |
4a0a57f37059741c23ba050d709537e0ebb9ce67cba5f162493ad27f846a1da3 | foreverbell/project-euler-solutions | 543.hs | import Common.Numbers.InfiniteSequence (fibnoacci)
import Common.Numbers.Primes (primesTo')
import qualified Data.Vector.Unboxed as V
import Data.List (foldl')
Goldbach 's conjecture
fib :: [Int]
fib = reverse $ take 45 fibnoacci
isPrimeTable = fst $ primesTo' (head fib)
contrib n = ... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/543.hs | haskell | import Common.Numbers.InfiniteSequence (fibnoacci)
import Common.Numbers.Primes (primesTo')
import qualified Data.Vector.Unboxed as V
import Data.List (foldl')
Goldbach 's conjecture
fib :: [Int]
fib = reverse $ take 45 fibnoacci
isPrimeTable = fst $ primesTo' (head fib)
contrib n = ... | |
509e65468f439d5a0ade0b7fb3374b53a731a8cd07a6ca788ad5b578e9f4b6ef | flodihn/NextGen | connection.erl | -module(connection).
-behaviour(gen_fsm).
-include("protocol.hrl").
-include("charinfo.hrl").
-include("state.hrl").
-include("char.hrl").
States
-export([
conn_lost/2,
connected/2,
playing/2,
observing/2
]).
% API
-export([
socket_send/2
]).
% gen_fsm callbacks
-export([
start_link... | null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/ConnectionServer/src/connection.erl | erlang | API
gen_fsm callbacks
For now we terminate the gen_fsm, perhaps we should't make it still run
and the player can reconnected with preseved state?
error_logger:info_report([{tcp, Socket, Data}]), | -module(connection).
-behaviour(gen_fsm).
-include("protocol.hrl").
-include("charinfo.hrl").
-include("state.hrl").
-include("char.hrl").
States
-export([
conn_lost/2,
connected/2,
playing/2,
observing/2
]).
-export([
socket_send/2
]).
-export([
start_link/1,
init/1,
handle... |
37f2783d01f8945a74344afddd9c9315273b9652c7088dbee74024b9419b3193 | cram2/cram | ptu.lisp | ;;;
Copyright ( c ) 2016 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_pr2/cram_pr2_low_level/src/ptu.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2016 , < >
* Neither the name of the Institute for Artificial Intelligence/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
35bf4915a286a46eef765e7cf9eaf1f68e4dea313ca78974c659425995d41f91 | Clozure/ccl-tests | pathname-type.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Dec 6 14:45:16 2003
;;;; Contains: Tests for PATHNAME-TYPE
(in-package :cl-test)
(compile-and-load "pathnames-aux.lsp")
(deftest pathname-type.1
(loop for p in *pathnames*
for type = (pathname-type p)
unless (or (stringp type)
(member type '(nil :w... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/pathname-type.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for PATHNAME-TYPE
section 19.3.2.1 | Author :
Created : Sat Dec 6 14:45:16 2003
(in-package :cl-test)
(compile-and-load "pathnames-aux.lsp")
(deftest pathname-type.1
(loop for p in *pathnames*
for type = (pathname-type p)
unless (or (stringp type)
(member type '(nil :wild :unspecific)))
collect (list p type))
nil)
(deftest pat... |
8c87d09fb9aa759e5ce6a4674150f8a2aededdfa6f97002143d494747659b0c2 | orivej/pzmq | grovel.lisp | (in-package #:pzmq)
(include "zmq.h")
(ctype size "size_t")
(cstruct %msg "zmq_msg_t")
(bitfield (events :base-type :short)
((:pollin "ZMQ_POLLIN"))
((:pollout "ZMQ_POLLOUT"))
((:pollerr "ZMQ_POLLERR")))
(cstruct pollitem "zmq_pollitem_t"
(socket "socket" :type :pointer)
(events "events" :type events)
(reve... | null | https://raw.githubusercontent.com/orivej/pzmq/6f7b2ca02c23ea53510a9b0e0f181d5364ce9d32/grovel.lisp | lisp | (in-package #:pzmq)
(include "zmq.h")
(ctype size "size_t")
(cstruct %msg "zmq_msg_t")
(bitfield (events :base-type :short)
((:pollin "ZMQ_POLLIN"))
((:pollout "ZMQ_POLLOUT"))
((:pollerr "ZMQ_POLLERR")))
(cstruct pollitem "zmq_pollitem_t"
(socket "socket" :type :pointer)
(events "events" :type events)
(reve... | |
c02b559474d326a6d8a6fb45ebb83bd9c65dff7b66e2bd9b079355a08b510675 | facebookarchive/pfff | parse_minic.mli |
val parse:
Common.filename -> Ast_minic.program
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/mini/parse_minic.mli | ocaml |
val parse:
Common.filename -> Ast_minic.program
| |
3f9b02d39475439d483798413a206de149038dd55e22a494320bbef5421cfee8 | gizmo385/discord.clj | core.clj | (ns discord.interactions.core
"This namespace implements the core routing and response functionality for handling interactions
within Discord. Functions and implementations for handling specific kinds of interactions are
delegated to other namespaces, such as `discord.interactions.commands` for various kinds of... | null | https://raw.githubusercontent.com/gizmo385/discord.clj/5c2cadc8faa25e8bb50211f60457057cbed6dd90/src/discord/interactions/core.clj | clojure |
Defining some constants from the developer documentation
Responding to interactions
Other interaction-generic helpers
For guild messages
For DMs
Handling generic interactions over the gateway
| (ns discord.interactions.core
"This namespace implements the core routing and response functionality for handling interactions
within Discord. Functions and implementations for handling specific kinds of interactions are
delegated to other namespaces, such as `discord.interactions.commands` for various kinds of... |
f8cdab9d5df51f849e43dfc8377a008bcf08523b6646d556357380cc870c8304 | genenetwork/guix-bioinformatics | hyphy.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 < >
Copyright © 2019 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; ei... | null | https://raw.githubusercontent.com/genenetwork/guix-bioinformatics/9e1e668e4f9f9e2b595620fda831da0525db4095/gn/packages/hyphy.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 < >
Copyright © 2019 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gn packages hyphy)
#:use-module ((guix licenses) #:prefix license:)
... |
06359293f8bf59bde164edc5ba0812afa723dc63c4a0496ea1ab036b653fbd71 | unclebob/more-speech | article_tree_util.clj | (ns more-speech.ui.swing.article-tree-util
(:use [seesaw core])
(:require [more-speech.mem :refer :all]
[more-speech.db.gateway :as gateway]
[more-speech.config :refer [get-db]])
(:import (java.util Collections)
(javax.swing.tree DefaultMutableTreeNode TreePath)))
(defn find-ch... | null | https://raw.githubusercontent.com/unclebob/more-speech/460b77d57551f19ca0810acc7dd1656a3160fdf8/src/more_speech/ui/swing/article_tree_util.clj | clojure | (ns more-speech.ui.swing.article-tree-util
(:use [seesaw core])
(:require [more-speech.mem :refer :all]
[more-speech.db.gateway :as gateway]
[more-speech.config :refer [get-db]])
(:import (java.util Collections)
(javax.swing.tree DefaultMutableTreeNode TreePath)))
(defn find-ch... | |
cd63db51c5a43d9495a0944952ba655687969954c8c54d89690933c3e6d45c98 | huangz1990/SICP-answers | 50-rotate270.scm | 50-rotate270.scm
(define (rotate270 painter)
(transform-painter painter
(make-vect 0.0 1.0)
(make-vect 0.0 0.0)
(make-vect 1.0 1.0)))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/50-rotate270.scm | scheme | 50-rotate270.scm
(define (rotate270 painter)
(transform-painter painter
(make-vect 0.0 1.0)
(make-vect 0.0 0.0)
(make-vect 1.0 1.0)))
| |
25280a529e65bb59126309444666a65396b5bf72444ae7df485cad8e28841d2d | haskell-works/hw-json | Types.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE DuplicateRecordFields #
module App.Commands.Types
( CountAesonOptions(..)
, CountOptions(..)
, CreateIndexOptions(..)
, DemoOptions(..)
, FileIndexes(..)
) where
import Data.Text (Text)
import GHC.Generics
data CreateIndexOptions = CreateIndexOptions
... | null | https://raw.githubusercontent.com/haskell-works/hw-json/371d20c836dba90271d62d736f2b51b9cf418ea6/app/App/Commands/Types.hs | haskell | # LANGUAGE DeriveGeneric # | # LANGUAGE DuplicateRecordFields #
module App.Commands.Types
( CountAesonOptions(..)
, CountOptions(..)
, CreateIndexOptions(..)
, DemoOptions(..)
, FileIndexes(..)
) where
import Data.Text (Text)
import GHC.Generics
data CreateIndexOptions = CreateIndexOptions
{ filePath :: FilePath
, backend... |
6192d1eb4b97515b41c8eda3ff581d5a8f3ea4112e1160210703e52f5cd69610 | maurer/symfuzz | process.ml | (* SymFuzz *)
* process handling
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
mo... | null | https://raw.githubusercontent.com/maurer/symfuzz/ea6298746a23b6d266d28d27c6ff952a7bd14885/src/analyzer/process.ml | ocaml | SymFuzz
simple fork and exec
child
parent
proc map parsing
get loaded shared object
Printf.printf "%s\n" line; |
* process handling
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , a... |
1eb2b58cbd0db1ddd94c38fbc9999e3ee6a6ac67e0c3f716673f8ad68a9b414d | wavewave/fficxx | SharedPtrSpec.hs | # LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module SharedPtrSpec
( spec,
)
where
import Control.Concurrent (forkIO, forkOS, threadDelay)
import Control.Concurrent.Async (async, wait)
import qualified Data.ByteString.Char8 a... | null | https://raw.githubusercontent.com/wavewave/fficxx/6a648ee3cd0c4adc1da512403196bee98259a6b3/fficxx-test/test/SharedPtrSpec.hs | haskell | # LANGUAGE OverloadedStrings #
| # LANGUAGE ForeignFunctionInterface #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module SharedPtrSpec
( spec,
)
where
import Control.Concurrent (forkIO, forkOS, threadDelay)
import Control.Concurrent.Async (async, wait)
import qualified Data.ByteString.Char8 as B
import FFICXX.Runtime.CodeGen.C... |
b98bc6561cf972a8e79d4b22f6ee37ee08031bf6ee6864ec37f74922e60c4e2f | lexi-lambda/freer-simple | TH.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
Originally ported from code written by ( @isovector ) , available
at -effects/pull/28 .
|
This module provides Template Haskell functions for automatically generating
effect operation functions ( that is , functions that use ' ... | null | https://raw.githubusercontent.com/lexi-lambda/freer-simple/87403cc229edbea0c2fab7ef98a2c098c8c8d286/src/Control/Monad/Freer/TH.hs | haskell | # LANGUAGE OverloadedStrings #
generates a function that uses 'send' with each operation. For more
function.
@
Output :: String -> Lang ()
-- | Output a string.
=> String -- ^ String to output.
-> Eff effs () -- ^ No result.
@
lifted function.
@x :: Member (Effect e) effs => a -> b -> ... | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
Originally ported from code written by ( @isovector ) , available
at -effects/pull/28 .
|
This module provides Template Haskell functions for automatically generating
effect operation functions ( that is , functions that use ' send ' ) from a given
effect alge... |
d20c033e5b16eb0c353c56ce5ca553c451c774b9fd7758748cdce9c2001ac667 | footprintanalytics/footprint-web | sync.clj | (ns metabase.driver.sql-jdbc.sync
"Implementations for sync-related driver multimethods for SQL JDBC drivers, using JDBC DatabaseMetaData."
(:require [metabase.driver.sql-jdbc.sync.describe-database :as sql-jdbc.describe-database]
[metabase.driver.sql-jdbc.sync.describe-table :as sql-jdbc.describe-table... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/driver/sql_jdbc/sync.clj | clojure | (ns metabase.driver.sql-jdbc.sync
"Implementations for sync-related driver multimethods for SQL JDBC drivers, using JDBC DatabaseMetaData."
(:require [metabase.driver.sql-jdbc.sync.describe-database :as sql-jdbc.describe-database]
[metabase.driver.sql-jdbc.sync.describe-table :as sql-jdbc.describe-table... | |
53c3d74fdeb528791982d6c05eb032a505c1f96f73938d186fe75b2a33c3637e | shirok/Gauche | gen-accum.scm | (define (check-generators-and-accumulators)
(define test-bvec (bitvector 1 0 1 1 0 1 0 1))
(print-header "Checking generators and accumulators...")
;;; Generators
(check (eof-object? ((make-bitvector/int-generator (bitvector)))) => #t)
(check (eof-object? ((make-bitvector/bool-generator (bitvector)))) => #t... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/include/test/gen-accum.scm | scheme | Generators
Accumulator
Accumulate integers.
Accumulate booleans.
Generator/accumulator identities
Accumulating generated values yields the original structure.
Generating accumulated values yields the original values. | (define (check-generators-and-accumulators)
(define test-bvec (bitvector 1 0 1 1 0 1 0 1))
(print-header "Checking generators and accumulators...")
(check (eof-object? ((make-bitvector/int-generator (bitvector)))) => #t)
(check (eof-object? ((make-bitvector/bool-generator (bitvector)))) => #t)
(check (bitve... |
9f4be518ad2a63394879df7e49715d59e1d25b84eb0641129a48acb1e20b42f1 | LPCIC/matita | libraryClean.mli | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/library/libraryClean.mli | ocaml | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... | |
ad71a398e23a5d72509e21c29550d885c0c51cb0e8ad4fc5107d673beb257955 | silviucpp/mysql_pool | mysql_utils.erl | -module(mysql_utils).
-export([
env/1,
lookup/2,
lookup/3,
replace/3,
delete/2,
as_json/1,
as_json/2,
quote/1
]).
env(Key) ->
application:get_env(mysql_pool, Key).
lookup(Key, List, Default) ->
case lists:keyfind(Key, 1, List) of
{Key, Result} ->
Result;
... | null | https://raw.githubusercontent.com/silviucpp/mysql_pool/c41f99090ad2f73b6b6c909f7cb324b421177f93/src/mysql_utils.erl | erlang | convert datetime, date, time into string
decimals seconds are not supported yet. so for the moment are truncated.
Quote a string or binary value so that it can be included safely in a MySQL query.
- 34 is $"
- 39 is $' | -module(mysql_utils).
-export([
env/1,
lookup/2,
lookup/3,
replace/3,
delete/2,
as_json/1,
as_json/2,
quote/1
]).
env(Key) ->
application:get_env(mysql_pool, Key).
lookup(Key, List, Default) ->
case lists:keyfind(Key, 1, List) of
{Key, Result} ->
Result;
... |
d4cb68338cec43afc823bca1ca89d0b71cf1be826285f59b29c9a10410022d0d | VERIMAG-Polyhedra/VPL | LinearizeBackend.mli | open ASTerm
open ImpureConfig
open Map_poly
open NumC
open PedraQBackend
val oracle : linearizeContext -> ZTerm.t Core.Base.imp
val handelman_oracle : t -> cmpG -> QTerm.t -> Handelman_compute.certif list
| null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/LinearizeBackend.mli | ocaml | open ASTerm
open ImpureConfig
open Map_poly
open NumC
open PedraQBackend
val oracle : linearizeContext -> ZTerm.t Core.Base.imp
val handelman_oracle : t -> cmpG -> QTerm.t -> Handelman_compute.certif list
| |
a787127c85bb9f5aa8c560c3e2a35c7e1d03c5557fe7cab1998fe8dc1eb88b61 | nikita-volkov/rerebase | TMVar.hs | module Control.Concurrent.STM.TMVar
(
module Rebase.Control.Concurrent.STM.TMVar
)
where
import Rebase.Control.Concurrent.STM.TMVar
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Concurrent/STM/TMVar.hs | haskell | module Control.Concurrent.STM.TMVar
(
module Rebase.Control.Concurrent.STM.TMVar
)
where
import Rebase.Control.Concurrent.STM.TMVar
| |
6d9929b1748cf3a97b17c76463c739efa185d83e8dda120dd0a423a716eb9bc2 | HaskellZhangSong/Introduction_to_Haskell_2ed_source | FreeMonad1.hs | {-# LANGUAGE GADTs, KindSignatures #-}
import Control.Monad
import Control.Monad.State
data Interaction :: * -> * where
Say :: String -> Interaction ()
Ask :: Interaction String
Return :: a -> Interaction a
Bind :: Interaction a -> (a -> Interaction b) -> Interaction b
instance Functor Interaction
i... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C14/FreeMonad1.hs | haskell | # LANGUAGE GADTs, KindSignatures # | import Control.Monad
import Control.Monad.State
data Interaction :: * -> * where
Say :: String -> Interaction ()
Ask :: Interaction String
Return :: a -> Interaction a
Bind :: Interaction a -> (a -> Interaction b) -> Interaction b
instance Functor Interaction
instance Applicative Interaction where
... |
0197f04f09afa106e058771dcc94a252a48fea0936e66bdeadb5bdb6450c0070 | facebook/infer | PulseModelsOptional.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/9eed1a92b987b29a45b4cf95e0b5ee19a58a8200/infer/src/pulse/PulseModelsOptional.ml | ocaml | This model marks the optional object to be non-empty
This model marks the optional object to be non-empty by storing value.
We need an expression corresponding to the value of the argument we pass to
the constructor.
create the list of types of the actual arguments of the constructor
if the model cann... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
0a356d597c11e9feb95fb9da880c1c92c236c055b905471ed3140d4de84093a5 | bamboo/idris-cil | Main.hs | module Main where
import Control.Monad (liftM)
import IRTS.CodegenCil
import IRTS.CodegenCommon
import IRTS.Compiler
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.Main
import System.Environment
import System.Exit
data Opts = Opts { inputs :: [FilePath]
, output :: FilePath }
main :: ... | null | https://raw.githubusercontent.com/bamboo/idris-cil/37ec9a3cd783e67ba03369052ce6e177621fc147/main/Main.hs | haskell | module Main where
import Control.Monad (liftM)
import IRTS.CodegenCil
import IRTS.CodegenCommon
import IRTS.Compiler
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.Main
import System.Environment
import System.Exit
data Opts = Opts { inputs :: [FilePath]
, output :: FilePath }
main :: ... | |
a7adef7e4fd625f89937c70cb2199347139439845cdf36a81c33b3c3488c1479 | Yuras/pdf-toolbox | Util.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Object.Util
(
spec,
)
where
import Pdf.Core.Object
import Pdf.Core.Object.Util
import qualified Data.Vector as Vector
import qualified Data.HashMap.Strict as HashMap
import Test.Hspec
spec :: Spec
spec = describe "Object.Util" $ do
boolValueSpec
stringValueSpec
... | null | https://raw.githubusercontent.com/Yuras/pdf-toolbox/f1d20479fe6782bc293468ac05186e658216388b/core/test/Test/Object/Util.hs | haskell | # LANGUAGE OverloadedStrings # |
module Test.Object.Util
(
spec,
)
where
import Pdf.Core.Object
import Pdf.Core.Object.Util
import qualified Data.Vector as Vector
import qualified Data.HashMap.Strict as HashMap
import Test.Hspec
spec :: Spec
spec = describe "Object.Util" $ do
boolValueSpec
stringValueSpec
intValueSpec
realValueSpec
arr... |
cdc78c1b045089a4c591eb57957977c06357812f5e30fb9da9d5fc047f9a0439 | clojure-interop/aws-api | AmazonPinpointSMSVoiceClient.clj | (ns com.amazonaws.services.pinpointsmsvoice.AmazonPinpointSMSVoiceClient
"Client for accessing Pinpoint SMS Voice. All service calls made using this client are blocking, and will not return
until the service call completes.
Pinpoint SMS and Voice Messaging public facing APIs"
(:refer-clojure :only [require com... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.pinpointsmsvoice/src/com/amazonaws/services/pinpointsmsvoice/AmazonPinpointSMSVoiceClient.clj | clojure | (ns com.amazonaws.services.pinpointsmsvoice.AmazonPinpointSMSVoiceClient
"Client for accessing Pinpoint SMS Voice. All service calls made using this client are blocking, and will not return
until the service call completes.
Pinpoint SMS and Voice Messaging public facing APIs"
(:refer-clojure :only [require com... | |
913ef64120b47e40ce2de34cbe2612fc657a2b08586087eb9af1487e6aaa619d | xapi-project/xen-api | sync_networking.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/sync_networking.ml | ocaml | This, and the associated startup item in xapi.ml, can be removed as soon as upgrades from anything
* pre-Boston are no longer supported.
Fix incorrect PIF.bond_slave_of fields
* Copy Bonds from master
Consider Bonds
The bond mode used on the master. We will use the same mode on the slave, when creating a new b... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
ea445f9dbdfb7a73845cf0266e8b192dded301303a3b902162271ab7953fb67b | cardano-foundation/dab | AcidState.hs |
module Control.Monad.Freer.AcidState
( evalAcidState
, openLocalState
)
where
import Control.Monad.Freer
import Control.Monad.Freer.State
import Control.Monad.IO.Class (MonadIO (liftIO))
import Data.Acid
import Data.Acid.Core
evalAcidState
:: forall s m effs qe fue ue
. ( QueryEvent qe
, MethodStat... | null | https://raw.githubusercontent.com/cardano-foundation/dab/b650c175254dc9d013ebe970aecb4f9124d6d2e2/chain-watcher/src/Control/Monad/Freer/AcidState.hs | haskell |
module Control.Monad.Freer.AcidState
( evalAcidState
, openLocalState
)
where
import Control.Monad.Freer
import Control.Monad.Freer.State
import Control.Monad.IO.Class (MonadIO (liftIO))
import Data.Acid
import Data.Acid.Core
evalAcidState
:: forall s m effs qe fue ue
. ( QueryEvent qe
, MethodStat... | |
11e6dc05ee499346b80f1ea94f0d0870ff9d6a09db693dcfbc69c6dc4c9464ee | triffon/fp-2019-20 | 02--sum.rkt | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 2
Напишете функция ` ( sum L ) ` ,
която намира сумата на L ` .
(define (sum L)
(void))
(define l1 '(1 2 3 4 5 6 7 8))
(define l2 '(0 (12 13) (21 22)))
(run-tests (test-suite "sum tests"
(check-eq? (sum '())
... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/04--lists/02--sum.rkt | racket | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 2
Напишете функция ` ( sum L ) ` ,
която намира сумата на L ` .
(define (sum L)
(void))
(define l1 '(1 2 3 4 5 6 7 8))
(define l2 '(0 (12 13) (21 22)))
(run-tests (test-suite "sum tests"
(check-eq? (sum '())
... | |
fa225c74be0a1987878d66427390a40e04f0486c7dfb2f16497f12f1275e377b | cbaggers/varjo | bitwise-operators.lisp | (in-package :vari.cl)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-uint v-uint) v-uint :pure t)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-int v-int) v-int :pure t)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-uvec2 v-uvec2) v-uvec2 :pure t)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-uvec3 v-uv... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/vari.cl/bitwise-operators.lisp | lisp | ------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
---------------... | (in-package :vari.cl)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-uint v-uint) v-uint :pure t)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-int v-int) v-int :pure t)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-uvec2 v-uvec2) v-uvec2 :pure t)
(v-def-glsl-template-fun << (x y) "(~a << ~a)" (v-uvec3 v-uv... |
2a64a5dde326f2f32428945515ac4ea5f57b2242c9b3f2e18246be6baa92fa81 | clj-commons/rewrite-clj | hello_figwheel.cljs | ;;
;; I find figwheel main's test support quite nice while developing.
;; We have no app here though, just a library and fighweel main needs a main to work.
;; Hence this file.
;;
(ns rewrite-clj.hello-figwheel)
(js/console.log "hello figwheel")
| null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/7621126caae5f21dc5150d52a6c9b747dc0aeeff/test/rewrite_clj/hello_figwheel.cljs | clojure |
I find figwheel main's test support quite nice while developing.
We have no app here though, just a library and fighweel main needs a main to work.
Hence this file.
| (ns rewrite-clj.hello-figwheel)
(js/console.log "hello figwheel")
|
b0c1f0f3c98152e8fa81a06f68fa1784a274c73c355457dbea053fb68f118b9f | zwizwa/rai | test-ai.rkt | #lang racket/base
(require
rai/tools
rai/stream-lib
rai/stream-syntax
rai/ai-array
rai/ai-autodiff
rai/ai-eval
"test-lang.rkt")
;; Simple evaluator
((ai-eval test-add) 1 2)
;; Scheme syntax compiler
(pretty-print (ai-array test-program-1))
| null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/test/test-ai.rkt | racket | Simple evaluator
Scheme syntax compiler | #lang racket/base
(require
rai/tools
rai/stream-lib
rai/stream-syntax
rai/ai-array
rai/ai-autodiff
rai/ai-eval
"test-lang.rkt")
((ai-eval test-add) 1 2)
(pretty-print (ai-array test-program-1))
|
6f7315410bcbd50acb233f7bb2275aa272756e75d87de3785ac3bea0e65b3ceb | nuprl/gradual-typing-performance | main.rkt | #lang scheme/base
(define-syntax-rule (out)
(begin (require scribble/doclang)
(provide (all-from-out scribble/doclang))))
(out)
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/scribble-lib/scribble/doc/main.rkt | racket | #lang scheme/base
(define-syntax-rule (out)
(begin (require scribble/doclang)
(provide (all-from-out scribble/doclang))))
(out)
| |
ceeecb6c2fc3d3af795f38c332009a29f849b729c4cd6b16fde53df7aa1b779b | helix-collective/hx-deploy-tool | ProxyMode.hs | {-# LANGUAGE OverloadedStrings #-}
module Commands.ProxyMode(
showStatus,
createAndStart,
stopAndRemove,
connect,
disconnect,
slaveFlush,
slaveUpdate,
restartProxy,
generateSslCertificate,
) where
import qualified ADL.Core.StringMap as SM
import qualified Data.Aeson as JS
import qualified Data.Hash... | null | https://raw.githubusercontent.com/helix-collective/hx-deploy-tool/74ad135308157d54ba73818341e86ae91ba3c09e/src/Commands/ProxyMode.hs | haskell | # LANGUAGE OverloadedStrings #
| Show the proxy system status, specifically the endpoints and live deploys.
| Create and start a deployment (if it's not already running)
| Stop and remove a deployment
| Connect an endpoint to a running deployment
| Disconnect an endpoint
| Update local state to reflect the master... | module Commands.ProxyMode(
showStatus,
createAndStart,
stopAndRemove,
connect,
disconnect,
slaveFlush,
slaveUpdate,
restartProxy,
generateSslCertificate,
) where
import qualified ADL.Core.StringMap as SM
import qualified Data.Aeson as JS
import qualified Data.HashMap.Strict as HM
import qualified D... |
446e68a2b6233ba5f59eef1dff6c237fc6daa4369b6804ce06083e3366158a63 | Leberwurscht/Diaspora-User-Directory | mTimer.mli | (************************************************************************)
This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or (... | null | https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/mTimer.mli | ocaml | **********************************************************************
********************************************************************* | This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
This program is distributed in ... |
552d6438e242d3886706132d0ee835251fac67f99c4bc19eca46bbdb7e47a81b | rbermani/ib-api | Paths_ib_api.hs | module Paths_ib_api (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) ->... | null | https://raw.githubusercontent.com/rbermani/ib-api/c303cb0384ca5dd255acb4da482206dea2b6576a/.stack-work/dist/x86_64-linux-nopie/Cabal-1.22.4.0/build/autogen/Paths_ib_api.hs | haskell | module Paths_ib_api (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) ->... | |
ae7fed9c3bec40a40d611953d143772a49a38c7452136abbe27e0f709e45a194 | startalkIM/ejabberd | ejabberd_sm_sql.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2015 - 2016 ,
%%% @doc
%%%
%%% @end
Created : 9 Mar 2015 by < >
%%%-------------------------------------------------------------------
-module(ejabberd_sm_sql).
-compile([{parse_transform, ejabberd_sql_pt}]).
-be... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_sm_sql.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
===================================================================
API
===================================================================
=========================... | @author < >
( C ) 2015 - 2016 ,
Created : 9 Mar 2015 by < >
-module(ejabberd_sm_sql).
-compile([{parse_transform, ejabberd_sql_pt}]).
-behaviour(ejabberd_sm).
-export([init/0,
set_session/1,
delete_session/4,
get_sessions/0,
get_sessions/1,
get_sessions/2,
get_sessions/3]).
-export([upd... |
0c37b6d58cc345753303964dca4413c784885bdb92a57e8533078ea6b9bc7e64 | ivankelly/gambit | _thread.scm | ;;;============================================================================
File : " _ thread.scm " , Time - stamp : < 2009 - 04 - 27 15:38:48 feeley >
Copyright ( c ) 1994 - 2009 by , All Rights Reserved .
;;;============================================================================
(##include "header.... | null | https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/lib/_thread.scm | scheme | ============================================================================
============================================================================
============================================================================
Implementation of exceptions.
----------------------------------------------------------... |
File : " _ thread.scm " , Time - stamp : < 2009 - 04 - 27 15:38:48 feeley >
Copyright ( c ) 1994 - 2009 by , All Rights Reserved .
(##include "header.scm")
( # # include " sys.scm " )
(implement-library-type-deadlock-exception)
(implement-library-type-abandoned-mutex-exception)
(implement-library-type-sche... |
905bbdecba2360d681920c5854c3862385c387c8f0bb7282472db8a14f349feb | dmitryvk/sbcl-win32-threads | host-alieneval.lisp | ;;;; the part of the Alien implementation which is needed at
;;;; cross-compilation time
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; publ... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/host-alieneval.lisp | lisp | the part of the Alien implementation which is needed at
cross-compilation time
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
utility functions
ALIEN-TYPE-INFO stuff
Cast?
cast?
slot n... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!ALIEN")
(/show0 "host-alieneval.lisp 15")
(defun align-offset (offset alignment)
(let ((extra (rem offs... |
c675545ce763dabbfde49ca021d3fab11d78ce20bbabe1deef9ef583d9eab3ac | ethereum/act | Main.hs | module Main where
import qualified CLI
main :: IO ()
main = CLI.main
| null | https://raw.githubusercontent.com/ethereum/act/36b65b71eea22ebe4287f066190ecf47f4394fa3/src/main/Main.hs | haskell | module Main where
import qualified CLI
main :: IO ()
main = CLI.main
| |
e9310b6c0a42792c0b984b1fafccb02358df71282152362bf970d59be97a0554 | elastic/eui-cljs | format_date.cljs | (ns eui.services.format-date
(:require ["@elastic/eui/lib/services/format/format_date.js" :as eui]))
(def dateFormatAliases eui/dateFormatAliases)
(def formatDate eui/formatDate)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/services/format_date.cljs | clojure | (ns eui.services.format-date
(:require ["@elastic/eui/lib/services/format/format_date.js" :as eui]))
(def dateFormatAliases eui/dateFormatAliases)
(def formatDate eui/formatDate)
| |
96898876ea6dab9780932895399d872d9d79b2a81445df2c74877c494fb4a24a | david-christiansen/tt-playground | tt.rkt | #lang typed/racket
;; This is me learning Racket by attempting to implement a somewhat
NuPRL - inspired system on top of it .
;; No guarantees are made as to the goodness of it.
(provide (all-defined-out))
(require racket/set)
(require "tt-helpers.rkt")
(require "terms.rkt")
(require "tt-macros.rkt")
(module+ tes... | null | https://raw.githubusercontent.com/david-christiansen/tt-playground/ffb396d908c952bb522d01b465cfbe3dbcc686bf/tt.rkt | racket | This is me learning Racket by attempting to implement a somewhat
No guarantees are made as to the goodness of it.
Pattern synonym for the is-value type
Contexts and hypothetical judgments
Contexts are represented in reverse order because hypotheses are
counted from the most-recent first, to make proof steps rely ... | #lang typed/racket
NuPRL - inspired system on top of it .
(provide (all-defined-out))
(require racket/set)
(require "tt-helpers.rkt")
(require "terms.rkt")
(require "tt-macros.rkt")
(module+ test (require typed/rackunit))
(define-match-expander is-value
(lambda (stx)
(syntax-case stx ()
[(_ term ... |
e4c38a268351875ac7530f8411a2faf1ee04023f12a1ae1ca955d26dfd427d5a | LuisThiamNye/chic | focus.clj | (ns chic.focus)
;; (deftype+ FocusNode [])
(defn request-focus [manager focus-node]
(reset! (:*primary-focus manager) focus-node))
(defn has-focus? [manager focus-node]
(= focus-node @(:*primary-focus manager)))
(defn new-manager []
{:*primary-focus (atom nil)})
| null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/focus.clj | clojure | (deftype+ FocusNode []) | (ns chic.focus)
(defn request-focus [manager focus-node]
(reset! (:*primary-focus manager) focus-node))
(defn has-focus? [manager focus-node]
(= focus-node @(:*primary-focus manager)))
(defn new-manager []
{:*primary-focus (atom nil)})
|
210514279f374a47acd2f51d81ec53a1a5df53ee1c046e34757e0c696d91d861 | ryanpbrewster/haskell | matrix_multiply.hs | -- matrix_multiply.hs
- Simple program to explore matrix multiplication in Haskell .
- Simple program to explore matrix multiplication in Haskell.
-}
import Data.List (transpose)
import ProjectEuler.Util (chunks)
dot v1 v2 = sum $ zipWith (*) v1 v2
mmult m1 m2 = let rs1 = m1 -- rows of m1
... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/matrix_multiply.hs | haskell | matrix_multiply.hs
rows of m1
columns of m2 |
- Simple program to explore matrix multiplication in Haskell .
- Simple program to explore matrix multiplication in Haskell.
-}
import Data.List (transpose)
import ProjectEuler.Util (chunks)
dot v1 v2 = sum $ zipWith (*) v1 v2
in [ [ dot r c | c <- cs2 ] | r <- rs1 ]
t1 = chunks 4 [1..16]
t2 ... |
8dfa91db87b78454e3b5bab05259dccbfc037d370b1afb7ce81300a8913f6e63 | pixlsus/registry.gimp.org_static | layer-to-selection.scm | (script-fu-register "layer-to-selection"
"<Image>/Select/_Layer to selection"
"Just make a layer selected. For some reason this is not built in."
"(c) Kevin Brubeck Unhammer <unhammer(at)fsfe.org>"
"Published under GPL version 2"
"March 8, 2009. Modified by Aralox 7th April 201... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/layer-to-selection.scm | scheme | is there a quicker way to do this? | (script-fu-register "layer-to-selection"
"<Image>/Select/_Layer to selection"
"Just make a layer selected. For some reason this is not built in."
"(c) Kevin Brubeck Unhammer <unhammer(at)fsfe.org>"
"Published under GPL version 2"
"March 8, 2009. Modified by Aralox 7th April 201... |
36efb79075a644fe1df7344605d120d0d4c429f99f877a3ec9c574b427c42878 | input-output-hk/project-icarus-importer | CSV.hs | module Statistics.CSV
( txCntInChainMemPoolToCSV
, focusToCSV
) where
import Control.Monad.Random (MonadRandom (..), evalRandT)
import qualified Data.Text as T
import System.IO (hPutStrLn)
import System.Random (mkStdGen)
import Pos.Util.JsonLog.Events (JLMemPool (..... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/tools/src/post-mortem/Statistics/CSV.hs | haskell | module Statistics.CSV
( txCntInChainMemPoolToCSV
, focusToCSV
) where
import Control.Monad.Random (MonadRandom (..), evalRandT)
import qualified Data.Text as T
import System.IO (hPutStrLn)
import System.Random (mkStdGen)
import Pos.Util.JsonLog.Events (JLMemPool (..... | |
d3d732da097552ab537754971ea166d16cf7baf8084b1781fe39de8f5153dda8 | alandipert/enduro | pgsql.clj | (ns alandipert.enduro.pgsql
(:require [alandipert.enduro :as e]
[clojure.java.jdbc :as sql]))
(defn create-enduro-table! [table-name]
(sql/create-table table-name [:id :int] [:value :text]))
(defn delete-enduro-table! [table-name]
(sql/drop-table table-name))
(defn table-exists? [table-name]
(sql... | null | https://raw.githubusercontent.com/alandipert/enduro/521468070bf7c92661feb8d428b85f5fe62e8503/src/alandipert/enduro/pgsql.clj | clojure | (ns alandipert.enduro.pgsql
(:require [alandipert.enduro :as e]
[clojure.java.jdbc :as sql]))
(defn create-enduro-table! [table-name]
(sql/create-table table-name [:id :int] [:value :text]))
(defn delete-enduro-table! [table-name]
(sql/drop-table table-name))
(defn table-exists? [table-name]
(sql... | |
fdc6b88c2dae7a784806b4a3926fbd2f376fbe3cb55c088b6de4fa5b9d81bf0f | kelamg/HtDP2e-workthrough | ex167.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex167) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex167.rkt | racket | about the language level of this file in a form that our tools can easily process.
List-of-posns -> Number
produces the sum of all x-coordinates in each posn in lop | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex167) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-expect (sum '()) 0)
(check-expect (sum (cons (make-posn 12... |
9ece9433fa8cac89bb6021634726ed833e927bdb3c4b0a461af83d2186b92f6e | racket/old-plt | SXML-tree-trans.scm | ; XML/HTML processing in Scheme
SXML expression tree transformers
;
; IMPORT
; A prelude appropriate for your Scheme system
; (myenv-bigloo.scm, myenv-mit.scm, etc.)
;
; EXPORT
( provide : send - reply
; post-order pre-post-order replace-range)
;
; See vSXML-tree-trans.scm for the validation code, which also
... | null | https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/ssax/SXML-tree-trans.scm | scheme | XML/HTML processing in Scheme
IMPORT
A prelude appropriate for your Scheme system
(myenv-bigloo.scm, myenv-mit.scm, etc.)
EXPORT
post-order pre-post-order replace-range)
See vSXML-tree-trans.scm for the validation code, which also
serves as usage examples.
Output the 'fragments'
The fragments are a li... | SXML expression tree transformers
( provide : send - reply
$ I d : SXML - tree - trans.scm , v 1.6 2003/04/25 19:16:15 oleg Exp $
but causes the result of : send - reply to be # t
(define (SRV:send-reply . fragments)
(let loop ((fragments fragments) (result #f))
(cond
((null? fragments) result... |
5ec60aac46a827793a06df4e8ef6c7a34cd81973ef2b7ec89506c2f81a19dc5c | inaka/erlang_guidelines | ignored_vars.erl | -module(ignored_vars).
-export([good/1, bad/1]).
bad(_Number) -> 2 * _Number.
good(Number) -> 2 * Number.
| null | https://raw.githubusercontent.com/inaka/erlang_guidelines/7a802a23a08d120db7e94115b4600b26194dd242/src/ignored_vars.erl | erlang | -module(ignored_vars).
-export([good/1, bad/1]).
bad(_Number) -> 2 * _Number.
good(Number) -> 2 * Number.
| |
3169f8662aecbc08e55aec39afc6f901bdb67838f08ec1024d9bb7ef0c9d0e06 | Ptival/recursion-schemes-examples | List.hs | # LANGUAGE LambdaCase #
-- |
module Histomorphisms.List
( fibonacci
, fibonacciAlgebra
) where
import Control.Comonad.Cofree
import Data.Functor.Foldable
import Numeric.Natural
import Algebras.CVAlgebra
-- | Expressing Fibonacci as a CV-algebra gives us access to the history of
-- | computations
fibonacciAl... | null | https://raw.githubusercontent.com/Ptival/recursion-schemes-examples/bd2a506d38887e9b5d4f2afc435fc7bddf12a92e/lib/Histomorphisms/List.hs | haskell | |
| Expressing Fibonacci as a CV-algebra gives us access to the history of
| computations | # LANGUAGE LambdaCase #
module Histomorphisms.List
( fibonacci
, fibonacciAlgebra
) where
import Control.Comonad.Cofree
import Data.Functor.Foldable
import Numeric.Natural
import Algebras.CVAlgebra
fibonacciAlgebra :: (Num a) => CVAlgebra (Base Natural) a
fibonacciAlgebra = \case
Nothing -> 0
Just (prev... |
5b0669db2085031024871cfbdf7c17d415371770e4af021faa61f7b7194801a0 | ryanpbrewster/haskell | P117.hs | module Problems.P117
( solve
) where
- Using a combination of black square tiles and oblong tiles chosen from : red
- tiles measuring two units , green tiles measuring three units , and blue tiles
- measuring four units , it is possible to tile a row measuring five units in
- length in exactly fifteen ... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P117.hs | haskell | f[n] == f[n-4] + f[n-3] + f[n-2] + f[n-1] | module Problems.P117
( solve
) where
- Using a combination of black square tiles and oblong tiles chosen from : red
- tiles measuring two units , green tiles measuring three units , and blue tiles
- measuring four units , it is possible to tile a row measuring five units in
- length in exactly fifteen ... |
8f15cada1f29a26196f4f26d57004375f3c5ecc5a6253811a6e20d62df169853 | melange-re/melange | bytesLabels.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange/13edf6108d884e64cd510bce077ef2ce73de6a97/jscomp/stdlib-412/stdlib_modules/bytesLabels.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Byte sequence operations .
A byte sequence is a mutable data structure that contains a
fixe... |
a8fa84285936ee63cf30261125ca1121b585ad0a7fc8691df89631256df6d879 | froggey/Mezzano | ast-generator.lisp | DSL for creating AST objects .
(in-package :mezzano.compiler)
(defun ast (form &optional (inherit *current-lambda*))
"Produce AST nodes from a programmer-friendly representation.
*CURRENT-LAMBDA* must be bound appropriately.
Inherit source locations/etc from INHERIT."
(convert-ast-form form inherit '()))
(defu... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/compiler/ast-generator.lisp | lisp | DSL for creating AST objects .
(in-package :mezzano.compiler)
(defun ast (form &optional (inherit *current-lambda*))
"Produce AST nodes from a programmer-friendly representation.
*CURRENT-LAMBDA* must be bound appropriately.
Inherit source locations/etc from INHERIT."
(convert-ast-form form inherit '()))
(defu... | |
2b1aa9d4ea4cb01dc57fff0e21a50ce0dd2d8d25dfd84c126403fc599f68558d | aaronps/enotepad | enotepad_menu.erl | %%%-------------------------------------------------------------------
@author
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 10 . Oct 2016 20:25
%%%-------------------------------------------------------------------
-module(enotepad_menu).
-author("aaronps").
-include_lib("wx/include/wx.hrl").
-incl... | null | https://raw.githubusercontent.com/aaronps/enotepad/d6b501ed94e8f44d1f375eb3c5b228d13b0c9dd3/src/enotepad_menu.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
This is so you can see the key on the menu BUT IT DOESN'T CREATE AN
ACCELERATOR. This trick is needed because if the menu entry is disabled, the
key won't wor... | @author
( C ) 2016 , < COMPANY >
Created : 10 . Oct 2016 20:25
-module(enotepad_menu).
-author("aaronps").
-include_lib("wx/include/wx.hrl").
-include("enotepad.hrl").
-export([create/1]).
-type menuItemDesc() :: {integer(), string()}
| {integer(), string(), 'check' | 'disabled'}
... |
cdb5dfdca7b2fd8108c716a5a29e8460a8547bf0390775ceb464ea7088dbad68 | ocsigen/ocaml-eliom | pr6993_bad.ml | type (_, _) eqp = Y : ('a, 'a) eqp | N : string -> ('a, 'b) eqp
let f : ('a list, 'a) eqp -> unit = function N s -> print_string s;;
module rec A : sig type t = B.t list end =
struct type t = B.t list end
and B : sig type t val eq : (B.t list, t) eqp end =
struct
type t = A.t
let eq = Y
end;;
f B.eq;;... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/typing-gadts/pr6993_bad.ml | ocaml | type (_, _) eqp = Y : ('a, 'a) eqp | N : string -> ('a, 'b) eqp
let f : ('a list, 'a) eqp -> unit = function N s -> print_string s;;
module rec A : sig type t = B.t list end =
struct type t = B.t list end
and B : sig type t val eq : (B.t list, t) eqp end =
struct
type t = A.t
let eq = Y
end;;
f B.eq;;... | |
9208e31656c6607c3fb1cceb94683b7beeb3da8e3a68236d05c267300df165f7 | semilin/layoup | crstemak.lisp |
(MAKE-LAYOUT :NAME "crstemak" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/crstemak.lisp | lisp |
(MAKE-LAYOUT :NAME "crstemak" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX
NIL :KEYBOARD NIL) | |
f68b9faf23bf9e1fe935239a2251982b40f014b45b31d3955b8b9196c6b4bf51 | luminus-framework/guestbook | core.clj | (ns guestbook.test.db.core
(:require [guestbook.db.core :refer [*db*] :as db]
[luminus-migrations.core :as migrations]
[clojure.test :refer :all]
[clojure.java.jdbc :as jdbc]
[guestbook.config :refer [env]]
[mount.core :as mount]))
(use-fixtures
:once
(... | null | https://raw.githubusercontent.com/luminus-framework/guestbook/c0e4c05cd6b1a59602c7699266d11f56adbec197/test/clj/guestbook/test/db/core.clj | clojure | (ns guestbook.test.db.core
(:require [guestbook.db.core :refer [*db*] :as db]
[luminus-migrations.core :as migrations]
[clojure.test :refer :all]
[clojure.java.jdbc :as jdbc]
[guestbook.config :refer [env]]
[mount.core :as mount]))
(use-fixtures
:once
(... | |
3dff1412df0e00be52a7390751be806392fc879cb3274279f4cec31449dde9b7 | programaker-project/Programaker-Core | automate_rest_api_program_custom_blocks.erl | %%% @doc
%%% REST endpoint to manage knowledge collections.
%%% @end
-module(automate_rest_api_program_custom_blocks).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
]).
-export([ to_json/2
]).
-include("./records.hrl").... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/7be978b7c46453c51f883421f6d635f8fd521856/backend/apps/automate_rest_api/src/automate_rest_api_program_custom_blocks.erl | erlang | @doc
REST endpoint to manage knowledge collections.
@end
CORS
Authentication
Don't do authentication if it's just asking for options
GET handler
TODO: When ReadOnly only show blocks used on the program |
-module(automate_rest_api_program_custom_blocks).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
]).
-export([ to_json/2
]).
-include("./records.hrl").
-include("../../automate_service_port_engine/src/records.hrl").
-inc... |
75daa1f39d2f02d26f5ccb30d94317ddcdbde4509f3f00e20396683c08c7a743 | AkronCodeClub/edX-FP101x-Oct-2014 | Riffle.hs | riffle :: [a] -> [a] -> [a]
riffle xs ys = concat [[x,y] | (x,y) <- xs `zip` ys]
| null | https://raw.githubusercontent.com/AkronCodeClub/edX-FP101x-Oct-2014/7db691d795126ad912256fec29b5aa1817beb8c0/ryan_p/HW1029/Riffle.hs | haskell | riffle :: [a] -> [a] -> [a]
riffle xs ys = concat [[x,y] | (x,y) <- xs `zip` ys]
| |
b97f0f44a9b8af02272ec4b66a6b185e442da34bc5a4bbcba087c13f3e6364eb | apache/couchdb-couch-epi | couch_epi_app.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " AS ... | null | https://raw.githubusercontent.com/apache/couchdb-couch-epi/60e7f808513b2611eb412cf641d6e7132dda2a30/src/couch_epi_app.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations u... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_epi_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_Type, _Args) ->
couch_epi_sup:start_link().
stop(_State) ->
... |
a6fad6b7b3b162f50b42587c59d0b90340b45c6601529d38611d49ff97eff67e | dbtoaster/dbtoaster-a5 | SqlClient.ml | open Type
open Constants
module type Interface = sig
type sql_channel_t
;;
val create: ?database:string option ->
?username:string option ->
?password:string option ->
?flags:string list ->
unit -> sql_channel_t
val destroy: sql_channel_t ... | null | https://raw.githubusercontent.com/dbtoaster/dbtoaster-a5/6436110ad283378085a935ecca69080b7127467b/src/sql/SqlClient.ml | ocaml | open Type
open Constants
module type Interface = sig
type sql_channel_t
;;
val create: ?database:string option ->
?username:string option ->
?password:string option ->
?flags:string list ->
unit -> sql_channel_t
val destroy: sql_channel_t ... | |
fa067c1b81bb07a66bfccad331346284a8feb042ce12486328a3722826932921 | ocaml-sf/learn-ocaml-corpus | ifflat.ml | (* Addition of requirements. *)
let (++) (x : req) (y : req) : req =
match x, y with
| Infinite, _
| _, Infinite ->
Infinite
| Finite x, Finite y ->
Finite (x + y)
(* Comparison of requirements. *)
let (<==) (x : req) (y : req) : bool =
match x, y with
| _, Infinite ->
true
| Infinite... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/pprint/wrong/ifflat.ml | ocaml | Addition of requirements.
Comparison of requirements.
Determining the space requirement of a document.
This function is expected to run in constant time.
Smart constructors.
Wrong: forget to check whether [doc1] is [IfFlat _].
Optional: treat [empty] as a neutral element for concatenation.
The following ... |
let (++) (x : req) (y : req) : req =
match x, y with
| Infinite, _
| _, Infinite ->
Infinite
| Finite x, Finite y ->
Finite (x + y)
let (<==) (x : req) (y : req) : bool =
match x, y with
| _, Infinite ->
true
| Infinite, Finite _ ->
false
| Finite x, Finite y ->
x <= y
... |
9e7e8a88bb659f4ced29168764a7796048165bd1eca92b538f3b9ca6fb711e00 | psholtz/MIT-SICP | exercise-03.scm | ;;
;; Working definitions
;;
(define the-empty-tree '())
(define empty-tree? null?)
(define tree? list?)
(define (make-tree-node value left-subtree right-subtree)
(list value left-subtree right-subtree))
(define (node-value node)
(car node))
(define (node-left node)
(cadr node))
(define (node-right node)
(cad... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Recitations-F2007/Recitation-09/mit-scheme/exercise-03.scm | scheme |
Working definitions
Previous exercises
What is the running time of calling "tree-lookup" on such a tree?
We can define a procedure to generate such "linear" trees:
Graphically these trees look like:
/ \
/ \
2 ()
/ \
/ \
/ \
/ \
() ()
... | (define the-empty-tree '())
(define empty-tree? null?)
(define tree? list?)
(define (make-tree-node value left-subtree right-subtree)
(list value left-subtree right-subtree))
(define (node-value node)
(car node))
(define (node-left node)
(cadr node))
(define (node-right node)
(caddr node))
(define (tree-look... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.