Inspirated by Golang's const, I made this script for automation set value for constants white writing Java code.
Just:
//#constant(
int A;
int B;
| class ArgumentParser: | |
| def __init__(self, args): | |
| self.positioned_arguments = list(filter(lambda x: not x.startswith('--'), args)) | |
| self.named_argument_map = dict(map(lambda x: x.split("=", 1) if "=" in x else (x, None), | |
| filter(lambda x: x.startswith('--'), args))) | |
| def get(self, key_or_index): | |
| if type(key_or_index) is int: | |
| return self.positioned_arguments[key_or_index] | |
| else: |
| #!/bin/bash -e | |
| # List all backups | |
| device_path="zzzBackup" | |
| package=<package_of_the_app> # <--- replace this with your app | |
| adb shell "run-as $package ls $device_path" |
| def testcase(*testcases): | |
| def build_format(): | |
| max_param_len = 0 | |
| max_result_len = 0 | |
| num_params = 0 | |
| for case in testcases: | |
| num_params = len(case) - 1 | |
| for param in case[1:]: | |
| str_param = str(param) | |
| max_param_len = max(max_param_len, len(str_param)) |
| @import url('https://fonts.googleapis.com/css?family=Goudy+Bookletter+1911|Inconsolata|Lora|Slabo+27px|Song+Myung|Source+Serif+Pro|Roboto Mono'); | |
| * { | |
| -webkit-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Source Serif Pro', Lora, 'Slabo 27px', 'Goudy Bookletter 1911', serif; | |
| line-height: 1.4em; |
| def solution(A, B): | |
| go_up_count = 0 | |
| s1 = [] | |
| for i in range(0, len(A)): | |
| a = A[i] | |
| b = B[i] | |
| if b == 0: | |
| if not s1: | |
| go_up_count += 1 | |
| else: |
| setTimeout(function() { | |
| document.getElementsByClassName("sbo-toc-thumb")[0].click(); | |
| setInterval(function() { | |
| document.getElementsByClassName("sbo-toc-thumb")[0].click(); | |
| }, 1000); | |
| }, 2000); | |
Grab code then
apply from: 'lazy.gradle'
| <key>Customized</key> | |
| <dict> | |
| <key>Duplicate Lines</key> | |
| <string>selectLine:, copy:, moveToEndOfLine:, paste:, deleteBackward:</string> | |
| <key>Duplicate Current Line</key> | |
| <string>moveToBeginningOfLine:, deleteToEndOfLine:, yank:, insertNewline:, moveToBeginningOfLine:, yank:</string> | |
| <key>Start New Line</key> | |
| <string>moveToEndOfLine:, insertNewline:</string> | |
| <key>Start New Line Above</key> | |
| <string>moveUp:, moveToEndOfLine:, insertNewline:</string> |