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 main | |
import ( | |
"fmt" | |
"bufio" | |
"os" | |
"path/filepath" | |
"strings" | |
"gopkg.in/mgo.v2" | |
"time" |
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
static String sha1(String input) { | |
MessageDigest mDigest = null; | |
try { | |
mDigest = MessageDigest.getInstance("SHA1"); | |
} catch (NoSuchAlgorithmException e) { | |
return ""; | |
} | |
byte[] result = mDigest.digest(input.getBytes()); | |
StringBuffer sb = new StringBuffer(); | |
for (int i = 0; i < result.length; 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
func (s *session) Send(req listener.CmdRequest) listener.CmdResponse { | |
bytes := req.Bytes() | |
_, err := s.conn.Write(bytes) | |
if err != nil { | |
return listener.CmdResponse{} | |
} | |
p := packet{bytes} | |
s.addCMD(p.command()) |
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 main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"net" | |
"sync" | |
"time" | |
"encoding/binary" | |
"github.com/clouway/tools/listener/bincodec" |
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 main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"net" | |
"sync" | |
"time" | |
"encoding/binary" | |
"github.com/clouway/tools/listener/bincodec" |
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 client | |
import ( | |
"fmt" | |
"net" | |
"time" | |
) | |
type Client struct { | |
Host string |
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
public class ConnectionProvider implements Provider<Connection> { | |
@Override | |
public Connection get() { | |
return ConnectionFilter.connectionThreadLocal.get(); | |
} | |
} |
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.clouway.servlets; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.Cookie; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.HttpSession; | |
import java.io.IOException; | |
import java.security.MessageDigest; |
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 xml.sax; | |
import org.junit.Test; | |
import java.util.List; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.core.Is.is; | |
public class ParseJavaObjectsWithSaxTest { |
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 task4; | |
import java.util.List; | |
/** | |
* @author Ivan Genchev ([email protected]) | |
*/ | |
public class MyClass { | |
class Customer { |
NewerOlder