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
// Server | |
load('vertx.js'); | |
var eb = vertx.eventBus; | |
eb.registerHandler('test.address', function(message){ | |
stdout.println('Message Received: ' + 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
load('vertx.js'); | |
var eb = vertx.eventBus; | |
vertx.setPeriodic(1000,function(id){ | |
eb.send( | |
'server.address', | |
'a String', | |
function(reply){ |
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
// Handle Vertx Case | |
if(vertx){ | |
this.YAML = YAML; | |
} |
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
// -- line 389 | |
// Handle vertx case | |
if (vertx){ | |
this.YAML = YAML; | |
} | |
// Handle browser case | |
if ( typeof(window) != "undefined" ) | |
{ | |
window.YAML = YAML; |
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
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import org.vertx.java.core.Handler; | |
import org.vertx.java.core.Vertx; | |
import org.vertx.java.deploy.impl.VertxLocator; | |
public class PromiseTests { | |
private Object lock = new Object(); |
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 v2 = require('vertx.js'); | |
var module = require('module.js'); | |
var instance = module(v2); | |
v2.logger.info(console); | |
console.log('Hello'); | |
console.info('Hello'); | |
console.warn('Hello'); |
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
#!/usr/local/bin/python3 | |
def generate(chars, current = ''): | |
for index,char in enumerate(chars): | |
joined = current + char | |
yield joined | |
for word in generate([ | |
char for i,char in enumerate(chars) if i != index | |
],joined): |
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
def initEventBus(): | |
loggingAddress = config['loggingAddress'] | |
def handler(msg): | |
print(msg) | |
EventBus.register_handler(loggingAddress,handler) | |
# Exception in Python verticle | |
# Traceback (most recent call last): |
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
import org.edgeframework.promises.Promise; | |
import org.edgeframework.promises.PromiseHandler; | |
import org.edgeframework.promises.RepromiseHandler; | |
import org.vertx.java.core.AsyncResult; | |
import org.vertx.java.core.AsyncResultHandler; | |
import org.vertx.java.core.Handler; | |
import org.vertx.java.core.buffer.Buffer; | |
import org.vertx.java.core.file.AsyncFile; | |
import org.vertx.java.deploy.Verticle; |
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
apply from: "vertx.gradle" | |
apply plugin: 'java' | |
vertx { | |
version = "1.3.1-final" | |
} | |
build { | |
dependsOn vertx | |
} |
OlderNewer