This template is analogous to the traditional for(i = 0; i < x; i++) loop in NiFi Data flow.
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
| How to disable auto-save: | |
| Go to File > Settings (Ctrl+Alt+S). | |
| Go to Appearance & Behavior > System Settings. | |
| Make sure the two are unchecked: | |
| Save files on frame deactivation | |
| Save files automatically if application is idle for x sec. | |
| Go to Editor > General > Editor Tabs | |
| Put a checkmark on "Mark modified files with asterisk" | |
| (Optional but recommended) Under "Tab Closing Policy", select "Close non-modified files first". You may also want to increase the number of allowed tabs. | |
| Click Apply > OK. |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
import itertools as IT
def scale_polygon(path,offset):
center = centroid_of_polygon(path)
for i in path:
if i[0] > center[0]:
i[0] += offset
else:
i[0] -= offset
if i[1] > center[1]:
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
| /** | |
| * Toggle fullscreen function who work with webkit and firefox. | |
| * @function toggleFullscreen | |
| * @param {Object} event | |
| */ | |
| function toggleFullscreen(event) { | |
| var element = document.body; | |
| if (event instanceof HTMLElement) { | |
| element = event; |
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 p1 = { | |
| x: 20, | |
| y: 20 | |
| }; | |
| var p2 = { | |
| x: 40, | |
| y: 40 | |
| }; |
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 urlLib = require('url'); | |
| function UrlAdapter(urlString) { | |
| this.urlObj = urlLib.parse(urlString, true); | |
| // XXX remove the search property to force format() to use the query object when transforming the url object to a string | |
| delete this.urlObj.search; | |
| } | |
| exports.UrlAdapter = UrlAdapter; |