code stringlengths 2 1.05M |
|---|
//! moment.js
//! version : 2.14.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
; (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(f... |
'use strict';
const OBJFile = require('../src/OBJFile');
describe('OBJ File Parser', () => {
describe('Object Name', () => {
it('assigns objects the default name "untitled" if no object name was declared', () => {
const fileContents = "v 1.0 2.0 3.0";
const modelName = new OBJFile(fileContents).pars... |
'use strict';
var Dispatcher = require('flux').Dispatcher,
assign = require('object-assign'),
AppDispatcher;
AppDispatcher = assign(new Dispatcher(), {
/**
* A bridge function between the views and the dispatcher, marking the action
* as a view action.
* @param {object} action The data coming from ... |
import Page from '../classes/Page';
export default (req, res) => {
const { session = {} } = req;
const templatePath = '/templates/404.twig';
const pageDetails = {
templatePath,
templateVariables: {
errors: session.errors,
},
};
if (session.errors) {
delete session.errors;
}
const pa... |
define(['backbone', './SkiAreaModel.js'], function(Backbone, SkiArea) {
return Backbone.Collection.extend({
model: SkiArea,
url: '/ski-areas/myList',
getById: function (id) {
return this.filter(function (area) {
return area.get("id") == id;
})[0];
}
});
}); |
/*
Copyright (c) 2015, Yahoo! Inc. All rights reserved.
Code licensed under the MIT License.
See LICENSE.txt file.
*/
var express = require('express');
var st = require('st');
var lru = require('lru-cache');
var fs = require('fs');
var url = require('url');
var mdns = require('mdns');
var path = require('path');
var sp... |
Namespace.register("comp");
comp.Base=function(){
}
comp.Listview=function(searchstr){
this.$elem=$(searchstr);
this.searchstr=searchstr;
}
comp.Listview.prototype.render=function(entities,listItemHandler){
listItemHandler=listItemHandler || function(entity,$li){
$li.html(entity);
}
this.$elem.html("");... |
import React, { PureComponent } from 'react';
export default class NotFound extends PureComponent {
render() {
return <div>NotFound</div>;
}
}
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
const _ = require('lodash')
const inquirer = require('inquirer')
const packageQuestions = require('./packageQuestions')
module.exports = function (questions, done) {
inquirer.prompt(_.map(packageQuestions, transform), (pkg) =>
inquirer.prompt(_.map(questions, transform), (answers) =>
done({'package': pkg, ... |
import Microcosm from 'microcosm'
const identity = n => n
describe('Action complete state', function() {
it('will not change states if already complete', function() {
const repo = new Microcosm()
const action = repo.append(identity)
action.cancel()
action.resolve()
expect(action.is('cancelled'... |
// All code points in the Hangul Compatibility Jamo block as per Unicode v4.0.1:
[
0x3130,
0x3131,
0x3132,
0x3133,
0x3134,
0x3135,
0x3136,
0x3137,
0x3138,
0x3139,
0x313A,
0x313B,
0x313C,
0x313D,
0x313E,
0x313F,
0x3140,
0x3141,
0x3142,
0x3143,
0x3144,
0x3145,
0x3146,
0x3147,
0x3148,
0x3149,
0x... |
$( document ).ready(function() {
/* Sidebar height set */
$('.sidebar').css('min-height',$(document).height());
/* Secondary contact links */
var scontacts = $('#contact-list-secondary');
var contact_list = $('#contact-list');
scontacts.hide();
contact_list.mouseenter(function(){ scontacts.fadeIn(); });
co... |
function mayThrow() {
throw new Error('Whoops...')
}
function unsafe() {
try {
mayThrow();
} catch (e) {
handleError(e);
}
}
|
var searchData=
[
['set',['set',['../classSparseMatrix.html#a5344d8d6543344f3aec055c373ac61de',1,'SparseMatrix']]],
['sparsematrix',['SparseMatrix',['../classSparseMatrix.html#a14f8df02d304c3e60a308b426e908613',1,'SparseMatrix::SparseMatrix(int n)'],['../classSparseMatrix.html#a9e50d719e7d7fc212cfdac41eea1a63b',1,'... |
var expect = require('./lib/expect');
var rewire = require('rewire');
var sinon = require('sinon');
describe('rewrite-files module', function() {
var globResults, readContents, fs, glob, rewriteFiles;
function setup() {
globResults = [];
readContents = "";
rewriteFiles = rewire('../lib/rewrite-files'... |
import THREE from 'three';
import Mesh from './Mesh';
import Iso from './Iso';
export default class Scene {
threeScene = new THREE.Scene();
camera = null;
constructor(container:HTMLElement) {
// Fog
this.threeScene.fog = new THREE.FogExp2(0x000000, 5);
// Ambient light
this.ambientLight = new T... |
'use strict'
module.exports = {
get today() {
return Date.now()
},
get todayReadable() {
let tstamp = new Date()
return tstamp.toDateString()
},
now: {
seperator: '-',
get get() {
let o = new Date()
let minutes = function() {
if (o.getMinutes() < 10) return '0' ... |
//YouTube iframe player API docs https://developers.google.com/youtube/iframe_api_reference
define( ['jquery'], function ( $ ) {
'use strict';
return {
loadAPI: function () {
// This code loads the IFrame Player API code asynchronously.
var tag = document.createElement( 'script' );
tag.src = "http://www... |
__lavaBuildMap = null;
__geocode_jsonp0 = null;
__geocode_jsonp1 = null;
__geocode_jsonp2 = null;
__geocode_jsonp3 = null;
__geocode_jsonp4 = null;
__geocode_jsonp5 = null;
__geocode_jsonp6 = null;
|
'use strict';
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
var webpackDistConfig = require('./webpack.dist.config.js'),
webpackDevConfig = require('./webpack.config.js');
module.exports = function (grunt) {
// Let *load-grunt-tasks* require everything
... |
var nparse = function(string){
var q = string[string.length-1];
var regex = /[^0-9]/g;
if(q.match(regex)){
return string.slice(0,string.length-1);
}
else{
return string;
}
};
if(typeof module !== 'undefined' && typeof require !== 'undefined'){
module.exports = nparse;
} |
// Copyright (c) 2015-2018 Robert Rypuła - https://audio-network.rypula.pl
(function () {
'use strict';
AudioNetwork.Injector
.registerService('Audio.ActiveAudioContext', _ActiveAudioContext);
_ActiveAudioContext.$inject = [
'Audio.SimpleAudioContextBuilder'
];
function _ActiveAud... |
import initShowEnvironment from '~/environments/mount_show';
document.addEventListener('DOMContentLoaded', () => initShowEnvironment());
|
import React from 'react';
import { Route, IndexRoute, Redirect } from 'react-router';
import App from './App';
import Index from './views/Index';
import Company from './views/Company';
import Return from './views/Return';
import Validation from './views/Validation';
// export const rootRoute = "/";
export const rootR... |
var crypto, qs, request;
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
request = require('request');
crypto = require('crypto');
qs = require('querystring');
function rest(key, secret, nonceGenerator) {
this.url = "https://api.bitfinex.com";
this.version = 'v1';
this.key = key;
this.secret = sec... |
// Generated by CoffeeScript 1.10.0
(function() {
module.exports = {
Padding: require('./Padding')
};
}).call(this);
|
import LatLng from './models/LatLng';
import LatLngBounds from './models/LatLngBounds';
export {
LatLng,
LatLngBounds
} |
/**
The YUI module contains the components required for building the YUI seed file.
This includes the script loading mechanism, a simple queue, and the core
utilities for the library.
@module yui
@main yui
@submodule yui-base
**/
/*jshint eqeqeq: false*/
if (typeof YUI != 'undefined') {
YUI._YUI = YUI;
}
/**
The... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var PushData = new Schema({
user_id:{type:String, required:true},
token:{type:String, require:true},
timestamp:{type:Date, default:Date.now}
})
var SMS = new Schema({
message:{type:String, required:true},
to:{type:String,required:tr... |
import React from 'react'
import {connect} from 'react-redux'
import 'semantic-ui-css/semantic.min.css'
import Navbar from './NavigationBar/NavigationBar'
import Sidebar from './Sidebar/Sidebar'
import TradeArea from './TradeArea/TradeArea'
const App = () => (
<div className='container flex-columns'>
<Navbar />... |
/**
* @author dforrer / https://github.com/dforrer
* Developed as part of a project at University of Applied Sciences and Arts Northwestern Switzerland (www.fhnw.ch)
*/
/**
* @param scene containing children to import
* @constructor
*/
export var SetSceneCommand = function ( scene ) {
Command.call( this );
... |
/* jshint node: true */
'use strict';
var csso = require('broccoli-csso');
module.exports = {
name: 'untitled-ui',
postprocessTree: function(type, tree) {
return type === 'css' ? csso(tree) : tree;
},
isDevelopingAddon: function() {
return true;
}
};
|
import * as React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'components/tabs';
const requireDemo = require.context('docs/src/pages/components/tabs', false, /\.(js|tsx)$/);
const require... |
module.exports = {"main":{"js":"/main.js?b056c25769a38d0d8fdc"}}; |
(function() {
var checkVersion = Dagaz.Model.checkVersion;
Dagaz.Model.checkVersion = function(design, name, value) {
if (name != "paper-go-extension") {
checkVersion(design, name, value);
}
}
if (!_.isUndefined(Dagaz.Controller.addSound)) {
Dagaz.Controller.addSound(0, "../sounds/step.ogg");... |
/**
* @license Angular v4.4.4
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/animations')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular... |
steal("funcunit/qunit", function(){
module("naxx");
test("naxx testing works", function(){
ok(true,"an assert is run");
});
}) |
describe('taSanitize', function(){
'use strict';
beforeEach(module('textAngular'));
beforeEach(module('ngSanitize'));
describe('should change all align attributes to text-align styles for HTML5 compatability', function(){
it('should correct left align', inject(function(taSanitize){
var safe = angular.element(t... |
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var concat = require('gulp-concat');
var plumber = require('gulp-plumber');
var strip = require('gulp-strip-comments');
var uglify = require('gulp-uglify');
var browserify = require('gulp-browserify');
var sourceB... |
/*
Copyright (c) 2008-2015 Pivotal Labs
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, publish,
di... |
var Dungeon = {
LEVEL: 1,
attackVariance: 5,
weaponTypes: [
{
weaponName: "Wooden Stick",
damage: 4,
xp: 0
},
{
weaponName: "Brass Knuckles",
damage: 7,
xp: 5
},
{
weaponName: "Serrated Dagger",
damage: 12,
xp: 5
},
{
weaponName: "Katana",
damage: 1... |
version https://git-lfs.github.com/spec/v1
oid sha256:5eae0a783d81b87e71f9f6626dc1cb356f896c8df874e7a7d72b7181075c3128
size 339
|
describe('app', function () {
'use strict';
var module, dependencies;
beforeEach(function () {
module = angular.module('app');
dependencies = module.requires;
});
it('should be defined', function () {
expect(module).not.toBeUndefined();
});
describe('check defined dependencies:', function... |
// @flow
function _validate(rules: Object, state: Object): Object {
return Object.keys(rules).reduce((validation: Object, key: string) => {
if (typeof rules[key] === "function") {
validation[key] = rules[key](state);
return validation;
}
if (typeof rules[key] === "ob... |
const axios = require('axios')
const express = require('express')
const _ = require('lodash')
const { url } = require('../../config')
const { onError, getData } = require('../lib')
const router = express.Router()
const nearby = ({ lat, lng }, r = 0.5) =>
`lat_gte=${lat - r}&lat_lte=${lat + r}&lng_gte=${lng - r}&ln... |
'use strict';
const extend = require('extend');
const mongoose = require('mongoose');
const debug = require('debug')('hds:init');
const mongo = require('./mongo');
var defaultOptions = {
database: {
host: '127.0.0.1',
port: 27017,
name: 'hds',
user: null,
pass: null
}
}... |
/**
* Created by Alex on 24/05/2015.
*/
/* TODO
This view will contain the different templates such as movie-metadata,
options menu (actors/awards/etc).
The options menu will need to publish a event in order to know
which detail view template has to be loaded.
*/
//# sourceMappingURL=metadata-view.js.map |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides enumeration for changes in model
sap.ui.define(function() {
"use strict";
/**
* @class
* Change Reason for ListBind... |
var inotify = require('inotify'),
Inotify = inotify.Inotify,
path = require('path'),
util = require('util'),
walker = require('walk'),
log = require('winston'),
fs = require('fs'),
events = require('events');
/**
* Creates a new watcher.
*
* @constructor
* @extends events.EventEmitter
... |
'use strict';
/**
* @ngdoc directive
* @name konga.directive:tableCell
* @description
* # tableCell
*/
angular.module('konga')
.directive('tableCell', ['util', '$filter', 'configurationManager', 'mapper',
function (util, $filter, configurationManager, mapper) {
return {
templateUrl: '/konga/vi... |
/* */
'use strict';
var _extends = require('babel-runtime/helpers/extends')['default'];
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
exports.__esModule = true;
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _classnames = require('cl... |
'use strict';
const inherits = require('util').inherits;
const EventEmitter = require('eventemitter2').EventEmitter2
class StepValueCollection {
constructor(collection) {
this.collection = collection;
}
valid() {
return this.collection.every((item) => { return item.valid(); });
}
ambiguousSt... |
/* eslint-env node, mocha */
/* global expect */
/* eslint no-console: 0 */
'use strict';
// Uncomment the following lines to use the react test utilities
// import TestUtils from 'react-addons-test-utils';
import createComponent from 'helpers/shallowRenderHelper';
import WishthumbnailComponent from 'components/wishs... |
'use strict'
const xhr = require('xhr')
const controlPanelLinks = document.querySelectorAll('.control-panel a')
const messagesEl = document.getElementById('messages')
const initFlamegraph = require('./viz/flamegraph')
const initSunburst = require('./viz/sunburst')
const initTree = require('./viz/tree')
const initTree... |
function Selection(selection, table, args) {
args = args || {};
this.selection = selection || [];
this.length = this.selection.length;
this.table = table;
if (args.type === undefined) {
this.type = "SELECTION<STREAM>";
}
else {
this.type = args.type;
}
this.operations = [];
if ((args.oper... |
var searchData=
[
['borradoelemento',['BorradoElemento',['../classZero_1_1Observador.html#a3ba845503dd02bde5117f7c6b515439ba7589b232ac05b1a6ecb93dff3e80b815',1,'Zero::Observador']]]
];
|
version https://git-lfs.github.com/spec/v1
oid sha256:b230c966acc49261f99af797170ba8d46f3c012441b7833b6ee448ea0e355a47
size 2630
|
const escapeRegex = require('escape-string-regexp')
const highlightTranscript = (transcript, selector, highlight) => {
highlight = highlight && escapeRegex(highlight)
const nodes = transcript.find(selector)
$(nodes).each(function(){
const text = $(this).attr('data-node')
const html = $(this).html()
... |
// Vehicle (reducer) ==================== On se préoccupe d’une seule action…
import {ADD_VEHICLE, REMOVE_VEHICLE, UPDATE_VEHICLE} from '../action-creators'
// Par défaut, `history` vaut `[]` (pas d’historique)
export default function vehicles (state = [], action) {
switch (action.type) {
case ADD_VEHICLE: {
... |
var dir_b05834cb21707fe439124e4910782a60 =
[
[ "asm-primitives.cpp", "asm-primitives_8cpp.html", "asm-primitives_8cpp" ],
[ "blockcopy8.h", "blockcopy8_8h.html", "blockcopy8_8h" ],
[ "dct8.h", "dct8_8h.html", "dct8_8h" ],
[ "intrapred.h", "intrapred_8h.html", "intrapred_8h" ],
[ "ipfilter8.h", "ipfi... |
import React from 'react'
import { Table, TableHeader, TableBody, TableRow, TableRowColumn, TableHeaderColumn } from 'material-ui'
export function DocsTable({ columns, children }) {
return (
<Table style={{ tableLayout: 'auto' }} selectable={false} fixedHeader={false}>
{
columns && (
<Tab... |
import expect from 'expect';
import successRateReducer$, { successRateActions } from '../../containers/successRate.redux$';
describe('successRate.redux$', () => {
it('handles succeed, fail and reset actions', () => {
successRateReducer$.take(5).toArray().subscribe((fns) => {
expect(fns.reduce((acc, fn) => f... |
import express from "express";
import validate from "validate.js";
import moment from "moment";
import APIResponse from "../../lib/apiresponse.js";
import * as Utils from "../../lib/apiutils.js";
var router = express.Router();
// Adds a new assignment to the database
// Required fields: subjectId, typeId, du... |
const fs = require('fs');
var read = fs.readFileSync('input.json', 'utf8');
var index = require('./input.json');
var D;
var x1;
var x2;
var print={};
if (index.a==0 && index.b==0)
{
print="#"
console.log(print);
}
if (index.a==0 && index.b!=0)
{
x1=(-c)/b
print = {"x1":x1};
console.log(print);
}
D=(index.b... |
var map = require('../../array/map');
describe('array/map', function () {
it('returns an empty array when passed an empty array', function () {
function yes () {
return true;
}
expect(map([], yes)).to.deep.equal([]);
});
it('returns a mapped array', function () {
function square (n) {
... |
$(document).ready(function() {
var publishCommand = function(notificationName) {
return function(tokens) { $.publish(notificationName); };
}
window.TerminalCommands = {
next : publishCommand('presentation:slide:next'),
previous : publishCommand('presentation:slide:previous'),
goto : function(tok... |
module.exports = {
options: {
title: "a typical app",
description: "Generates something very important.",
forms: [
"$ cat input.json | my-app [<options>]",
"$ my-app <files>"
],
footer: "Project home: [underline]{https://github.com/me/my-app}"
},
... |
(function (window, $) {
'use strict';
// Cache document for fast access.
var document = window.document;
/*
function mainSlider() {
$('.bxslider').bxSlider({
pagerCustom: '#bx-pager',
mode: 'fade',
nextText: '',
prevText: ''
});
}
mainSlider(); */
var $links = $(".bx-wr... |
import ApiKey from 'appkit/models/api_key';
var AuthManager = Ember.Object.extend({
// Load the current user if the cookies exist and is valid
init: function() {
this._super();
var accessToken = $.cookie('access_token');
var authUserId = $.cookie('auth_user');
if (!Ember.isEmpty(accessToken) && !E... |
/**
* ShopReactNative
*
* @author Tony Wong
* @date 2016-09-23
* @email 908601756@qq.com
* @copyright Copyright © 2016 EleTeam
* @license The MIT License (MIT)
*/
import React, {Component} from 'react';
import {connect} from 'react-redux';
import PreorderPage from '../pages/PreorderPage';
class PreorderContai... |
const {expect} = require('chai');
const valueExpand = require('.');
describe('Set-1: Value Expand', () => {
let inputObject;
beforeEach(() => {
inputObject = {
1: {
values: {
36: 0.7
},
uuids: {
finance_rate_id: {
36: '43378e65-a835-47e0-8577-e24d... |
'use strict';
angular.module('videostoreApp').controller('MovieDialogController',
['$scope', '$stateParams', '$modalInstance', 'entity', 'Movie', 'Director',
function($scope, $stateParams, $modalInstance, entity, Movie, Director) {
$scope.movie = entity;
$scope.directors = Director.query()... |
function WrappedShape(type, x, y, board) {
Shape.call(this, type, x, y, board);
this.state = WrappedShape.NORMAL;
this.special = WrappedShape.SPECIAL;
this.bombSize = 1;
}
WrappedShape.NORMAL = 0;
WrappedShape.EXPLODED = 1;
WrappedShape.WAIT_EXPLODE_AGAIN = 2;
WrappedShape.CAN_CLEAR = 3;
WrappedShape.... |
function setup() {
// You are also allowed to assign variables a value, while declaring them
// Valid
var myVar = 5;
// OR you can declare and assign on seperate lines;
var var2;
var2 = 5;
}
function draw() {
}
|
/**
* Created by zhangdihong on 2014/12/15.
*/
var dbUrl=require('../config').db;
var mongoose=require('mongoose');
exports.connect= function (callback) {
mongoose.connect(dbUrl);
}
exports.mongoObj= function () {
return mongoose;
} |
/*globals describe, it */
var should = require('should'),
JGLModel = require('../../').Model,
Parser = JGLModel.Pattern.Parser;
describe('OPE.Pattern.Parser', function () {
describe('.isInteger()', function () {
it('should return true for a integer', function () {
Parser.isInteger(2).s... |
var t;
function timedCount() {
var temptextmin = document.getElementById('txt');
var now = new Date();//定义一个现在的时间
var SetStart = new Date();//设置开始考试时间
// SetStart.setHours(21, 30, 00);//时,分,秒
var SetEnd = new Date();//设置结束考试时间
SetEnd.setHours(22, 30, 00);//时,分,秒
var leftTime=SetEnd.getTime... |
import lt from './lt'
describe('lt', () => {
it('compares the values', () => {
expect(lt(1)(2)).toBe(false)
expect(lt(2)(1)).toBe(true)
expect(lt(2)(2)).toBe(false)
})
})
|
exports.action = {
name: 'printerCreate',
description: 'Creates a Printer',
version: 1,
inputs: {
required: [ 'name', 'organizationId', 'ipAddress' ],
optional: [ 'location', 'manufacturer', 'model', 'serial' ]
},
outputExample: {
name: 'My Color Printer',
id: '12... |
// viewmodel class
define(['jquery', 'knockout'], function($, ko) {
return function() {
var self = this;
self.authors = ko.observable();
$.get('/shufa/').then(function(list) {
$('#beitie-authors-container').removeClass('hide');
return $.map(list, function(author, ind... |
/* global module:false */
module.exports = function(grunt) {
var port = grunt.option('port') || 8000;
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner:
'/*!\n' +
' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd... |
/* ========================================================
* bootstrap-tab.js v2.2.1
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may ... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as APIService from '../../api/APIService';
import DocumentTitle from 'react-document-title';
import ReactPaginate from 'react-paginate';
import Loader from '../helpers/loader';
import IssueHandler from '../helpers/IssueHandler';
i... |
class AboutController {
constructor() {
this.name = 'about';
}
}
export default AboutController; |
var cooking = require('cooking');
var config = require('./config');
var md = require('markdown-it')();
var striptags = require('./strip-tags');
var slugify = require('transliteration').slugify;
var isProd = process.env.NODE_ENV === 'production';
function convert(str) {
str = str.replace(/(&#x)(\w{4});/gi, function($... |
define([
'onion/type',
'onion/event_emitter',
'onion/json_api',
'jquery'
], function (
Type,
eventEmitter,
JsonApi,
$
) {
return Type.sub("Server")
.after("init", function () {
this.api = new JsonApi()
})
.proto(eventEmitter)
.proto({
camelize: function (string) {
... |
angular.module('tf-client')
.directive('tfJob', function() {
return {
restrict: 'E',
// ng-repeat has a priority of 1000, we need the compiler to process first the directive,
// so we use more priority here.
priority: 1001,
scope: {
job: '='
},
templateUrl: 'directives/job/tf-job.htm... |
var request = require('request');
var userUrl = 'https://www.codewars.com/api/v1/users/johnwquarles?access_key=' + process.env['CODEWARS_KEY'];
var outOfUrl = 'https://www.codewars.com/api/v1/code-challenges/50654ddff44f800200000004?access_key=' + process.env['CODEWARS_KEY'];
var exp_obj = {};
exp_obj.getMyData = f... |
/**
* 显示模块
* @param node|nodeArray 略过节点
支持节点或者节点数组
*/
CJS.Import( 'css.isShow' );
CJS.register( 'css.show', function ( $ ) {
var $f = $.FUNCS,
$l = $.logic;
return function ( nodes, skipNode ) {
var show = function ( n ) {
// 对当前节点做浅度显示检测,避免重复设置
if( !$l.css.isS... |
import $ from 'jquery';
/* Dependencies for checking if changes happened since load on a form
import toastr from '../utils/toastr';
import { translations } from 'grav-config';
import { Instance as FormState } from './state';
*/
export default class Form {
constructor(form) {
this.form = $(form);... |
exports.defineAutoTests = function () {
describe('Whois (window.Whois)', function () {
it('should exist', function (done) {
expect(window.Whois).toBeDefined();
done();
});
});
describe('Success callback', function () {
it('should take an argument that is an array of results', function ... |
Ext.override(Rally.ui.cardboard.CardBoard,{
_buildColumnsFromModel: function() {
var me = this;
var model = this.models[0];
if (model) {
if ( this.attribute === "Iteration" ) {
var retrievedColumns = [];
retrievedColumns.push({
... |
var async = require('async');
var cache = require('memory-cache');
var config = require('./config');
var CronJob = require('cron').CronJob;
var GitHubApi = require('github');
var log = require('./logger')();
var api = module.exports = {};
api.init = function init(callback) {
var github = this;
github.client = new... |
var DOM = module.DOM = Class.extend({
initNode: function (element, classSet, attributes, dataSet) {
var classes = classSet,
cl;
extend(element, attributes);
extend(element.dataset, dataSet);
if (Array.isArray(classSet)) {
classes = classSet.join(' ');
... |
/*Generated By KISSY Module Compiler*/
config({
'component/plugin/drag': {requires: ['rich-base','dd']}
});
|
'use strict';
(function (angular) {
angular.module('seminarNotesPluginContent')
.constant('TAG_NAMES', {
SEMINAR_INFO: 'seminarInfo',
SEMINAR_ITEMS: "seminarItems",
SEMINAR_BOOKMARKS: "seminarBookmarks",
SEMINAR_NOTES: "seminarNotes"
})
.constant('STATUS_CODE', {
INSERTED: '... |
var minesweeper = require('./solver.js');
var WIDTH = 16;
var HEIGHT = 16;
var MINES = 40;
function play () {
var field = new minesweeper.Field(WIDTH, HEIGHT, MINES);
var solver = new minesweeper.Solver(field);
try {
solver.solve();
} catch (exc) {
return false;
}
return true;
}
function test (n)... |
/*
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( 'indent', 'si', {
indent: 'අතර පරතරය වැඩිකරන්න',
outdent: 'අතර පරතරය අඩුකරන්න'
} );
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.