code stringlengths 2 1.05M |
|---|
//These methods are provided for you and handle creating
//the shader and drawing the contents of the buffer
var setupShader = require('./setup-shader')
var drawIt = require('./draw-it')
//This is the data for the outline of the text
var DATA = require('./vertices.json')
//These variables are initialized in init()
va... |
/* 作者: dailc
* 时间: 2017-07-08
* 描述: Search-a-2D-Matrix-II
*
* 来自: https://leetcode.com/problems/search-a-2d-matrix-ii
*/
(function(exports) {
/**
* @param {numsber[]} numss
* @param {numsber} k
* @return {numsber[]}
*/
var searchMatrix = function(matrix, target) {
if (!matrix ... |
var fs = require('fs');
//Variables ---------------
var warningsLogged = 0,
warningsSkipped = 0;
//Constants & regexps -----
var regexpModule = new RegExp("angular.module\\(([A-Za-z0-9\"\\[\\]\', ]+)\\)","gm"),
regexpModuleComponentSplit = new RegExp("\\.(service|directive|controller|factory|config)","g"),
... |
/**
* Module dependencies.
*/
const
iconv = require('iconv-lite'),
cheerio = require('cheerio'),
moment = require('moment'),
request = require('request'),
Provider = require('../../lib/provider');
/**
* HanjinWebsite Class
*/
class HanjinWebsite extends Provider {
static statusImages = [
... |
const webpack = require('webpack');
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const nodeEnv = process.env.NODE_ENV === 'production' ? 'production' : 'development';
module.exports = {
// the project dir
context: __dirname,
entry: './src/index.js',
target: 'node',
... |
(function() {
var express,http;
express = require('express'); //加载express模块等待扩展
http = require('http'); //加载http模块等待扩展
//通用摸版
exports.kangjian = function (){};
}).call(this);
|
Ui.Element.extend('Ui.SVGElement', {
renderSVG: function(svg) {
}
}, {
renderDrawing: function() {
var svg = document.createElementNS(svgNS, 'svg');
svg.setAttribute('focusable', false);
var content = this.renderSVG(svg);
if(content !== undefined)
svg.appendChild(content);
return svg;
}
});
|
/* Excel specific API library */
/* Version: 16.0.6216.3006 */
/*
Copyright (c) Microsoft Corporation. All rights reserved.
*/
/*
Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
*/
/*
* @overview es6-promise - a tiny implementation of ... |
var assert = require('assert');
var lexer = require('../lib/lexer');
// Install our own parseError function that doesn't depend on the parser.
var SyntaxError = require('../lib/syntax_error');
lexer.parseError = function(message, hash){
throw new SyntaxError(message, hash)
};
function lex() {
return [lexer.lex(), ... |
import {Schema} from 'mongoose'
const GeoLocationSchema = new Schema({
type: {
type: String,
default: 'Point'
},
coordinates: {
type: [Number]
},
isTest: {
type: Boolean,
}
})
export default GeoLocationSchema |
module.exports = {
"key": "togetic",
"moves": [
{
"learn_type": "tutor",
"name": "covet"
},
{
"learn_type": "tutor",
"name": "hyper-voice"
},
{
"learn_type": "tutor",
"name": "sky-attack"
},
... |
export const describe = window.describe;
export const it = window.it;
export const before = window.before;
export const after = window.after;
export const beforeEach = window.beforeEach;
export const afterEach = window.afterEach;
|
import * as c from './constants'
const initialState = {
nodes: [],
apollo: null,
update_channel: null,
modal: null,
colour: {}
}
export default function reducer(state = initialState, action) {
switch (action.type) {
case 'SET_APPOLO':
return {...state, apollo: action.apollo}
case 'SET_CHANNEL':... |
/**
* Store catprod
*
* Copyright (C) 2013 Emay Komarudin
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ... |
const webpack = require('webpack')
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const config = {
entry: "./src/app.js",
output: {
path: path.resolve(__dirname, "../dist"),
filename: 'bundle.js',
chunkFilename: '[name].bundle.js'
},
module: {
rules: [
... |
var
/** Plugin list */
rename = require( "gulp-rename" ),
concat = require( "gulp-concat" ),
uglify = require( "gulp-uglify" ),
jshint = require( "gulp-jshint" ),
browserSync = require( "browser-sync" ),
less = require( "gulp-less" ),
debug = require( "gulp-debug" ),
fs = require( "fs" ),
pkg = require( "./package.j... |
/* */
"format cjs";
$(document).ready(function() {
function sum (x, y) { return x + y; }
function square (x) { return x * x; }
function odd (x) { return x % 2 === 1; }
function naturalSmallerThan (x) { return _.iterators.List(_.range(0, x)); }
module("underscore.function.iterators");
test("List", fu... |
version https://git-lfs.github.com/spec/v1
oid sha256:d9c2cad33d09950c69fdd96f3f4e1fbc66c1ffc1252ea1cf6bce3ec307c11052
size 39680
|
import GradeModel from '../models/grade';
import UserModel from '../models/user';
import { pubsub, withFilter, GRADE_CHANGE_CHANNEL } from '../pubsub';
const find = (root, { userId }, context) => {
if (userId) {
context.userId = userId;
}
if (!context.userId) {
return [];
}
context.course = UserModel.findOn... |
/**
* Copyright (c) 2016-present ZENOME, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
module.exports = run
const readline = require('readline')
const needle = require('needle')
co... |
$( document )
.ready( function () {
$( ".popuptext" )
.hide();
var x53d7 = $( '<p>受付<br>うけつけ :aceitação<br>受ける<br>うける :receber</p>' );
$( '#x53d7' )
.mouseenter( function () {
$( '.popuptext' )
.append( x53d7 );
$( '.popuptext' )
.show( 500 );
} );
... |
import React from 'react'
import axios from 'axios'
import {Link} from 'react-router'
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn
} from 'material-ui/Table';
import {RaisedButton} from 'material-ui'
class Pubs extends React.Component {
constructor(props) {
sup... |
'use strict';
// External dependencies
require('should');
const request = require('supertest');
// Our dependencies
const app = require('../server');
const agent = request.agent(app);
describe('__gtg tests:', () => {
it('responds with OK when a GET is received', (done) => {
agent.get('/__gtg')
.expect(200)
... |
#!/usr/bin/env node
var obtree = require('obtree');
var msgpack = require('msgpack');
var argv = require('minimist')(process.argv.slice(2),{
boolean: ['n','p','b'],
string: ['o']
});
var path = require('path');
function splitPathComponents(p) {
return path.normalize(p).split(path.sep);
}
function layerWrap(obj,... |
// # Ghost Configuration
// Setup your Ghost install for various [environments](http://support.ghost.org/config/#about-environments).
// Ghost runs in `development` mode by default. Full documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
config = {
// ### Produ... |
const midnight = require("../../");
const app = midnight();
app.route("/", (req, res) => {
res.send("Hello world!");
});
app.start();
|
/*
* Copyright (c) 2015-2016 PointSource, LLC.
* MIT Licensed
*/
/*
* post middleware runs after all the express handlers have been registered.
*
* defined in the config under the 'middleware$' key.
* It's useful for things like error handlers.
*
* We always load the built-in error handler, middleware/_errors.... |
const loseloseHashCode = (key) => {
let hash = 0;
for (let i = 0; i < key.length; i++) {
hash += key.charCodeAt(i);
}
return hash % 37;
};
const noHash = () => 0;
export { loseloseHashCode, noHash };
|
#!/usr/bin/env node
var fs = require('fs');
var sh = require('shelljs');
var log = require('winston');
log.remove(log.transports.Console);
log.add(log.transports.Console, {colorize: true, timestamp: true});
var StartServer = require('../lib/server').startServer;
/**
* Parse command line args
* Sample usage:
* prea... |
// moment.js locale configuration
// locale : japanese (ja)
// author : LI Long : https://github.com/baryon
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['../moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('... |
/*! jquery.scroll.to.top - v0.0.1 - 2014-09-13 */
!function(a){"use strict";function b(a,b){var c=[],d=0;do c.push(a),d+=a[b];while(a=a.offsetParent);return{chain:c,offset:d}}function c(a,c){var d,e,f,g="left"===c?"offsetLeft":"offsetTop",h="left"===c?"scrollLeft":"scrollTop",i="left"===c?"overflowX":"overflowY",j=a;if... |
/**
* ftime - 时间戳转化
* Chenyancheng. (MIT Licensed)
* https://github.com/
*/
;(function(){
/*
* 输入时间戳 10或者13位
* 输出格式化时间
*/
var ftime = function(timestamp){
if(!timestamp){
throw new Error('timestamp required')
}
var reg = /^([0-9]{10})|([0-9]{13})$/;
... |
var restify = require('restify'),
request = require('request'),
rand = require('csprng'),
sha1 = require('sha1'),
server = restify.createServer({
name: "localr"
});
var uuid = require('node-uuid');
// Setting server dependancys
server.use(restify.CORS({
origins: ['*'], // defaults to ['... |
db.posts.insert({
userID: "leon",
title: "AGH",
date: 847857484784647363746,
category: "music",
message: "Liszt is cool"
}); |
var buckets = require('../../dataStore').buckets.buckets;
/**
* Sends all failed messages for the bId given in the request-params, sends an error message if no bId or matching bucket is found.
*
* @param {Object} req http-request object
* @param {Object} res http-response object
* @param {Function} next Follow-u... |
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... |
import React from 'react';
import Router from 'react-router';
import routes from './routes'
Router.run(routes, (Handler) =>
React.render(<Handler />, document.body));
|
import { generateGUID, getRandomNumber } from '../actions/user';
import { USER_LOGGED_OUT, USER_NAME_CHANGED, USER_SAVED } from '../actions/types';
const initialState = {
pickerCard: null,
guid: generateGUID(),
name: `Anonymous #${getRandomNumber(0, 1000)}`,
isReady: false,
isSaved: false,
offline: false,
... |
import expect from 'expect'
import insertKnot from '../../src/util/insertKnot'
describe('Insert knot', () => {
it('throws error if knot is invalid', () => {
const controlPoints = [
{ x: 0, y: 0 },
{ x: 10, y: 0 },
{ x: 10, y: 10 },
{ x: 0, y: 10 },
{ x: 0, y: 20 },
{ x: 10, y... |
/*
* This file is part of the BenGorCookies library.
*
* (c) Beñat Espiña <benatespina@gmail.com>
* (c) Gorka Laucirica <gorka.lauzirika@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import GoogleTagManager from './G... |
/**
* Handle the logs connection
*/
app.service("Logs", function($resource) {
var Resource = $resource(app.baseUrl + "/api/logs/:id", {
}, {
index: {method: "GET", isArray: true},
get: {method: "GET", isArray: false}
});
return Resource;
});
app.service("Sources", function($resource) {
var Resource = $r... |
/* eslint-env browser */
import CarouselList from './parts/carousel-list';
import CarouselItem from './parts/carousel-item';
import CarouselControl from './parts/carousel-control';
import CarouselScroller, { directionPrev, directionNext } from './parts/carousel-scroller';
import React from 'react';
import PropTypes fro... |
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contr... |
angular
.module('app')
.controller('CourseModalController', CourseModalController);
function CourseModalController(self, $state, $mdDialog, course) {
self.title = '';
self.statuses = ['DRAFT', 'PUBLISHED', 'FINISHED'];
self.course = course;
if (self.course && self.course.registrationEnd) {
... |
var BEEP = {
VERSION: 2,
// Chrome, Opera, and Firefox already provide AudioContext()
// but Safari instead provides webkitAudioContext().
// Let’s just standardize this for our own sanity right here:
AudioContext: window.AudioContext ? window.AudioContext : window.webkitAudioContext,
}
// We might a... |
//////////////////////////////////////////////////////////////////////////
// //
// This is a generated file. You can view the original //
// source in your browser if your browser supports source maps. //
// Source maps are s... |
import mongoose, { Schema } from 'mongoose'
const schema = new Schema({
_tournament: {
type: Schema.Types.ObjectId,
required: true
},
breakCategory: {
type: Schema.Types.ObjectId,
ref: 'breakCategories',
required: true
},
numberOfTeams: {
type: Number,
required: true
},
matchU... |
function Weather(values,type) {
this.type = type;
try
{
this.values = JSON.parse(values);
}
catch(ex)
{
this.values = null;
this.err = ex;
}
}
/*
* Summary : Get the temperature in kelvin
* Result : Temperature in Kelvin
*/
Weather.prototype.getKelvinTemp = function(pos){
var result = {};
if(typeof... |
import shortId from 'shortid'
// Prefix to ensure that the first character isn't a number
export default () => `_${ shortId.generate() }` |
"use strict";
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Dependencies
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var classes = require("./../../classes");
var helper = require("./../../helper");
var dbhandler = require("./../../dbhandler");
var config = require("./../../static/config.json");
var... |
$(function(){
$(document).off("change","#category_firstbox").on('change',"#category_firstbox",function(event){
var that = $(this);
getNextBox(that,page);
if(page=="unit") {
var text = $(this).find(':selected').text();
text= text.replace('>','');
$(".select... |
(function () {
'use strict';
angular
.module('app.meerp.clients')
.service('clientsService', ['$q', clientsService]);
function clientsService($q) {
// Revealing module pattern:
return {
getClientById: getClientById,
getClientByLocation: getClientByLocation,
};
/**
* Ret... |
define(function () { 'use strict';
// Use strict has an effect
'use strict';
// Access getters with side-effects to e.g. force DOM repaints
globalVar.getter;
globalVar && globalVar.member && globalVar.member.getter;
// Call pure constructors for side-effects for e.g. feature detection
new Function('');
});
|
export {default as FocusDirective} from './FocusDirective'
export {default as OnAllDirective} from './OnAllDirective' |
/**
* Copyright 2001-2015 Aspose Pty Ltd. All Rights Reserved. *
* The MIT License (MIT)
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
*
* @author <ul><li>Farooq Sheikh (farooq.sheikh@aspose.com)</li>
*
* This file is the application bootstrap. It contains RequireJS con... |
// Remove required from editors
$('.editor, .editor-email').removeAttr('required');
// Convert video to video-js
$('video').addClass('video-js')
.css('width', '100%')
.css('height', 'auto')
.css('max-height', '500px');
$('iframe')
.css('max-width', '100%');
// File manager popup callback
var editorNam... |
var assert = require('assert');
exports.DataReader = DataReader;
function DataReader(data) {
assert(Buffer.isBuffer(data));
this.data = data;
this.len = data.length;
this.pos = 0;
}
DataReader.prototype.readBytes = function(size) {
if (size > this.bytesRemaining())
return null;
var buf = this.data.sl... |
'use strict';
var fs = require('fs');
var path = require('path');
function serveRoot(options) {
var dir = options.dir || '';
var paths = options.paths || [];
var headers = options.headers || {};
return function (req, res, next) {
var file = dir + req.originalUrl;
if (paths.indexOf(req... |
module.exports = {
"key": "zekrom",
"moves": [
{
"learn_type": "tutor",
"name": "earth-power"
},
{
"learn_type": "tutor",
"name": "dragon-pulse"
},
{
"learn_type": "tutor",
"name": "magnet-rise"
... |
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, white: true bitwise:true */
/*global inputManager, SpecialKeys, game, b2Vec2 */
function ArgumentDesc(name, type, deft, selectOptions)
{
'use strict';
this.name = name;
this.type = type;
this.deft ... |
'use strict';
/* Controllers */
angular.module('myApp.controllers', [])
.controller('LandingPageController',
['$scope','$http', function($scope,$http) {
$scope.test;
$scope.data={};
$scope.seachExperts = function(){
$http.post('http://rlaprince-w7.nbttech.com:9200/experts/_search',
{... |
(function () {
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var states = 'none done'.split(' ');
/**
* Post Schema
*/
var PostSchema = new Schema({
title: {
type: String,
default: '',
trim: true,
required: 'Title cannot be blank'
},
status:... |
/* */
var arrayMap = require('./_arrayMap'),
baseIntersection = require('./_baseIntersection'),
baseRest = require('./_baseRest'),
castArrayLikeObject = require('./_castArrayLikeObject');
var intersection = baseRest(function(arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return (mapped.l... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const FeedbackSchema = new Schema({
solutionID: {
type: Schema.Types.ObjectId,
ref: 'Solution',
required: [true, 'solutionID is required']
},
staticAutomaticFeedback: {
type: Array,
//required: [tr... |
var assignOwnDefaults = require('lodash/internal/assignOwnDefaults'),
assignWith = require('lodash/internal/assignWith'),
attempt = require('lodash/utility/attempt'),
baseAssign = require('lodash/internal/baseAssign'),
baseToString = require('lodash/internal/baseToString'),
baseValues = require('lod... |
var fs = require('fs');
var connect = require('gulp-connect');
var gulp = require('gulp');
var karma = require('karma').server;
var concat = require('gulp-concat');
var jshint = require('gulp-jshint');
var header = require('gulp-header');
var rename = require('gulp-rename');
var es = require('event-stream');
var del = ... |
/* Imports for global scope */
Accounts = Package['accounts-base'].Accounts;
RouteController = Package['iron-router'].RouteController;
Route = Package['iron-router'].Route;
Router = Package['iron-router'].Router;
moment = Package.moment.moment;
jsPDF = Package.jspdf.jsPDF;
base64 = Package.jspdf.base64;
sprintf = Pack... |
"use strict";
const request = require("request-promise");
const mongoose = require("mongoose");
const stateGen = require("crypto-random-string");
var UserData = mongoose.model("UserData");
require("../../db.js");
// these are credentials that are used for facebook to authorise the login
var credentials = {
ClientId:... |
//Group project week 7
// Release 4 - Coline Forde
// Refactor
var sum = function(array){
return array.reduce((a,b) => a + b);
};
// As a user, I want to take a list of numbers, and add all the numbers together.
var mean = function(array){
return sum(array)/ array.length;
};
// As a user, I want to take a l... |
const {readdirSync, readFileSync} = require('fs')
const matter = require('gray-matter')
const DIR_TO_BLOG_POSTS = './src/pages/blog/'
const DIR_TO_AUTHORS = './src/pages/about-us/'
const getPosts = () => readdirSync(DIR_TO_BLOG_POSTS)
const getAuthors = () => readdirSync(DIR_TO_AUTHORS)
const getAuthorNames = () => (... |
const apiPutAppReload = {
schema: {
summary: 'Do a stand-alone reload of a Qlik Sense app, without using a task.',
description: '',
params: {
type: 'object',
properties: {
appId: {
type: 'string',
description: 'I... |
import React from 'react'
import ReactDOM from 'react-dom'
import 'font-awesome/css/font-awesome.css'
import './app.css'
import {browserHistory, Router, Route} from 'react-router'
import App from './containers/App/App'
import makeRoutes from './routes'
const routes = makeRoutes()
const mountNode = document.querySelec... |
import { A } from '@ember/array';
import Component from '@ember/component';
import { set, get } from '@ember/object';
import layout from './ember-collection/template';
import identity from '../utils/identity';
import needsRevalidate from '../utils/needs-revalidate';
class Cell {
constructor(key, item, index, style) ... |
var path = require('path')
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var embedFileSize = 15000
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client?reload=false',
'bootstrap-loader',
path.join(__dirname, 'src/m... |
{
var foo = function(d) {
return d.foo;
},
treemap = d3_hierarchy.treemap().size([6, 4]),
root = treemap(
d3_hierarchy
.hierarchy(require("../data/simple3"))
.sum(foo)
.sort(descendingValue)
),
nodes = root.descendants().map(round);
test.deepEqual(treemap.siz... |
version https://git-lfs.github.com/spec/v1
oid sha256:94f5e9b2bd2174518462582fde3163637b59d2d1dd17d96b634f53448c9043e3
size 67198
|
var objecttools = require('./'),
a = require('assert')
// id()
var p = {}
objecttools.id(p)
a.strictEqual(
p.__id,
0
)
a.strictEqual(
objecttools.id(p),
0
)
var q = {}
a.strictEqual(
objecttools.id(q),
1
)
// find()
p = {
a: {
b: [
{
c: 5
}
]
},
d: true
}
a.deepEqual(
objecttool... |
'use strict';
System.register(['../common/widget-base', '../common/constants', '../common/decorators', '../common/common'], function (_export, _context) {
"use strict";
var WidgetBase, constants, generateBindables, customElement, inlineView, inject, _dec, _dec2, _dec3, _dec4, _class, ejNavigationDrawer;
functi... |
'use strict';
module.exports = function(client) {
var Pool = require('../node_modules/knex/lib/pool');
var inherits = require('inherits');
var _ = require('lodash');
// Inherit from the `Pool` constructor's prototype.
function Pool_FILEMAKER_ODBC() {
this.client = client;
Pool.apply(this, arguments);
... |
/*
* server.js
*
* Usage: call as follows whilst making sure to use the escaped quotes and avoid spaces e.g.
*
* node server.js {\"uuid\":\"6e8bc430-9c3a-11d9-9669-0800200c9a66\"}
*
* Following the example from https://github.com/neumino/thinky/examples/basic-todo
* but with our own modifications (removal of '... |
const URL = 'https://phonebook-540ec.firebaseio.com/phonebook'
$('#btnLoad').on('click', loadData)
function loadData() {
$.ajax({
method:'GET',
url: URL + '.json'
}).then(handleSuccess)
.catch(handleError)
function handleSuccess(res) {
console.log(res)
}
}
function h... |
$(document).ready(function () {
var steering = new CompareScreenSteering({
selector: '#differences-form table.table-form',
isPosted: formRepost == 1
});
Backbone.Events.on('total-score-changed', function (e) {
$('#totalScore').text(e.totalScore);
if (e.suppressCaseOutcome === 0 ) {
this.preSelectCaseOut... |
(function () {
'use strict';
rxSocket.QueueSubjectInit = function () {
rxSocket.QueueSubject = QueueSubject;
QueueSubject.prototype = Object.create(rxSocket.Rx.Subject.prototype);
function QueueSubject() {
rxSocket.Rx.Subject.apply(this, arguments);
this._queuedValues = [];
return th... |
//= require load_css
//= require webfontloader
//= require_self
loadCSS('/assets/application.css')
WebFont.load({
google: {
families: ['Droid Sans', 'Droid Serif']
}
})
|
//resolve => require.ensure([], () => resolve(require('xxx')), 'common') webpack静态语法分析
export const layout = resolve => require.ensure([], () => resolve(require('@/views/layout/layout.vue')), 'common')
export const login = resolve => require.ensure([], () => resolve(require('@/views/login/index.vue')), 'login');
expor... |
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import typescript from 'rollup-plugin-typescript2';
export default {
input: ['./src/index.ts'],
output: {
file: './dist/index.js',
name: 'shared',
... |
export class OneTwoThreeIterable {
constructor () {
this._counter = 0
this.isCleanedUp = false
}
next () {
if (this._counter <= 2) {
return {
value: ++this._counter,
done: false
}
} else {
this.isCleanedUp = true
return {
value: undefined,
d... |
var map;
var infoWindow;
// A variável markersData guarda a informação necessária a cada marcador
// Para utilizar este código basta alterar a informação contida nesta variável
var markersData = [
{
lat: -3.7506093,
lng: -38.5015025,
nome: "Clube do Volei Multsport",
endereco:"Rua Joaquim S... |
/*
This code is a complete rewrite with considerable assistance from Alex Williams.
*/
AJS.$(document).on('DOMNodeInserted', function(event) {
if (event.target.id == 'aui-flag-container') {
console.log('issue-quick-start: Got post-it note!');
AJS.$(event.target).on('DOMNodeInserted', function(e... |
const CHARMAP =
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
const short2long = new Map();
/**
* Encodes a URL to a shortened URL.
*
* @param {string} longUrl
* @return {string}
*/
var encode = function (longUrl) {
const genShortUrl = function () {
let rand = [];
for (let i = 0; ... |
/* jshint -W101, -W098 */
var blocktrail = require('../');
var assert = require('assert');
var crypto = require('crypto');
/**
* @type APIClient
*/
var client = blocktrail.BlocktrailSDK({
apiKey: process.env.BLOCKTRAIL_SDK_APIKEY || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APIKEY",
apiSecret: process.env.BLOCKTRAIL_SD... |
const toArray = require('../../core/utils/toArray')
const {flatten} = require('../../core/utils')
const findFunctionInTypes = require('./typeLookup')
/** scale an object in 2D/3D space
* @param {Float|Array} scale - either an array or simple number to scale object(s) by
* @param {Object(s)|Array} shapes either a sin... |
/*global QUnit:true, module:true, test:true, asyncTest:true, expect:true*/
/*global start:true, stop:true ok:true, equal:true, notEqual:true, deepEqual:true*/
/*global notDeepEqual:true, strictEqual:true, notStrictEqual:true, raises:true*/
(function($) {
$(function(){
var flags = [];
$('#test-1 img').retina... |
(function(scope) {
function VideoRecorder(bufferLength, media, video, canvas, format, quality) {
format = format || "image/jpeg";
quality = quality || 0.8;
var frameRate = 60;
var canvasCtx = canvas.getContext("2d");
var width = canvas.width;
var height = canvas.height;
var frameRequ... |
'use strict';
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.writable = true; Object.definePro... |
var Module = require('module').Module,
_load = Module._load,
expose = require('./lib/expose.js');
function wrap(caller) {
return expose(caller);
};
/*!
* Hack to wrap the calling modules path
* in a closure... Not crazy about this but..
*/
// TODO: find a better way to determine calling module
Module.... |
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
grunt.initConfig({
sass: {
options: {
sourceMap: true
},
dist: {
files: {
'css/style.css': 'scss/sty... |
define([
'marionette',
"util/Radio",
'app/modules/Radio/views/ChannelList',
'app/modules/Radio/views/ChannelInfo',
], function(Marionette, Radio, ChannelList, ChannelInfo) {
return Marionette.View.extend({
template: "radio/layout.html",
regions: {
channelList: '[data-region="channel-list"]',
... |
import Vue from "vue"
import Highcharts from "highcharts"
function config() {
//Highcharts options
Highcharts.setOptions({
global: {
useUTC: false
}
});
}
export default config |
// src/js/controllers/service-index.js
define([
'./session-service',
'./user-service',
'./auth-service'
], function () {
'use strict';
}); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.