code stringlengths 2 1.05M |
|---|
(function () {
'use strict';
angular.module('about.module')
.constant('appName', 'App Name')
// version x.y.z
// Where:
// x = main version number, 1-~.
// y = feature number, 0-9. Increase this number if the change contains new features with or ... |
import Audio from './audio';
import Battle from './battle';
import Input from './input';
import Screen from './screen';
import Title from './title';
export default class Game {
constructor() {
this.screen = new Screen();
this.input = new Input();
Audio.play();
this.currentState = n... |
/**
* Created by Chris on 29-11-13.
*/
!function($){
function Emitter() {
this.callbacks = {};
}
Emitter.prototype.on = function(event, callback){
if(!(event in this.callbacks))
this.callbacks[event] = $.Callbacks();
this.callbacks[event].add(callback);
retur... |
/* eslint-disable no-console, no-shadow */
import path from 'path';
import webpack from 'webpack';
import express from 'express';
import WebpackDevServer from 'webpack-dev-server';
import chalk from 'chalk';
import webpackConfig from '../webpack.config';
import config from './config/environment';
// Launch Relay by us... |
var Participant = BaseModel.extend({
url: 'participant/',
idAttribute: 'date',
defaults: {
topic: '',
description: '',
date: '29-02-2000',
time_start: '18:00',
time_end: '24:00'
}
});
var ParticipantCollection = BaseCollection.extend({
model: Event,
url: ... |
var _ = require('lodash');
var analyticsManager = require('./analyticsManager');
var apiServer = require('./apiServer');
var config = require('./config');
var logger = require('./logger')(__filename);
var analyticsSocket;
apiServer.on('sockets_listening', function(){
analyti... |
'use strict';
angular.module('pdb.version', [
'pdb.version.interpolate-filter',
'pdb.version.version-directive'
])
.value('version', '0.1');
|
import React from 'react';
import { storiesOf } from '@storybook/react';
import { host } from 'storybook-host';
import { ThemeProvider } from 'styled-components';
import CloseIcon from '../index';
const customTheme = {
closeFontSize: '1.75rem',
closeFontWeight: 700,
closeColor: 'red',
closeTextShadow: '0 1px... |
'use strict';
var through = require('through2');
var contents = require('file-contents');
var dest = require('dest');
var loader = require('..');
/**
* Example usage
*/
var src = loader(function (options) {
return through.obj(function (file, enc, cb) {
console.log('file.path', file.path);
this.push(file)... |
/*globals changeCase */
import _ from 'underscore';
const URL = Npm.require('url');
const QueryString = Npm.require('querystring');
class Providers {
constructor() {
this.providers = [];
}
static getConsumerUrl(provider, url) {
const urlObj = URL.parse(provider.endPoint, true);
urlObj.query['url'] = url;
... |
/**
* The MIT License (MIT)
* Copyright (c) 2017-present Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
*/
const parser = require('..');
function re(regexp) {
return parser.parse(regexp.toString());
}
describe('basic', () => {
it('char', () => {
expect(re(/a/)).toEqual({
type: 'RegExp',
body: {... |
var bracers = [
{
name: "Ancient Parthan Defenders",
type: "Bracers",
weight: 50,
hc: false,
season: false,
smartLoot: [
"Demon Hunter",
"Monk",
"Barbarian",
"Crusader",
"Wizard",
"Witch Doctor"
],
primary:{
MAIN:null,
RANDOM:3
},
secondary:{
ParthanDefenders:{
min:9,... |
/**
Created by paper on 15/8/25.
Missing Number
https://leetcode.com/problems/missing-number/
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n,
find the one that is missing from the array.
For example,
Given nums = [0, 1, 3] return 2.
Note:
... |
'use strict';
var assert = require('assert');
var fs = require('fs');
var imageSize = require('image-size');
var concat = require('concat-stream');
var Pageres = require('../');
process.chdir(__dirname);
before(function () {
this.timeout(20000);
});
it('should generate screenshots', function (cb) {
var pageres = n... |
/**
* The Module that serves as an interface to access input information.
*
* @class InputManager
* @property {boolean[]} keysPressed - An array linking the keycodes to a boolean representing if the key is pressed or not.
* @property {{isDown: boolean, position: Vector}} mouse - An object giving informations ... |
$(() => {
setGreeting();
const baseUrl = 'https://baas.kinvey.com/';
const appKey = 'kid_S1vgc01Pb';
const appSecret = '7b2ba554530d4f38bcb3c1be124ec66b';
$('#linkHome').click(() => showView('home'));
$('#linkLogin').click(() => showView('login'));
$('#linkRegister').click(() => showView('... |
module.exports = [
///////////////////////////////////////////////////
// Device Explorer how-to doc
///////////////////////////////////////////////////
{
"taskType": "regexReplaceTask",
"filePath": "tools/DeviceExplorer/doc/how_to_use_device_explorer.md",
"search": "(https\\:\\/... |
'Use Strict';
angular.module('App').controller('loginController', function ($scope, $state,$cordovaOauth, $localStorage, $location,$http,$ionicPopup, $firebaseObject, Auth, FURL, Utils) {
var ref = new Firebase(FURL);
var userkey = "";
$scope.signIn = function (user) {
console.log("Enviado");
if(angular.i... |
const { update, createSession } = require('../sess')
describe('sess_local', () => {
it('should', () => {})
// it('should send data from one side the other side through sessions', (done) => {
// const a = createSession(1)
// const b = createSession(1)
// const data = Buffer.from('ffff0000', 'hex')
//
... |
const config = require('../config/env');
const requestHelper = require('../helpers/request');
const pathHelper = require('../helpers/path');
/**
* Get pricing information for a specified list of Instruments within an Account.
* @param req
* @param res
* @param next
* @returns {Promise.<*>}
*/
function pricing(re... |
// Generated by psc-make version 0.6.9.5
"use strict";
var Prelude = require("Prelude");
var Control_Monad_Trans = require("Control.Monad.Trans");
var Data_Monoid = require("Data.Monoid");
var Control_Monad_Eff = require("Control.Monad.Eff");
var Control_Monad_Maybe_Trans = require("Control.Monad.Maybe.Trans");
var Con... |
dojo.declare("Main", wm.Page, {
"preferredDevice": "desktop",
"i18n": true,
onCloseSessionByDBCall: function(inError, inMessage) {
console.debug('Start Main.onCloseSessionByDBCall');
console.debug('inMessage: ' + inMessage);
this.controller.showWarningOnConnect(this.getDictionaryIte... |
/*
Utilities
*/
import marked from 'marked';
import urlObject from 'url';
import moment from 'moment';
import getSlug from 'speakingurl';
import { getSetting, registerSetting } from './settings.js';
import { Routes } from './routes.js';
import { getCollection } from './collections.js';
import set from 'lodash/set';
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ChordOrScaleTypeConstant;
(function (ChordOrScaleTypeConstant) {
ChordOrScaleTypeConstant[ChordOrScaleTypeConstant["MAJOR"] = 0] = "MAJOR";
ChordOrScaleTypeConstant[ChordOrScaleTypeConstant["MINOR"] = 1] = "MINOR";
ChordOrScale... |
module.exports = {
'development': 'mongodb://localhost:27017/tipbox_development'
, 'tipbox.in': 'mongodb://localhost:27017/tipbox_production'
, 'tipbox.is': 'mongodb://localhost:27017/tipbox_production'
};
|
(function ($m) {
(function(proto) {
if(!proto.moveLocation) {
proto.moveLocation = function(id, initLoc, locs, speed, that, startLoc) {
$("#inAct-" + id).text('Flying.');
// speed = vitesse du drone en m/s
if(that === undefined) {
that = this;
}
if(startLoc === undefined) {
startLoc ... |
/*
* Make a unique id for an element, comprising of its name and random number.
* Any spaces in the name will be removed.
* input : element - the element to make the unique id for
* return : the unique id for the element or a blank string if the input is null.
*/
export default function makeUniqueIdForElement(elem... |
import CategoryComponents from './category.vue';
export default CategoryComponents; |
'use strict';
// Utility functions for parsing dc-* directives (dc-multitext, etc)
var dbeUtil = function() {
//For use inside nested anonymous functions where the value "this" can get lost
var _this = this;
// --- Parsing fields ---
// Return the multitext's values as [{wsid: 'en', value: 'word'}, {wsi... |
/*
====================================
GMapz. Yet another gmaps manager
by carlos Cabo 2015. V.2.11
https://github.com/carloscabo/gmapz
====================================
*/
/**
* Core and general tools
*/
(function($, undefined) {
'use strict';
// Singleton
if (typeof window.GMapz !== 'undefined') {
... |
define([
'dojo/store/Memory'
],
function(
Memory
){
return new Memory({
idProperty: 'id',
data: [
{id: 'large', size: 7, text: '<span class="font-large">Large</span>'},
{id: 'normal', size: 4, text: '<span class="font-normal">Normal</span>'},
{id: 'small',... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'find', 'vi', {
find: 'Tìm kiếm',
findOptions: 'Tìm tùy chọn',
findWhat: 'Tìm chuỗi:',
matchCase: 'Phân biệt chữ hoa/t... |
import Bootstrapper from './setup/Bootstrapper';
Bootstrapper.bootstrap(); |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Player from '../components/Player';
import { removeFromQueue } from '../../track/actions';
class SideBar extends Component {
constructor(props) {
super(props);
}
render() {
... |
/* --- AUTOGENERATED FILE -----------------------------
* If you make changes to this file delete this comment.
* Otherwise the file may be overwritten in the future.
* --------------------------------------------------- */
const { mergeLocMatchGroups } = require('../lib/matching/utils');
const { regexMatchLocs } = re... |
ko.computedContext = ko.dependencyDetection = (function () {
var outerFrames = [],
currentFrame,
lastId = 0;
// Return a unique ID that can be assigned to an observable for dependency tracking.
// Theoretically, you could eventually overflow the number storage size, resulting
// in dup... |
/**
* Incubation stat extends egg state to draw the incubation lamp over it
* TECHNICALLY this is an exercise but it shares more code with the egg class
*/
import { EmptyPhrasebook } from '../../text/phrasebooks/phrasebook'
import AIncubate from '../../animation/incubate'
import { STATS, STATES } from '../../consta... |
() => {
const [startDate, setStartDate] = useState(new Date());
const ExampleCustomTimeInput = ({ date, value, onChange }) => (
<input
value={value}
onChange={(e) => onChange(e.target.value)}
style={{ border: "solid 1px pink" }}
/>
);
return (
<DatePicker
selected={startDate}... |
angular.module('labController', ['ngCookies','angular.filter'])
// inject the Todo service factory into our controller
.controller('mainController', ['$scope','$http','$cookies','$filter','Labs', function($scope, $http, $cookies,$filter, Labs) {
$scope.formData = {};
$scope.loading = true;
$scope.usercookie = ... |
#!/usr/bin/env node
'use strict';
var fs = require('fs');
var join = require('path').join;
var shiny = function (name) {
name = name.charAt(0).toUpperCase() + name.substring(1).toLowerCase();
name = name.replace('.jpg', '');
name = name.replace('.png', '');
name = name.replace(/-/g, ' ');
name = na... |
function Solve(args) {
var fieldSizes = args[0].split(" ");
var rows = parseInt(fieldSizes[0]);
var cols = parseInt(fieldSizes[1]);
var startPosition = args[1].split(" ");
var startRow = parseInt(startPosition[0]);
var startCol = parseInt(startPosition[1]);
var fieldNumbers = new Array(row... |
var SkyRTC = function() {
var PeerConnection = (window.PeerConnection || window.webkitPeerConnection00 || window.webkitRTCPeerConnection || window.mozRTCPeerConnection);
var URL = (window.URL || window.webkitURL || window.msURL || window.oURL);
var getUserMedia = (navigator.getUserMedia || navigator.webkitG... |
describe('controller: UserController', function() {
var controller, scope, User;
beforeEach(module('core'));
beforeEach(module('app'));
beforeEach(module('mock.user'));
beforeEach(inject(function($controller, $rootScope, _User_) {
scope = $rootScope.$new();
controller = $controller('UserCo... |
require('babel-register');
module.exports = require('./importer');
|
$(function() {
// Display the Popover
var templatePopover = ' <div class="popover" role="tooltip">\n\
<div class="arrow"></div>\n\
<h3 class="popover-title bg-orange"></h3>\n\
<div style="height: 350px; width:28... |
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { check } from 'meteor/check';
Meteor.methods({
addReferrer({ code, name, url, commissionRate, cpa }) {
check(code, String);
check(name, Match.Optional(String));
check(url, Match.Optional(String));
check(c... |
const { isFunction, typeError, validateSiblings, validateChild, getLatestFromNames, loadCurrentValue, getParentData, getInitialData, saveCurrentValue } = require("../../util/ruleUtil");
const { TRANSFORM, CONTENT, DEFAULT, FUNCTION, OPTIONAL, TYPE, CAST_TO, MATCH, VALIDATE, MIN, MAX, PROPERTIES, CLEAN } = require("../.... |
var readline = require('readline')
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
})
rl.on('line', function (ln) {
console.log(ln)
})
|
'use strict';
// Declare app level module which depends on views, and components
(function() {
angular.module('supplementDiary', [])
.controller('SupplementDiaryController', function() {
this.supplements = supplements;
this.categories = categories;
this.displayForm = false;
})
.directi... |
// JavaScript Document
var jasmine = require("jasmine")
var app = require("../ari-geo-lab/ari-geo-lab.js");
(function(){
'use strict';
describe("Determine the sequence of an array of numbers: ", function() {
describe("Case for an empty array", function() {
it("should return 0 for an empty array", funct... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["/stdlib/markdown"],{
/***/ "../[ ] swan-js/lib/stdlib/markdown.js":
/*!*********************************************!*\
!*** ../[ ] swan-js/lib/stdlib/markdown.js ***!
\*********************************************/
/*! no static exports found */
/***... |
const baseConfig = require('./base.conf');
module.exports = function (config) {
baseConfig({
set(base) {
base.browsers = [];
base.customLaunchers = null;
base.forceJSONP = true;
base.logLevel = config.LOG_DEBUG;
base.transports = ['polling'];
config.set(base);
},
});
};
|
'use strict';
(function () {
angular
.module('dailyMummApp')
.filter('fromNow', FromnowFilter);
FromnowFilter.$inject = [];
function FromnowFilter() {
return function(date){
return moment(date).fromNow();
}
}
})(); |
export default {
/**
* For this example, you will need to change this url depending on
* the backend you are using:
*
* Express: http://localhost:1337
* Sails: http://localhost:1337
* Rails: http://localhost:1337/cable
*/
serverUrl: 'http://localhost:1337'
/**
* Override to change ho... |
import React from 'react';
import { mount } from 'enzyme';
import chai, {expect} from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import { mapStateToProps, Login } from './Login';
chai.use(sinonChai);
describe('<Login />', () => {
it('should call onLoginClick() on button click', () => {
... |
module.exports = [{
path: '/cliente',
method: 'get',
callback: require('./get')
},
{
path: '/cliente/:cpf',
method: 'get',
callback: require('./getById')
},
{
path: '/cliente',
method: 'post',
callback: require('./post')
},
{
path: '/cliente/:cpf',
method: 'put',
... |
import React from 'react';
export default ({
width = 35,
height = 35,
className,
}) => (
<svg
x="0px"
y="0px"
className={className}
width={`${width}px`}
height={`${height}px`}
viewBox="0 0 1024 1024"
>
<g id="Layer_1">
<polyline
fill="#FFFFFF"
points="719.001... |
// var token = "XXX";
// (function() {
// })(); |
/* ************************************************************************
Googly
Copyright:
2010-2011 Deutsche Telekom AG, Germany, http://telekom.com
************************************************************************ */
/* ************************************************************************
... |
window.onload = function() {
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create , update: update, render: render });
function preload () {
game.load.image('background', 'game/images/background.png');
game.load.atlas('bucket', 'game/images/bucket_sprite.png'... |
// todos_list_controller.js |
/*
# ENGINEER
# I wrote this because I wanted a way for me to create server side tables with a jade file
# and an object.
*/
/*
# required modules
*/
(function() {
var engineer, fs, jade, path, _;
jade = require("jade");
_ = require("lodash");
fs = require("fs");
path = require("path");
engineer = ... |
var nijs = require('nijs');
var slasp = require('slasp');
exports.pkg = function(args, callback) {
args.stdenv().mkDerivation ({
name : "test",
buildCommand : 'echo "Hello world!" > $out'
}, callback);
};
|
/**
* mixin search
*
* Copyright 2012 Cloud9 IDE, Inc.
*
* This product includes software developed by
* Cloud9 IDE, Inc (http://c9.io).
*
* Author: Mike de Boer <info@mikedeboer.nl>
**/
"use strict";
var error = require("./../../error");
var Util = require("./../../util");
var search = module.exports ... |
export function initialize(container, application) {
application.inject('route', 'session', 'service:session');
application.inject('controller', 'session', 'service:session');
application.inject('service:api', 'session', 'service:session');
}
export default {
name: 'session-service',
initialize: initialize
}... |
/**
* Native
* ------
*
* Extension
* ---------
* .addMinute() Add one or more minutes to the Date
* .addHour() Add one or more hours to the Date
* .addDay() Add one or more days to the Date
* .addWeek() Add one or more weeks to the Date
* .addMonth() Add one or more months to... |
const { resolve } = require('path')
const formidable = require('formidable')
module.exports = function (req, res, next) {
const form = new formidable.IncomingForm()
form.uploadDir = resolve(__dirname, '../', 'uploads')
let image
form
.on('file', function (name, file) {
// make sure it is an image
... |
var TIP,
// .on() namespace
TIPNS = '.qtip-tip',
// Common CSS strings
MARGIN = 'margin',
BORDER = 'border',
COLOR = 'color',
BG_COLOR = 'background-color',
TRANSPARENT = 'transparent',
IMPORTANT = ' !important',
// Check if the browser supports <canvas/> elements
HASCANVAS = !!document.createElement('canvas').getCo... |
var App = React.createClass({
getUserInfo: function(){
$.ajax({
url: '/scicuec/panel/getUserInfo',
dataType: 'json',
cache: true,
success: function(data){
if(data['res'] === 'true'){
this.setState({usrId: data['usrId'],usrName: data['usrName'],usrFullName: data['usrFullName']});
Reac... |
/* Copyright (c) 2011 by MapQuery Contributors (see AUTHORS for
* full list of contributors). Published under the MIT license.
* See https://github.com/mapquery/mapquery/blob/master/LICENSE for the
* full text of the license. */
/**
#jquery.mapquery.mqMousePosition.js
The file containing the mqMousePosition Widget
... |
jsonp_handler({
"version": "1",
"build": 2,
"title": "myapp",
"minruntime": 1,
"baseurl": "http://yhh52367y@rawgit.com/yhh52367y/myapp/master/",
"description": "",
"files": [
"index.html",
"index.css",
"bundle.js",
"jquery.js",
"react-with-addons.js",
"ksana.js",
"bootstrap.min.js",
"bootstrap.mi... |
'use strict'
module.exports = {
auth: false,
jsonp: 'callback',
handler (request, reply) {
return reply({ alive: true })
}
}
|
/**
* ===============================================================================
*
* Copyright © 2008/2011 CAMENSULI Christophe | ccamensuli@gmail.com
*
* ===============================================================================
* ____ _ ____ ... |
/**
* @author xeolabs / https://github.com/xeolabs
*/
class ArrayBuffer {
constructor(gl, type, data, numItems, itemSize, usage) {
this._gl = gl;
this.type = type;
this.allocated = false;
switch (data.constructor) {
case Uint8Array:
this.itemType = ... |
module.exports = function errorHandler(err, req, res, next) { // eslint-disable-line no-unused-var
let code = 500, error = 'Internal Server Error';
// Mongoose Validation Error?
if(err.name === 'ValidationError' || err.name === "CastError") {
console.log(err.errors);
code = 400;
... |
define(['lazoView'], function (LazoView) {
'use strict';
return LazoView.extend({
});
}); |
app.config(function($stateProvider, $urlRouterProvider,$locationProvider,$httpProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
.state('admin', {
url: '/admin',
templateUrl: 'admin/back_login.php',
controller: 'AdminController'
... |
// The Tern server object
// A server is a stateful object that manages the analysis for a
// project, and defines an interface for querying the code in the
// project.
(function(root, mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
return mod(exports, require("./infer"), require... |
var FacebookChat = require('../');
var fbchat = new FacebookChat({
userId: '123456789',
appId: '123456789',
accessToken: 'abcdefghimnopqrstuvz1234567890'
});
fbchat.addListener('connected', function() {
console.log('Connected!');
fbchat.getFriends(function (result) {
console.log('Friends loaded - callback ... |
var Stream = require('stream')
var spawn = require('child_process').spawn
function execStream (cmd, args, options) {
var AB = new Stream.Duplex
var A = new Stream.PassThrough
var B = new Stream.PassThrough
// console.log = function () {}
AB._write = function (chunk, encoding, cb) {
return A.write(chunk, ... |
var assert = require('assert'),
fs = require('fs'),
rimraf = require('rimraf');
describe('/lib/tar', function() {
var tar = null;
var cleanup = function() {
rimraf.sync(__dirname + '/files/test2.tar');
rimraf.sync(__dirname + '/files/test');
};
before(cleanup);
after(cleanup);
describe('uni... |
/**
* Imports
*/
import React from 'react';
import connectToStores from 'fluxible-addons-react/connectToStores';
import moment from 'moment';
import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router';
// Flux
import IntlStore from '../../../../stores/Application/IntlStore';
import OrdersListStor... |
var usersRouter = require('./users.js'),
wrappedResponse = require('./../util').wrappedResponse,
cors = require('./../util').cors,
config = require('./../config'),
clientConfig;
if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === undefined) {
clientConfig = config.development.client;
}
if (... |
(function($) {
$(document).ready(function() {
$('body').css('overflow', 'hidden');
$(window).load(function() {
var preloaderDelay = 350,
preloaderFadeOutTime = 800;
function hidePreloader() {
var loadingAnimation = $('#loading-animation'),
... |
version https://git-lfs.github.com/spec/v1
oid sha256:0ca12fe083d6e9ac3432b0e05680d5c8fbfa0d0814f861bcf90dee5b9bad3853
size 202604
|
'use strict';
myApp.factory('authService', ['$http', '$q', 'localStorageService', 'ngAuthSettings', function($http, $q, localStorageService, ngAuthSettings) {
var serviceBase = ngAuthSettings.apiServiceBaseUri;
var authServiceFactory = {};
var _authentication = {
isAuth: false,
userName: "... |
(function (exports) {
'use strict';
/**
* Module : Sparrow touch event
* Author : Kvkens(yueming@yonyou.com)
* Date : 2016-07-28 14:41:17
*/
var on = function(element, eventName, child, listener) {
if(!element)
return;
if(arguments.length < 4) {
listener = child;
child = undefined;
} else {
var child... |
function BounceGA(gaConfig, fitnessConfig) {
/* TO DO - fill in unprovided inputs */
this.gaConfig = gaConfig;
this.fitnessConfig = fitnessConfig;
/* get axes for surfaces, surfaces will always have bottom edge perpendicular to y-axis */
for (var i = 0; i < this.fitnessConfig.surfaces.length; i++) {
var... |
const expect = require('chai').expect;
const utils = require('../lib/utils/utils');
const AcceptsParser = utils.AcceptsParser;
const traverseJson = utils.traverseJson;
const returnsParser = utils.returnsParser;
const returnClasses = utils.returnClasses;
let accepts;
describe('Traverse json', () => {
it('should recu... |
(function () {
'use strict';
/**
* @param Base
* @param {User} user
* @param {app.utils} utils
* @return {UserNameService}
*/
const factory = function (Base, user, utils) {
class UserNameService extends Base {
/**
* @public
* @type {... |
(function () {
'use strict';
describe('Dashboards Controller Tests', function () {
// Initialize global variables
var DashboardsController,
$scope,
$httpBackend,
$state,
Authentication,
DashboardsService,
mockDashboard;
// The $resource service augments the response... |
var appBookshelf = require('./base'),
Basetoken = require('./base/token'),
Accesstoken,
Accesstokens;
Accesstoken = Basetoken.extend({
tableName: 'accesstokens'
});
Accesstokens = appBookshelf.Collection.extend({
model: Accesstoken
});
module.exports = {
Accesstoken: appBookshelf.model('A... |
$(document).ready(function(){
lastfmRadio.init();
}); |
import { registerComponent } from 'nornj';
import Stepper from 'antd-mobile/lib/stepper/index';
registerComponent({
'antm-Stepper': Stepper
});
export default Stepper; |
import React from 'react';
import {RadioButton, RadioButtonGroup} from 'material-ui/RadioButton';
import ActionFavorite from 'material-ui/svg-icons/action/favorite';
import ActionFavoriteBorder from 'material-ui/svg-icons/action/favorite-border';
const styles = {
block: {
maxWidth: 250,
},
radioButton: {
... |
;(function() {
var app = angular.module('service-storage',[]);
// Remove angular specifics
function cleanObject(obj) {
return angular.fromJson( angular.toJson(obj) );
}
app.factory('homyStorage', ['$q', '$rootScope', function($q, $rootScope) {
var DEFAULT = {
_version: '1',
_rev: (new Date()).getTime(... |
!(function(r) {
var a = {};
function s(t) {
if (a[t]) return a[t].exports;
var e = (a[t] = { i: t, l: !1, exports: {} });
return r[t].call(e.exports, e, e.exports, s), (e.l = !0), e.exports;
}
(s.m = r),
(s.c = a),
(s.d = function(r, a, t) {
s.o(r, a) || Object.defineProperty(r, a, { e... |
javascript: (function() {
var re_num = /\d/gi;
function walkTextNodes(node, callback) {
var nextNode, n;
if ('undefined' === typeof node.nodeName)
return;
n = node.nodeName.toLowerCase();
if (-1 !== ['script', 'style'].indexOf(n))
return;
if (... |
//Next
//By Dean Peterson
//provides convenient way to return an array of strings
//Allows for multiple instances
function Next(itemList, options) {
"use strict";
options = options || {};
if( Object.prototype.toString.call( itemList ) !== '[object Array]' ) {
throw new Error("An array is required.");
}
this.o... |
'use strict';
/*!
* Module dependencies.
*/
var pjson = require('./package.json');
var fs = require('fs');
var join = require('path').join;
var mongoose = require('mongoose');
var restify = require('restify');
var config = require('./config/config.js');
// hook up DB
var connect = function () {
var options = {s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.