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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
const fetchMachine = Machine({ | |
id: 'processTransactoin', | |
initial: 'idle', | |
context: {}, | |
states: { | |
idle: { | |
on: { | |
SAVE_REQUEST: 'savingRequest' | |
} | |
}, |
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
# |
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
import fetchers from './fetchers/index.js'; | |
import dataStore from './data-store'; | |
export const fetcher = { | |
dataFetchingServer: { | |
listeners: new Set(), | |
postMessage: (data) => { | |
fetcher.dataFetchingClient.listeners.forEach((listener) => listener({ data })); | |
}, | |
onmessage(callback) { |
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
pragma solidity 0.5.1; | |
import './ArrayListLib.sol'; | |
import './ExclusionList.sol'; | |
import './Survey.sol'; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol"; | |
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; |
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
pragma solidity 0.5.1; | |
library ArrayListLib { | |
struct ListItem { | |
uint index; | |
address item; | |
} | |
struct StoredList { |
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
declare type JsonValue = (string|number|boolean|Date|void|ParsedJson); | |
declare type JsonArray = Array<JsonValue>; | |
declare type ParsedJson = { [key: string]: JsonValue|JsonArray }; | |
declare module "z-schema" { | |
type JsonSchema = ParsedJson; // I tried to build a parsed Json type. This could also be an "Object" type | |
type ZSchemaCallback = (err: Error, status: boolean) => void; | |
type CustomValidatorSync = (data: any) => boolean; | |
type CustomValidatorAsync = (data: any, callback: Function) => void; | |
type CustomValidator = CustomValidatorSync|CustomValidatorAsync; |
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
'use strict'; | |
var fs = require('fs'); | |
function replaceValues(values_file, brut_file) { | |
var values_array = fs.reeadSync(values_file).split("\n"); | |
//on fais exploser la chaine avec une regexp | |
//contrairement au cas précédent ou c'était par un simple caractère | |
//faudrait ajuster ta regexp |
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
----+-----+------ | |
# |@RID |@CLASS | |
----+-----+------ | |
0 |#11:1|Member | |
----+-----+------ |
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
----+-----+------+--------+------+-------------------------------------------------------------------------+-----+----------+------ | |
# |@RID |@CLASS|name |status|password |roles|_allowRead|_allow | |
----+-----+------+--------+------+-------------------------------------------------------------------------+-----+----------+------ | |
0 |#11:1|Member|user_two|ACTIVE|{SHA-256}D74FF0EE8DA3B9806B18C877DBF29BBDE50B5BD8E4DAD7A3A725000FEB82E8F1|[1] |[1] |[1] | |
----+-----+------+--------+------+-------------------------------------------------------------------------+-----+----------+------ |