code stringlengths 2 1.05M |
|---|
export class ClipView {
constructor(clipAlbum, clip, settings) {
settings = _updateSettingsIfNeeded(settings);
this._clipAlbum = clipAlbum;
this._clip = clip;
this._settings = settings;
this._div = null;
this._label = null;
this._playButton = null;
this._overlays = [];
}
get cl... |
// Collector
// https://github.com/tbremer/collector
// (c) 2015 Tom Bremer / @_tbremer / github.com/tbremer
// Collector may be freely distributed under the MIT license
(function() {
const collector = (function() {
// ## CS
// _this is our factory for binding any itteratable functions to._
... |
module.exports = function(grunt) {
grunt.initConfig({
// 配置文件,参考package.json配置方式,必须设置项是
// name, version, author
// name作为gallery发布后的模块名
// version是版本,也是发布目录
// author必须是{name: "xxx", email: "xxx"}格式
pkg: grunt.file.readJSON('package.json'),
//banner: ... |
const { mix } = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel a... |
const { Schema } = require('mongoose');
const { saveMiddleware, updateMiddleware } = require('../utils');
const { fetch, findById } = require('../utils/schema');
const ObjectId = Schema.Types.ObjectId;
const CategorySchema = new Schema({
name: String,
articleIds: [{ type: ObjectId, ref: 'Articles' }],
... |
'use strict';
angular.module('angularApp')
.controller('NavbarCtrl', function ($scope, $location) {
$scope.menu = [{
'title': 'Home',
'link': '/'
}];
$scope.isActive = function(route) {
return route === $location.path();
};
});
|
var passport = encode62.timeencode(encode62.decode62(user._passport, user.session));
function upload(f, base) {
return new Promise(function (ok, oh) {
var xhr = new XMLHttpRequest;
xhr.open("put", (base ? base : `/@/data/`) + f.filename.replace(/\.?[^\.]+$/, function (m) {
return "!" + u... |
/**
* typescript:commonjscreatebinding
* 这个文件由工具生成,请不要手动修改
*
* Efront Authors
* 2020-05-22T15:06:22.318Z
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { re... |
version https://git-lfs.github.com/spec/v1
oid sha256:7271ca2035cded170c53008f6ac6ab8bd91d002ce2468791dadc47c87680e4a5
size 729
|
'use strict';
const holograph = require('holograph');
const path = require('path');
const merge = require('merge');
const log = require('gulplog');
const isPlainObj = require('is-plain-obj');
/**
* Build an optional Holograph styleguide..
*
* @param {ConfigParser} conf A configuration parser object.
* @param {Und... |
import React, {Component, PropTypes} from 'react';
import {connect} from 'react-redux';
import {asyncConnect} from 'redux-async-connect';
import {push} from 'react-router-redux';
import {StatusPanel, CustomError} from 'components';
import {Grid, Cell} from 'radium-grid';
import Helmet from 'react-helmet';
import {load ... |
//Parameter randomStream should be an instance of the RandomStream class.
function symbolicLogicQuestion(randomStream)
{
// Bool Operator classes, for doing quick generation and execution boolean expressions.
// Vector is associative array of bool values to be tested (used for building answer key)
var ... |
module.exports = ['$scope', '$rootScope', '$location', '$window', 'db', home];
function home($scope, $rootScope, $location, $window, db) {
'use strict';
db.fetchAll(function (err, schema) {
if (err) {
console.error(err);
return;
}
$scope.matches = schema.matches;
$scope.$apply();
})... |
var knex = require('knex');
var path = require('path');
var db = knex({
client: 'sqlite3',
connection: {
filename: path.join(__dirname, 'warpsong.sqlite3')
},
useNullAsDefault: true
});
module.exports = db; |
#!/usr/bin/env node
'use strict'
const restClient = require('request-promise')
const express = require('express')
const morgan = require('morgan')
const _ = require('underscore')
const bodyParser = require('body-parser')
const session = require('express-session')
const moment = require('moment')
const Q = require('q'... |
require("./example");
|
// import modules
var fs = require('fs'),
xml2js = require('xml2js'),
EyeD3 = require('eyed3'),
officegen = require('officegen');
// init & config
var eyed3 = new EyeD3({
eyed3_executable: 'eyeD3'
});
// path save word file
var savePath = './word/';
/***********************************************... |
var StringDecoder = require('string_decoder').StringDecoder;
var decoder = new StringDecoder('utf8');
var buffer = new Buffer('cats');
console.log(decoder.write(buffer.slice(0, 3))); // cat
|
import React from 'react'
const NextIcon = props => (
<svg width="6.26px" height="7.65px" viewBox="0 0 6.26 7.65" {...props}>
<path fill="#EFEFEF" d="M4.66,4.15c0.2-0.15,0.2-0.41,0-0.56L0.35,0.17C0.15,0.02,0,0.09,0,0.34V7.4c0,0.25,0.15,0.33,0.35,0.17
L4.66,4.15z"/>
<rect x="4.72" fill="#EFEFEF" width="1.54" he... |
/**
* Immutable trade object
*
* @param price trade price
* @param quantity trade quantity
* @constructor
*/
function Trade(price, quantity) {
this.price = price;
this.quantity = quantity;
Object.freeze(this); // immutable
}
module.exports = Trade; |
function initiate() {
var element = document.getElementById("canvas");
var canvas = element.getContext('2d');
canvas.beginPath();
canvas.arc(200,200,75,0,Math.PI * 2, true);//start point, radius, starting angle, degree(rad), clockwise
canvas.stroke();
var radFromDeg = Math.PI / 180 * 60;
... |
/*!
* Interface gráfica para automação residencial
*
* Rafael Prado
* Data: 06/10/2015
*/
/**
*
**/
function Objeto(nome,x,y,w,h,img) {
this.id = 0;
this.nome = nome || "Objeto";
this.tag = nome;
this.x = x || 0;
this.y = y || 0;
this.w = w || 0;
this.h = h || 0;
this.nomePos = {x:this.x,y:this.y}
th... |
'use strict'
const chalk = require('chalk')
module.exports = (city, country, region, internet, cost, weather) => {
const output = [`
${chalk.bold.yellow('⇢ City:')} ${chalk.bold(city)}
${chalk.bold.yellow('⇢ Country:')} ${chalk.bold(country)}
${chalk.bold.yellow('⇢ Region:')} ${chalk.bold(region)}
${chalk.bold.yell... |
// @flow
import React, { Component } from 'react';
import styles from './Projects__MenuListItem.scss';
export default class MenuListItem extends Component {
render() {
return (
<li className={styles.item}>
<div className={styles.itemText}>New<br />Project</div>
</li>
);
}
}
|
class Context {
constructor() {
this._stubs = {};
}
addStub(url, module, isDefault = true) {
if (!Array.isArray(url)) {
this._stubs[url] = { module, isDefault };
} else {
url.forEach(item => {
this._stubs[item.url] = {
modu... |
version https://git-lfs.github.com/spec/v1
oid sha256:4940cdc16893890617b543293d4e2ce681b6a73c801f8f3c8524fd5681499b8f
size 28009
|
/*
Code used below is based the pie chart example from
https://github.com/square/intro-to-d3
Licensed under Apache 2.0
https://github.com/square/intro-to-d3/blob/master/LICENSE.txt
*/
var learn = learn || {};
(function () {
"use strict";
learn.initPieChart = function (container, options) {
learn.hel... |
'use strict'
/**
* Function to parse and normalize nats host addresses
* @module skyring/lib/nats/parse-hosts
* @author Eric Satterwhite
* @since 10.0.0
**/
const toArray = require('../lang/array/to-array')
module.exports = parseHosts
function parseHosts(str) {
if (Array.isArray(str)) return str.map(parseItem)... |
'use strict';
angular.module('comments').factory('Comments', function($resource) {
return $resource('/comments/:id', {id: '@id'}, {
update: {
method: 'PUT'
}
});
}); |
/**
* @fileoverview Main function src.
*/
// HTML5 Shiv. Must be in <head> to support older browsers.
document.createElement('video');
document.createElement('audio');
document.createElement('track');
/**
* Doubles as the main function for users to create a player instance and also
* the main library object.
*
... |
import React, { Component } from 'react'
import
{ FormGroup,
FormControl,
HelpBlock,
Button
} from 'react-bootstrap'
import { Cookies } from 'react-cookie'
import { API_URL } from '../config'
class AddUser extends Component {
constructor(props) {
super(props)
this.state = {
error: ''
... |
version https://git-lfs.github.com/spec/v1
oid sha256:6a4524b6672a6ff762c4ac488d38c1d44f179c649e6eb918f79f9761ce58ab66
size 5666
|
/*
* jQuery Goodreads Widget
* 2016 Matt O'Connell <mattoconnell408@gmail.com>
* License: MIT
*/
(function($) {
"use strict";
var widget_name = 'goodreads';
/*
* Only gets called when we're using $('$el').goodreadsWidget format
*/
var GoodreadsWidget = function(el, customOptions) {
var _ = this;
_.... |
'use strict';
const Logger = require('./index');
const events = Logger.events;
const logger = Logger.logger('wlan0');
var DNS_DATA = {};
var CONNECT_DATA = {};
logger.events.on(events.READY_EVENT, () => {
console.log('READY')
});
logger.events.on(events.CONNECT_EVENT, (event) => {
let data = event.data;
... |
/**
@module SoCo
@submodule graphDB
**/
/**
* Represents a relationship in Neo4j graph database
*
* @class Relationship
* @constructor
*/
var Neo4j = require('./Neo4j')
, db;
function Relationship(_relationship) {
this._relationship = _relationship;
var url = global.neo4node.url || proc... |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.retextLancaste... |
define(function (require) {
'use strict';
// Get module dependencies.
var Parser = require('modules/parsers/base');
var PHPMD = new Parser('phpmd', 'PHP Mess Detector');
PHPMD.setCommand('php {{path}} {{file}} text {{rulesets}}');
PHPMD.buildCommand = function (file) {
var rulesets = this.concatenate... |
(function(window, document){
input = document.getElementById("input");
label = document.getElementById("label");
input.addEventListener("input", function(){
if(input.value.length > 0) {
label.classList.add('hidden');
} else {
label.classList.remove('hidden');
... |
'use strict';
/* global require, describe, it, afterEach, beforeEach */
const Assert = require('assertly');
const expect = Assert.expect;
const Location = require('../../../lib/model/Location');
describe('model/Location', function () {
describe('from', function () {
it('should accept Location instance a... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$(document).ready(function(){
hljs.initHighlightingOnLoad();
$('#coolness div').hover(function(){
$('#coolness .second').fadeOut(500);
}, function(){
$('#coolness .second').fadeI... |
const assert = require('assert');
const ID3Writer = require('../../dist/browser-id3-writer');
const emptyBuffer = new ArrayBuffer(0);
const id3Header = [
73, 68, 51, // ID3 magic nubmer
3, 0, // version
0, // flags
];
describe('TLEN', () => {
it('TLEN', () => {
const writer = new ID3Writer(emp... |
var RW;
(function (RW) {
(function (BabylonHeadTracker) {
var HeadTracker = (function () {
function HeadTracker(_canvas, _videoInput, altVideos, debugOverlay) {
var _this = this;
this._canvas = _canvas;
this._videoInput = _videoInput;
... |
'use strict';
var vfs = require('../');
var path = require('path');
var fs = require('graceful-fs');
var bufEqual = require('buffer-equal');
var through = require('through2');
var File = require('vinyl');
var should = require('should');
require('mocha');
var dataWrap = function(fn) {
return function(data, enc, c... |
angular.module('predicsis.jsSDK.models', []);
angular.module('predicsis.jsSDK.helpers', []);
angular
.module('predicsis.jsSDK', ['predicsis.jsSDK.models', 'predicsis.jsSDK.helpers', 'restangular'])
.provider('predicsisAPI', function () {
'use strict';
var errorHandler = function(response) { throw Error(re... |
var mongoose = require('mongoose'); //引用mongoose模块
var db = mongoose.createConnection('localhost','test'); //创建一个数据库连接
db.on('error',console.error.bind(console,'连接错误:'));
db.once('open',function(){
//一次打开记录
});
var PersonSchema = new mongoose.Schema({
name:String //定义一个属性name,类型为String
});
... |
// @flow
import Promise from 'bluebird';
import {firebaseApp} from '../firebase/';
import {ChannelsResource, channelsRef, logFinished, snapshotExists} from '../index';
import type {TChannel, TYouTubeChannelResponse} from '../../types';
// add CHANNEL_IDS before running batch
const CHANNEL_IDS = `
UC2rbyOa3Jo7vGSibq... |
/**
* @class DragSimulate
* @export DragSimulate
*/
export class DragSimulate {
/**
* On drag event simulate
* @memberOf DragSimulate
* @param type
* @param args
*/
dragDraggableSimulate(type, args) {
/**
* Define widget
* @type {Widget}
*/
const widget = this.scope.contro... |
import React from "react";
import classnames from "classnames";
const BASIC = "basic";
const PRO = "pro";
export default function PricingTabs({ type, onChange }) {
return (
<div className="pricing-tab-switch">
<a
href="#basic"
data-track="event"
data-cate... |
var express = require('express');
var app=express();
var mongoose=require('mongoose');
mongoose.connect('mongodb://test:test@ds051833.mlab.com:51833/tictactoe');
var todoSchema = new mongoose.Schema({
id:String,
list:[String],
length:{type:Number}
});
app.use("/css",express.static(__dirname+"/css"))
app... |
var sqlite3 = require('sqlite3').verbose();
url_file = function (url,callback) {
var db = new sqlite3.Database('./db/sqlite/nf.sqlite3');
db.get("SELECT file FROM urls where url = $1",[url], callback)
db.close();
}
exports.url_file = url_file; |
// Copyright © 2013-2014 David Caldwell <david@porkrind.org>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS... |
'use strict';
module.exports = /*@ngInject*/
function <%= cameledName %>Directive(/* inject dependencies here, i.e. : $rootScope */) {
return {
link: function (scope, element) {
// Do something awesome
}
};
};
|
import React, {Component} from 'react';
import {View, StyleSheet, TouchableOpacity, Image, ListView} from 'react-native';
import BackButton from './BackButton';
const datasource = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
const ds = datasource.cloneWithRows([
require('../../images/monkey1.jpe... |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { Provider } from "react-redux";
import registerServiceWorker from './registerServiceWorker';
import Store from "./Store"
ReactDOM.render(
<Provider store={Store}>
<App/>
</Provider>,
document.getElementById('root')... |
const express = require('express');
const httpError = require('http-errors');
const loadCollection = require('./services/collection-loader');
const modelManager = require('./services/model-manager');
const adapter = require('./services/api-adapter');
const bluebird = require('bluebird');
const router = express.Router(... |
(function () {
angular
.module("AutonomousWriters")
.controller("WriterController", WriterController);
function WriterController($rootScope, $location, $routeParams, UserService, BookService) {
var vm = this;
vm.userId = $routeParams.uid;
function init() {
v... |
const Client = require('../lib/client');
const options = {
baseUrl: 'some value',
username: 'some value',
password: 'some value'
};
describe('Client', () => {
it('should be constructor and factory function', () => {
expect(Client).toBeFunction();
expect(new Client(options)).toBeObject();
expect(Cl... |
import Backbone from 'backbone'
import React from 'react'
import { SeriesAdmin } from '../components/series.jsx'
import { mount } from 'enzyme'
import ImageUpload from 'client/apps/edit/components/admin/components/image_upload.coffee'
import Paragraph from 'client/components/rich_text/components/paragraph.coffee'
des... |
/**
* The common low values for a Simplex.
* @hidden
*/
export var SimplexMode;
(function (SimplexMode) {
SimplexMode[SimplexMode["EMPTY"] = -1] = "EMPTY";
SimplexMode[SimplexMode["POINT"] = 0] = "POINT";
SimplexMode[SimplexMode["LINE"] = 1] = "LINE";
SimplexMode[SimplexMode["TRIANGLE"] = 2] = "TRIAN... |
// Invocar modo JavaScript 'strict'
'use strict';
// Configurer le módule routes de 'personnes'
angular.module('annonces').config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/annonces', {
templateUrl: 'annonces/views/list-annonces.client.view.html'
}).
when('/annonces/create', {
... |
var jstransform = require('jstransform');
var through = require('through');
var utils = require('jstransform/src/utils');
var Syntax = jstransform.Syntax;
function visitorExportsDefinePropertyGet(traverse, node, path, state) {
var exportsStr = [node.expression.arguments[0].name, '.',
node.expression.arguments[1]... |
// Natives
const fs = require('fs')
const {sep} = require('path')
// Packages
const mustache = require('mustache')
module.exports = (templateData, data) => {
return new Promise(resolve => {
const {path, files} = templateData
if (!files || files.length === 0) {
return resolve([])
}
const rende... |
"use strict";
var c = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
}
console.log.apply(console, arguments);
};
var _ = require('lodash');
var Bluebird = require('bluebird');
var IoRedis = require('ioredis');
var Orange = IoRedis.creat... |
/*
Fork of StackBlur - doesn't create unnecessary globals, and can
be used in AMD/Browserify projects.
See http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html
for original demo and usage info.
The stackBlurImage, stackBlurCanvasRGBA and stackBlurCanvasRGB functions
have been replaced with the ... |
var decode = require('../');
var shoe = require('shoe');
var sock = shoe('/sock');
window.addEventListener('keydown', function (ev) {
var c = decode(ev);
if (c) sock.write(c);
});
|
var gulp = require('gulp'),
requireDir = require('require-dir'),
config = require('./gulp/config.json');
var tasks = requireDir('./gulp/tasks');
gulp.task('default', config.defaultTask); |
import IW from './IW.js';
export default class Sign extends IW {
constructor(bdate) {
super();
this.sign = bdate;
}
}
|
wowchi.url = function(endpoint) {
try {
return wowchi.locale().host + endpoint + "?jsonp=?&locale=" + wowchi.locale().locale;
} catch (e) {
return null;
}
};
wowchi.achievements = function(wowchi) {
try {
return [
wowchi.locale().host,
"/api/wow/character/... |
import QDatetime from './QDatetime'
import QDatetimeRange from './QDatetimeRange'
import QInlineDatetime from './QInlineDatetime'
export {
QDatetime,
QDatetimeRange,
QInlineDatetime
}
|
"use strict"
Object.defineProperty(exports, "__esModule", {
value: true,
})
exports.StreetViewPanorama = undefined
var _defineProperty2 = require("babel-runtime/helpers/defineProperty")
var _defineProperty3 = _interopRequireDefault(_defineProperty2)
var _getPrototypeOf = require("babel-runtime/core-js/object/get-... |
var patio = require("index"),
helper = require("./helper"),
comb = require("comb");
exports.loadModels = function () {
var ret = new comb.Promise();
return comb.executeInOrder(helper, patio, function (helper, patio) {
var DB = helper.createTables();
var Company = patio.addModel(DB.from(... |
const MAX_SIZE = 10;
// Creating a class named Queue.
class QueueCircularInArray {
// Constructor - set front and rear as -1.
// We are assuming that for an empty Queue, both front and rear will be -1.
constructor() {
this.front = -1;
this.rear = -1;
this.arr = [];
}
... |
(function () {
'use strict';
angular.module('users')
.service('userService', ['$http', '$q', UserService]);
/**
* Users DataService
* Uses embedded, hard-coded data model; acts asynchronously to simulate
* remote data service call(s).
*
* @returns {{loadAll: Function}}
... |
'use strict';
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writabl... |
'use strict';
document.body.innerHTML = document.body.innerHTML + '<p>index3.js</p>';
|
describe('function getInfo', function() {
it('finds Billy Bob', function() {
var person = getInfo("Billy","Bob");
expect(person.id).toEqual("272822514");
});
});
describe('function getDescendants', function() {
it('finds the children and grandchildren', function() {
var mattias = {
"id": "313207561",
... |
// Generated on 2014-05-16 using generator-angular 0.8.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Load grunt tasks au... |
import React from 'react';
// MATERIAL
import {blue500, cyan700, pinkA200, cyan500} from 'material-ui/styles/colors';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
// COMPONENT
import Navigation from '../components/0_Global/Navigation/Navig... |
// >>> WARNING THIS PAGE WAS AUTO-GENERATED - DO NOT EDIT!!! <<<
import MultipleChoiceWithOtherPage from '../../multiple-choice.page'
class FurtherContactPage extends MultipleChoiceWithOtherPage {
constructor() {
super('further-contact')
}
clickFurtherContactAnswerYes() {
browser.element('[id="further... |
describe('BC controllers', function() {
describe('Controller: ChatController', function(){
var scope, ctrl, window, room, bcrypt, websocket;
beforeEach(module('bc'));
beforeEach(inject(function($rootScope, $controller, _room_, _bcrypt_, $window) {
scope = $rootScope.$new();
room = _room_;
bcrypt = _b... |
//var queryObject = AutocompleteService();
//queryObject.getQueryPredictions();
function initialize() {
var mapCanvas = document.getElementById('map-canvas');
var mapOptions = {
center: new google.maps.LatLng(39.5, -98.35),
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMA... |
const { camelCase, capitalize } = require('lodash')
const kebabCase = str => {
let kebab = ''
for (let i = 0; i < str.length; i++) {
const charCode = str.charCodeAt(i)
if (charCode >= 65 && charCode <= 90) {
kebab += `${i > 0 ? '-' : ''}${str[i].toLowerCase()}`
} else {
kebab += str[i]
... |
var searchData=
[
['parser_5fdictionnaire',['parser_dictionnaire',['../classparser__dictionnaire.html',1,'']]]
];
|
// @flow strict
export default function getClosestTransformedParent(el: Element) {
do {
const style = window.getComputedStyle(el);
if (style.transform !== 'none' || style.webkitTransform !== 'none') return el;
// $FlowFixMe - it's fine
el = el.parentElement || el.parentNode;
} w... |
var pkgcloud = require('pkgcloud');
var tools = require('./tools');
module.exports = function(options){
tools.check_options(options, [
'username',
'apikey',
'region'
])
return pkgcloud.storage.createClient({
provider: 'rackspace',
username: options.username,
apiKey: options.apikey,
region: optio... |
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
import { isPresent } from '@ember/utils';
import { dropTask, restartableTask } from 'ember-concurrency-decorators';
export default class C... |
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
/*
* This component is built using `gatsby-image` to automatically serve optimized
* images with lazy loading and reduced file sizes. The image is loaded using a
* `useStaticQuery`, which allows us to load the ... |
// Same as list structure.
var Chaking = Chaking || {};
Chaking.SinglyLinkedList = function(){
var Node = Chaking.Node;
var Iterator = Chaking.SinglyLinkedListIterator;
this.firstNode = null;
this.getBegin = function(){
return new Iterator( this.firstNode );
};
this.getEnd = function()... |
'use strict';
angular.module('CST.work', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/work', {
templateUrl: 'views/work/work.html',
controller: 'workCtrl'
});
}])
.controller('workCtrl', function($scope, $rootScope, FileLoader, Notification, $timeout) {
var ct... |
const example = require("../test/example-utils.js")
const Table = require("../")
const baseConfig = {
marginLeft: 0,
marginTop: 0
}
const defaultSampleText = "this is a test"
const program = require("commander").description("example test script")
.option("-c, --columns <number>", "list number/ranges to test. ie... |
export default {
html: `
<p>selected: one</p>
<select>
<option value='one'>one</option>
<option value='two'>two</option>
<option value='three'>three</option>
</select>
<p>selected: one</p>
`,
props: {
selected: 'one'
},
async test({ assert, component, target, window }) {
const select = tar... |
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, Input, NgZone, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core';
import { Backdrop } from '../backdrop/backdrop';
import { Config } from '../../config/config';
import { isTrueProperty } from '../../util/util';
impo... |
import React, { Component, PropTypes } from 'react';
import objectAssign from 'object-assign';
import pureRender from 'pure-render-decorator';
let ua = '';
if (!isNode) {
ua = navigator.userAgent.toLowerCase();
}
let _platform = function(os) {
let ver = ('' + (new RegExp(os + '(\\d+((\\.|_)\\d+)*)').exec(ua) || [... |
(function($) {
$(document).ready(function() {
// check for html5 input multiple support first
html5Support = ("multiple" in document.createElement("input"));
if(!html5Support){
// console.log("Sorry, your browser doesn't support HTML5!");
return false;
}
Symphony.Language.add({
'Successfully ad... |
"use strict";
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
exports.foo7 = foo7;
var foo = exports.foo = 1;
var foo = exports.foo = 1;
var bar = exports.bar = 2;
var foo2 = exports.foo2 = function () {}... |
var __ = require('../../index')
var path = require('path')
var fs = require('fs')
var rootdir = path.join(__dirname, '../root')
describe("scan item", function() {
var root = __(rootdir)
it("synchronous ensure testdir ensure folder exist", function() {
var testdir = path.join(rootdir, 'ensure-test')
var test = ... |
'use strict';
angular.module('dictionaryApp')
.config(function ($stateProvider) {
$stateProvider
.state('requestReset', {
parent: 'account',
url: '/reset/request',
data: {
authorities: []
},
view... |
var mongoose = require('mongoose')
var Schema = mongoose.Schema
var roomSchema = new Schema({
"name": { type: String, required: true, unique: true },
"owner": {
type: 'String'
},
"messages": [],
"users": [{
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
}]
})
mongoos... |
import React from 'react'
import { action } from '@storybook/addon-actions'
import createStory from '../../storybook/createStory'
import Button from '../../src/Button'
createStory('Button', module)
.add('with `children:Apple`', () => <Button>Apple</Button>)
.add('with `title:Banana`', () => <Button title='Banana' ... |
/*
Add a path that must match an email format
*/
'use strict';
var Belt = require('jsbelt')
, _ = require('underscore');
module.exports = function(schema, options){
var a = Belt.argulint(arguments, {
'validators': {
'options': [
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.