This file contains 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(); | |
} |
This file contains 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 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 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 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 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 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 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
function getPublicAddress() { | |
let interfaces = os.networkInterfaces(); | |
return _.chain(interfaces) | |
.filter(function(o) { | |
return o[0].family == 'IPv4' && !_.startsWith(o[0].address, '192.168'); | |
}) | |
.flatten() | |
.value(); | |
} |
This file contains 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
public interface ChainOfMessageProcessors extends MessagePostProcessor { | |
void setNext(ChainOfMessageProcessors next); | |
ChainOfMessageProcessors next(); | |
default Message toNext(Message message) throws JMSException { | |
if (next()!=null) { | |
return next().postProcessMessage(message); | |
} |
This file contains 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
@RunWith(SpringJUnit4ClassRunner.class) | |
@SpringApplicationConfiguration(classes = { | |
Application.class, | |
TrivialIT.PostConfiguration.class | |
}) | |
@WebAppConfiguration | |
@IntegrationTest("server.port=0") | |
@ActiveProfiles({"default", "test"}) | |
@ConfigurationProperties("application.yml") | |
public class TrivialIT { |
NewerOlder