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
version: '3' | |
services: | |
slapd: | |
image: osixia/openldap | |
environment: | |
LDAP_ORGANISATION: example | |
LDAP_DOMAIN: example.com | |
LDAP_ADMIN_PASSWORD: secret | |
ports: | |
- 389:389 |
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 java.net.InetSocketAddress; | |
import java.nio.charset.Charset; | |
import org.apache.mina.core.RuntimeIoException; | |
import org.apache.mina.core.future.ConnectFuture; | |
import org.apache.mina.core.service.IoHandlerAdapter; | |
import org.apache.mina.core.session.IoSession; | |
import org.apache.mina.filter.codec.ProtocolCodecFilter; | |
import org.apache.mina.filter.codec.textline.TextLineCodecFactory; | |
import org.apache.mina.filter.logging.LoggingFilter; | |
import org.apache.mina.transport.socket.nio.NioSocketConnector; |
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
// tokenize(str) | |
// extracts semantically useful tokens from a string containing English-language sentences | |
// @param {String} the string to tokenize | |
// @returns {Array} contains extracted tokens | |
function tokenize(str) { | |
var punct='\\['+ '\\!'+ '\\"'+ '\\#'+ '\\$'+ // since javascript does not | |
'\\%'+ '\\&'+ '\\\''+ '\\('+ '\\)'+ // support POSIX character | |
'\\*'+ '\\+'+ '\\,'+ '\\\\'+ '\\-'+ // classes, we'll need our |