One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| function bubbleSort() { | |
| const len = this.length; | |
| const inputArray = this; | |
| for (let i=0; i < len; i++) { | |
| for (let j=0; j < len - i; j++) { | |
| if(inputArray[j] > inputArray[j+1]) { | |
| const tmp = inputArray[j]; | |
| inputArray[j] = inputArray[j+1]; | |
| inputArray[j + 1] = tmp; | |
| } |
| export function createStore(reducer, preloadedState) { | |
| let listeners = []; | |
| let currentState = reducer(preloadedState, { type: "" }); | |
| const subscribe = listener => { | |
| listeners.push(listener); | |
| let isSubscribed = true; | |
| const unsubscribe = () => { | |
| const index = listeners.indexOf(listener); | |
| listeners = listeners.concat( | |
| listeners.slice(0, index - 1), |
| function quicksort(list) { | |
| if(list.length < 2) { | |
| return list; | |
| } | |
| const [pivot, ...rest] = list; // define pivot and rest of array | |
| const left = [], right = []; // initialize left and right | |
| rest.forEach(num => num < pivot ? left.push(num) : right.push(num)); // set right if the number is equar to pivot or over, if the number is less than pivot put in left | |
| return quicksort(left).concat([pivot], quicksort(right)); // concat values in order | |
| } |
| " Use Vim settings, rather then Vi settings (much better!). | |
| " This must be first, because it changes other options as a side effect. | |
| set nocompatible | |
| " ================ General Config ==================== | |
| set number "Line numbers are good | |
| set backspace=indent,eol,start "Allow backspace in insert mode | |
| set history=1000 "Store lots of :cmdline history | |
| set showcmd "Show incomplete cmds down the bottom |
These rules are adopted from the AngularJS commit conventions.
| import glamorous from 'glamorous' | |
| import { Table as antTable } from 'antd' | |
| // custom import | |
| import { colors } from 'shared/constants' | |
| export const Table = glamorous(antTable)({ | |
| background: colors.white, | |
| boxShadow: '0 2px 4px 0 rgba(0, 0, 0, 0.05)', | |
| '& .ant-table-thead tr': { |
| 'use strict'; | |
| // Generated on 2014-04-14 using generator-leaflet 0.0.14 | |
| var gulp = require('gulp'); | |
| var open = require('open'); | |
| var wiredep = require('wiredep').stream; | |
| // Load plugins | |
| var $ = require('gulp-load-plugins')(); |
| /** @jsx React.DOM */ | |
| var RenderedDeck = React.createClass({ | |
| render: function() { | |
| return <div id={this.props.id} className="deck" dangerouslySetInnerHTML={{__html:this.props.contents}}></div>; | |
| } | |
| }); | |
| var Deck = React.createClass({ | |
| render: function() { |