Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#### Launching other programs using python | |
You can launch other program using `Popen()` function present in built in `subprocess()` module. | |
To start an external progra, from your python script,pass filename to subprocess.Popen() | |
For example | |
``` | |
>>> import subprocess | |
>>> subprocess.Popen('C:\\Windows\\System32\\calc.exe') | |
``` |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
To perform server-side rendering, use renderStatic
from glamor, which takes a callback. Render your component inside the callback and all of the calls to css()
will be collected and generated html and css will be returned. This will also return an array of ids to rehydrate the styles for fast startup.
To perform rehydration, call rehydrate
with the array of ids returned by renderStatic
.
Example -
import { renderStatic } from 'glamor/server';
'use strict'; | |
/*****************NATIVE forEACH*********************/ | |
Array.prototype.myEach = function(callback) { | |
for (var i = 0; i < this.length; i++) | |
callback(this[i], i, this); | |
}; | |
//tests |
// @flow | |
type A11yOptionsStatusMessageOptions = { | |
highlightedIndex: number, | |
highlightedValue: any, | |
inputValue: string, | |
isOpen: boolean, | |
itemToString: (item: any) => string, | |
previousResultCount: number, | |
resultCount: number, |
class App extends React.Component { | |
state = { src: '', err: null } | |
render() { | |
return ( | |
<ProcessImage | |
image='http://365.unsplash.com/assets/paul-jarvis-9530891001e7f4ccfcef9f3d7a2afecd.jpg' | |
colors={{ | |
mix: { | |
color: 'mistyrose', |
if(Function.prototype.name===undefined&&Object.defineProperty!==undefined){Object.defineProperty(Function.prototype,"name",{get:function(){var regex=/function\s([^(]{1,})\(/,match=regex.exec(this.toString());return match&&match.length>1?match[1].trim():""}})}if(String.prototype.trimRight===undefined){String.prototype.trimRight=function(){return String(this).replace(/\s+$/,"")}}var stylus=function(){function require(p){var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');if(!mod.exports){mod.exports={};mod.call(mod.exports,mod,mod.exports,require.relative(path))}return mod.exports}var bifs="called-from = ()\n\nvendors = moz webkit o ms official\n\n// stringify the given arg\n\n-string(arg)\n type(arg) + ' ' + arg\n\n// require a color\n\nrequire-color(color)\n unless color is a 'color'\n error('RGB or HSL value expected, got a ' + -string(color))\n\n// require a unit\n\nrequire-unit(n)\n unless n is a 'unit'\n error('unit expected, got a ' + -strin |
function Flyweight (make, model, processor) { | |
this.make = make; | |
this.model = model; | |
this.processor = processor; | |
}; | |
var FlyWeightFactory = (function () { | |
var flyweights = {}; | |
return { |
/* | |
React v16.1.0-beta | |
react-dom.production.min.js | |
Copyright (c) 2013-present, Facebook, Inc. | |
This source code is licensed under the MIT license found in the | |
LICENSE file in the root directory of this source tree. | |
Modernizr 3.0.0pre (Custom Build) | MIT | |
*/ |
/** @license React v16.1.0-beta | |
* react-dom.development.js | |
* | |
* Copyright (c) 2013-present, Facebook, Inc. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
(function (global, factory) { |