Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| Cypress.Commands.add('switchToFrame', { prevSubject: 'element' }, ($iframe, callback = () => {}) => { | |
| Cypress.log({ | |
| name: 'switchToFrame', | |
| message: '', | |
| }); | |
| const waitForFrameLoading = () => { | |
| return new Cypress.Promise((resolve, reject) => { | |
| onIframeReady($iframe[0], resolve, reject); | |
| }); |
| This Gist contains the GitHub Language colors in CSS and JSON formats in seperate files. |
| from PyQt4.QtCore import * | |
| from PyQt4.QtGui import * | |
| import time | |
| class Form(QDialog): | |
| """ Just a simple dialog with a couple of widgets | |
| """ | |
| def __init__(self, parent=None): | |
| super(Form, self).__init__(parent) |
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
| #!/usr/bin/python3 | |
| import tkinter | |
| import time | |
| """ | |
| Example tkinter Clock widget, counting seconds and minutes in realtime. | |
| Functions just like a Label widget. |
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {number} a random floating point number | |
| */ | |
| function getRandomFloat(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |