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
| -------------------------------------------------------------------------------- | |
| -- | |
| -- Partial implementation of the Python class model for Lua | |
| -- | |
| -- Copyright (c) 2012, Jonathan Zrake | |
| -- | |
| -------------------------------------------------------------------------------- | |
| -- | |
| -- Exports the following functions: | |
| -- |
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
| #include "LuaIntf/LuaIntf.h" | |
| extern "C" { | |
| #include "lua.h" | |
| } | |
| using namespace LuaIntf; | |
| void test(char* s) { | |
| } |
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
| #include "LuaIntf/LuaIntf.h" | |
| extern "C" { | |
| #include "lua.h" | |
| } | |
| using namespace LuaIntf; | |
| void open(lua_State* L) { | |
| LuaBinding(L) | |
| .addConstant("GL_ES_VERSION_2_0", 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
| #include "LuaIntf/LuaIntf.h" | |
| using namespace LuaIntf; | |
| void* test_malloc(int n) { | |
| return malloc(n); | |
| } | |
| void test_free(void* p) { | |
| free(p); | |
| } |
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
| local uv = require_uv() | |
| -- run uv event loop in engine loop. | |
| return RunLoop.schedule(function() | |
| uv.run('nowait') | |
| end, 0.02, 0.02) | |
| local multi = curl.multi() | |
| local function check_info() |
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
| #!stack runhaskell | |
| import Data.List(elemIndex) | |
| import System.Environment(getArgs) | |
| wl_en :: [String] | |
| wl_en = | |
| [ "abandon", "ability", "able", "about", "above", "absent" | |
| , "absorb", "abstract", "absurd", "abuse", "access", "accident" | |
| , "account", "accuse", "achieve", "acid", "acoustic", "acquire" | |
| , "across", "act", "action", "actor", "actress", "actual" |
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
| {-# LANGUAGE FlexibleContexts, RecordWildCards, ConstraintKinds #-} | |
| import System.Environment | |
| import Data.Reflection | |
| newtype Config = Config{ | |
| cfgCount :: Int | |
| } | |
| type HasConfig = Given Config |
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
| {"swagger":"2.0","info":{"version":"cardano-sl:1","title":"Cardano Wallet API","license":{"url":"https://raw.githubusercontent.com/input-output-hk/cardano-sl/develop/lib/LICENSE","name":"MIT"},"description":"This is the specification for the Cardano Wallet API, automatically generated as a [Swagger](https://swagger.io/) spec from the [Servant](http://haskell-servant.readthedocs.io/en/stable/) API of [Cardano](https://github.com/input-output-hk/cardano-sl).\n\nSoftware Version | Git Revision\n-------------------|-------------------\ncardano-sl:1 | c3a292fee627bc9e76bb5b4896df59471a4dbdc4\n\n> **Warning**: This version is currently a **BETA-release** which is still under testing before\n> its final stable release. Should you encounter any issues or have any remarks, please let us\n> know; your feedback is highly appreciated.\n\n\nGetting Started\n===============\n\nIn the following examples, we will use *curl* to illustrate request to an API running on the default port **8090**.\n\nPlease note that wallet web |
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
| from pyswagger import App, Security | |
| from pyswagger.contrib.client.requests import Client | |
| from pyswagger.primitives import Primitive, create_str, validate_str | |
| from mnemonic import Mnemonic | |
| def validate_hex_base16(obj, ret, val, ctx): | |
| print('validate', val) | |
| return val | |
| prim = Primitive() |
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
| {-# LANGUAGE GADTs, KindSignatures, DataKinds #-} | |
| module Test where | |
| data Test = | |
| Test1 { test1 :: Int } | |
| | Test2 { test2 :: Int } | |
| data TestBranch = TTest1 | TTest2 | |
| data Test' (a :: TestBranch) where | |
| Test'1 :: { test'1 :: Int } -> Test' TTest1 |