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 asyncsocket; | |
import java.io.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.InetSocketAddress; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.AsynchronousSocketChannel; | |
import java.nio.channels.CompletionHandler; | |
import java.util.concurrent.atomic.AtomicInteger; |
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.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; |
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 myApp = angular.module("myApp",[]); | |
myApp.directive('heartbeat', function($interval, $window) { | |
return { | |
restrict: 'E', | |
scope: {}, | |
templateUrl: 'directives/heartbeat.html', | |
link: function(scope, element, attr) { | |
var el = $(element).find(".heartbeat").get(0); |
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.io.FileInputStream; | |
import java.io.InputStream; | |
import java.security.MessageDigest; | |
public class Main { | |
public static byte[] getMD5Checksum(String filename) throws Exception { | |
InputStream fis = new FileInputStream(filename); | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
byte[] buffer = new byte[1024]; |