code stringlengths 2 1.05M |
|---|
/**
* Module dependencies.
*/
var express = require('express'),
http = require('http'),
path = require('path'),
mongoose = require('mongoose'),
config = require('./config'),
routes = require('./routes/routes');
// connect to local mongodb database
mongoose.connect('mongodb://' + config.MONGODB_IP + '... |
export default {
env: 'dev'
};
|
var xyz = require('xyz-utils')
var tmp = [0, 0, 0]
var tmp1 = [0, 0, 0]
var tmpRGBM = [0, 0, 0, 0]
const clamp = require('clamp')
module.exports = xyzToRGBM
function xyzToRGBM (xyzArray) {
var pixelCount = xyzArray.length / 3
var ret = new Uint8Array(pixelCount * 4)
for (var i = 0; i < pixelCount; i++) {
tmp... |
exports.strength = {
"1": "cjersov3s14fu01832cku6ivc",
"2": "cjertinv814oj0183jx107b9u",
"3": "cjertith714om0183tr2huxiw",
"4": "cjertj05014or0183we74xnsb",
"5": "cjertj34914ov0183sl7kmqm1",
"6": "cjertj5ol14p10183cmzat5y9",
"7": "cjertj8a814p60183av1hlcty",
"8": "cjertjbqr14pc0183uo7656p7",
"9": "cje... |
exports.addDays = function(date, days) {
var newDate = new Date(date);
newDate.setDate(newDate.getDate() + days);
return newDate;
}
|
import '../styles.css';
|
'use strict';
// resolved via hbsfy transform
module.exports = require('./svg.hbs');
|
// TYPE <groups/info>
TEST("The groups's identifier is returned.", function(Query) {
var example = {};
var db = Query.mkdb();
var auth = Query.auth(db);
var id = Query.post(["db/",db,"/groups"],example,auth).id();
var id2 = Query.get(["db/",db,"/groups/",id,"/info"],auth).id();
return Asser... |
/**
* Copyright 2013-2014 Academe Computing Ltd
* Released under the MIT license
* Author: Jason Judge <jason@academe.co.uk>
* Version: 1.2.1
*/
/**
* jquery.maxsubmit.js
*
* Checks how many parameters a form is going to submit, and
* gives the user a chance to cancel if it exceeds a set number.
* ... |
define(['src/components/cpu', 'src/components/memory'], function(CPU, Memory) {
var Atari;
Atari = {
CPU: CPU,
Memory: Memory,
init: function init() {
this.attachMemory();
},
attachMemory: function attachMemory() {
CPU.memory = Memory;
}
... |
'use strict';
/*
SQL Challenges framework
Version: 5.0 as of SQL3
Build, check, reset
*/
var workspaceDirectory = '/home/codio/workspace/';
var sqlDir = workspaceDirectory + '.guides/sqltests/';
// var workspaceDirectory = '/Volumes/Seagate Backup Plus Drive/htdocs/MySQL/CodioSQL.Units/sqlx/';
// var sqlDir = worksp... |
module.exports = function ({ canvas, onPan, onZoom, onRotate }) {
let prevX = 0
let prevY = 0
canvas.addEventListener('mousemove', ({clientX, clientY, buttons, which}) => {
if ((buttons | which | 0) & 1) {
onRotate(
(clientX - prevX) / window.innerWidth,
(prevY - clientY) / window.inner... |
var express = require('express')
var router = express.Router()
var path = require('path')
var debug = require('debug')('app:' + path.basename(__filename).replace('.js', ''))
var request = require('request')
var entu = require('./entu')
// GET requests/offers listing
router.get('/:type', function(req, res, ... |
(function(){
angular.module('app')
.directive('newNote', function()
{
return {
templateUrl: "new-note.html",
scope: {
notes: '='
},
controller: NewNoteController
};
function NewNoteController($scope, NoteService)
{
$scope.blankNote = null;
$scope.createNote = createNote;
... |
//嘉福客服模块
var jfCustomerService = {
init: function (service, token) {//初始化
if (!$("#MEIQIA-PANEL-HOLDER").length > 0) {
var isIosProduct = 0; //判断是不是可能出现位移的页面
function jfServiceInit(visibili... |
var system = require('system');
var page = require('webpage').create();
var fs = require('fs');
if (system.args.length === 3) {
console.log('Usage: snap.js <some URL> <view port width> <target image name>');
phantom.exit();
}
var url = system.args[1];
var image_name = system.args[3];
var view_port_width = sys... |
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ var parentJsonpFunction = window["webpackJsonp"];
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ // add "moreModules" to the modules object,
/******/ ... |
var utils = require('jsr-util')
, HashMap = require('../type/hash')
, Constants = require('jsr-constants')
, OK = Constants.OK
, slice = Array.prototype.slice;
// TODO: hincrby
// TODO: hincrbyfloat
// TODO: hscan (much later!)
/**
* Set the string value of a hash field.
*/
function hset(key, field, value... |
/*
* @author paper
*/
function YHAlert(arg){
var obj = arg ||{},
msg = obj.msg || '你没有写提示内容!',
bd = document.getElementsByTagName('body')[0],
time = obj.time || 2000,
way = obj.way == 'leftToRight' ? 'left' : 'top',
$ = function(id){
return typeof id == 'string' ? document.getElementById(i... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
var DBSCAN = require('../lib/index.js').DBSCAN;
var dataset = [
[1, 1], [0, 1], [1, 0],
[10, 10], [13, 13], [10, 13],
[54, 54], [55, 55], [89, 89], [57, 55]
];
var dbscan = new DBSCAN();
var clusters = dbscan.run(dataset, 5, 2);
console.log(clusters);
|
version https://git-lfs.github.com/spec/v1
oid sha256:9d9d8e01a2a7570aca18bc11a453ed5b5fb412ba1fc025a6e2438040d5254ce3
size 22959
|
import React from 'react'
import {connect} from 'react-redux'
import CommentList from './comment-list'
import Vote from './vote'
export default class Question extends React.Component {
render() {
const q = this.props.question.question;
const comments = this.props.question.comments;
return <div className=... |
/**
* Created by vladi on 27-Jan-17.
*/
import {
removeEventListenerById,
suspendEventListenerById,
restoreEventListenerById,
isListenerSuspended,
listenerExists,
addTypeFilter,
addTypeFilters,
resetTypeFilter,
removeTypeFilter,
removeTypeFilters
} from './EventsControl';
expor... |
/**
* User: Jomaras
* Date: 26.09.12.
* Time: 17:24
*/
FBL.ns(function() { with (FBL) {
/*************************************************************************************/
Firecrow.DependencyGraph.DependencyHighlighter = function(htmlContainer, dependencyGraph)
{
(function establishConnection()
... |
app.controller('MainCtrl', function($scope, cachedGames) {
$scope.games = cachedGames.query();
$scope.interval = 5000;
});
|
export default Ember.Route.extend({
model: function() {
return ['orange', 'black', 'purple'];
}
});
|
// flow-typed signature: 944ad0ad35ca446a54ecf5f7ad58eff9
// flow-typed version: <<STUB>>/node-sass_v^3.10.0/flow_v0.35.0
/**
* This is an autogenerated libdef stub for:
*
* 'node-sass'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
... |
'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users');
var prefroshes = require('../../app/controllers/prefroshes');
// Prefroshes Routes
app.route('/prefroshes')
.get(prefroshes.list)
.post(users.requiresLogin, prefroshes.create);
app.route('/prefroshes/:prefrosh... |
/** ********************************************************************************************************************
*
* drawer with left navigation
* @exports {function} initializeDrawer
*
********************************************************************************************************************... |
// This view renders a single issue, which contains sub-views for the reporter, labels, truncated summary, etc.
var IssueView = Backbone.View.extend({
className: 'issuelist-item-view',
render: function() {
// Append labels to this view.
var labels = this.model.get('labels');
var labelView = new Labe... |
define(['jquery', 'moment', 'bootstrap', 'datatables.net', 'datatables.net-bs'], function ($, moment) {
function PlansList(container) {
var that = this;
container = $(container);
var table;
function _init() {
table = container.DataTable({
columns: [
... |
// Require dependencies
const events = require('events');
const { writeFile } = require('fs');
const { promisify } = require('util');
const { join } = require('path');
// Create async writeFile
const asyncWrite = promisify(writeFile);
/**
* Interface for Expr.constructor
* @interface IExprConstructor
*/
const IExp... |
import { connect } from 'react-redux';
import { toggleShoppingItem } from '../actions/shoppingItems';
import ShoppingItemList from '../components/ShoppingItemList';
const mapStateToProps = (state) => {
return {
shoppingItems: state.shoppingItems
};
};
const mapDispatchToProps = (dispatch) => {
ret... |
import * as types from '../../constants';
import update from 'react/lib/update';
export default function currentPost(state = {
lastFetched: null,
isLoading: false,
error: null,
data: {},
}, action) {
switch (action.type) {
case types.LOAD_POST_REQUEST:
return update(state, {
isLoading: { $s... |
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import SetForm from 'app/shared_features/set_card/expanded/SetForm';
import * as Actions from './OneRMEditSetFormActions';
import * as DateUtils from 'app/utility/DateUtils';
const mapStateToProps = (state, ownProps) => {
const rpe... |
const Promise = require('../../src');
const assert = require('chai').assert;
const sinon = require('sinon');
describe('flow control - #for', () => {
context('instance', () => {
it('when called 0 to 10, i variable must be from 0 to 10', done => {
let val = 0;
Promise.resolve()
.for(0, 10, (i) => assert.equ... |
var RaceData = {
human: {
name: 'Human',
physical: 6,
personal: 6,
mental: 4,
magical: 0,
genders: 'male|female',
},
dwarf: {
name: 'Dwarf',
physical: 8,
personal: 0,
mental: 4,
magical: 4,
genders: 'male',
defenses: { moist:5 },
},
elf: {
name: 'Elf... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84l3.96-5.58c.25-.35.25-.81 0-1.16l-3.96-5.58z" />
, 'LabelRounded');
|
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { forceCheck } from 'react-lazyload'
import { getFiles, thumbnailGenerated, makeFilesLoadedSelector } from 'ducks/files'
import { openFileModal } from 'ducks/fileModal'
import SingleSelect from 'containers/SingleSelect'
import Multi... |
'use strict';
const keyBy = require('lodash/keyBy');
const CapturesCreateValidator = require('../../../validators/captures/create');
const CapturesDeleteValidator = require('../../../validators/captures/delete');
const Controller = require('./controller');
const Pokemon = require('../../.... |
!function(window,stik){stik.boundary({as:"tplWrapper",from:"all",to:function($template){if(window.hasOwnProperty("MooTools"))return window.document.id($template);if(window.hasOwnProperty("Zepto"))return window.Zepto($template);if(window.hasOwnProperty("jQuery"))return window.jQuery($template);throw"no DOM library found... |
function renderTOC(toc) {
$('#toc').html(
parseList(toc, 0)
);
}
function renderDoc(path) {
window.md = window.md || window.markdownit()
.use(window.markdownitContainer)
.use(window.markdownitFootnote)
.use(window.markdownitIns)
.use(window.markdownitMark)... |
const mail = require('../config').mail
const nodemailer = require('nodemailer')
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: mail
});
// transporter.sendMail(mailOptions, (error, info) => {
// if (error) {
// return console.log(new Date() + ' ' + error);
// }
// })
module.expo... |
/**
* Controller used to render the notification icon in the mobile app decoration
*
* @@source_header
*
* --
*
* This file is part of the focus-app-demonstrator package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
... |
(function() {
var checkVersion = Dagaz.Model.checkVersion;
Dagaz.Model.checkVersion = function(design, name, value) {
if (name != "koom-valley-goal") {
checkVersion(design, name, value);
}
}
var checkGoals = Dagaz.Model.checkGoals;
Dagaz.Model.checkGoals = function(design, board, player) {
... |
enyo.kind({
name : "menuPanel",
kind: "FittableRows",
classes: "panel",
components: [
{kind: "onyx.Toolbar", name : "title", content: "Menü"},
{kind: "menuList", fit:true},
{kind: "onyx.Toolbar", components: [
{kind: "onyx.Grabber"},
// {kind: "onyx.Button", content: "Einstellungen", ontap: "openSettings... |
/**
* Module dependencies.
*/
const express = require('express');
const compression = require('compression');
const session = require('express-session');
const bodyParser = require('body-parser');
const logger = require('morgan');
const chalk = require('chalk');
const errorHandler = require('errorhandler');
const lus... |
import {
BaseCustomElement,
reflectPropertiesToAttributes,
mdlUpgrade
} from '../utils';
class CardActions extends BaseCustomElement {
createdCallback() {
this.classList.add('mdl-card__actions');
}
attributeChangedCallback(attrName, oldVal, newVal) {
this.classList.toggle('mdl-card--border', th... |
import { assign } from '@ember/polyfills';
import { A } from '@ember/array';
import { Promise } from 'rsvp';
import { run } from '@ember/runloop';
import Evented from '@ember/object/evented';
import Service from '@ember/service';
import { debug } from '../utils';
import {
namespace,
tabId,
tabIdKey,
shouldInval... |
/**
* Findout current context.
* @function ctx
*/
'use strict'
const ctx = require('apeman-ctx')
module.exports = ctx;
|
import React from 'react';
import IconBase from '@suitejs/icon-base';
function DvBootstrap(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M6 37.358V10.642A4.642 4.642 0 0 1 10.642 6h26.716A4.642 4.642 0 0 1 42 10.642v26.716A4.642 4.642 0 0 1 37.358 42H10.642A4.642 4.642 0 0 1 6 37.358... |
/*
* =============================================================
* elaostrap
*
* (c) 2015 Jeremy FAGIS <jeremy@fagis.fr>
* =============================================================
*/
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if... |
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');
describe('generator-dzbot:app', function () {
before(function () {
return helpers.run(path.join(__dirname, '../generators/app'))
.withPrompts({someAnswer: true})
.toPromise();
});
... |
export const ic_power_input_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"},"children":[]}]}; |
describe('avoidSelect()', function() {
'use strict';
var window, document, utils,
PlainOverlay, traceLog, pageDone,
IS_TRIDENT,
overlayElm, overlayDoc,
pBefore, pTarget, pAfter, face1, face2;
function setSelection(startElement, startIndex, endElement, endIndex) {
var selection = ('getSelecti... |
import './adapter';
import './commit';
import './configLoader';
import './init';
import './staging';
import './util'; |
'use strict;'
angular.module('kaptureApp')
.filter('percentage', ['$filter', function ($filter) {
return function (input, decimals) {
return $filter('number')(input * 100, decimals) + '%';
};
}]);
|
import "../../../data/icon-16.png";
browser.devtools.panels.create(
browser.i18n.getMessage("name"),
"assets/images/icon-16.png",
"devtools/panel/index.html"
);
|
// Karma configuration
// http://karma-runner.github.io/0.12/config/configuration-file.html
// Generated on 2015-11-25 using
// generator-karma 1.0.0
module.exports = function(config) {
'use strict';
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: tr... |
var Component = require('elements-core').Component;
class Text extends Component {
render(state, content) {
let tags = Text.expose().tags;
if (!state.content) {
state.content = 'Text goes here';
}
if (!state.tag) {
state.tag = 'p';
} else {
state.tag = tags[state.tag];
}
... |
"use strict";
/*globals ajaxify, config, utils, app, socket*/
$(document).ready(function () {
setupProgressBar();
animateCategoryCards();
setupSideBar();
setupWavesEffect();
setupFloatingLabels();
setupMenus();
setupChatSearch();
setupCheckBox();
function setupProgressBar() {
$(window).on('action:ajaxify.... |
var AspxShipmentsManagement = {
"Shipping Method ID":"送货方式标识",
"Shipping Method Name":"运输方式名称",
"Order ID":"订单ID",
"Ship to Name":"船名",
"Shipping Cost":"运费",
"Actions":"操作",
"View":"视图",
"No Records Found!":"没有找到记录!",
"Package Details":"软件包的详细资料",
"Shipment Date:":"发货日期:",
"Shipments Items:":"出货量的项目:",
"Ite... |
/*
* angular-cache
* http://github.com/jmdobry/angular-cache
*
* Copyright (c) 2013 Jason Dobry <http://jmdobry.github.io/angular-cache>
* Licensed under the MIT license. <https://github.com/jmdobry/angular-cache/blob/master/LICENSE>
*/
module.exports = function (grunt) {
'use strict';
// Project configu... |
/* Copyright (C) 2011-2014 Mattias Ekendahl. Used under MIT license, see full details at https://github.com/developedbyme/dbm/blob/master/LICENSE.txt */
/**
* Global object for andeling id.
*/
dbm.registerClass("dbm.core.globalobjects.idmanager.IdManager", "dbm.core.globalobjects.GlobalObjectBaseObject", function(obj... |
define([
"jquery",
"utils",
"lib/pusher.min"],
function($, utils) {
BaseController = function(){
control = this;
this.fieldsToLoad = [];
this.permissions = [];
};
function BaseController_genericOnLoad(debug){
this.loadData(debug);
}
function BaseController_loadData(debug){
var copy = this;
var notificatio... |
/* jshint camelcase: false */
module.exports = function (cfg, db) {
var _ = require('lodash'),
services = require('./services')(cfg, db),
userMod = require('./users')(cfg, db),
fileMod = require('./file')(cfg, db);
function GDrive(userId) {
return userMod.Repo.getById(u... |
var browserify = require( 'gulp-browserify' ),
gulp = require( 'gulp' ),
buffer = require( 'vinyl-buffer' ),
uglify = require( 'gulp-uglify' ),
rename = require( 'gulp-rename' ),
insert = require( 'gulp-insert' );
gulp.task( 'client', function(){
var out = gulp.src( './scripts/gibber/interface.li... |
import React from 'react';
import { mount } from 'enzyme';
import localStorageMock from '../__mocks__/localStorageMock';
import * as data from '../__mocks__/mockData';
import {
MessageAreaContainer
} from '../../dev/js/containers/MessageAreaContainer.jsx';
window.localStorage = localStorageMock;
jest.mock('react-... |
{
var config = oneEventLoopTestConfig(three);
config.startShouldSetResponder.captured.grandParent = {
order: 0,
returnVal: false
};
config.startShouldSetResponder.captured.parent = {
order: 1,
returnVal: false
};
config.startShouldSetResponder.captured.child = {
order: 2,
returnVal: ... |
/**
* 二元操作表达式
* @abstract
*/
define( function ( require, exports, modules ) {
var kity = require( "kity" );
return kity.createClass( 'BinaryExpression', {
base: require( "expression/compound" ),
constructor: function ( firstOperand, lastOperand ) {
this.callBase();
... |
"use strict";
let logs = require("../logs");
let assert = require("assert");
describe("logs DB collection", function () {
let userID = 1;
let log = {
title: "Food Journal"
};
let logID = "";
it("should create a log", function () {
return logs.createLog(global.db,userID,log).then(function (savedLog) {
asse... |
'use strict'
const express = require('express');
const router = express.Router();
const auth = require('../controllers/authController');
/* GET users listing. */
router.post('/login', auth.login);
router.post('/register', auth.register);
module.exports = router;
|
import React from "react"
import {Heading, CodePane, Text, Appear} from "spectacle"
const colorSchemes = {
a: {
textColor: 'primary',
bgColor: 'black'
},
b: {
textColor: 'secondary',
bgColor: 'secondary'
}
}
export default ({name, es6, es5, scheme, codeSize = 18}) => {
const colorScheme = co... |
// Separate Numbers with Commas in JavaScript **Pairing Challenge**
// I worked on this challenge with: Tiffany Larson.
// Pseudocode
// Create a new container.
// Remove back number from original container and add it to the front of the new container.
// Do this three times or until original container is empty.
// ... |
import * as types from '../mutation-types';
import * as api from '@/api';
let state = {
content: '',
};
let actions = {
getBlogContent ({ commit }, payload) {
api.getBlogContent(payload.blogName)
.then((data) => {
commit({
type: types.OPEN_SOME_BLOG,
... |
module.exports = {
main: {
files: [{
expand: true,
cwd: '<%= app %>/fonts',
src: ['**'],
dest: '<%= build %>/fonts'
}, {
expand: true,
cwd: 'content/projects/videos',
src: ['**'],
dest: '<%= build %>/videos/projects'
}]
}
};
|
var User = require('./fixtures/User');
var should = require('should');
describe('User', function(){
describe('#save()', function(){
it('should save without error', function(done){
var user = new User('Luna');
// user.save takes a callback -
// remember mocha's done will accept a potential err... |
// 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... |
/*======================================================
************ Picker ************
======================================================*/
/* global $:true */
+ function($) {
"use strict";
//Popup 和 picker 之类的不要共用一个弹出方法,因为这样会导致 在 popup 中再弹出 picker 的时候会有问题。
$.openPopup = function(popup, className) ... |
var margin = {
top: 50,
right: 62,
bottom: 100,
left: 50
},
dim = Math.min(parseInt(d3.select("#chart").style("width")), parseInt(d3.select("#chart").style("height"))),
width = dim - margin.left - margin.right,
height = dim - margin.top - margin.bottom;
//width = 700 - ma... |
// 定一个 reducer
function reducer(state, action) {
/* 初始化 state 和 switch case */
if (!state) {
return {
title: {
text: 'React.js 小书',
color: 'red'
},
content: {
text: 'React.js 小书内容',
color: 'blue'
... |
var fs = require('fs');
var path = require('path');
var recursive = require('recursive-readdir-sync');
var git = require('simple-git');
var posts_data = __dirname + '/../data/posts_dates.json';
createFile(posts_data);
var listOfPosts = recursive(__dirname + '/../posts/');
var cleanedListOfPosts = listOfPosts.filter(... |
import React from "react";
import { shallow } from "enzyme";
import App from "../../renderer/Components/App";
import EmojiPad from "../../renderer/Components/EmojiPad";
test("<App /> should have div with <EmojiPad />", () => {
const app = shallow(<App />);
expect(
app.contains(
<div id="app-container" cl... |
require([
"esri/Map",
"esri/views/SceneView",
"dojo/domReady!"
], function(Map, SceneView) {
var map = new Map({
basemap: "streets",
ground: "world-elevation"
});
var view = new SceneView({
container: "viewDiv", // Reference to the DOM node that will contain the view
map: map // References... |
'use strict';
const { readFileSync, readdirSync, writeFileSync } = require('fs');
// Get all markdown stubs
const header = readFileSync('bundler/header.md', 'utf-8');
const badges = readFileSync('bundler/badges.md', 'utf-8');
const installation = readFileSync('bundler/installation.md', 'utf-8');
const api = readFileS... |
// JavaScript Document
//Override the default setting
$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition = 'slide';
}); |
'use strict';
/** Module for browsing transfer endpoints. */
angular.module('stork.transfer.browse', [
'ngCookies'
])
.service('history', function (stork) {
var history = [];
var listeners = [];
this.history = history;
this.fetch = function (uri) {
stork.history(uri).then(function (h) {
history ... |
const NODE_ENV = process.env.NODE_ENV || 'development'
module.exports = {
/** The environment to use when building the project */
env: NODE_ENV,
/** The full path to the project's root directory */
basePath: __dirname,
/** The name of the directory containing the application source code */
srcDir: 'src',
... |
var config = require('../config').logger;
var bunyan = require('bunyan');
var logstash = require('bunyan-logstash-tcp');
module.exports = function createLogger(){
var log = bunyan.createLogger({
name: 'rabbitmq-connector',
streams: [
{
type: 'raw',
stream: logstash.createStream({
host: config.logStash... |
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Web Client
* Copyright (C) 2006, 2007, 2008, 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 obt... |
Sammy('#main', function() {
this.get('/', function() {
var zis = this;
this.something = true;
this.title = 'Hello!';
this.name = this.params.name;
// render the template and pass it through handlebars
this.partial('templates/home.hb');
s... |
alert(2) |
'use strict';
var assert = require('assert');
describe('basic', function () {
it('should compile a Smash module', function () {
var core = require('../!./fixtures/core.js');
assert.equal('string', typeof(core.hello));
assert.equal('world', core.hello);
});
});
|
Package.describe({
name: 'rocketchat:livechat',
version: '0.0.1',
summary: 'Livechat plugin for Rocket.Chat'
});
Package.registerBuildPlugin({
name: 'Livechat',
use: [],
sources: [
'plugin/build-livechat.js'
],
npmDependencies: {
'shelljs': '0.5.1'
}
});
Npm.depends({
'ua-parser-js': '0.7.10'
});
Packa... |
(function () {
"use strict";
var PLUGIN_ID = require("./package.json").name,
MENU_ID = "Blendin generator",
MENU_LABEL = "$$$/JavaScripts/Generator/Blendin generator/Menu=Blendin generator";
var _generator = null,
_currentDocumentId = null,
_config = null;
var fs =... |
import selectorParser from "postcss-selector-parser"
import {
isKeyframeRule,
isStandardRule,
isStandardSelector,
isStandardTypeSelector,
report,
ruleMessages,
validateOptions,
} from "../../utils"
export const ruleName = "selector-type-case"
export const messages = ruleMessages(ruleName, {
expected: ... |
// Chord types
const SoundFontType = {
STANDARD_LIGHT: 0,
STANDARD_HEAVY: 1,
// NES_STYLE: 2,
SNES_STYLE: 2,
// OPL2FM_STYLE: 4,
GXSCC_STYLE: 3,
// GB_STYLE: 6,
getSamplesPrefix: function(type) {
switch (type) {
case SoundFontType.STANDARD_LIGHT:
... |
import { expect } from 'chai';
import FormLogic from '../src';
describe('Field', () => {
it('creates fields with presence validation', () => {
const field = FormLogic.Field({ presence: true });
expect(field.validations.length).to.equal(1);
expect(field.validations[0].validationName).to.equal('presence'... |
/**
* This file is a part of hale_aloha_dashboard.
*
* Created by Cam Moore on 11/12/15.
*
* Copyright (C) 2015 Cam Moore.
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.