code stringlengths 2 1.05M |
|---|
$(document).ready( () => {
var button = $('#fileSave')
$(document).on({
'file:modified': () => {
setButtonStyle('warning')
},
'file:saving': () => {
// disable to prevent user from sending many requests
button.prop('disabled', true)
},
'file:saved': () => {
setButtonStyl... |
/*
Product Name: dhtmlxSuite
Version: 4.3
Edition: Standard
License: content of this file is covered by GPL. Usage outside GPL terms is prohibited. To obtain Commercial or Enterprise license contact sales@dhtmlx.com
Copyright UAB Dinamenta http://www.dhtmlx.com
*/
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
You ... |
const SimpleSource = require('../../lib/sources/simple-source.js')
const JsSource = require('../../lib/sources/js-source.js')
describe('sources/js-source.js', () => {
it('should return the type', () => {
expect(JsSource.from('var x = 1')).to.have.property('type', 'js')
})
describe('#join', () => {
it('s... |
/*
(c) 2010 Geraud Boyer
Adapted from rhino.js from Douglas Crockford (www.JSLint.com)
This is the node companion to fulljslint.js.
*/
/*global JSLINT
*/
/*jslint rhino: false, node: true, strict: false
*/
/*global require,util,__filename,process
*/(function(args) {
var JSLINT, filename, fs, input, input_file... |
export class CreateTaskAction {
constructor(title) {
this.title = title;
}
}
export class UpdateTaskAction {
constructor(taskId, attrs) {
this.taskId = taskId;
this.attrs = attrs;
}
}
|
/** _ _____ _ _
* | | |_ _| |_| |
* | |_ _| | | _ |
* |___|_|_| |_| |_|
* @author lo.th / http://lo-th.github.io/labs/
* THREE ultimate manager
*/
'use strict';
// MATH ADD
Math.degtorad = Math.PI / 180;//0.0174532925199432957;
Math.radtodeg = 180 / Math.PI;//57.295779513082320876;
Math.Pi ... |
const User = require("./user-model");
const Gemstone = require("./gemstone-model");
const Data = require("./data-initilize");
module.exports = {
User,
Gemstone,
Data
}; |
import axios from 'axios'
/**
* This is an example SYNC action creator
* it simply returns an action object
*/
export const somethingReceivedActionCreator = response => ({
type: 'SOMETHING_RECEIVED',
payload: response,
})
/**
* This is an example ASYNC action creator
* it returns a function that is passed `d... |
module.exports = {"AlegreyaSansSC":{"black":"AlegreyaSansSC-Black.ttf","blackitalics":"AlegreyaSansSC-BlackItalic.ttf","bold":"AlegreyaSansSC-Bold.ttf","bolditalics":"AlegreyaSansSC-BoldItalic.ttf","extrabold":"AlegreyaSansSC-ExtraBold.ttf","extrabolditalics":"AlegreyaSansSC-ExtraBoldItalic.ttf","italics":"AlegreyaSans... |
var router = require('express').Router(),
usersController = require('../controllers/users.js'),
jwtUtils = require('../middlewares/jwt-validator.js'),
userSchema = require('../json-schemas/user.js'),
schemaValidator = require('../middlewares/schema-validator.js');
router.post('/',
jwtUtils.verifyTo... |
//! moment.js locale configuration
//! locale : dutch (nl)
//! author : Joris Röling : https://github.com/jjupiter
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && defin... |
import webpack from 'webpack';
import commonsChunk from 'webpack/lib/optimize/CommonsChunkPlugin';
import uglifyWebpack from 'webpack/lib/optimize/UglifyJsPlugin';
import autoprefixer from 'autoprefixer';
import poststylus from 'poststylus';
export default {
watch: true,
entry:{
app: './src/Main.js'... |
var mongoose = require('mongoose'),
ApiSchema = new mongoose.Schema({
creation_date: {
type: Date,
required: true,
default: Date.now
},
format: {
type: String,
required: true
},
link: {
type: String,
required: true
},
organization: {
type: St... |
// get a connection to the DB
var db = require('../lib/storage').db
, hash = require('../lib/hash')
, Cart = require('../models/Cart').Cart;
var UserSchema = db.Schema({
firstName: String,
lastName: String,
email: String,
salt: String,
hash: String,
cart: { type: db.Schema.Types... |
'use strict'
module.exports = (req, allowedOrigins) => {
if (allowedOrigins === '*') return '*'
if (allowedOrigins != null) {
const origins = allowedOrigins.split(',')
return origins.find((origin) => origin.includes(req.headers.origin) || origin.includes(req.headers.host))
}
} |
jQuery.fn.highlight=function(c,e,d,b){var e=e||"highlight";if(d==undefined&&b==undefined){var d="mouseover";var b="mouseout"}else{if(d==b||d!=undefined&&b==undefined){var a=true}}this.each(function(){var f=this.tagName.toLowerCase();if(f=="form"){c=c||"li";var g=jQuery("textarea, select, multi-select, :text, :image, :p... |
import Geometry from './geometry';
import { vec3, mat4 } from 'gl-matrix';
/**
* A cube of size 1x1x1
*/
export class Cube extends Geometry {
constructor() {
const points = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, ... |
/// <reference path="../main.js" />
function viewsGenerate() {
gameViews.viewNavbar = {
player: player,
dayCount: dayCount,
dayTimerToggle: dayTimer.timer.myToggle,
//dayTimer: dayTimer,
food: player.cityCapital.food,
population: player.cityCapital.population,
... |
var fs = require('fs');
var crypto = require('crypto')
var algorithm = 'aes-256-gcm'
var password = process.env.FIREBASE_PASSWORD
var iv = process.env.FIREBASE_IV
function encrypt(text) {
var cipher = crypto.createCipheriv(algorithm, password, iv)
var encrypted = cipher.update(text, 'utf8', 'hex')
encrypted += ... |
import React, {Component} from "react"
import {HBox, VBox, Spacer} from "appy-comps";
import {Input, ListView, Scroll, Toolbar} from './GUIUtils'
import RemoteDB from "./RemoteDB";
export default class FileViewer extends Component {
constructor(props) {
super(props);
this.db = new RemoteDB("files"... |
module.exports = function( Gibber ) {
var GE,
$ = Gibber.dollar //require( './dollar' )
var Browser = {
demoColumn: null,
userFilesLoaded: false,
setupSearchGUI : function() {
var btns = $( '.searchOption' )
for( var i = 0; i < btns.length; i++ ) {
!function() {
... |
'use strict';
const dotenv = require('dotenv');
const webpack = require('webpack');
const HTMLPlugin = require('html-webpack-plugin');
const CleanPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
dotenv.load();
const production = process.env.NODE_ENV === 'pro... |
const cleanEcrImages = require('./clean_ecr_images/index');
module.exports.handle = (event, context, callback) => {
console.log(event);
cleanEcrImages(event).then(() => {
callback(null, {});
}).catch(e => {
console.error(e);
});
};
|
'use strict';
var mongoose = require('mongoose');
var commentsSchema =
new mongoose.Schema({
userId: {type: String, required: true},
groupId: {type: String, required: true},
isActive: {type: Boolean, default: true},
createdOn: {type: Date, default: Date.now()},
text: {type: String, req... |
import {
getVersions,
retrievePackageJson,
writePackageJson,
getBabelDependencies,
installDependencies,
copyTemplate,
} from '../../lib/helpers';
export default async (npmOptions, { storyFormat = 'csf' }) => {
const [storybookVersion, actionsVersion, linksVersion, addonsVersion] = await getVersions(
... |
/**
* Module dependencies.
*/
var express = require('express'),
// routes = require('./routes'),
repl = require("repl"),
http = require('http'),
path = require('path'),
stylus = require('stylus'),
fluidity = require('fluidity'),
cons = require('consolidate'),
swig = require('swig'),
util = require('util');... |
require('./stripe');
|
game.Tree = me.AnimationSheet.extend({
init : function() {
this.parent(me.game.viewport.width / 2 - 128, me.game.viewport.height - 512 - 50, me.loader.getImage('tree'), 256, 512);
this.addAnimation('idle', [2], 1);
this.addAnimation('wobble', [2,3,4,3,2,1,0,1,2,3,4,3,2,1,0,1,2], 2);
this.setCurrentAni... |
'use strict';
let Gerencianet = require('gn-api-sdk-node');
let options = require('../../credentials');
let params = {
id: "95"
}
let gerencianet = new Gerencianet(options);
gerencianet.pixGenerateQRCode(params)
.then((resposta) => {
console.log(resposta);
})
.catch((error) => {
console.... |
"use strict";
/**
*
* Parse
*
*/
const _toArray = require('lodash.toarray')
module.exports = function (config) {
// parse loader
[
'loaders',
'preLoaders',
'postLoaders'
].forEach(function (key) {
config.module[key] = _toArray(config.module[key])
})
// parse plugin
config.plugins = ... |
var clickX = new Array();
var clickY = new Array();
var clickDrag = new Array();
var paint;
var context ;
var canvasWidth = 600
var canvasHeight = 300;
var canvas;
var canvasDiv;
//Color
var curColor = "#000000";
var clickColor = new Array();
//Size
var clickSize = new Array();
var curSize = 10;
function initializ... |
import React from 'react'
import { ResponsiveCalendarCanvas, calendarCanvasDefaultProps } from '@nivo/calendar'
import { generateDayCounts } from '@nivo/generators'
import { ComponentTemplate } from '../../components/components/ComponentTemplate'
import meta from '../../data/components/calendar/meta.yml'
import mapper ... |
import React from 'react'
import { render } from 'react-dom'
import App from '../../cra-template-bs/template/src/App'
render(<App />, document.querySelector('#demo'))
|
var age_groups,items,follow_up_triggers,auto_order_triggers,customers,devices;
$(document).ready(function() {
if ($("select.sexes").length) {
init_input_space("sexes",function (data) {
var select = $("select.sexes")
select.empty()
select.append('<option value="" disabled selected>性別</option>')
... |
/**
* @class Resizer
* @author Bruno SIMON / http://bruno-simon.com
*/
B.Tools.Ticker = B.Core.Event_Emitter.extend(
{
static : 'ticker',
options :
{
auto_run : true
},
/**
* Initialise and merge options
* @constructor
* @param {object} options Properties to merge wi... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
var db = require('../config').db(mongoose);
var Publisher = require('../models/publisher.js').make(Schema, mongoose);
//
// list
//
exports.index = function(request, response) {
response.contentType('application/json');... |
var require = {
baseUrl: 'js'
}
|
var class_tempo_test_1_1_tests_1_1_ref_count_test =
[
[ "ListCellSelectRefCount", "class_tempo_test_1_1_tests_1_1_ref_count_test.html#ac02144aeb6b307640f0df07298d43d3c", null ],
[ "RefCountHelpersReleaseRange", "class_tempo_test_1_1_tests_1_1_ref_count_test.html#ad71a331eddc1d0d97673817f2a9c550a", null ],
[... |
with(require('./helpers')) {
describe('A node attribute', function() {
it('can be read', function() {
// reading a node is implied during all tests
var doc = new libxml.Document();
elem = doc.node('name');
new libxml.Attribute(elem, 'to', 'wongfoo');
assert.equal('wongfoo', elem.attr('to').value(... |
import Component from '@ember/component';
import events from '../../utils/global-event-handlers';
import layout from '../../templates/components/mdc-card/primary';
export default Component.extend({
//region Ember Hooks
layout,
tagName: 'section',
classNames: ['mdc-card__primary'],
attributeBindings: [...even... |
var assert = require("assert");
var math = require("../lib/math.js");
describe("math", function() {
describe(".sinh", function() {
it("RubyのMath.sinhと同じ動きをすること", function() {
assert(Math.abs(math.sinh(-2.0) - -3.6268604078470186) < 1e-15);
assert(Math.abs(math.sinh(-1.0) - -1.1752011936438014) < 1e-... |
(function(c){var b={inEffect:{opacity:"show"},inEffectDuration:600,stayTime:3E3,text:"",sticky:false,type:"notice",position:"top-right",closeText:"",close:null};var a={init:function(d){if(d)c.extend(b,d)},showNotify:function(f){var g={};c.extend(g,b,f);var j,e,d,i,h;j=!c(".notify-container").length?c("<div></div>").add... |
import { renderComponent , expect } from '../test_helper';
import Entry from '../../src/components/entry';
describe('Entry' , () => {
let component;
beforeEach(() => {
component = renderComponent(Entry);
});
it('contains an input field', () => {
expect(component.find('textarea')).to.exist;
});
i... |
'use strict';
//route for getting all stocks for portfolio
const express = require('express');
const router = express.Router();
const portfolioCtrl = require("../ctrlrs/portfolioCtrl")
//queries db and sends back data as json to /api/portfolio route
router.get("/api/portfolio", portfolioCtrl.getAllStock);
//updates db... |
/**
* 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.
*
* This program is dist... |
/**
* @file 首页数据仓库
* @author dongkunshan(windwithfo@yeah.net)
*/
import {
action,
computed,
observable
} from 'mobx';
import fetch from 'isomorphic-fetch';
class {{{Name}}}State {
@observable list = [];
constructor(data) {
this.list = data || [];
}
@action fetchData() {
fetch('/mock/test')
... |
var _ = require('lodash');
var chai = require('chai');
var fs = require('fs');
var path = require('path');
var sinon = require('sinon');
var Formatter = require('../lib/formatter');
var Logger = require('../lib/logger');
chai.use(require('chai-string'));
var assert = chai.assert;
var getErrorMsgByLine = function(li... |
/**
* `tasks/config/sync`
*
* ---------------------------------------------------------------
*
* Synchronize files from the `assets` folder to `.tmp/public`,
* smashing anything that's already there.
*
* For more information, see:
* https://sailsjs.com/anatomy/tasks/config/sync.js
*
*/
module.exports = fu... |
'use strict';
const Gpio = require('../onoff').Gpio;
const assert = require('assert');
const button = new Gpio(4, 'in', 'rising', {
debounceTimeout : 10
});
let count = 0;
assert(button.direction() === 'in');
assert(button.edge() === 'rising');
console.info('Please press button connected to GPIO4 5 times...');
bu... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Helmet } from 'react-helmet';
import { compose } from 'redux';
import TextInput from '../../components/Form/TextInput';
import FormContainer from '../LoginPage/FormContainer';
import Button from '../../compon... |
import { StyleSheet } from 'react-native';
import theme from '../../../theme';
const { margins } = theme;
export default StyleSheet.create({
list: {
width: '100%',
},
containerUSER: {
marginLeft: 60,
marginRight: 20,
marginTop: margins.xs,
marginBottom: margins.xs,
alignItems: 'flex-end... |
var LoginAssistant = Class.create(BaseAssistant, {
initialize: function($super, credentials) {
$super()
this.hidePreferences = true
this.credentials = credentials || new Credentials()
this.api = new Api()
this.triedLogin = false
this.hideLogout = true
},
setup: function($super) {
$sup... |
Rox = {
/* Here we've just got some global level vars that persist regardless of State swaps */
score: 0,
/* If the music in your game needs to play through-out a few State swaps, then you could reference it here */
music: null,
/* Your game can check Rox.orientated in internal loops to know if i... |
version https://git-lfs.github.com/spec/v1
oid sha256:02ee2312d4c44d6b196d6a1194fe5039c2e156a5119113aae34d80d685ec578b
size 2486
|
module.exports = {
replaceNewlines: text => text.replace(/\n+(?!$)/g, ' '),
formatSigilText: sigilText => {
return sigilText.replace(/^%/, '%25').slice(0, 8) + '...'
},
// https://github.com/joypixels/emojione/issues/644
removeBadBytes: text =>
text
.split('')
.filter(f => f.codePointAt(0)... |
//download.js v3.1, by dandavis; 2008-2014. [CCBY2] see http://danml.com/download.html for tests/usage
// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.UR... |
const dataTableDriverFactory = component => ({
clickRowByIndex: index => component.$$('tbody tr').get(index).click(),
getRowTextByIndex: index => component.$$('tbody tr').get(index).getText(),
element: () => component
});
export default dataTableDriverFactory;
|
/**
* Copyright (C) 2010-2015 KO GmbH <copyright@kogmbh.com>
*
* @licstart
* This file is part of WebODF.
*
* WebODF is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License (GNU AGPL)
* as published by the Free Software Foundation, either version 3 o... |
version https://git-lfs.github.com/spec/v1
oid sha256:912159daaef9ef3f33150924ba16d2b73ffb872fe75e9db472e944acdca08a76
size 280900
|
#!/usr/bin/env node
/*====================================================*
| SORT PACKAGE.JSON |
| |
| I think documentation order matters and given that |
| NPM docs regarding `package.json` follow an order, |
| I wanted to resp... |
// 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... |
// Copyright 2014 LastLeaf
'use strict';
fw.main(function(pg){
fw.loadingLogo.show();
// parse servers
var serverStrs = app.config.get('servers');
var servers = [];
for(var i=0; i<serverStrs.length; i++) {
var str = serverStrs[i];
var match = str.match(/\{([0-9]+)\,([0-9]+)\}/);
if(!match) servers.push(str)... |
function booksPublishController($scope, $routeParams, $http) {
$scope.onLoad=onLoad;
$scope.title={};
$scope.session = {};
onLoad();
function onLoad(){
var text;
var signed;
console.log("in on load");
$http.post('/userManage/getSessionInfo')
... |
var React = require('react')
// takes react out of global
// DOM components
var div = React.DOM.div
var h1 = React.DOM.h1
// Custom components
var MyTitle = React.createClass({
// render: function (){} alternative ES6 syntax
render () {
return (
div(null,
h1({style: {color: this.props.color}}, t... |
// libs
import React, {PropTypes} from 'react';
import styles from './index.css';
export default function ProgressBar({children, pctComplete, backgroundColor}) {
return (
<div className={styles.component}>
<div style={{backgroundColor, width: `${pctComplete}%`}} className={styles.body}>
{children}
... |
export const CLIENT_CONNECT = 'CLIENT_CONNECT';
export const CLIENT_ERR = 'CLIENT_ERR';
export const CLIENT_CONNECT_FAILURE = 'CLIENT_CONNECT_FAILURE';
export const CLIENT_DISCONNECT = 'CLIENT_DISCONNECT';
export const STATS_UPDATE_DEVICES = 'STATS_UPDATE_DEVICES';
export const STATS_UPDATE_DEVICEIDS = 'STATS_UPDATE_... |
version https://git-lfs.github.com/spec/v1
oid sha256:25ccefb37f263139fbe715b78715501e0c93686edf2b10a981c8c39a892355c3
size 190701
|
/* jshint -W024 */
/* jshint expr:true */
var webdriverjs = require('../index'),
assert = require('assert');
describe('my webdriverjs tests', function(){
this.timeout(99999999);
var client = {};
before(function(){
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'pha... |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33s-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3.36 1.54-5.31-.01-1.89-.55-3.67-... |
/*
In NativeScript, the app.ts file is the entry point to your application.
You can use this file to perform app-level initialization, but the primary
purpose of the file is to pass control to the app’s first module.
*/
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("./bundle-confi... |
'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var imageuploaders = require('../../app/controllers/imageuploaders.server.controller');
var multipart = require('connect-multiparty')();
// Imageuploaders Routes
app.route('/imageuploaders')
.... |
myApp.factory('InitializeApp', ['$resource',
function($resource){
return $resource('http://dev2.cabotprojects.com/asthma/webservices?method=initializeApp');
}]);
|
module.exports = {
type : String,
enum : [ 'BOISSON', 'NOURRITURE', 'TOILETTES'],
default : 'BOISSON'
};
|
'use strict';
module.exports = function(grunt) {
// Unified Watch Object
var watchFiles = {
serverViews: ['app/views/**/*.*'],
serverJS: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js'],
clientViews: ['public/modules/**/views/**/*.html'],
clientJS: ['public/js/*.js', 'public/modules/**/*.js'],
... |
/**********************************************************
* Copyright (c) SESHENGHUO.COM All rights reserved *
**********************************************************/
/*!
* Crypto-JS v1.1.0
* http://code.google.com/p/crypto-js/
* Copyright (c) 2009, Jeff Mott. All rights reserved.
* http://code.googl... |
// GA addon for convnet.js
(function(global) {
"use strict";
var Vol = convnetjs.Vol; // convenience
// used utilities, make explicit local references
var randf = convnetjs.randf;
var randn = convnetjs.randn;
var randi = convnetjs.randi;
var zeros = convnetjs.zeros;
var Net = convnetjs.Net;
var maxm... |
import { hash, compare, genSaltSync} from "bcrypt";
const saltRounds = 10;
/**
* Generate crypt and decrypt
* @param plainString
*/
exports.getHash = (plainString) => {
return hash(plainString, saltRounds)
.then((hash) => hash)
.catch((e) => console.log(e.message));
}
exports.getSalt = (lengt... |
var tape = require("tape"),
getCurrentStyle = require("..");
tape("getCurrentStyle([element : Element]) should return elements current styles", function(assert) {
var element = document.createElement("div");
element.style.marginLeft = "10px";
document.body.appendChild(element);
assert.equal(get... |
var freeice = require('freeice');
var _ = require('eakwell');
var Socket = require('./socket.js');
var Storage = require('./storage.js');
var Broadcast = function(broadcastName, roomName, keepVideos) {
var self = this;
var stream = _.deferred();
var video;
var senderPeer;
var senderId = _.deferred();
va... |
import ElementSerializer from 'ember-fhir/serializers/element';
export default ElementSerializer.extend({
attrs: {profile: { embedded: 'always' }
}
}); |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... |
// @flow
import * as React from 'react';
import { connect } from 'react-redux';
import styles from './NavigationBar.scss';
import likedColorsSelector from '../../redux/selectors/likedColorsSelector';
import ExportButton from '../export/ExportButton';
type Props = {
likedColors: Array<Object>,
};
class NavigationBar... |
var fs = require('fs')
module.exports = {
NODE_ENV: '"production"',
APP_VERSION: JSON.stringify(JSON.parse(fs.readFileSync('./package.json')).version)
}
|
if (typeof T === 'undefined') require('../setup');
T('clone', function () {
function t(expression) {
T.assert(expression);
}
Decimal.config({
precision: 10,
rounding: 4,
toExpNeg: -7,
toExpPos: 21,
minE: -9e15,
maxE: 9e15
});
var D1 = Decimal.clone({ precision: 1 });
var D2 =... |
'use babel';
'use strict';
var fs = require('fs-extra');
var temp = require('temp');
var specHelpers = require('./spec-helpers');
describe('Visible', function() {
var directory = null;
var workspaceElement = null;
temp.track();
beforeEach(function() {
atom.config.set('build.buildOnSave', false);
at... |
'use strict';
angular.module('discover').filter('relativeDate', function(){
return function(dateStr){
var date = new Date(dateStr),
//var date = new Date((dateStr || "").replace(/-/g, "/").replace(/[TZ]/g, " ")),
diff = (((new Date()).getTime() - date.getTime()) / 1000),
day_diff = Math.floor... |
// Regular expression that matches all symbols in the `Glagolitic` script as per Unicode v6.2.0:
/[\u2C00-\u2C2E\u2C30-\u2C5E]/; |
var async = require('async'),
PropValidator = require('./propvalidator');
/**
* Run validation functions.
* @param {Object} doc
* @param {Object} functions
* @param {boolean} parallel
* @param {function} done
*/
function validate(doc, functions, parallel, done) {
var tasks = [];
for (var key in funct... |
/* global define */
define([
'backbone',
'marionette',
'buses/event-bus',
// Behaviors
'behaviors/search-behavior',
// Templates
'templates/forms/navigation-search-template'
/* jshint unused: false */
], function (Backbone, Marionette, EventBus) {
'use strict';
var SearchView = Backbone.Marionette... |
'use strict';
// lesson-groups-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const lessonGroupsSchema = new Schema({
name: { type: String, required: true },
dates: [Date],
l... |
'use strict';
exports.up = function(knex, Promise) {
return Promise.all([
/*******************************************************
AUCTIONS TABLE
*******************************************************/
knex.schema.createTableIfNotExists('auctions', function(t)... |
/*jshint browserify: true */
var _ = require('underscore');
var Backbone = require('backbone');
var Marionette = require('backbone.marionette');
var $ = Backbone.$;
var Events = require('./events');
var Searchbox = require('./searchbox');
var Content = {};
var NavbarHeaderLayout = Marionette.LayoutView.extend({
te... |
let models = require('../models');
const isNullOrUndefinedOrNaN = (value) => {
if (typeof value === 'null' ||
typeof value === 'undefined' ||
Number.isNaN(value)) {
return true;
}
return false;
}
const getJSONDiff = (prev = {}, next = {}) => {
const diffPrev = {};
c... |
class Character {
constructor(x, y) {
this.x = x;
this.y = y;
this.health = 100;
}
damage() {
this.health -= 10;
}
getHealth() {
return this.health
}
toString() {
return "x: " + this.x + " y: " + this.y + " health: " + this.health;
}
}
class Player extends Character {
construc... |
import deepFreeze from 'deep-freeze';
import { ActionPrefixes, ReduxNames } from '../../constants';
import ucastniciTestData, {
AKTUALNI_DATUM_KONANI,
} from '../../entities/ucastnici/ucastniciTestData';
import { SortDirTypes } from '../../sort';
import {
createKategorieFilterChange,
createTextFilterChange,
} fro... |
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Zimlets
* Copyright (C) 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the Lic... |
(function () {
var toggles = document.querySelectorAll('[data-action="toggle-menu"]');
var nav = document.querySelector('nav');
var main = document.querySelector('main');
var victor = document.getElementById('victor');
Array.from(toggles).forEach(function (node) {
node.addEventListener('click', function (... |
var searchData=
[
['make_5ffuture_5fwith_5fexception',['make_future_with_exception',['../namespacetranswarp_1_1detail.html#a34c09a6639f52048a1e4642d32520783',1,'transwarp::detail']]],
['make_5ffuture_5fwith_5fvalue',['make_future_with_value',['../namespacetranswarp_1_1detail.html#ac5851824847b3e272e5c4b0864706fae',... |
import AbstractList from '../abstract/AbstractList.js';
export default class extends AbstractList {
constructor($injector, $scope, $filter, $WPHCPosts) {
'ngInject';
super($injector, $scope);
this.setType('posts');
this.setTitle();
this.setService($WPHCPosts);
}
}
|
/**
* umd
* ===
*
* Wraps the library into an universal module definition (AMD + CommonJS + Global).
*
* Link: https://github.com/bebraw/grunt-umd
*/
'use strict';
module.exports = function (grunt) {
return {
dist: {
src: '<%= pkg.config.src %>/scripts/chartist-plugin-threshold.js',
dest: '<%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.