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 test; | |
public class Model { | |
private String hello; | |
private String world; | |
public Model() { | |
} |
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 test; | |
import static org.junit.Assert.assertNotSame; | |
import static org.junit.Assert.assertSame; | |
import static org.mockito.Matchers.anyString; | |
import static org.mockito.Matchers.isA; | |
import static org.mockito.Mockito.mock; | |
import static org.mockito.Mockito.never; | |
import static org.mockito.Mockito.times; | |
import static org.mockito.Mockito.verify; |
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 org.junit.Test; | |
import org.junit.Rule; | |
import org.junit.rules.ExpectedException; | |
public class JUnitExceptionTest { | |
@Rule | |
public ExpectedException exception = ExpectedException.none(); | |
@Test |
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 org.junit.Before; | |
import org.junit.After; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class JUnitTest { | |
@Before | |
public void setUp() throws Exception { | |
} |
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
#!/usr/bin/env python2.6 | |
import time | |
# | |
# token cookie | |
# | |
def check_token(conn, token): | |
return conn.hget('login:', token) |
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
#!/usr/bin/python2.6 | |
import redis | |
import time | |
import random | |
ONE_WEEK_IN_SECONDS = 7 * 86400 | |
VOTE_SCORE = 432 | |
ARTICLES_PER_PAGE = 25 |
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
# -*- encoding: utf-8 -*- | |
import sys | |
if len(sys.argv) < 3: | |
print "usage: %s [start] [end]" % sys.argv[0] | |
sys.exit(1) | |
start = int(sys.argv[1]) | |
end = int(sys.argv[2]) |
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
# -*- encoding: utf-8 -*- | |
import sys | |
#print sys.argv | |
if len(sys.argv) < 3: | |
print "usage: %s [start] [end]" % sys.argv[0] | |
sys.exit(1) | |
start = int(sys.argv[1]) |
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
# -*- encoding: utf-8 -*- | |
import sys | |
if len(sys.argv) < 3: | |
print "usage: %s [start] [end]" % sys.argv[0] | |
sys.exit(1) | |
start = int(sys.argv[1]) | |
end = int(sys.argv[2]) |
NewerOlder