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
function go_ajax(url, method, data, success_func, extra_dict) { | |
if ($.type(data) === "function") { | |
var success_func_holder = success_func; | |
success_func = data; | |
extra_dict = success_func_holder; | |
data = undefined; | |
} | |
$.ajax({ | |
url: url, | |
type: method, |
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 re,sys | |
WANT_OPENING_BRACE = 10 | |
WANT_CLOSING_BRACE = 12 | |
def find_if_block(string_input, cur_index): | |
remaining_input = string_input[cur_index:] | |
if_true_indices = [(m.start(0), m.end(0)) for m in re.finditer(r'if\s*\(\s*true\s*\)\s*\{', remaining_input)] | |
if if_true_indices: |