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
| package net.kjunine.test; | |
| import static org.junit.Assert.*; | |
| import java.io.IOException; | |
| import org.junit.Test; | |
| public class AdditionalAssert { |
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
| package sample.filelist; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.Random; | |
| public class FileLister { |
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.util.Collections; | |
| import java.util.Enumeration; | |
| import java.util.Properties; | |
| import java.util.Vector; | |
| @SuppressWarnings("serial") | |
| public class SortedProperties extends Properties { | |
| @SuppressWarnings({ "rawtypes", "unchecked" }) | |
| public synchronized Enumeration keys() { |
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
| public class WebSocketServer { | |
| private final InetSocketAddress localAddress; | |
| private final ServerBootstrap bootstrap; | |
| public WebSocketServer (InetSocketAddress localAddress) { | |
| this.localAddress = localAddress; | |
| this.bootstrap = new ServerBootstrap(new NioServerSocketChannelFactory( | |
| Executors.newCachedThreadPool(new NamedThreadFactory( |
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
| @Override | |
| public void channelConnected(ChannelHandlerContext ctx, | |
| ChannelStateEvent e) throws Exception { | |
| this.channel = e.getChannel(); | |
| channels.add(channel); | |
| } |
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 static org.jboss.netty.buffer.ChannelBuffers.*; | |
| import org.jboss.netty.buffer.ChannelBuffer; | |
| import org.jboss.netty.buffer.ChannelBuffers; | |
| import org.jboss.netty.channel.Channel; | |
| import org.jboss.netty.channel.ChannelHandlerContext; | |
| import org.jboss.netty.handler.codec.oneone.OneToOneEncoder; | |
| public class DelimiterAppender extends OneToOneEncoder { |
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
| #!/bin/bash | |
| #------------------------------------------------------------------------------ | |
| # SETTINGS | |
| #------------------------------------------------------------------------------ | |
| MYSQL_ROOT_PASSWORD=password | |
| MYSQL_GITORIOUS_PASSWORD=password | |
| GITORIOUS_HOST=gitorious | |
| SYSADMIN=sysadmin |
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
| package net.kjunine.insightquiz; | |
| import java.util.Arrays; | |
| public class InsightQuiz01 { | |
| public static void rotateArray(int[] array, int s, int t, int k) { | |
| int start = s; | |
| int length = t - s + 1; | |
| int offset = k; |
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
| package swiftify.channel.util.execute; | |
| import java.util.concurrent.ThreadFactory; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| public class NamedThreadFactory implements ThreadFactory { | |
| private final String name; | |
| private final AtomicInteger index = new AtomicInteger(1); | |
| public NamedThreadFactory(String name) { |
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
| package gisttest; | |
| public static void main(String[] args) { | |
| System.out.println("Gist test"); | |
| } |
NewerOlder