code stringlengths 2 1.05M |
|---|
app = function(app) {
var
updateSetsList = function() {
var
$setList = $(".setList"),
sets = app.data.sets.map(function(set, i) {
return {n: set.n, c: set.n.toLowerCase(), i: i};
});
///var
$setList.empty();
sets.sort(function(a, b) {
if(a.c < b.c) return -1;
if(a.c > b.c) return... |
require('colors');
module.exports = require('async')(function *(resolve, reject, application, root, moduleID, file) {
"use strict";
file = require('path').resolve(root, file);
let fs = require('fs');
if (!fs.existsSync(file) || !fs.statSync(file).isFile()) {
let message = 'Overwrites configur... |
import React from 'react'
const RenderStatus = ({isServer}) => {
return (
<div className='component__render-status_container align--center'>
<div className='component__render-status--prefix component__render-status--box'>rendered on </div>
<div className={'component__render-status--suffix component__... |
var defaults = {
equipment: {
Shield: {
locked: 1,
tooltip: "A big, wooden shield. Adds $healthCalculated$ health to each soldier per level.",
blocktip: "A big, wooden shield. Adds $blockCalculated$ block to each soldier per level.",
modifier: 1,
l... |
import PathNode from './path-node';
import NODE_MAP from './node-map';
var ArcNode = (function (PathNode) {
function ArcNode () {
PathNode.apply(this, arguments);
}
if ( PathNode ) ArcNode.__proto__ = PathNode;
ArcNode.prototype = Object.create( PathNode && PathNode.prototype );
ArcNode.pr... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.8/esri/copyright.txt for details.
//>>built
define({title:"\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435",hint:"\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u... |
(function () {
'use strict';
function repeat(amount, char) {
char = String(char).charAt(0);
var ret = '';
for (var i = 0; i < amount; i++) {
ret += char;
}
return ret;
}
var common = {
repeat: repeat
};
module.exports = common;
}).call();
|
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
stripBanners: true,
banner: '/*! <%= pkg.name %> <%= pkg.version %>\n'
+ 'Written by: <%= pkg.author %>\n'
+ 'Website: <%=... |
class Logger {
constructor(global) {
this.enabled_ = typeof(global.console) != 'undefined';
this._logger = global.console;
}
enable() {
this.enabled_ = true;
}
disable() {
this.enabled_ = false;
}
log() {
if (this.enabled_) {
this._logger.log.apply(this._logger, arguments);
}
}
group() {
i... |
const whoops = require('./whoops');
module.exports = () => {
return (req, res, next) => {
req.whoops = whoops;
next();
};
};
|
describe('tpTaggerInput directive', ()=>{
let HOT_KEYS, HOT_KEYS_SUGGESTION, $scope, template, scope, ctrlScope, $log, $compile, $rootScope, element;
beforeEach(()=>{
module('tpTagger');
module('templates');
inject((_$rootScope_, _$compile_, _$log_)=>{
HOT_KEYS = [8, 9, 13, 17, 27, 188];
... |
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-quaggajs'
}; |
var self = this;
// Load native UI library
var gui = require('nw.gui');
// Get the current window
var win = gui.Window.get();
win.setResizable(false);
win.window.onunload = function() {
this.opener.elucia.unFocus(this.win.routing_id);
}
$("div.controll > div.dev").click(function() { win.showDevTools(); });
$("div... |
define(["util/dom-creator","services/time_span_service","views/status_view"], function(DomCreator,TimeSpanService, StatusView){
describe("StatusView", function(){
var $test, service;
var view;
beforeEach(function(){
$test = DomCreator("div h2.punch-clock");
service = TimeSpanService.create();... |
document.addEventListener('DOMContentLoaded', function(){
var aluContainer = document.querySelector('.comment-form-smilies');
if ( !aluContainer ) return;
aluContainer.addEventListener('click',function(e){
var myField,
_self = e.target.dataset.smilies ? e.target : e.target.parentNode;
if ... |
/// <reference path="ios/cordova.js" />
function get_device_type() {
//alert("" + navigator.userAgent);
if (navigator.userAgent.match(/(Android)\s+([\d.]+)/)
|| navigator.userAgent.match(/Silk-Accelerated/))
return 'android';
if (navigator.userAgent.match(/(iPad).*OS\s([\d_]+)/)
|| navigator.use... |
import DS from 'ember-data';
import attr from 'ember-data/attr';
export default DS.Model.extend({
contentType: attr('string'),
createdAt: attr('date'),
updatedAt: attr('date')
});
|
/*globals global,__dirname*/
var path = require('path');
var distPath = path.join(__dirname, '../../dist');
/*jshint -W079 */
global.EmberENV = {
FEATURES: {
'ember-application-instance-initializers': true,
'ember-application-visit': true
}
};
var Ember = require(path.join(distPath, 'ember.debug.cjs'));
... |
import assert from "assert";
import ts from "typescript";
import _ from "underscore";
import logger from "./logger";
import sourceHost from "./files-source-host";
import {
normalizePath,
prepareSourceMap,
isSourceMap,
getDepsAndRefs,
getRefs,
createDiagnostics,
getRootedPath,
TsDiagnostics,
} from "./t... |
'use strict';
var URIParser = {};
URIParser.parse = function(uri) {
/*
RegEx for URL format by Diego Perini
https://gist.github.com/dperini/729294
So far, this seems to be the most complete regex for URL formats
https://mathiasbynens.be/demo/url-regex
*/
var URIInfo = {
isValid: true,
type: null,
... |
import { Client } from 'minio'
const region = 'us-east-1'
const minioClient = new Client({
endPoint: 'localhost',
port: 9000,
path: 'minio',
secure: false,
insecure: true,
accessKey: 'minioAccessKey',
secretKey: 'minioSecretKey'
})
export default {
client: minioClient,
region
}
|
var Admin = (function(){
var _userTable,
_editUsersMode;
var listUsers = function() {
var i = 0,
tableEl = $('[data-usertable]'),
tableData = '';
// get user data (no need to check if exists, since admin is already loggedin)
_userTable = JSON.parse(loc... |
const express = require('express')
const router = express.Router()
const jwt = require('express-jwt')
const pluginController = require('../plugins/plugin.controller')
module.exports = config => {
const auth = jwt({
secret: config.secret,
userProperty: 'payload'
})
const controller = require('./user.cont... |
var Sidebar = require('./views/sidebar/sidebar');
var MainView = require('./views/main-view');
var locale = require('./lib/locale');
var SignIn = require('./views/sidebar/signin');
var SignUp = require('./views/sidebar/signup');
var AboutView = require('./views/sidebar/aboutview');
class Application {
constructor... |
var browser = require('./browser')
var isMobile = browser.versions.mobile === true && $(window).width() < 800
function init() {
var frameClass = 'js-archives-frame'
if (top !== window) {
// 子级
// 特殊样式
$('body').addClass('archive-inner')
// 父级跳转
$('.archive-article-title').click(function() {
var link ... |
function Player(game, direction) {
this.game = game
this.fireDirection = direction
this.score = 0
this.health = game.startingHealth
this.game.players.push(this)
this.shots = {shootTime: 0,
minimumDelay: 150,
goodDelay: game.shotDelay * 0.8}
}
Player.prototype = {
addPoints... |
import xs from 'xstream';
import { _ } from 'lodash';
import { adminStatus$Factory } from './adminStatus.js'
import { submitStatus$Factory } from './submitStatus.js'
import { formInputVals$Factory } from './formInputVals.js'
import { phase$Factory } from './phase.js'
export const gsiIntent = ({ DOM, gsiSources }) => ... |
(function($) {
'use strict';
$.extend({
///////////////////////////////////////////
// Creates a Tab Bar for Toggling Articles:
///////////////////////////////////////////
UITabbar : function ( options ) {
/*
var options = {
id: 'mySpecialTabbar',
tabs: 4,
labels... |
// This file is adapted from supporting material for the Udacity course
// "Interactive 3D Graphics" https://www.udacity.com/course/interactive-3d-graphics--cs291
// My changes:
// - Wrap as a module for use with require.js (no shim needed)
// - Don't reference any global objects; just pass in THREE as a dependency
// ... |
var activity_chart = dc.rowChart("#activity");
var country_chart = dc.pieChart("#county");
var organisation_chart = dc.rowChart("#organisation");
var region_chart = dc.geoChoroplethChart("#map");
var cf = crossfilter(data);
cf.activity = cf.dimension(function(d){ return d.Activity; });
cf.country = cf.dimension(funct... |
GAdsManager = function(map, publisherId, adsManagerOptions) {
/// <summary>Creates a new GAdsManager object that requests AdSense ads from Google's servers. (Since 2.85)</summary>
/// <param name="map" type="String">The map parameter identifies the map on which this GAdsManager should display ads.</param>
... |
"use strict"
const optionsMatches = require("../optionsMatches")
it("optionsMatches matches a string", () => {
expect(optionsMatches({ foo: "bar" }, "foo", "bar")).toBeTruthy()
expect(optionsMatches({ foo: "bar" }, "foo", "BAR")).toBeTruthy()
expect(optionsMatches("not an object", "foo", "bar")).toBeFalsy()
... |
var s = {};
s.match = function (regex, str, callback) {
var matches = [];
var error = null;
var match = null;
var index = null;
if (!regex) {
callback(error, matches);
return;
}
if (window.Worker) {
if (s.worker) {
clearTimeout(s.id);
s.worker.terminate();
}
s.worker = new Worker("http:localh... |
import { nprogressStart, nprogressDone } from '../actions/global';
const defaultTypeSuffixes = ['REQUEST', 'SUCCESS', 'ERROR']
export default function loadingBarMiddleware(config = {}) {
const typeSuffixes = config.typeSuffixes || defaultTypeSuffixes;
return ({ dispatch }) => next => action => {
next(action)... |
function unhandled() {
return function handle(err, req, res, next) {
if (!err) {
next(); // you also need this line
} else {
res.status(500).json({ message: err.message });
}
};
}
module.exports = unhandled;
|
'use strict';
angular.module('myApp.rsvp', ['ui.router', 'ngCookies'])
.controller('rsvpCtrl', ['$scope', '$http','$cookies', '$location', '$anchorScroll', function($scope, $http, $cookies,$location, $anchorScroll){
// $location.hash('menu');
// $anchorScroll();
$scope.showHotel = false;
$scope.isAttending =... |
import DS from 'ember-data';
var ValueSetCodeSystemComponent = DS.Model.extend({
system: DS.attr('string'),
version: DS.attr('string'),
caseSensitive: DS.attr('boolean'),
concept: DS.hasMany('value-set-concept-definition-component', {embedded: true})
});
export default ValueSetCodeSystemCompon... |
var assert = require('assert');
var http = require('http');
var urlParse = require('url').parse;
var WebSocket = require('ws');
var request = require('supertest');
var util = require('util');
var Scout = require('../zetta_runtime').Scout;
var zetta = require('../zetta');
var mocks = require('./fixture/scout_test_mocks'... |
export function initialize(instance) {
let container = this.container;
if (!container && instance.container) {
container = instance.container();
} else {
container = instance.__container__;
}
let config = container.lookupFactory('config:environment');
if (!config.mapbox || !config.mapbox.accessTok... |
// Import basic elements
import tpl from './tpl.ef'
import style from './style.css'
import styled from '../../utils/styled.js'
const Page = styled(tpl, style)
// Export the module
export { Page }
|
import Tatari from './Tatari';
export default Tatari;
|
function extendJQuery() {
function pathOf(key) {
return key.match(/[^\[\]]+/g);
}
function set(obj, path, value) {
var last = path.pop();
for(var k in path) {
k = path[k];
if(!obj[k]) {
obj[k] = {};
}
obj = obj[k];
... |
// Roller created by Michael Fawver
// Copyright 2015 Michael Fawver All rights reserved.
var Roller = (function() {
var _p = {
parseXml: null,
zipFileLoaded: null,
skillDescriptions: {},
userName: '',
characterName: 'Someone',
d20Distribution: [],
initialize: function() {
for(var i = 0; i < 20; i+... |
'use strict';
//babel config
module.exports = {
options: {
stage: 1,
loose: ['all'],
optional: ['runtime', 'es7.asyncFunctions']
},
test: {
options: {
sourceMap: true
},
files: {
'tests/specs/cli.js': 'src/cli.js',
'tests/specs/environment.js': 'src/environment.js',
... |
(function (global) {
"use strict";
/**
* @class Animation
* @desc Defines an animation for a SpriteSheet.
* @param {Object} parameters An object initializer that may contain the
* following parameters: name, startFrame, animationLength, frameRate.
* @returns {Animation}
* @author ... |
cubs = new Mongo.Collection('cubs');
cubs.attachSchema(
new SimpleSchema({
name: {
type: String,
label: "Cub Name"
},
dob: {
type: Date,
label: "Date of Birth",
autoValue: function() {
if (this.isInsert) {
return new Date;
}
}
}
/*
... |
// --------- This code has been automatically generated !!! Wed Jul 22 2015 13:15:45 GMT+0000 (UTC)
/**
* @module opcua.address_space.types
*/
var doDebug = false;
var assert = require("better-assert");
var util = require("util");
var _ = require("underscore");
var makeNodeId = require("../lib/datamodel/nodeid").mak... |
var appSrc = 'app',
appDest = 'build',
bourbon = require('node-bourbon');
module.exports = {
appSrc: appSrc,
appDest: appDest,
styles: {
watchSrc: appSrc + '/assets/styles/**/*.scss',
src: appSrc + '/assets/styles/app.scss',
dest: appDest + '/css/',
sassOpts: {
includePaths: bourb... |
import { stringifyEqual } from 'source/common/verify.js'
import { getSampleRange } from 'source/common/math/sample.js'
import { isEqualArrayBuffer } from 'source/common/data/ArrayBuffer.js'
import { encode as encodeBase64 } from './Base64.js'
import { encode, decode } from './DataUri.js'
const { describe, it } = globa... |
var Welcome = qc.defineBehaviour('qc.JumpingBrick.Welcome', qc.Behaviour, function() {
}, {
quickLogin: qc.Serializer.NODE,
wechatLogin: qc.Serializer.NODE
});
Welcome.prototype.awake = function() {
var self = this;
self.quickLogin && self.addListener(self.quickLogin.onClick, self.doQuickLogin, self);
self.wec... |
// Generated by CoffeeScript 1.9.1
(function() {
jQuery(function() {
var do_confirm;
do_confirm = function(ptr) {
var message;
message = ptr.attr("data-confirm");
if (message === void 0) {
return true;
}
return confirm(message);
};
$("a[data-remote]").click(functi... |
'use strict';
let child_process = require('child_process');
let fs = require('fs');
let winston = require('winston');
beforeEach('refresh temp directory', function (done) {
let tempDir = `${__dirname}/../temp`;
let createTempDir = function () {
fs.mkdir(tempDir, done);
};
fs.exists(tempDir, function (exi... |
/*
* Morpheuz Sleep Monitor
*
* Copyright (c) 2013 James Fowler
*
* 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 u... |
WinJS.Namespace.define("Fillups", {
Fillup: WinJS.Class.define(function (payload) {
this.id = payload.id;
this.carId = payload.carId;
this.dateLong = payload.date;
this.milesFloat = payload.miles;
this.gallonsFloat = payload.gallons;
this.pricePerGallon = payl... |
/**
* @license Angular v4.2.3
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs/Observable'), require('rxjs/observable/merge'), require('rxjs/operator/share'), require('rxjs/... |
'use strict';
module.exports = {
$meta: 'Hindi translation file',
app: {
$filter: 'role',
block: {
paydash: 'पे-डॅश',
overview: {
musters_closing_today: 'आज बंद हो रहे मस्टर्स',
delayed_musters: 'विलंबित मस्टर्स',
delayed_n... |
// = require jquery/dist/jquery
// = require lodash/dist/lodash
// = require angular/angular
// = require angular-animate/angular-animate
// = require angular-aria/angular-aria
// = require angular-messages/angular-messages
// = require angular-resource/angular-resource
// = require angular-sanitize/angular-sanitize
//... |
$(".chzn-select").chosen({
'placeholder_text': '\0'
});
|
import concat from './internal/concat';
import doSeries from './internal/doSeries';
/**
* The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
*
* @name concatSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.concat]{@link module:Collect... |
const os = require('os')
const child_process = require('child_process')
const fs = require('fs')
module.exports.initial = function(){
return new Promise((resolve,reject) => {
child_process.exec(`wmic logicaldisk get name`, (error, stdout, stderr) => {
if(error)
reject(error)
let firstEmptyDriv... |
// jquery.scrollPatrol.js
// copyright Brian Sewell
// https://github.com/bwsewell/scrollPatrol
//
// v1.0.0
// Aug 14, 2012 12:30
(function(e){e.fn.scrollPatrol=function(t){var n=!1,r=this,i={offset:10},s=e.extend(i,t),o=r.find("li");e(o).each(function(){var t=e(this),r=e(this).next(),i=t.children("a").attr("href");if... |
$(function() {
"use strict";
// Obtener los elementos del DOM
var status = document.getElementById('status');
var input = document.getElementById('input');
var content = $('#content');
// Mi color asignado por el servidor
var myColor = false;
// Mi nick
var myName = false;
// ... |
/* global before, after */
/* eslint-disable no-unused-expressions */
import { expect } from 'chai';
import sinon from 'sinon';
import Join from '../../server/Join';
const { describe, it } = global;
describe('Join class', () => {
before(() => {
global.Meteor = {
bindEnvironment(cb) {
return cb;
... |
#!/usr/bin/env node
'use strict';
const log = console.log;
const Utils = require('../utils/utils');
const Chalk = require('chalk');
const Constants = require('../utils/constants');
const jsonfile = require('jsonfile');
// Main code //
const self = module.exports = {
getSuggestion: (item) => {
const descrip... |
module.exports = {
before: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
after: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
error: {
all: [],
find: [],
get: [],
create: [... |
game.resources = [
{name: "bg", type:"image", src: "data/img/bg.png"},
{name: "clumsy", type:"image", src: "data/img/clumsy.png"},
{name: "pipe", type:"image", src: "data/img/pipe.png"},
{name: "logo", type:"image", src: "data/img/logo.png"},
{name: "ground", type:"image", src: "data/img/ground.png"},
{nam... |
var ServerProcessModule;
(function (ServerProcessModule) {
"use strict";
var RunningServerProcessListItem = (function () {
function RunningServerProcessListItem(serverProcessUow) {
this.serverProcessUow = serverProcessUow;
this.$inject = ["serverProcessUow"];
this.res... |
// rebin
var redis = require("redis"),
client = redis.createClient();
var ss = require('socketstream'),
express = require('express');
var passport = require('passport'),
LocalStrategy = require('passport-local').Strategy
ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn;
var bcr... |
'use strict';
/*global window */
window.app = {
// Application Constructor
initialize: function () {
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
bindEvents: function () {
/*jslint bro... |
/**
* Simulator abstraction layer
* Pokemon Showdown - http://pokemonshowdown.com/
*
* This file abstracts away Pokemon Showdown's multi-process simulator
* model. You can basically include this file, use its API, and pretend
* Pokemon Showdown is just one big happy process.
*
* For the actual simulation, see b... |
var express = require('express')
var app = express()
app.use(express.static('dist'))
app.listen(3000, function() {
console.log('prodServer.js: Listening on port 3000')
})
|
const Mock = require('mockjs')
const List = []
const count = 100
const baseContent = '<p>I am testing data, I am testing data.</p><p><img src="https://wpimg.wallstcn.com/4c69009c-0fd4-4153-b112-6cb53d1cf943"></p>'
const image_uri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3'
for (let i = 0; i <... |
'use strict';
(function (win, doc) {
// Check if `fonts-loaded` cookie has been set
if (doc.documentElement.className.indexOf('fonts-loaded') > -1) {
return;
}
/*! Cookie function: get, set, or forget a cookie.
* [c]2014 @scottjehl, Filament Group, Inc.
* Licensed MIT
*/
const cookie = function... |
import emptyObj from './src/'
console.log('Object imported', emptyObj)
|
//@flow
//vendor
import React from "react";
//styledComps
import { Svg, Circle, Path } from "./styled-components";
import Text from "./Text";
import Dividers from "./Dividers";
type coordinates = {
"x": number,
"y": number
};
export default (props: {
children: {},
maskId: string,
d: string,
viewBox: str... |
//jshint strict: false
module.exports = function(config) {
config.set({
basePath: './app',
frameworks: ['jasmine'],
files: [
'lib/jquery.min.js',
'lib/angular.min.js',
'lib/angular-route.min.js',
'lib/angular-mocks.js',
'lib/firebase.js',
'lib/angularfire.min.js',
'js/*.js',... |
/// <reference path="./typings/tsd.d.ts" />
var mysql = require("mysql");
var Promise = require("bluebird");
Promise.promisifyAll(mysql);
Promise.promisifyAll(require("mysql/lib/Connection").prototype);
var path = require("path");
var DbHelper = (function () {
function DbHelper() {
}
/**
* 获取数据库的配置,通过全... |
import * as Immutable from 'immutable';
import { createAction, handleActions } from 'redux-actions';
var CombatantRecord = Immutable.Record({
id: '',
ship: '',
name: '',
skill: 0,
// nested makes merging suck
focus: 0,
evade: 0,
targetlock: '',
tokens: Immutable.Map(),
});
// Actio... |
{
"name": "Soundcloud",
"domain": "soundcloud.com",
"urlMappings": [{
"urlTemplate": "http://soundcloud.com/{username}",
"schema": "hCard",
"contentType": "Profile",
"mediaType": "Html"
}, {
"urlTemplate": "http://soundcloud.com/{username}",
"schema": "XFN... |
export function shotImage (shot) {
const uri = shot.images.normal ? shot.images.normal : shot.images.teaser
return { uri }
}
export function authorAvatar (player) {
var uri;
if (player) {
uri = player.avatar_url
return { uri }
} else {
uri = require('../styles/AuthorAvatar.png')
return uri
... |
// 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 vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... |
'use strict';
const url = require('url');
const https = require('https');
const GoogleMapsAPI = require('googlemaps');
const config = {
key: 'AIzaSyBnsCuuS0N0Akc1I3WEifbNoBCQ1iZ4a9g', //Não tente usar a chave, ela só aceita requests do meu server =)
secure: true
}
if (process.env.proxy) config.proxy = process.en... |
$(document).ready(function()
{
var introductionContent, photoContent ;
var disblur = 0 ;
$('form').on('mousedown', 'input#formSubmit', function()
{
disblur = 1 ;
}) ;
$('form#productIntroductionForm').on('click', 'div#productIntroduction', function()
{
introductionContent = $(this).htm... |
var sitemap = [{
url: '/',
title: 'Mojo',
children: [{
url: '/base/',
title: 'base',
children: [{
url: '/base/backport.h/',
title: 'backport.h',
}, {
url: '/base/cleanup.h/',
title: 'cleanup.h',
}, {
url: '/base/clock.h/',
title: 'clock.h',
}, {
ur... |
import Breadcrumb from './breadcrumb';
import BreadcrumbItem from './breadcrumb-item';
Breadcrumb.Item = BreadcrumbItem;
export default Breadcrumb; |
(function(){
'use strict';
angular.module('sidebarMenuDemo', [
'ui.bootstrap',
'ui.bootstrap.sidebarMenu'
])
.controller('DemoController', ['$scope', '$http', function($scope, $http){
$http.get('js/menu.json')
.success(function(data) {
$scope.menu = data;
});
}]);
})(); |
//'use strict';
//
//(function() {
// describe('RuleOutcomeController', function() {
// beforeEach(module(ApplicationConfiguration.applicationModuleName, function(_$provide_) {
// _$provide_.value('actuatorsOptionsModel', {
// load: jasmine.createSpy('load'),
// model:... |
// Initial bookmarklet code from https://www.smashingmagazine.com/2010/05/make-your-own-bookmarklets-with-jquery/
(function(){
// the minimum version of jQuery we want
var v = "1.3.2";
// check prior inclusion and version
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) {
var done = false;
v... |
/**
* Bootstro.js Simple way to show your user around, especially first time users
* Http://github.com/clu3/bootstro.js
*
* Credit thanks to
* Revealing Module Pattern from
* http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/
*
* Bootstrap popover variable width
*... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'ArrestDBcmd', 'ug', {
save: 'ساقلا'
} );
|
require( "../setup" );
var mockConnectionFn = require( "../data/mockConnection" );
/***************************************************
SqlContext *Successful* Execution Tests
****************************************************/
describe( "SqlContext", function() {
var sql, seriate, reqMock, prepMock;
function s... |
import $ from "jquery";
import _ from 'underscore';
import Backbone from 'backbone';
import Ui from './ui.js';
import {Data} from './data.js'
var init = function () {
import(
/* webpackChunkName: "view" */
'./view.js').then(View => {
var AppRouter = Backbone.Router.extend({
rout... |
/*jslint browser: true, undef: true *//*global Ext*/
Ext.define('SlateAdmin.proxy.API', {
extend: 'Jarvus.proxy.API',
alias: 'proxy.slateapi',
connection: 'SlateAdmin.API'
}); |
// This file contains methods responsible for replacing a node with another.
import { codeFrameColumns } from "@babel/code-frame";
import traverse from "../index";
import NodePath from "./index";
import { parse } from "@babel/parser";
import * as t from "@babel/types";
const hoistVariablesVisitor = {
Function(path)... |
describe("About Functions", function() {
it("should declare functions", function() {
function add(a, b) {
return a + b;
}
expect(add(1, 2)).toBe(3);
});
it("should know internal variables override outer variables", function () {
var message = "Outer";
function getMessage... |
/**
* @fileoverview
* @enhanceable
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
goog.provide('proto.tensorflow.OpPerformanceList');
goog.require('jspb.Message');
goog.require('jspb.BinaryReader');
goog.require('jspb.BinaryWriter');
goog.require('proto.tensorflow.OpPerformance');
/**
* Generated by JsPbCodeGe... |
var r = require('rethinkdb'),
httpUtil = require('./httpUtil');
function connect() {
return r.connect({db: 'kodapor'});
}
function members() {
return connect()
.then(function (conn) {
return r.table('members')
.map(function (m) {
return {
month: r.expr([m('joined').year()... |
var shell = require('shelljs');
// 查找失败.
var DEFINE_ERROR = 'DEFINE_ERROR';
/**
* 获取工程项目路径
*/
function getProjectPath(searchPath) {
// 获取工程项目路径组成元素
var compose = getProjectCompose(searchPath);
if (compose.length == 0) {
return DEFINE_ERROR;
};
// 工程项目路径
var projectPath = compose.join('/');
return proje... |
KineticUI.Slide = function(config){
this.____init(config);
};
KineticUI.Slide.prototype = {
____init : function(config){
this._config = KineticUI.extend(KineticUI.Config.slide, config, true);
this.___init(this._config);
var self = this;
this._background = new Kinetic.Rect({
cornerRadius : this._config.... |
#! /usr/bin/env node
"use strict";
function showHelpAndExit() {
console.log("Usage: bundle-messages -t TRANSLATIONS [FILES]");
console.log("Prints a JS module with messages in FILES mapped to render functions.");
process.exit();
}
if (process.argv.length < 5
|| process.argv[2] != "-t"
|| ~process.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.