code stringlengths 2 1.05M |
|---|
import React, { PropTypes } from 'react';
import { render } from 'react-dom';
import { Container, Row, Col } from 'reactstrap';
import Footer from './Shared/Footer';
class Index extends React.Component {
render() {
return (
<div>
<Container>
<Row>
... |
import { connect } from 'react-redux'
import { toggleTodo } from '../../../api/actions/todo'
import TodoList from '../../components/TodoComponents/List'
const getVisibleTodos = (todos, filter) => {
switch (filter) {
case 'SHOW_ALL':
return todos
case 'SHOW_COMPLETED':
return todos.filter(t => t.c... |
'use strict';
module.exports = angular.module('modules',
[
require('./home').name,
require('./customer').name,
require('./pages').name // Used for static content pages like "About", "Privacy Policy", "404", etc.
])
.controller('MainCtrl', require('./MainController')); |
export const $ = window.jQuery
export function activePage (query = '') {
return $('.ui-page-active ' + query)
}
|
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('healthcare-service-available-time', 'Unit | Model | HealthcareService_AvailableTime', {
needs: [
'model:meta',
'model:narrative',
'model:resource',
'model:extension'
]
});
test('it exists', function(assert) {
const model = this.... |
var res = require('./res'),
req = http('./req');
module.export = {
Res: Res,
Req: Req
};
|
'use strict';
function getEndpoint(origin, destination) {
var url = "http://localhost:8090/api/directions/transit";
return url.concat("?")
.concat("origin=").concat(origin)
.concat("&")
.concat("destination=").concat(destination);
}
angular.module('myApp.trip', ['ngRoute', 'uiGmapgoogl... |
'use strict';
angular.module('myCart', []).config(function () {
});
|
import CombatDetection from './CombatDetection'
export default class BoardState {
constructor () {
this.units = []
}
addUnit (unit) {
this.units.push(unit)
}
getUnits () {
return this.units
}
advanceUnits () {
this.units.forEach((u) => u.advance())
}
killCombattingUnits () {
c... |
import assert from "assert";
import generateCombGuid from "../src/index";
describe("Array", () => {
describe("generateCombGuid()", () => {
it("should return a 36 char string", () => {
let val = generateCombGuid();
assert.equal(val.length, 36);
});
it("should have 5 segments split on -", () =... |
module.exports = function(str) {
if (str.charCodeAt(0) === 46 /* . */ && str.indexOf('/', 1) === -1) {
return true;
}
var last = str.lastIndexOf('/');
return last !== -1 ? str.charCodeAt(last + 1) === 46 /* . */ : false;
};
|
/**
* @author Kevin Boogaard <{@link http://www.kevinboogaard.com/}>
* @author Alex Antonides <{@link http://www.alex-antonides.com/}>
* @license {@link https://github.com/kevinboogaard/Sports_World-Ball_Pit/blob/master/LICENSE}
* @ignore
*/
var ADCore = ADCore || {};
var scene = scene || {};
/**
*... |
// Run tasks with newer files only
//
// grunt-newer: <https://github.com/tschaub/grunt-newer>
'use strict';
module.exports = {
// "grunt-newer" works fine without options.
// If you need special configuration, insert it here.
};
|
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'react-router-redux';
import store, { history } from './store';
import ProtectedRoute from './components/protected-route';
import App from './components/app';
import Ac... |
#!/usr/bin/env node
var fs = require('fs');
var YAML = require('yamljs');
var program = require('commander');
var meta = require('./lib/meta');
program
.version(meta.VERSION)
.usage('[options] -f <swagger file> -o <output>')
.option('-f, --file [file]', 'Path to swagger file', 'swagger.yaml')
.option('-o, --o... |
// Normal
function add(n1, n2) {
return n1 + n2;
}
add(1, 2) // 3
// Curried
function add(n1) {
return function(n2) {
return n1 + n2;
}
}
add(1)(2) // 3 |
// Placeholders
var encryptionPattern = new RegExp(":geheim:([A-Za-z0-9+/=]*):([A-Za-z0-9+/=]*):([A-Za-z0-9+/=]*):", "g");
// Run eval() in different scope, provide non blocking error handling.
function methodExec(code, input, key)
{
try
{
eval("var method = " + code);
return method(input, key);
}
catch(error)... |
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('service:page-title-list', function(hooks) {
setupTest(hooks);
test('the list has no tokens by default', function (assert) {
assert.equal(this.owner.lookup('service:page-title-list').tokens.length, 0);
});
test('calling... |
/**
* derived-classes-1 created on 6/30/16 10:10 AM.
*
* @description [To be completed]
* @author Florian Popa <florian@webgenerals.com>
*/
class Point {
constructor(a, b) {
this.a = a;
this.b = b;
console.log('Point: ', this.a, this.b);
}
}
class ColorPoint extends Poin... |
'use strict';
// see http://eslint.org/docs/rules/#stylistic-issues
module.exports = {
// Enforce spacing inside array brackets
'array-bracket-spacing': [2, 'never'],
// Disallow or enforce spaces inside of single line blocks
'block-spacing': [2, 'always'],
// Enforce one true brace style
'brace-style': ... |
// --------------------------------------------------------------------------------------------------------------------
//
// amazon.js - the base class for all Amazon Web Services
//
// Copyright (c) 2011 AppsAttic Ltd - http://www.appsattic.com/
// Written by Andrew Chilton <chilts@appsattic.com>
//
// License: http:... |
/**
* @file mip-hs-showmore 组件
* @author
*/
define(function (require) {
'use strict';
var $ = require('zepto');
var viewport = require('viewport');
var customElement = require('customElement').create();
/**
* 第一次进入可视区回调,只会执行一次
*/
customElement.prototype.firstInviewCallback = function (... |
var LocalStrategy = require('passport-local').Strategy;
var mango = require('../database/mango');
var models = require('../database/models');
var User = models.user;
var passportUtils = require('./utilities.js');
var gunner = require('../gunner/gunner.js');
module.exports = function(passport){
passport.use('re... |
import 'babel/polyfill';
import SurvivorSelection from './survivor-selection';
import Recombination from './recombination';
import Mutation from './mutation';
import { MissingRequiredPropertyError, ImproperlyConfiguredError }
from '../errors';
import { extend, items } from '../utils';
const properties = {
pop... |
import React, { Component, PropTypes } from 'react';
import { AddRouteWithData } from '../../components/chapel/chapel.js'
export default class NewRoute extends Component {
constructor(props, context) {
super(props, context);
this.addBench = this.addBench.bind(this);
this.removeLastBench = this.removeLas... |
module.exports = require('highcharts-editor.js'); |
import React, { Component } from 'react';
import Moment from 'moment';
class WeatherAlerts extends Component{
render() {
// First, see if we have any alerts
if(this.props.alerts.length < 1) {
return null;
}
// If we have multiple, just display the first one:
var alert = this.props.... |
/*!
* CanJS - 1.1.7
* http://canjs.us/
* Copyright (c) 2013 Bitovi
* Wed, 24 Jul 2013 00:23:28 GMT
* Licensed MIT
* Includes: CanJS default build
* Download from: http://canjs.us/
*/
define(["can/util/string"], function(can) {
// ## construct.js
// `can.Construct`
// _This is a modified version of
// [Jo... |
let postcss = require('postcss'),
util = require('postcss-plugin-utilities');
module.exports = postcss.plugin('postcss-styler-var', () => {
let applyVars = o => {
['params', 'selector', 'prop', 'value'].forEach(prop => {
if (o.hasOwnProperty(prop)) {
o[prop] = o[prop].replac... |
export * from './state-provider'
export * from './statefull'
export * from './state-gameobject' |
// Regular expression that matches all symbols with the `Variation_Selector` property as per Unicode v5.1.0:
/[\u180B-\u180D\uFE00-\uFE0F]|\uDB40[\uDD00-\uDDEF]/; |
/**
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v25.1.0
* @link http://www.ag-grid.com/
* @license MIT
*/
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=iSideBar.js.map
|
var reserve = require("./reserve")(8000)
var IP = require("./IP")
module.exports = function( grunt, taskName, options, runOptions ){
var tinylr = require("./livereload")(grunt)
var middleWareStack = options.middleware || []
options.middleware = function ( connect, options, middlewares ){
middleWareStack.fo... |
const NCAPModel = require('~/models/ncap');
const navigateWithData = require('~/utils/navigateWithData');
const ctx = NCAPModel.getEmptyPlaceholder();
const loadYearData = () => {
ctx.set('isLoading', true);
return NCAPModel.get('').then(r => {
ctx.set('items', r);
ctx.set('isLoading', false);... |
module.exports.toJSON = (s) => {
try {
return JSON.stringify(s);
} catch(err) {
return null;
}
};
module.exports.fromJSON = (json) => {
try {
return JSON.parse(json);
} catch(err) {
return null;
}
};
module.exports.randomString = (length) => {
let result = '';
const ch... |
// @flow
import defaultPersister from '../../../_configuration/urb-base-server/graphql/defaultPersister'
defaultPersister.addTableSchema('Translaticiarum', {
fields: {
id: 'uuid',
Translaticiarum_User_id: 'uuid',
Translaticiarum_Stop: 'timestamp',
Translaticiarum_Start: 'timestamp',
Translaticia... |
import React from 'react'
import { storiesOf } from '@storybook/react'
import { withInfo } from '@storybook/addon-info'
import Navigation from './Navigation'
storiesOf('Navigation', module)
.addDecorator(withInfo({ header: false, inline: true, excludedPropTypes: ['children'] }))
.add('default', () => (
<Naviga... |
{
var _this;
return false || _this;
}
|
angular
.module('confRegistrationWebApp')
.directive('questionToolbar', function ($document, $timeout) {
return {
restrict: 'A',
link: function ($scope) {
//Debouncing plugin for jQuery from http://www.paulirish.com/2009/throttled-smartresize-jquery-event-handler/
(function (jQuery, ... |
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, de... |
version https://git-lfs.github.com/spec/v1
oid sha256:4bb8bf8e02fbd345da3ddf1bf8a55ae225446d7fab641db7f2d8f39a834a6c60
size 16675
|
(function () {
angular
.module('meanApp')
.service('consulta', consulta);
consulta.$inject = ['$http', '$window', 'authentication'];
function consulta ($http, $window, authentication) {
var consulta = function(req) {
return $http
.post('/api/system', req)
.success(function(res) {
console.l... |
import React from "react";
export default class Order extends React.Component {
render()
{
return(
<li class="">
<div class="icon-feed">
<i class="material-icons">local_shipping</i>
</div>
<a class="order-items">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do e... |
import * as tslib_1 from "tslib";
/**
* @license Angular v4.2.5
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
import { AUTO_STYLE, NoopAnimationPlayer } from '@angular/animations';
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-... |
/*!
Material Components for the web
Copyright (c) 2017 Google Inc.
License: Apache-2.0
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory)... |
export const SET_AUTH_ERROR = 'SET_AUTH_ERROR';
export const CLEAR_AUTH_ERROR = 'CLEAR_AUTH_ERROR';
export const SET_CREATE_ACC_NAV_POS = 'SET_CREATE_ACC_NAV_POS';
export const RESET_CREATE_ACC_NAV_POS = 'RESET_CREATE_ACC_NAV_POS';
export const SET_SECRET_STRENGTH = 'SET_SECRET_STRENGTH';
export const SET_PASSWORD_STRE... |
var connect = require('connect');
var http = require('http');
var WebSocket = require('ws');
var WebSocketServer = WebSocket.Server;
var wss = new WebSocketServer({port: 9000});
var Entities = require('./shared/Entities');
var lastTime = new Date().getTime();
var GAMETIME = 1000 * 60 * 5; //minutes
var runningTime = 0;... |
#!/usr/bin/env node
/*
Copyright 2013 Igor Shevchenko
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publ... |
define(["helpers/views/factory_classes", "helpers/views/contexted", "helpers/views/updateable_model", "helpers/views/updateable_collection", "helpers/views/unwrappable", "helpers/views/subviews_initializable", "helpers/views/attachable", "helpers/views/selectable", "helpers/views/stickerable", "helpers/views/validatabl... |
// jquery.animcloud.js - (c) tuomas.salo@iki.fi
(function($) {
var fill = function($target, wordlist) {
if(!wordlist) {
wordlist = [];
}
$target.html('');
var styles = [
{color: '#F7F6F4', fontSize: 0},
{color: '#aaa', fontSize: 12},
{color: '#888', fontSize: 18},
... |
import React from 'react';
function Choice(props) {
return (
<div className="choice">
<input type={props.type} value={props.text} name={props.type}/>
<label>{props.text}</label>
</div>
);
};
export default Choice;
|
//
// A Grid to snap transformations.
// In other words, a Grid defines a discrete set of transformations
// and provides methods to find the nearest transformation in the set
// for any given transformation.
//
var EPSILON = require('./epsilon')
var Vector = require('./Vector')
var Path = require('./Path')
var extend ... |
/* ===================================================
* bootstrap-transition.js v2.3.1
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you ... |
(function() {
module('gpub.api.endToEndTest');
var sgfs = testdata.sgfs;
var sgf = testdata.gogameguru_commentary;
var base = testdata.base;
test('Setup', function() {
ok(sgf, 'testdata defined');
ok(glift, 'glift global defined');
ok(gpub, 'gpub global defined');
});
test('Testing validatio... |
define( [ 'angular', 'angular-mocks', 'mockQ', 'halp', 'jasmine' ], function( ng, _, mockQ, halp, jasmine ) {
'use strict';
// Examples are from the RFC: http://tools.ietf.org/html/draft-kelly-json-hal-06
var exampleOrders = {
"_links": {
"self": { "href": "/orders" },
"next": { "href"... |
hljs.registerLanguage("clojure-repl",(()=>{"use strict";return e=>({
name:"Clojure REPL",contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)?=>/,
starts:{end:/$/,subLanguage:"clojure"}}]})}))(); |
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt
frappe.provide('frappe.views');
// opts:
// stats = list of fields
// doctype
// parent
// set_filter = function called on click
frappe.views.ListSidebar = Class.extend({
init: function(opts) {
$.extend(this, opt... |
import gulp from 'gulp'
import gutil from 'gulp-util'
import uglify from 'gulp-uglify'
import sourcemaps from 'gulp-sourcemaps'
import source from 'vinyl-source-stream'
import buffer from 'vinyl-buffer'
import watchify from 'watchify'
import browserify from 'browserify'
import vueify from 'vueify'
import babelify from ... |
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
|
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","topic_0000000000000C16.html"],['408',"Tlece.Recruitment.Controllers Namespace","topic_000000000000018A.html"],['537',"QuestionVideoCreateController Class","topic_00000000000001F9.html"],['539',"Methods","topic_00000000000001F9_methods--.html"],['5... |
(function () {
'use strict';
angular
.module('videostoreApp')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig ($stateProvider) {
$stateProvider.state('admin', {
abstract: true,
parent: 'app'
});
}
})();
|
var path = (process.argv[2]);
var fs = require('fs');
var file = fs.readFileSync(path);
console.log(file.toString().split('\n').length-1);
|
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M3 3v10c0 .55.45 1 1 1h2v7.15c0 .51.67.69.93.25l5.19-8.9c.39-.67-.09-1.5-.86-1.5H9l3.38-7.59c.29-.67-.2-1.41-.92-1.41H4c-.55 0-1 .45-1 1zm15-1c-.6 0-1.13.38-1.34.94L14.22 9.8c-.2.59.23 1.2.85 1.2.3... |
import alt from '../alt';
class ChatServerActionCreators {
constructor() {
this.generateActions('receiveServerStatus', 'receiveUsers', 'receiveMessages');
}
}
export default alt.createActions(ChatServerActionCreators);
|
"use babel";
import DocsParser from '../docsparser';
import { XRegExp } from 'xregexp';
class ActionscriptParser extends DocsParser {
setupSettings() {
var nameToken = '[a-zA-Z_][a-zA-Z0-9_]*';
this.settings = {
'typeInfo': false,
'curlyTypes': false,
'typeTag': '',
'commentCloser':... |
'use strict';
var paths = {
js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**', 'packages/**/*.js', '!packages/**/node_modules/**'],
html: ['packages/**/public/**/views/**', 'packages/**/server/views/**'],
css: ['!bower_components/**', 'packages/**/public/**/css/*.css']
};
module.exports =... |
import _ from 'underscore';
let isNumberOrNR = function() {
if (this.isSet && (this.value === 'NR' || _.isFinite(this.value))) {
return undefined;
} else {
return 'numOrNR';
}
},
isNumericishString = function() {
if (!this.isSet || this.value === null) r... |
var five = require('johnny-five');
var board = new five.Board();
board.on('ready', function(){
// Set up LEDS
var red = five.Led(9),
green = five.Led(10),
blue = five.Led(11);
// Inject into the repl
board.repl.inject({
r: red,
g: green,
b: blue
});
red.brightness(50);
green.brightness(50);
blue.b... |
import { css } from "lit-element";
export default css`
.primary-map > div {
width: 100%;
height: 400px;
}
.primary: {
color: red;
}
`;
|
var isFunction = require('./isFunction'),
isObject = require('./isObject');
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-... |
const jwt = require('jsonwebtoken');
const getVerify = function (token) {
return new Promise((resolve, reject) => {
jwt.verify(token, 'app.get(user)', function (err, decoded) {
if (err) {
reject(100);
} else {
resolve(decoded);
}
});
})
}
const resolveToken = async functi... |
define(['jquery', 'ekyna-form/collection'], function($) {
"use strict";
/**
* Supplier order item widget
*/
$.fn.supplierOrderWidget = function() {
this.each(function() {
var $this = $(this),
$carrier = $this.find('.order-carrier'),
$carrierFie... |
'use strict';
const assert = require('assert').strict;
global.Ladders = require('../../.server-dist/ladders').Ladders;
const {makeUser} = require('../users-utils');
describe('Matchmaker', function () {
const FORMATID = 'gen7ou';
const addSearch = (player, rating = 1000, formatid = FORMATID) => {
const search = n... |
<% if (projectstylelint === 'strict') { %>const font = {
properties: ['font', 'font-family', 'font-size', 'line-height', 'font-weight', 'font-style']
}
const text = {
properties: [
'break',
'column',
'columns',
'hyphens',
'letter-spacing',
'tab-size',
'text',
'white-space',
'wor... |
ScalaJS.is.scala_Function1$mcII$sp = (function(obj) {
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_Function1$mcII$sp)))
});
ScalaJS.as.scala_Function1$mcII$sp = (function(obj) {
if ((ScalaJS.is.scala_Function1$mcII$sp(obj) || (obj === null))) {
return obj
} else {
ScalaJS.throwCla... |
/**
* Created by Khoa on 12/27/2016.
*/
"use strict";
//configs
let screenWidth, screenHeight;
const STARTING_PARTICLE_NUM = 75;
const PARTICLE_RADIUS = 3;
const MAX_VELOCITY = 200;
const app = angular.module("app", []);
app.controller('MainCtrl', ['$scope','animate', ($scope, animate) => {
$scope.dots = [];
... |
/**
*
* */
requirejs(['app'], function(app) {
'use strict';
console.log('%cfile: common.js', 'color: #C2ECFF');
app();
});
|
var linearScale = d3.scale.linear()
.domain([0,100])
.range([0,10]);
var scale = d3.scale.linear()
.domain([0,1])
.range([150, 16]);
var svgContainer = d3.select("body").append("svg")
.attr("width", window.innerWidth)
.attr("height", window.innerHeight);
var rectangle_elems = []
var line_elems = []
var t... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
var playerInstance = null;
var Player = Backbone.View.extend({
tagName: "div",
videoInfoObject: null,
templateID: "framework/player/generic",
template: null,
recreate_on_play: false,
state: null,
previousState : null,
_hasBufferIndicator: false,
playerCurrentTime: -1,
seekImmedi... |
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';
module('Acceptance | list rentals', function(hooks) {
setupApplicationTest(hooks);
test('should show rentals as the home page', async function(assert) {
await visi... |
/**
* Module dependencies
*/
var ft = require('./fileTools')
var formatTools = require('./formatTools')
/**
* Generate a Mongoose model
* @param {string} path
* @param {string} modelName
* @param {array} modelFields
* @param {function} cb
*/
function generateModel (path, modelName, modelFields, cb, es6) {
ft... |
/*!
* jQuery UI Effects Slide 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/slide-effect/
*
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {
$.effects.effec... |
var webpack = require("webpack");
module.exports = {
entry: "./src/index.js",
output: {
path: "dist/assets",
filename: "bundle.js",
publicPath: "assets"
},
devServer: {
inline: true,
contentBase: './dist',
port: 5000
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
... |
var gulp = require('gulp');
var plug = require('gulp-load-plugins')();
var _ = require('lodash');
var isProduction = function(file) {
return process.env.NODE_ENV === 'production';
};
var isDebug = function(file) {
return isProduction(file);
};
gulp.task('test', function () {
return gulp.src('spec/*.js')
.pipe... |
/*!
* HTML5 export buttons for Buttons and DataTables.
* 2016 SpryMedia Ltd - datatables.net/license
*
* FileSaver.js (1.1.20160328) - MIT license
* Copyright © 2016 Eli Grey - http://eligrey.com
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatabl... |
/*!
* FileInput Ukrainian Translations
*
* This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* @see http://github.com/kartik-v/bootstrap-fileinput
* @author CyanoFresh <cyanofresh@gmail.com>
*
* NOTE... |
import Ember from 'ember';
export default (Ember.Service || Ember.Object).extend({
token: null,
getToken: function(billingInfo) {
let self = this;
return new Ember.RSVP.Promise(function(resolve, reject) {
recurly.token(billingInfo, function(err, token) {
if(err) {
reject(err);
... |
#!/usr/bin/env node
'use strict'
var killport = require('../lib')
var option = require('../lib/cli/parse').parse(process.argv)
if (option.args.length === 0) option.help()
killport(option)
|
function User () {
}
User.prototype.get = function() {
// body...
};
User.prototype.update = function() {
// body...
};
// fsdk:start(admin)
User.prototype.delete = function(first_argument) {
// body...
};
// fsdk:end
module.exports = User; |
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div"... |
'use strict';
var Ticker = cc._Ticker;
var Time = cc.Time;
var EditorEngine = cc.Class({
name: 'EditorEngine',
extends: cc.Playable,
ctor: function () {
var useDefaultMainLoop = arguments[0];
/**
* We should use this id to cancel ticker, otherwise if the engine stop and replay i... |
const createReactClass = require('create-react-class');
const MyComponent = createReactClass({
displayName: 'MyComponent',
mixins: [
{
componentWillMount() {
// componentWillMount
},
componentDidMount() {
// componentDidMount
},
componentWillUpdate(nextProps, nextS... |
$(function () {
$('#container').highcharts('StockChart', {
rangeSelector: {
selected: 1
},
plotOptions: {
line: {
gapSize: 2
}
},
series: [{
name: 'USD to EUR',
data: usdeur
}]
});
}); |
import React, { Component, PropTypes } from 'react';
import _ from 'lodash';
import { DragLayer } from 'react-dnd';
import ItemTypes from '../constants/ItemTypes';
import Connection from './Connection';
import DumbConnection from './CustomDragLayer/DumbConnection';
import SVGComponent from './SVGComponent';
import * as... |
'use strict'
const clc = require('cli-color')
const colors = [196, 202, 208, 214, 220, 226, 190, 154, 118, 82, 46, 47, 48, 49, 50, 51, 45, 39, 33, 27, 21, 57, 93, 129, 165, 201]
module.exports = i => clc.bgXterm(i === undefined ? 0 : colors[i % colors.length])(' ')
|
/**
* Created by zhang on 16/5/10.
*/
//数据的封装
(function() {
var n = "xianqiang" //这个外部是不能引用的
//函数当做类使用
function People(name) {
this._name = name;
}
//添加方法
People.prototype.say = function() {
alert("p-hello" + this._name)
};
window.People = People;
}()); // 这个地方执行了!... |
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modi... |
(function() {
angular.module('app')
.controller('CardsController', CardsController);
CardsController.$inject = ['cardsService'];
function CardsController(cardsService) {
var vm = this;
vm.cards = [];
vm.shuffle = shuffle;
vm.slices = [];
init();
fun... |
import React from 'react';
import PropTypes from 'prop-types';
const TreeView = ({ children }) => (
<div className="TreeView" style={{ width: '180px' }}>
{children}
</div>
);
TreeView.propTypes = {
children: PropTypes.node
};
TreeView.defaultProps = {
children: []
};
export default TreeView;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.