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 __builtin__ | |
| def fake_input(prompt): | |
| print prompt | |
| return "trgy" | |
| __builtin__.raw_input = fake_input | |
| name = raw_input("Enter your name >") |
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
| new File("camelcase.txt").eachLine { line-> | |
| def tokens = line.split("(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])") | |
| def words = [] | |
| tokens.each { | |
| words.push(it.capitalize()) | |
| } | |
| println words.join(" ") | |
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
| event = require('pilot/event') | |
| Anchor = require('ace/anchor').Anchor | |
| doc = ace_editor.session.getDocument() | |
| editablePositions = [[1, 0, 2, 0]] # allow editong only the second row | |
| jQuery.each editable, (index, row) -> | |
| editablePositions.push [new Anchor(doc, row[0], row[1]), new Anchor(doc, row[2], row[3])] | |
| Range = require('ace/range').Range |
NewerOlder