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
| HOST=https://nhutil-sandbox.mxapps.io | |
| ENDPOINT=/main | |
| URL=$(HOST)$(ENDPOINT) | |
| CURL=curl | |
| SRC=./src/a.js | |
| .phony:POST | |
| POST: | |
| @$(CURL) \ | |
| --insecure \ | |
| $(URL) \ |
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
| var astack=root.getContext().getActionStack(); | |
| var calleridx=astack.length-1; | |
| var caller=astack[calleridx]; | |
| caller.setVariable( | |
| "str_foo", | |
| "Hello Microflow, how are things up there?" | |
| ) |
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
| var astack= | |
| root | |
| .getContext() | |
| .getActionStack()[0]; | |
| var numthrs=10; | |
| var numacc=com.mendix.core.Core.retrieveXPathQueryAggregate( | |
| root.getContext(), | |
| "COUNT(//Administration.Account)" | |
| ); | |
| var maxacc=JSON.parse(astack |
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
| function alert(s){ | |
| com.mendix.webui.FeedbackHelper.addTextMessageFeedback( | |
| root.getContext(), | |
| com.mendix.systemwideinterfaces.core.IFeedback.MessageType.INFO, | |
| s, | |
| true | |
| ) | |
| } | |
| function getMethodsByObject(c){ | |
| var r={}; |
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
| var Path=Java.type('java.nio.file.Path') | |
| var Paths=Java.type('java.nio.file.Paths') | |
| var Files=Java.type('java.nio.file.Files'); | |
| var IOUtils=Java.type('org.apache.commons.io.IOUtils'); | |
| com.mendix.core.Core.addRequestHandler( | |
| "foobar", | |
| new ( | |
| Java.extend( | |
| com.mendix.externalinterface.connector.RequestHandler, | |
| { |
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
| for(var i=0;i<8;i++){ | |
| com | |
| .mendix | |
| .core | |
| .Core | |
| .getLogger("myscript") | |
| .info("hello world:) "+i); | |
| } |
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
| // BEGIN USER CODE | |
| javax.script.ScriptEngine engine=new javax.script.ScriptEngineManager().getEngineByName("nashorn"); | |
| javax.script.Bindings bindings=engine.createBindings(); | |
| bindings.put("root", this); | |
| engine.eval(str_script,bindings); | |
| return true; | |
| // END USER CODE |
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
| #!/bin/sh | |
| # | |
| # msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service | |
| # | |
| # Please report issues and/or improvements to Sam Hocevar <[email protected]> | |
| # | |
| # Prerequisites: | |
| # — MSYS2 itself: http://sourceforge.net/projects/msys2/ | |
| # — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights | |
| # |
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
| //-------------------------------------------------------------------------------- | |
| //configuration | |
| //-------------------------------------------------------------------------------- | |
| var storeIDField="Title"; | |
| var storeIDValue="myDataStore"; | |
| var storeTable="Nashorn.JS"; | |
| var storeValueField="Contents"; | |
| var str_ret=''; | |
| function print(s){ | |
| str_ret+=s; |
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
| //---------------------------------------- | |
| //Inline Widget Def | |
| //---------------------------------------- | |
| require( | |
| [ | |
| "dojo/_base/declare", | |
| "dijit/_TemplatedMixin", | |
| "dojo/dom-construct", | |
| "dojo/parser", |
NewerOlder