This file contains hidden or 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 time | |
| from multiprocessing import Process, Pipe | |
| def sleeper(seconds, conn): | |
| time.sleep(seconds) | |
| conn.send("Got up after "+str(seconds)+" seconds") | |
| conn.close() | |
| print("Processed: "+str(seconds)) | |
| if __name__ == '__main__': |
This file contains hidden or 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
| debugger; | |
| var softModel = this.getView().getModel('softModel'); | |
| var softModelData = softModel.getData(); | |
| var selectedRequestID = this.getView().byId('RequestTypeSelect').getSelectedKey(); | |
| var i18nBundle = this.getView().getModel('i18n').getResourceBundle(); | |
| switch (selectedRequestID) { | |
| case "2": | |
| if (softModel.getProperty("/selectedBankAccount") == "0") { | |
| // return [false, "Please select bank account"]; | |
| return [false, i18nBundle.getText("e_type2__bank_account_select")]; |
This file contains hidden or 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
| from sly import Lexer, Parser | |
| class CalcLexer(Lexer): | |
| tokens = { TYPE_DECLARATION, SPACE, COLLAN, ASSIGN, NAME, TYPEOF, END, LPAREN, RPAREN } | |
| ignore = ' \t' | |
| # Tokens | |
| NAME = r'[a-zA-Z_][a-zA-Z0-9_]*' | |
| # NUMBER = r'\d+' |
NewerOlder