code stringlengths 2 1.05M |
|---|
(function () {
angular.module('meanApp', ['ngRoute', 'ui.bootstrap']);
function config ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'home/home.view.html',
controller: 'homeCtrl',
controllerAs: 'vm'
})
.when('/home', {
template... |
/* */
(function(process) {
var build = require("./build/build");
function hint(msg, paths) {
return function() {
console.log(msg);
jake.exec('node node_modules/jshint/bin/jshint -c ' + paths, {printStdout: true}, function() {
console.log('\tCheck passed.\n');
complete();
});
... |
import React from "react";
const Skills = () => {
// WILL USE FIREBASE FOR SKILLS TEMP DATA:
const skills = [
`Javascript`,
`React`,
`Node`,
`Express`,
`Firebase`,
`GraphQL`,
`MongoDB`,
`HTML5`,
`CSS3`,
];
return (
<section>
{skills.map(skill => (
<ul key={... |
var mysql = require('promise-mysql');
var con = mysql.createPool({
host: "localhost",
user: "root",
password: "matter",
database: "simple",
port:"3306"
});
module.exports.con = con;
|
const NOTES_IN_SCALE = 8;
const DURATION_OF_MELODY = 12;
const BEATS_PER_MINUTE = 120;
const MAXIMUM_NOTE_LENGTH = 4;
const MUTATION_FREQUENCY = 1;
import Melody from 'models/Melody';
import Note from 'models/Note';
import Tone from 'models/Tone';
import Scale from 'models/Scale';
import Player from 'models/Player';
i... |
/**
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var d3 = require('d3');
module.exports = function getUpdateObject(axisLayout, buttonLayout) {
var axName =... |
module.exports = function(grunt) {
var fs = require('fs');
var path = require('path');
var extend = require('util')._extend;
var parameters = null;
if(fs.existsSync(__dirname + '/Gruntfile.parameters.js')) {
parameters = require(__dirname + '/Gruntfile.parameters.js');
}
parameters ... |
//Setting up route
angular.module('mean').config(['$stateProvider','$urlRouterProvider', function($stateProvider,$urlRouterProvider) {
$urlRouterProvider.otherwise(function($injector, $location){
$injector.invoke(['$state', function($state) {
$state.go('404');
}]);
});
$statePro... |
/*!
* VERSION: 0.2.0
* DATE: 2017-01-17
* UPDATES AND DOCS AT: http://greensock.com
*
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
* Physics2DPlugin is a Club GreenSock membership benefit; You must have a valid membership to use
* this code without violating the terms of use. Visit http://... |
// Karma configuration
// Generated on Wed Aug 31 2016 21:41:39 GMT+0900 (JST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/k... |
'use strict';
module.exports = require('./is-implemented')() ? Array.prototype[require('es6-symbol').iterator] : require('./shim');
//# sourceMappingURL=index-compiled.js.map |
const bole = require('bole');
const mongojs = require('mongojs');
const async = require('async');
const config = require('../lib/config');
const init = require('../lib/db/init.js');
const geocoding = require('../lib/maps').geocoding;
bole.output({ level: 'debug', stream: process.stdout });
const log... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Characteristic_1 = require("./node_modules/hap-nodejs/lib/Characteristic");
var Service_1 = require("./node_modules/hap-nodejs/lib/Service");
require("./node_modules/hap-nodejs/lib/gen/HomeKitTypes");
var availableServices = Object.keys(Se... |
Package.describe({
name: 'pa:lib',
version: '0.0.1',
// Brief, one-line summary of the package.
summary: '',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, s... |
const Graph = require('../src/Graph.js');
const GraphQuery = require('../src/GraphQuery.js');
const Memdown = require('memdown');
const {expect} = require('chai');
const crypto = require('crypto');
let db;
let graph;
beforeEach(() => {
graph = new Graph({db: Memdown});
db = graph._db;
});
describe('GraphQuery', ... |
const path = require('path')
module.exports = function ({config, inherit, options}) {
inherit('web', options)
const projectModules = path.join(__dirname, 'node_modules')
config
.module
.rule('vue:compile')
.test(/\.vue$/)
.loader('vue', 'vue-loader')
.end()
.end()
.r... |
var Plotly = require('@lib/index');
var Plots = require('@src/plots/plots');
var Lib = require('@src/lib');
var Image = require('@src/traces/image');
var d3 = require('d3');
var createGraphDiv = require('../assets/create_graph_div');
var destroyGraphDiv = require('../assets/destroy_graph_div');
var failTest = require... |
var total_slides = 5;
function nextSlide() {
// Cogemos la slide actual visible
var slide = $("div[id^='slider_']:visible")
// Le sacamos el id
slide_id = slide.attr('id');
var id = slide_id.substr(7, 1);
// Le sumamos 1
next_id = parseInt(id) + 1;
// Si nos hemos pasado del total de slides, volvemos a la p... |
/**
* Displays the cpu information.
*
* In the overview, for each core there will be one block, displaying the current usage.
* In the details, it will display cpu model(s) and speed(s)
*/
// Update interval in seconds
var interval = 10;
var os = require('os');
var _ = require('underscore');
/**
* Reads the c... |
jest.autoMockOff();
import Authentiq from '../authentiq';
import DigitalOceanProvider from '../authentiq/providers/digitalocean-oauth2';
describe('Authentiq', function() {
it('can be constructed with a provider string', function () {
var authentiq = new Authentiq('DigitalOceanOAuth2');
expect(authentiq.prov... |
import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
import { commitMutation, graphql } from 'react-relay/compat';
import Box from '@material-ui/core/Box';
import ShortTextIcon from '@material-ui/icons/ShortText';
import LocationIcon from '@material-ui/icons/LocationOn... |
// Testing the main file
describe(".select(selector)", function() {
it("should be a function", function() {
expect(typeof base.select).to.equal('function');
});
it("can select by class", function(){
expect(u().select('.base').length).to.equal(1);
expect(u().select('.base')).to.not.equal(null);
});... |
const FORM_ID = '#get-latest-builds'
// -------------------------------------------------------------
// Module.
// -------------------------------------------------------------
$(() => {
const form = $(FORM_ID)
form.submit(function onSubmitted (e) {
e.preventDefault()
$.getJSON('/builds', form.serializ... |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.7.1-master-bbbec18
*/
goog.provide('ng.material.components.select');
goog.require('ng.material.components.backdrop');
goog.require('ng.material.core');
(function() {
'use strict';
/*********************************************... |
import * as types from './actionTypes';
// import { push } from 'react-router-redux';
import axios from 'axios';
export function attempt_get_users() {
return (dispatch, getState) => { // eslint-disable-line
// return dispatch(fetchPosts(subreddit))
console.log("attempting to get users");
axios({
m... |
/**
* LitePubl CMS
*
* copyright 2010 - 2017 Vladimir Yushko http://litepublisher.com/ http://litepublisher.ru/
* license https://github.com/litepubl/cms/blob/master/LICENSE.txt MIT
* link https://github.com/litepubl\cms
* version 7.08
*/
(function($, document) {
'use strict';
$(function() {
... |
'use strict';
angular.module('myApp').factory('portsApi', function($resource) {
return $resource('/api/scm.config/1.0/ports', {},
{
'query': {
method: 'GET',
isArray: true ,
responseType: 'json',
transformResponse: function (data) {
var wrapped = angular.fromJson(data);
... |
/**
* @fileoverview disallow unused variable definitions of v-for directives or scope attributes.
* @author 薛定谔的猫<hh_2013@foxmail.com>
*/
'use strict'
const utils = require('../utils')
// ------------------------------------------------------------------------------
// Rule Definition
// --------------------------... |
'use strict';
var _ = require('lodash');
var async = require('async');
var fs = require('graceful-fs');
var path = require('path');
var recast = require('recast');
var through2 = require('through2');
/**
* Extension to append to files to distinguish them from their original
* versions.
*/
var SUBEXTENSION = '.webk... |
/**
* Test case for pad.
* Runs with mocha.
*/
'use strict'
const pad = require('../lib/pad.js'),
assert = require('assert')
describe('pad', () => {
it('Pad', (done) => {
assert.equal(pad('foo', 7), 'foo ')
done()
})
})
|
//// NPM
const chalk = require('chalk')
//// CORE
//// LOCAL
const { chooseInstanceId, choosePoolId, inspectContainer, isHost, tailLog } = require('../catalog')
const { log } = require('../log')
const { readLog } = require('../sqldb')
const { dft } = require('../../lib/viewer')
const config = require('../../config/con... |
// 包含页头. 页尾
var React = require('react');
var Router = require('react-router-ie8');
var RouteHandler = Router.RouteHandler;
var Header = require('./header.js');
var Footer = require('./footer.js');
var MyCenter = require('./my-center.js');
require('../config/core.js'); //单例
var Main = React.createClass({
getInitialSt... |
import React from 'react';
import withRedux from 'next-redux-wrapper';
import { initStore } from '../stores/search';
import stylesheet from 'styles/index.scss';
import {
BigcommerceLogo,
Map,
Navigation,
Results,
} from '../components/index';
export default withRedux(initStore)(() => (
<div class... |
var R = require('../source/index.js');
var eq = require('./shared/eq.js');
describe('insert', function() {
it('inserts an element into the given list', function() {
var list = ['a', 'b', 'c', 'd', 'e'];
eq(R.insert(2, 'x', list), ['a', 'b', 'x', 'c', 'd', 'e']);
});
it('inserts another list as an eleme... |
/**
*
* AddFilterCTA
*
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
// Design
import Button from 'components/CustomButton';
import Logo from '../../assets/images/icon_filter.png';
import styles from './styles.scss';
class AddFilterCTA extends ... |
version https://git-lfs.github.com/spec/v1
oid sha256:aaa7e8cf7d5289523aac49f7fe2fba2f4379530ad79534ad791d3672d39da905
size 12180
|
var request = require('request');
var cheerio = require('cheerio');
var config = require('../config.json');
var scraper = function(target, callback) {
// Increase throttle count
global.throttle++;
// Fetch target source code
request(target, function(error, response, body) {
if (!error && response.statusCod... |
/**
* Created by mikemc on 27/08/2016.
*/
// jscs:disable validateLineBreaks
'use strict';
var it = require("mocha/lib/mocha.js").it;
var describe;
describe = require("mocha/lib/mocha.js").describe;
const should = require('should'),
bunyan = require('bunyan'),
PrettyStream =... |
import { v4 } from 'uuid'
import Home from './pages/Home'
import NotFound from './pages/NotFound'
const routes = [
{
key: v4(),
path: '/',
exact: true,
component: Home,
},
{
key: v4(),
component: NotFound,
},
]
export default routes
|
/** @constructor */
ScalaJS.c.java_lang_Short$ = (function() {
ScalaJS.c.java_lang_Object.call(this);
this.TYPE$1 = null;
this.MIN$undVALUE$1 = 0;
this.MAX$undVALUE$1 = 0;
this.SIZE$1 = 0
});
ScalaJS.c.java_lang_Short$.prototype = new ScalaJS.inheritable.java_lang_Object();
ScalaJS.c.java_lang_Short$.prototyp... |
/**
* Created by tvtri on 08/11/2016.
*/
export const loadState = () => {
try {
const serializedState = localStorage.getItem('state');
if (serializedState === null) {
return undefined;
}
return JSON.parse(serializedState);
} catch (err) {
return undefined;
}
};
export const saveState ... |
fixtures.register('15', function () {
HIGHLIGHT({ color: 'red' },
'Lorem ',
HIGHLIGHT({ color: 'green' },
'ipsum ',
HIGHLIGHT({ color: 'blue' },
'do',
HIGHLIGHT({ color: 'red', marked: true }, 'lor')
),
HIGHLIGHT({ color... |
'use strict';
var Animation = require('./core.animation');
var animations = require('./core.animations');
var controllers = require('../controllers/index');
var defaults = require('./core.defaults');
var helpers = require('../helpers/index');
var Interaction = require('./core.interaction');
var layouts = require('./co... |
var babar, $b;
babar = $b = {
options: {
title: 'babar.js'
},
constants: {
hash_regexp: /^#!\/?/,
yield_id: 'babar-yield',
error_class: 'babar-error',
// class attribute prefixes
partial_prefix: 'babar-partial-',
page_prefix: 'babar-page-'
},
hash: {
change: function () {
... |
var rli = require("readline").createInterface(process.stdin, process.stdout);
rli.on("close", function () {
process.stdout.write("\n");
process.exit(0);
});
function prompt(p, f) {
rli.setPrompt(p);
rli.once("line", function (line) {
f(line);
});
rli.prompt();
}
var logo = require("./logo.js");
logo.... |
// flow-typed signature: 4cfd948132b177333b93604fcf0fb301
// flow-typed version: <<STUB>>/postcss-sassy-import_v^1.2.3/flow_v0.37.4
/**
* This is an autogenerated libdef stub for:
*
* 'postcss-sassy-import'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share... |
import * as React from 'react';
import TestRenderer from 'react-test-renderer';
import { applyMiddleware, createStore } from 'redux';
import {
TIMING_FUNCTIONS,
scrollableArea,
scrollToWhen,
createScrollMiddleware
} from '../src';
window.scroll = (x, y) => {
window.pageXOffset = x;
window.pageYOffset = y;
... |
'use strict';
module.exports = {
client: {
lib: {
css: [
// 'public/lib/bootstrap/dist/css/bootstrap.css',
// 'public/lib/bootstrap/dist/css/bootstrap-theme.css',
'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/css/foundation.css',
'https://cdnjs.cloudflare.com/ajax... |
var _ = require('lodash'),
request = require('request'),
utilityFunctions = {};
utilityFunctions.verifyCallbackArgument = function (options, callback) {
return (typeof options === 'function') ? options : callback;
};
utilityFunctions.getApiUrl = function (obj) {
return this.apiUrl;
};
utilityFunction... |
var Script = function () {
var doughnutData = [
{
value: 30,
color: "#F7464A"
},
{
value: 50,
color: "#46BFBD"
},
{
value: 100,
color: "#FDB45C"
},
{
value: ... |
/**
* @file
* Unit tests for the Kalabox object.
*/
// Dependencies:
var box = require('../kalabox/box');
// "Constants":
var BOX_INSTALLED = false; // Set this to true or false depending on if you have Kalabox installed or not.
describe('The Box object', function() {
// Test installed check.
it('can check i... |
var cluster = require('cluster');
var child_process = require('child_process');
var nodetime = require('nodetime');
nodetime.profile({ server: 'localhost', accountKey: new Array(41).join(0), silent: true, transactions: false });
var agent = nodetime.time().agent;
var clusterhub = require('clusterhub').createHub('appmo... |
(function(undefined) {
pl.extend(ke.app.handlers._proccessEventHandlers.app.audio, {
play: function(data, fn) {
console.log('Pronouncing:', lang);
var lang = data.dir.substr(0, 5) === 'lang:' ?
data.dir.substr(5) :
ke.ext.util.langUtil['get' + ke.capitalize(data.dir) + 'L... |
function setImageValue(url){
$('.mce-btn.mce-open').parent().find('.mce-textbox').val(url);
}
$(document).ready(function(){
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
tinymce.init({
menubar: false,
selector:'textarea.richTextBox',... |
module.exports = {
base: 'packages/vue/src/',
files: [
'packages/vue/src/*.template.html'
],
/**
* @argument {string} file
*/
handler: file => {
if (file.endsWith('index.template.html')) {
return {
type: 'vue',
name: 'Select2',
path: './index'
}
}
retu... |
import test from "ava"
import Factory from "@/factory"
import { WHITE_WIN, BLACK_WIN } from "~/share/constants/results"
import { WHITE, BLACK, PAWN, KNIGHT, BISHOP, ROOK, QUEEN } from "~/share/chess"
import { MOVE, FORFEIT } from "~/share/constants/revision_types"
import Revision from "~/app/models/revision"
test("... |
/* eslint no-console: [0] */
'use strict'
const Template = require('trailpack-proxy-email').Template
module.exports = class Order extends Template {
created(order) {
let orderItems = '<h5>Order Items</h5>'
orderItems = orderItems + `
<table>
<thead>
<tr>
<th>Name</th>
<th>Qty</th>
<t... |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of sou... |
/*!
* jQuery JavaScript Library v1.11.0
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-01-23T21:02Z
*/
(function( global, factory ) {
... |
import React, { Component } from 'react';
import classnames from 'classnames';
import _ from 'lodash';
export default class ChatTile extends Component {
render() {
const { props } = this;
let data = _.get(props.data, 'chat-configs', false);
let inviteNum = 0;
let msgNum = 0;
if (data) {
... |
import React, { Component } from 'react';
import {
Wrapper,
Icon,
ErrorResponseCode,
ErrorText
} from './ErrorStyled';
import ErrorIcon from './icons/error-icon@3x.png';
class ErrorComponent extends Component {
render() {
return (
<Wrapper>
<Icon srcSet={ ErrorIcon } />
<ErrorRespon... |
module.exports = {
devtool: 'eval',
entry: './src/client.js',
output: {
path: './public',
filename: 'dilemmas.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
},
resolve: {
extensions: ['', '.js', '.jso... |
'use strict';
// MODULES //
var test = require( 'tape' );
var assert = require( 'chai' ).assert;
var proxyquire = require( 'proxyquire' );
var counts = require( './../lib/counts.js' );
// FIXTURES //
var getOpts = require( './fixtures/opts.js' );
var data = require( './fixtures/results.json' );
// TESTS //
test... |
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: 'alpha',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
}; |
'use strict';
module.exports = function(grunt) {
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
serverViews: {
files: ['app/views/**'],
options: {
livereload: true,
}
... |
var fs = require('fs');
var criterias = {
children: 3,
cats: 7,
samoyeds: 2,
pomeranians: 3,
akitas: 0,
vizslas: 0,
goldfish: 5,
trees: 3,
cars: 2,
perfumes: 1
};
var ops = {
cats: function (a,b) { return a > b; },
trees: function (a,b) { return a > b; },
pomeranians: function (a,b) { return a < b; }... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
class UserDetails extends Component {
constructor(props) {
super(props);
}
render() {
let {params: {username}} = this.props;
return (
<h1>Details screen: {username}</h1>
);... |
/**
* Webpack config for production electron main process
*/
import webpack from 'webpack';
import merge from 'webpack-merge';
import BabiliPlugin from 'babili-webpack-plugin';
import baseConfig from './webpack.config.base';
export default merge.smart(baseConfig, {
devtool: 'source-map',
target: 'electron-main... |
/**
* Created by Yu on 2017/6/4.
*/
var host = 'http://localhost:8000/';
function W(obj) {
console.log(obj);
}
function isNotnull(str) {
if(typeof(str)=="undefined"){
return false;
}else if(null==str){
return false;
}else if(""==str||str.length<1){
return false;
}else {
... |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('./blockForm.component'));
//# sourceMappingURL=index.js.map |
goog.provide('glift.displays.svg.dom');
/** Dom methods for manipulating SVG. */
glift.displays.svg.dom = {
/**
* Attach content to a div.
* @param {!glift.svg.SvgObj} svgObj
* @param {string} divId
*/
attachToParent: function(svgObj, divId) {
var svgContainer = document.getElementById(divId);
... |
const dataDir = `${__dirname}/../data`;
const serverDataDir = `${__dirname}/../server-data`;
module.exports = {
dataDir,
serverDataDir,
// date2mIdPath: `${__dirname}/../data/date2metaDataId.json`
date2mIdPath: `${dataDir}/date2metaDataId.json`,
remoteDataDir: `${dataDir}/remote-data`,
twitterCredentials: require... |
define([
'backbone',
'underscore',
'i18n!find/nls/bundle',
'find/app/model/document-model',
'text!find/templates/app/page/search/document/metadata-tab.html'
], function(Backbone, _, i18n, DocumentModel, template) {
'use strict';
return Backbone.View.extend({
template: _.template(tem... |
export default {
REQUIRED: 'REQUIRED',
POSITIVE_INTEGER: 'POSITIVE_INTEGER',
}
|
var require = patchRequire(require);
var SignInPage = require("./Pages/sign_in_page.js");
var SitesPage = require("./Pages/sites_page.js");
var NewSitePage = require("./Pages/new_site_page.js");
var MonthsPage = require("./Pages/months_page.js");
var MonthPage = require("./Pages/month_page.js");
var Utilities = requir... |
//Autogenerated by ../../build_app.js
import immunization_vaccination_protocol_component from 'ember-fhir-adapter/models/immunization-vaccination-protocol-component';
export default immunization_vaccination_protocol_component; |
/*global require*/
var gulp = require('gulp'),
less = require('gulp-less'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),... |
;(function () {
'use strict'
var angular = window.angular
angular
.module('scaffold.app')
.controller('SignupCtrl', Controller)
function Controller ($window, $log, $location, Auth, Settings, FormatChecker) {
var vm = this
var title = 'Sign Up | Scaffold'
vm.u... |
/**
* SignupController
*/
var crypto = require('crypto');
var SignupController = {
index: function (req, res) {
var validator = function (err, user) {
res.view('user/signup', { user: user, errors: null });
};
if (req.session && req.session.passport && req.session.passpor... |
export default function isArrayLike(obj) {
if (!obj || typeof obj !== 'object') {
return false;
}
return (obj instanceof Array) ||
obj.length === 0 ||
typeof obj.length === "number" &&
obj.length > 0 &&
(obj.length - 1) in obj;
} |
exports = module.exports = require('./lib/ds18b20'); |
/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:false, strict:true, undef:true, unused:true, curly:true, node:true, indent:4, maxerr:50, globalstrict:true */
"use strict";
var fishback = require('./fishback');
var helper = require('./helper');
var Handler = require('./handler');
function Memory(m... |
/*!
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.2.4-master-6ec3454
*/
goog.provide('ngmaterial.components.whiteframe');
goog.require('ngmaterial.core');
/**
* @ngdoc module
* @name material.components.whiteframe
*/
MdWhiteframeDirective['$inject'] = ["$log"];
angular
... |
// ==UserScript==
// @name Faster Repinning on Pinterest
// @namespace http://www.gregschwartz.net
// @version 1.0
// @description Decrease the number of clicks required to repin.
// @author Greg Schwartz
// @match http://www.pinterest.com/*
// @downloadURL https://github.com/gregschwartz... |
'use strict';
/*jshint browser:false, node:true */
var fs = require('fs'),
async = require('async'),
myUtils = require('./utils');
var cfg = myUtils.loadJSON('./serverUtils/config.json');
var files = myUtils.loadJSON('./serverUtils/moduleFiles.json');
var filesToBundle;
var bundleFile = process... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import s from './style';
export default class Steps extends Component {
static defaultProps = {
prefixCls: s.stepsPrefix,
children: '',
mode: 'horizontal'
}
static propTypes = {
mode: PropTypes.oneOf(['mini', 'vertical... |
'use strict';
angular.module('angularPassportApp')
.controller('NavbarCtrl', function ($scope, Auth, $location) {
$scope.menu = [
{
"title": "Blogs",
"link": "blogs"
},
{
"title":"Blitz",
"link":"blitz"
}
];
$scope.authMenu = [
{
"title": "Create New Bl... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Validation
*/
function validateLength(v) {
//custom validation function for checking string length to be used by model
return v.length <= 15;
}
/**
* Category Schema
*/
var CategorySchema = ne... |
var x =(function () {
var informativeVariableName = 7;
var doSomething = function () {
var descriptiveName = "Boo";
if (descriptiveName.lenght < informativeVariableName) {
console.log((function doSomethingElse(parameterName) {
return parameterName + descriptiveName
... |
'use strict';
import models from '../../models';
// Song Route Configs
let songs = {
get: (request, reply) => {
models.Song.find({
'where': {
'id': request.params.id
},
'include': [{
'model': models.AlbumRelease,
'attributes': ['title', 'param'],
... |
describe('v-pressable directive', function () {
var $compile;
var buttonConfig;
var scope;
var generateTemplate = function (options) {
var dafaults = {
busyLabel: null
};
if (options) {
angular.extend(dafaults, options);
}
var template = '<button v-pressable>Text</button>';
... |
var events = require('./database').collection('events');
module.exports = function(uuid, callback) {
events.find({
$or: [{fromUuid: uuid}, {uuid:uuid}, { devices: {$in: [uuid, "all", "*"]}}]
}).limit(10).sort({
$natural: -1
}, function(err, eventdata) {
if(err || eventdata.length < 1) {
var ... |
/**
* @since 15-09-03 11:07
* @author vivaxy
*/
// todo simulate 100 hair with color to paint one point
class Dip {
constructor(options) {
this.ctx =
options.ctx ||
(() => {
throw new Error('ctx must be supplied');
})();
/**
* {
* r: 255,
* g: 255,
* ... |
var _ = require("lodash"),
async = require("async"),
jf = require('jsonfile'),
sys = require('sys'),
exec = require('child_process').exec,
glob = require("glob"),
fs = require("fs-extra"),
Mustache = require("mustache"),
chokidar = require('chokidar'),
commandFactoryClass = require("... |
/**
* @since 2016-01-22 15:10
* @author vivaxy
*/
'use strict';
/*
* action 类型
*/
export const ADD_TODO = 'ADD_TODO';
export const COMPLETE_TODO = 'COMPLETE_TODO';
export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER';
/*
* 其它的常量
*/
export const VisibilityFilters = {
SHOW_ALL: 'SHOW_ALL',
SHOW_CO... |
// JavaScript Document
var fmi3_useraction_fulltext = "";
var fmi3_sublist = [];
fmi3_sublist.customer = [];
fmi3_sublist.customer.push({
url: "https://edie.fdic.gov/index.html",
text: "Calculate my deposit insurance coverage",
});
fmi3_sublist.customer.push({
url: "/deposit/deposits/",
text: "Un... |
import router from 'shared/router'
const version = '__VERSION__'
/**
* Typically during the install step, you'll want to cache some static assets.
* If all the files are cached successfully, then the service worker becomes
* installed. If any of the files fail to download and cache, then the install
* step will f... |
const request = require('request');
const config = require('config');
const crypto = require('crypto');
const qs = require('querystring');
const sellLimit = (market, quantity, rate) => new Promise(
async (resolveSellLimit, rejectSellLimit) => {
const query = {
apikey: config.get('bittrexApiKey'),
non... |
/**
* RNS3
*/
import { Request } from './Request'
import { S3Policy } from './S3Policy'
const AWS_DEFAULT_S3_HOST = 's3.amazonaws.com'
const EXPECTED_RESPONSE_KEY_VALUE_RE = {
key: /<Key>(.*)<\/Key>/,
etag: /<ETag>"?([^"]*)"?<\/ETag>/,
bucket: /<Bucket>(.*)<\/Bucket>/,
location: /<Location>(.*)<\/Location>... |
'use strict';
(function () {
angular
.module('VotingApp', ['ngResource'])
.controller('mypollsController', ['$scope', '$resource', function ($scope, $resource) {
/***** INITIALIZE *****/
$scope.loader = { isLoadingData: true };
$scope.displayName = '';
$scop... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.