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/bin/python | |
# -*- coding: utf-8 -*- | |
_NONE = ' ' | |
_LEFT = '| ' | |
_MIDL = ' - ' | |
_RGHT = ' |' | |
_BOTH = '| |' | |
_SEGMENTS_BY_DIGIT = { |
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 javax.xml.datatype.XMLGregorianCalendar; | |
import javax.xml.ws.Holder; | |
import java.math.BigDecimal; | |
public class HelloWorldClient { | |
public static void main(String[] argv) { | |
Wschan service = new Wschan_Service().getWschanPort(); | |
System.out.println(service); | |
System.out.println("Saldo:_________"); |
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 static org.vertx.groovy.core.streams.Pump.createPump | |
import org.vertx.groovy.core.buffer.Buffer | |
def client = vertx.createNetClient() | |
client.connect(1234, "201.000.000.000") { socket -> | |
println "Conectado!" | |
def key = "08000220000100000000051300240412655910MEXWS1TEST" | |
byte[] bytesKey = new byte[key.bytes.length + 3] | |
for(int i = 2; i < key.bytes.length + 2; i++){ |
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.vertx.java.core.Handler | |
import org.vertx.java.core.Vertx | |
import org.vertx.java.core.VertxFactory | |
import org.vertx.java.core.http.HttpServer | |
import org.vertx.java.core.json.JsonObject | |
class BootStrap { | |
def init = { servletContext -> | |
Vertx vertx = VertxFactory.newVertx() |
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
//grails-app/conf/BootStrap.groovy | |
import org.vertx.java.platform.PlatformLocator | |
class BootStrap { | |
def vertxPlatformManager | |
def init = { servletContext -> | |
vertxPlatformManager = PlatformLocator.factory.createPlatformManager() | |
URL[] classpath = [new File('./src/verticles').toURI().toURL()] | |
vertxPlatformManager.deployVerticle( |
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.vertx.groovy.core.http.RouteMatcher | |
import groovy.sql.Sql | |
// Use this driver and put the jar in the classpath: | |
// http://mvnrepository.com/artifact/postgresql/postgresql/8.4-702.jdbc4 | |
def server = vertx.createHttpServer() | |
def routeMatcher = new RouteMatcher() | |
routeMatcher.getWithRegEx(".*") {req -> | |
def db = [ |
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 corg.grails.gertx | |
import org.junit.Ignore | |
import spock.lang.Shared | |
import spock.lang.Specification | |
import org.vertx.java.core.AsyncResult | |
import org.vertx.java.core.Handler | |
import org.vertx.java.core.eventbus.EventBus | |
import org.vertx.java.core.eventbus.Message | |
import org.vertx.java.core.json.JsonObject |
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 com.tu.starup | |
class TestLikeSpec extends GertxSpecification { | |
def setupSpec() { //Se despliegan primero los verticles | |
deployVerticle('aplica_like.groovy') | |
} | |
def cleanup() { | |
} |
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 you.mane | |
import javax.naming.directory.InitialDirContext | |
class Clazz { | |
static mailExchange(String email) { | |
def emailParts = email.split('@') | |
if (emailParts.size() == 2) { | |
try { | |
def domainName = emailParts[1] | |
def iniDir = new InitialDirContext(); |
OlderNewer