For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}| #!/bin/bash | |
| ########################################################### | |
| ########################################################### | |
| ## ## | |
| ## THIS SCRIPT SHOULD ONLY BE RUN ON A RASPBERRY PI 3 B+ ## | |
| ## ## | |
| ########################################################### | |
| ########################################################### |
For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:
1 - Add the property classes in the AppBar component:
<AppBar classes={{root: 'my-root-class'}}| import { Observable } from 'rxjs'; | |
| // Adapted from https://github.com/Reactive-Extensions/rx-node/blob/87589c07be626c32c842bdafa782fca5924e749c/index.js#L52 | |
| export default function fromStream(stream, finishEventName = 'end', dataEventName = 'data') { | |
| stream.pause(); | |
| return new Observable((observer) => { | |
| function dataHandler(data) { | |
| observer.next(data); | |
| } |
⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates
What this will cover
www.website.com to website.comindex.html)| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
| // Angular imports | |
| import { isArray, isBlank, isDate, isNumber, isStringMap, isPresent, isString } from 'angular2/src/facade/lang' | |
| export class GraphQLUtils { | |
| static createMutation(data: Object, dataDefinition: Object, method: string, mutationName?: string): string { | |
| if (!method || !data) { return null } | |
| let mutation: string = (mutationName || method) + '{' + method | |
| mutation += '(' + GraphQLUtils.flattenObject(data) + ')' |
| // Babel 2015 - ES6 | |
| // Convert a complex JS Object to GraphQL Query, should handle most use cases as of 21/01/2016 | |
| const o = { | |
| query: { | |
| fields: { | |
| complex: { | |
| aliasFor: "Products", | |
| processArgs: { | |
| coupon: (value) => { | |
| return `"${JSON.stringify(value).replace(/"/g, "\\\"")}"`; // passing json string as a argument |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| directive( 'ignoreMouseWheel', function( $rootScope ) { | |
| return { | |
| restrict: 'A', | |
| link: function( scope, element, attrs ){ | |
| element.bind('mousewheel', function ( event ) { | |
| element.blur(); | |
| } ); | |
| } | |
| } | |
| } ); |