It's better to set initial content directly on the DOM instead of editor.setContent(), because the latter one will fail before the editor has completely been set up.
A Pen by Balazs Ree on CodePen.
async function fetchData() { | |
let response; | |
try { | |
response = await request(options); | |
} catch (exc) { | |
// ... do something with the error | |
} | |
// ... do something with the response |
{ | |
stage: 0, | |
optional: [ | |
"runtime" | |
] | |
} |
var path = require('path'); | |
var include = [ | |
path.resolve(path.join(__dirname, 'src')), | |
/// path.join(__dirname, '..', '..', '..', 'src'), | |
path.resolve(path.join(__dirname, 'node_modules', 'nucleus', 'src')) | |
]; | |
module.exports = { | |
hot: false, |
/** | |
* Wait until the test condition is true or a timeout occurs. Useful for waiting | |
* on a server response or for a ui change (fadeIn, etc.) to occur. | |
* | |
* @param testFx javascript condition that evaluates to a boolean, | |
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or | |
* as a callback function. | |
* @param onReady what to do when testFx condition is fulfilled, | |
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or | |
* as a callback function. |
// DRAFT, UNTESTED | |
// Originally you have an Angular app that | |
// is decomposed to submodules. Each submodule has its own | |
// config and run handlers. One submodule (lib3) | |
// also depends on another submodule. | |
module('myapp', ['lib1', 'lib2', 'lib3']) | |
.config(...) |
class MyFolderContentsTable(...): | |
def reorderedContent(self, *args, **kw): | |
var original_items = super(self, MyFolderContentsTable).contentsMethod()(*args, **kw) | |
# ... sort them differently | |
items = ... | |
return items |
It's better to set initial content directly on the DOM instead of editor.setContent(), because the latter one will fail before the editor has completely been set up.
A Pen by Balazs Ree on CodePen.
A Pen by Balazs Ree on CodePen.
[environment] | |
recipe = collective.recipe.environment | |
# MacOSX problem, https://twistedmatrix.com/trac/ticket/6974#comment:12 | |
ARCHFLAGS = -Wno-error=unused-command-line-argument-hard-error-in-future |
from PdbSublimeTextSupport import preloop, precmd | |
pdb.Pdb.preloop = preloop | |
pdb.Pdb.precmd = precmd | |
try: | |
from ipdb.__main__ import Pdb as ipdb_Pdb | |
except ImportError: | |
pass | |
else: |