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
# https://www.youtube.com/watch?v=zSDC_TU7rtc | |
def insert(sum_name, delta): | |
index = memcache.get('index-' + sum_name) | |
if index is None: | |
memcache.add('index-' + sum_name, 1) | |
index = memcache.get ('index-' + sum_name) | |
lock = '%s-lock-%d' % (sum_name, index) | |
writers = memcache.incr(lock, initial_value = 2 ** 16) |
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
<!-- classic mode 2.7 --> | |
<add-linker name="xs"/> | |
<!-- superdev mode 2.5 --> | |
<add-linker name="xsiframe"/> | |
<set-configuration-property name="xsiframe.failIfScriptTag" value="false"/> | |
<set-configuration-property name="devModeRedirectEnabled" value="true"/> |
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 static void writeDoneFile(String filePath) throws IOException { | |
String doneFilePath = filePath + ".done"; | |
FileOutputStream out = null; | |
try { | |
out = new FileOutputStream(doneFilePath); | |
out.write(SimpleDateFormat.getInstance().format(new Date()).getBytes()); | |
} finally { | |
if (out != null) { |