Instance | Branch |
---|
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
import java.net.InetSocketAddress | |
import akka.actor.{ActorSystem, Props, Actor} | |
import akka.io.{Tcp, IO} | |
import akka.io.Tcp._ | |
import akka.util.ByteString | |
class TCPConnectionManager(address: String, port: Int) extends Actor { | |
import context.system | |
IO(Tcp) ! Bind(self, new InetSocketAddress(address, port)) |
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
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |