This file contains 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
/* | |
recursive calls to flatten will append items of inner array to the accumulator | |
e.g flatten :: [[1,2,[3]],4] -> [1,2,3,4] | |
*/ | |
const flatten = list => { | |
if (!Array.isArray(list)) | |
throw new Error(`Expecting input of type Array but found ${typeof list}`) | |
return list.reduce((accumulator, item) => | |
accumulator.concat(Array.isArray(item) ? flatten(item) : item), |
This file contains 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
<h1>Two way binding:</h1> | |
<div>{{message}}</div> | |
<label for="new-message">Type: message</label> | |
<input type="text" [(ngModel)]="message" id="new-message" /> | |
<h1>Lists:</h1> | |
<ul> | |
<li *ngFor="#item of nameList"> | |
{{item.name}} | |
</li> |
This file contains 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
<?php | |
add_filter( 'ai1wm_max_file_size', 'my_ai1wm_max_file_size', 10, 1 ); | |
function my_ai1wm_max_file_size( $max_file_size ){ | |
$new_max_file_size = 1073741824; | |
return $new_max_file_size; | |
} | |
// apply_filters( ‘ai1wm_max_file_size’, AI1WM_MAX_FILE_SIZE ) ); |
This file contains 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 React from 'react' | |
import PropTypes from 'prop-types'; | |
import {required, validate} from './validation'; | |
const NOOP = () => {}; | |
class InputWrapper extends React.Component { | |
static defaultProps = { | |
value: "", | |
onChange: NOOP, |
This file contains 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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="./style.css" /> | |
<title></title> | |
</head> | |
<body> | |
<div class="wrapper"> | |
<div class="circle"></div> |
This file contains 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
pipelines: | |
default: | |
- step: | |
name: build and publish docker image | |
services: | |
- docker | |
caches: | |
- docker | |
script: | |
- docker build -t $APP_NAME . |