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 express = require('express'), | |
| request = require('request'), | |
| _ = require('lodash'), | |
| config = { syncGwAdmin: 'http://localhost:4985', db: 'my-db' }; | |
| let router = express.Router(); | |
| let rebuildDocs = function(body) { | |
| const parts = body.split(/\r\n|\r|\n/g); | |
| return _.reduce( |
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
| package main | |
| import ( | |
| "fmt" | |
| "strconv" | |
| "reflect" | |
| ) | |
| /* TODO: | |
| 1. Fill the array from lines in a file |
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
| //trivial means trivial | |
| @Test | |
| public void transactionInDlog() throws SystemException, IOException { | |
| final Namespace namespace = Factories.namespace(NAMESPACE).get(); | |
| final DistributedLogManager managerOne = namespace.openLog("stream-1"); | |
| final DistributedLogManager managerTwo = namespace.openLog("stream-2"); | |
| managerOne.delete(); | |
| managerTwo.delete(); | |
| final LogWriter logWriterOne = managerOne.openLogWriter(); |
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
| @Slf4j | |
| @RunWith(SpringRunner.class) | |
| @SpringBootTest | |
| public class DemoApplicationTests { | |
| private static final String NAMESPACE = "distributedlog://127.0.0.1:2181/messaging/distributedlog/testing"; | |
| @Autowired | |
| JtaTransactionManager jtaTransactionManager; | |
| private DistributedLogManager managerOne, managerTwo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var getDiagramComponents = function(v, e) { | |
| return $(v).find("concept").filter(function(o) { | |
| return o.concept.id == e.id; | |
| }); | |
| } | |
| gap = $("element").filter(function(obj) { | |
| return obj.prop("GAP") == "true" ? true : false; | |
| }); |
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
| console.log("copy paste"); | |
| from = $(selection).first(); | |
| a = {}; | |
| a.name = from.name; | |
| a.documentation = from.documentation; | |
| a.type = from.type | |
| b = from.prop(); |
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
| console.log("remove visible relationships"); | |
| $(selection).rels().each(function(r) { | |
| v = r.view; | |
| i = r.id; | |
| $(v).find("relationship").each(function(f) { | |
| if (i==f.id) { | |
| console.log("deleting:"+f.id); | |
| f.delete(); | |
| } |
OlderNewer