code stringlengths 2 1.05M |
|---|
'use strict';
/**
* QueueInit
*
* 通常の配列ではなく、変数番号での管理となる。
* head, tailには変数番号が入る(インデックスではない)
* stackと違い、maxは変数領域の最大数(max + 1)が入る
* [head][tail][max][tmp][0][][][][MAX - 1][MAX](判定用に1個余分に確保する)
*/
const Command = require('../../command');
class QueueInit extends Command {
run(base, max) {
this.writeLog(`bas... |
const config = require('../config');
const path = require('path');
const express = require('express');
// default port where dev server listens for incoming traffic
const port = process.env.PORT || config.build.port;
const app = express();
// serve pure static assets
const staticPath = path.posix.join(config.build.a... |
'use strict';
const {
ok: assert,
deepStrictEqual
} = require('assert');
const {
getQLType
} = require('./getqltype');
const {
getSubType
} = require('./subtype');
const {
memoize
} = require('./memoize');
const {
types
} = require('./types');
// Uppercase the first letter and remove final 's' if ther... |
require('platform/services/environment')
const Promise = require('bluebird')
const fs = require('fs')
const path = require('path')
const parse = require('csv-parse/lib/sync')
const moment = require('moment')
const _ = require('lodash')
const mime = require('mime-types')
const aws = require('platform/services/aws')
mo... |
/**
* FileName: config.js
* Author: @mxfli
* CreateTime: 2011-12-09 14:39
* Description:
* Config of this nocancer app.
*/
var config = {
port: '1231', //the date of www.nocancer.com.cn shutting down.
working_root_path: './',
defaultPage : '/forum.php',
host: 'www.nocancer.com.cn'
};
module.expor... |
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var babel = require('gulp-babel');
var clean = require('gulp-rimraf');
var less = require('gulp-less');
gulp.task('lint', function() {
return gulp.src('src/**/*.js')
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterE... |
import test from 'tape';
import add from './../lib/subtract';
test('should subtract 2 numbers', (t) => {
t.equal(add(2, 1), 1);
t.end();
});
|
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route("index", {path: "/"});
this.route("about", {path: "/about"});
this.route("page-1", {path: "/page-1"});
this.route("page-2", {path: "/p... |
angular.module('app').factory('mvAuth', function($http, mvIdentity, $q, mvUser) {
return {
authenticateUser: function(username, password) {
var deferred = $q.defer();
$http.post('/login', {username:username, password:password}).then(function(response) {
if (response.d... |
import debug from 'debug'
export default function logger(name) {
if (window) window.DEBUG = debug
return debug(`tapclock:${name}`)
}
|
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... |
import React from 'react';
export default class SetFilterButton extends React.Component {
// static propTypes = {
// name: React.PropTypes.string,
// };
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick(e) {
e.preventDefault();
if(this.props... |
import GeometryDescriptorBase from './GeometryDescriptorBase';
import PropTypes from 'react/lib/ReactPropTypes';
class PolyhedronGeometryDescriptorBase extends GeometryDescriptorBase {
constructor(react3RendererInstance) {
super(react3RendererInstance);
[
'radius',
'detail',
].fo... |
(function (angular) {
"use strict";
var app = angular.module('myApp.surveyStart', ['ngRoute', 'firebase.utils', 'firebase']);
app.controller('SurveyStart', ['$scope', '$routeParams', '$location', 'fbutil', '$rootScope', function ($scope, $routeParams, $location, fbutil, $rootScope) {
var surveyH... |
const { request, readStream } = require('../lib/core');
const API = 'https://qyapi.weixin.qq.com/cgi-bin';
const createRequest = (method, url, { body, headers, withToken } = {}) => {
url = API + url;
return async ({ requestToken }) => {
if (withToken) {
const { access_token, expires_in } = await request... |
'use strict';
(function() {
describe('PalindromeController', function() {
beforeEach(module('main'));
var $controller;
beforeEach(inject(function(_$controller_){
$controller = _$controller_;
}));
it('"tatbctat" is a not palindrome', function(){
var PalindromeController = $controlle... |
var currentIndex = 0;
var maxLength = 100;
var nextCutoff = maxLength;
var clicked = false;
var finishedPage = false;
var delay = 100;
var audioElementChooser = 1;
var text = 'This is a Zelda-inspired dialogue engine. Add text here to see it displayed above.\n\
Move to a new line to force a new page.\nLike.\nThis.\n\
... |
/**
* Created by mark on 4/12/2016.
*/
/*global
beforeEach: false,
browser: false,
by: false,
describe: false,
it: false,
protractor: false,
element: false
*/
describe('Example:', function () {
'use strict';
beforeEach(function () {
console.log("Starting Signup New Pantry");
// Load up a view ... |
/*
* Copyright (c) 2016, Globo.com (https://github.com/globocom)
*
* License: MIT
*/
import React from "react";
export default class extends React.Component {
render() {
return (
<svg {...this.props} width="24" height="24" viewBox="0 0 24 24" >
<path d="M6 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm12... |
/*globals describe, before, beforeEach, afterEach, it */
var testUtils = require('./testUtils'),
should = require('should'),
_ = require('underscore'),
when = require('when'),
sequence = require('when/sequence'),
// Stuff we are testing
Models = require('../../server/models');
describe('Post M... |
const passport = require('passport');
module.exports = function(app) {
/**
* Receive Signin Form Data
**/
app.post('/signin',
passport.authenticate('local-login', { failureRedirect: '/' }),
function(req, res) {
res.redirect('/mygarage');
});
/**
* Display Signup Form
**/
app.get('/si... |
// Copyright (c) 2014 Sandstorm Development Group, Inc. and contributors
// Licensed under the MIT License:
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, includin... |
(function () {
'use strict';
var app = require('../../../app');
var request = require('supertest')(app);
var expect = require('chai').expect;
var testUtils = require('../../helpers/utils');
describe('User Test Suite:', function () {
describe('Test creates unique users', function () {
before(func... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2015 Lukas Mayerhofer <lukas.mayerhofer@guh.guru> *
* ... |
/* eslint-disable */
module.exports = (on, config) => {
}
|
// Import IE polyfill for Vue
import "babel-polyfill";
window._ = require('lodash');
const $ = global.jQuery;
window.$ = $;
|
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h(h.f, null, h("path", {
d: "M7 17h10V7H7v10zm2-8h6v6H9V9z",
opacity: ".3"
}), h("path", {
d: "M21 11V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-... |
'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actua... |
var path = require('path');
var junitWriter = new (require('junitwriter'))();
var fs = require('../util/fs');
var logger = require('../util/logger')('report');
var compare = require('../util/compare');
function writeReport (config, reporter) {
var promises = [];
if (config.report && config.report.indexOf('CI') >... |
/*
psm: Set Tesseract to only run a subset of layout analysis
and assume a certain form of image. The options are:
0 = Orientation and script detection (OSD) only.
1 = Automatic page segmentation with OSD.
2 = Automatic page segmentation, but no OSD, or OCR.
3 = Fully automatic page segmentation, but... |
/**
* All status messages
*
* require it in controller and use like
* eg. lang.login_success.message
*/
APP.constant('lang',{
server_error_500: {
title: "Server Error",
message: "There was problem in server communication. Please try again later"
},
login_success : {
title : 'Lo... |
steal('funcunit').then(function(){
module("External.Base64", {
setup: function(){
S.open("//external/base64/base64.html");
}
});
test("Text Test", function(){
equals(S("h1").text(), "External.Base64 Demo","demo text");
});
}); |
(function(window) {
"use strict";
var app = window.app;
app.factory('shareDataService', ['$http', function($http) {
return {
getJson: function() {
return $http.get('/api/v1/module-config/share-config/');
},
postJson: function(data) {
return $http.post('/api/v1/module-config... |
'use strict'
module.exports = splitDateMulti
function splitDateMulti (obj, keys) {
for (var i=0; i < keys.length; i++) {
var key = keys[i]
var dateTime = obj[key]
// require string
if (typeof dateTime !== 'string') {
obj[key+'Date'] = ''
obj[key+'Time'] = ''... |
//IP Addresses to use
/*************************************************************************************
* For server usage: http://35.154.38.81/app *
* *
* For localhost usage: http://localh... |
$(".counter").counterUp({
delay: 100,
time: 1200
});
$('.vcarousel').carousel({
interval: 3000
})
$(document).ready(function() {
var sparklineLogin = function() {
$('#sparklinedash').sparkline([ 0, 5, 6, 10, 9, 12, 4, 9], {
type: 'bar'... |
'use strict'
module.exports = 'This is hoge.' |
/* eslint-env mocha */
// test suite for plotter
'use strict'
var expect = require('chai').expect
var plotter = require('../lib')
var boundingBox = require('../lib/_box')
var EPSILON = 0.000001
describe('gerber plotter', function () {
var p
beforeEach(function () {
p = plotter()
})
it('should be an obj... |
var express = require("express");
var app = express();
var bodyParser = require("body-parser");
var mongoose = require("mongoose");
var Myfeed = require("./models/myfeed");
var Comment = require("./models/comment");
infoDB = require("./info");
infoDB();
mongoose.connect("mongodb://localhost/fashionblog");
// mongoose... |
/**
* Global namespace for Router
*
* @extends {FlowRouter}
* @namespace Router
*/
Router = FlowRouter;
|
var http = require("http");
var httpServer = http.Server();
var io = require("socket.io")(httpServer);
var url = require("url");
var log = require("./logger").log;
var PORT = 8888;
var WS_PORT = 8889;
function start(route, handle, webSocketHandlers) {
function onRequest(request, response) {
var pathname =... |
angular.module('pmkr.pristineOriginal', [])
.directive('pmkrPristineOriginal', [
function() {
var directive = {
restrict : 'A',
require : 'ngModel',
link: function($scope, $element, $attrs, $ngModel) {
var defaults = {
caseSensitive: true
};
var opts = $scope... |
messages = new Meteor.Collection('messages', {
schema: new SimpleSchema({
message: {
type: String
},
type: { // DIRECT or BROADCAST
type: String
},
originator: {
type: String // a username
},
recipient: {
type: String, // an username
optional: t... |
var modBreadcrumb = angular.module("modBreadcrumb", []);
modBreadcrumb.factory("Breadcrumb", function($rootScope, $translate) {
var exports = {};
var items = [];
exports.reset = function() {
items = [];
};
exports.addItem = function (key, url) {
if (url[0] != "#") {
url = "#" + url;
}... |
module.exports = function(opts){
return {
hostname:opts.hostname,
ip:opts.ip,
masters:opts.masters,
masterport:opts.masterport,
dockerport:opts.dockerport,
etcdport:opts.etcdport,
etcdpeerport:opts.etcdpeerport,
etcdpath:opts.etcdpath
}
} |
doh.is("complete",document.readyState),d.callback(!0); |
Accounts.ui.config({
passwordSignupFields: 'USERNAME_ONLY'
});
Categories = [{
name: 'fun',
title: '娱乐'
},{
name: 'life',
title: '生活'
}, {
name: 'work',
title: '工作'
}, {
name: 'read',
title: '读书'
}, {
name: 'exercise',
title: '锻炼'
}, {
name: 'project',
title: '项目'
}]... |
'use strict'
const PDFName = require('../object/name')
const PDFObject = require('../object/object')
const PDFString = require('../object/string')
const PDFArray = require('../object/array')
const Base = require('./base')
const StringWidth = Base.StringWidth
module.exports = class AFMFont extends Base {
constructor... |
// We only need to import the modules necessary for initial render
import CoreLayout from '../layouts/CoreLayout/CoreLayout';
import Home from './Home';
import CounterRoute from './Counter';
import CreatureListRoute from './CreatureList';
import DataRoute from './Data';
import DemonDisplayRoute from './DemonDisplay';
i... |
"use strict";
var encodeForSMS = require('6sense/src/codec/encodeForSMS.js');
var request = require('request');
var numbers = [
"+33781095259",
"+33783720119",
"+33783609060",
"+33783881878",
"+33783629109",
"+33783699454",
"+33783585494",
"+33783818983",
"+33783734218",
"+3378... |
(function() {
exports.dependencies = 'stylus';
exports.extension = 'styl';
exports.attr_types = {
'text/stylus': 'styl'
};
exports.process = function(opts, callback) {
return opts.dependencies.stylus.render(opts.text, {
filename: opts.filename || '/path.styl'
}, callback);
};
}).call(... |
import React, { Component } from 'react';
import THREE from 'three';
const planeRotation = new THREE.Euler( 0, -THREE.Math.degToRad( 90 ), 0 );
const floorRotation = new THREE.Euler( -THREE.Math.degToRad( 90 ), 0, 0 );
const floorPosition = new THREE.Vector3( 0, -0.48, 0 );
export default class FinishLine extends Com... |
(function() {
var ie_lt8 = /MSIE \d/.test(navigator.userAgent) &&
(document.documentMode == null || document.documentMode < 8);
var Pos = CodeMirror.Pos;
var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};
function findMatchingBracket(cm, where, strict) {
var st... |
var moment = require('moment');
var users = require('../../data/users');
var dojos = require('../../data/dojos');
var LoginPage = require('../../pages/login');
var MyDojosPage = require('../../pages/myDojos');
var ManageEventsPage = require('../../pages/events/manage');
var EditEventPage = require('../../pages/events/e... |
var sql = require('mssql');
var dateFormat = require('dateformat');
import { remote,ipcRenderer } from 'electron';
import * as CONNECT from "../../../../const/SQLConst.js"
import * as ACTION from "../../../../actions/rpt/production/Const.js"
import * as STATE from "../../../../actions/rpt/production/State.js"
import ... |
'use strict';
var env = process.env
, clientId = env.VALUEPACK_GITHUB_CLIENT_ID
, clientSecret = env.VALUEPACK_GITHUB_CLIENT_SECRET
;
module.exports = clientId && clientSecret
? '?client_id=' + clientId + '&client_secret=' + clientSecret
: '';
|
"use strict";
var ncApp = angular.module('ncApp', []);
ncApp.controller('GhCtrl', function($scope, $http) {
$scope.filter = '';
var userName = 'novicell',
userType = 'orgs',
str1 = '0a1fde2db5ef80ea6d7f',
str2 = '3b643be67f8269a3a6c1',
token = str1 + str2,
activeIndex ... |
var chapter_base = require('./chapter_base.js');
var menu_module = require('./menu.js');
var chapter_module = require('./chapter.js');
var app = {
state: 'init',
chapter: null,
database: chapter_base,
modules: {
menu: menu_module,
chapter: chapter_module,
},
init: function () {
this.cacheDom();... |
export default from './Debugger'
|
'use strict'
const assetServiceModule = require('@darkever/assetservice')
const Joi = require('joi');
module.exports.register = function(server, options, next) {
var assetService = new assetServiceModule(options.db);
function addAsset(request, reply) {
var asset = {
name: request.query.... |
if (Clicks.find().count() === 0) {
Clicks.insert({ 'number': 0 });
}
|
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import {Provider} from 'react-redux';
import {createStore, applyMiddleware, compose} from 'redux';
import thunk from 'redux-thunk';
import reducers fro... |
// flow-typed signature: b782fe4c661ee10d708a8aaf2452f736
// flow-typed version: <<STUB>>/keycode_v^2.1.9/flow_v0.59.0
/**
* This is an autogenerated libdef stub for:
*
* 'keycode'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* com... |
import { ShadowMaterial } from 'three';
import VglMaterial from './vgl-material';
import { inst } from '../constants';
export default {
mixins: [VglMaterial],
computed: {
/** The THREE.ShadowMaterial instance. */
[inst]: () => new ShadowMaterial(),
},
};
|
export function StateAndEffect(state, ...effects) {
this.effects = effects;
this.state = state;
}
export function withEffect(state, ...effects) {
if (state instanceof StateAndEffect) {
return new StateAndEffect(state.state, ...effects);
}
return new StateAndEffect(state, ...effects);
}
|
'use strict';
var parser = require('swig/lib/parser');
var helpers = require('swig/lib/helpers');
module.exports = (function() {
var youtube = function() {
var id = parser.parseVariable(this.args[0]);
//var width = (this.args[1]) ? parser.parseVariable(this.args[1]) : 560;
//var height = (this.args[2])... |
import React, { Component, PropTypes } from 'react';
import {initializeWithKey} from 'redux-form';
import connectData from 'helpers/connectData';
import * as addonActions from 'redux/modules/addon';
import {isLoaded, load as loadAddon} from 'redux/modules/addon';
import {connect} from 'react-redux';
import 'isomorphic-... |
/**
* This file is already embedded in the 3D Image Carousel.xsl template.
*
* It's included here for those who wish to reference rather than use it
* inline in the XSL
*/
function BufferLoader(context, urlList, callback) {
this.context = context;
this.urlList = urlList;
this.onload = callback;
thi... |
//Autogenerated by ../../build_app.js
import procedure_request from 'ember-fhir-adapter/models/procedure-request';
export default procedure_request; |
//CKEDITOR.replace("erpbundle_users[description]");
//CKEDITOR.replace("erpbundle_users[price]");
//CKEDITOR.replace("erpbundle_users[Portfolio]");
//CKEDITOR.replace("erpbundle_users[skill]");
$('textarea').each(function(){
var name = $(this).attr('name');
CKEDITOR.replace(name);
}); |
/**
* @author Alexander Farkas
* v. 1.22
*/
(function($) {
if(!document.defaultView || !document.defaultView.getComputedStyle){ // IE6-IE8
var oldCurCSS = $.curCSS;
$.curCSS = function(elem, name, force){
if(name === 'background-position'){
name = 'backgroundPosition';
}
if(name... |
var adjacent = require('./helper/adjacent');
module.exports = function succ(str) {
return adjacent(str, 1);
};
|
$(function () {
$('.button-checkbox').each(function () {
// Settings
var $widget = $(this),
$button = $widget.find('button'),
$checkbox = $widget.find('input:checkbox'),
color = $button.data('color'),
settings = {
on: {
... |
(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(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
'use strict';
angular.module('myApp.expenseList', ['ngRoute', 'ngSanitize', 'ngCsv'])
.controller('expenseListCtrl', ['$scope', 'expenseService', function($scope, expenseService) {
$scope.users = expenseService.all();
$scope.getHeader = function () {return ['Date', 'Expense', 'Description', 'Payment Ty... |
(function(angular, undefined) {
'use strict';
angular.module('metAppApp.constants', [])
.constant('appConfig', {userRoles:['guest','user','admin']})
;
})(angular); |
// --------------------------------------------------
// Allow for options to be send along with initialization
// --------------------------------------------------
// Modules
var Manager;
Manager = require("./manager");
// Exports a function that provides options for the manager
module.exports = function(config) {... |
var path = require("path");
var querystring = require("querystring");
var app = require(path.join(__dirname, "..", "..", "..", "config", "app"));
var redis = require(path.join(app.root, "config", "redis"));
var settings = require(path.join(app.root, "config", "settings"));
var RateLimiter = requ... |
angular.module('myApp').controller('CountryInfoCtrl', [
'$uibModalInstance', '$scope', 'hiService',
'$timeout', 'countryInfo',
function (
$uibModalInstance, $scope, hiService,
$timeout,countryInfo
) {
$scope.countryInfo = countryInfo;
$scope.countryMood = hiService.getMoo... |
module.exports = {
displayName: 'Data Example App',
preset: '../../jest.preset.js',
coverageDirectory: '../../coverage/apps/data-example-app',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.... |
/*--------------------------------------------------------------------------
* linq.js - LINQ for JavaScript
* ver 2.2.0.2 (Jan. 21th, 2011)
*
* created and maintained by neuecc <ils@neue.cc>
* licensed under Microsoft Public License(Ms-PL)
* http://neue.cc/
* http://linqjs.codeplex.com/
*-----------------------------... |
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../../config/renderer')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-erro... |
/* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani (sholby@sholby.net). */
define(['jQueryDatepickerLang'], function() {
jQuery(function($){
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
prevText: '<Préc',
nextText: 'Suiv>',
currentText: 'Courant',
... |
var EventProxy = require('eventproxy');
var superagent = require('superagent');
var cheerio = require('cheerio');
var fs = require('fs');
var targetUrlsPrefix = 'https://sezhong.se/forum.php?mod=viewthread&tid=';
var numArr = Array.apply(null, {length: 100}).map(Function.call, Number);
var targetUrlsArr = [];
console.... |
var sqltest = require('./fw-sqltests.js');
var workspace = sqltest.workspaceDirectory;
/*
Challenge tasks
tasks[{Task description | Expected Query}]
*/
var tasks = [
[
"Get all records from the 'basic_info' table where 'birthday' is less or equal than '2016' and 'id' is between 1 and 5. Sort results by 'id' in d... |
version https://git-lfs.github.com/spec/v1
oid sha256:f8487934c6d1bed93da10c943f8806deb2c50d9183bb448603d5dbc41bfce44b
size 9960
|
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {StyleSheet, View} from 'react-native'
import Svg, {Defs, Stop, G, Path, LinearGradient} from 'react-native-svg'
import {arc, line} from 'd3-shape'
import Chroma from 'chroma-js'
export default class CircularProgress extends Component {
... |
/**
* tiny-di
* @module binder/provider
* @copyright Dennis Saenger <tiny-di-15@mail.ds82.de>
*/
'use strict';
import {AbstractBase} from '../base';
import {ProviderBinding} from '../binding/provider';
export class ProviderBinder extends AbstractBase {
by(fn) {
var binding = new ProviderBinding(this.injecto... |
/* -*- js2-basic-offset: 4 -*- */
var husl = require('husl');
var codex = document.getElementById('codex');
var visCan = document.getElementById('art');
var visCtx = visCan.getContext('2d');
var hidCan = document.getElementById('hidden');
var hidCtx = hidCan.getContext('2d');
var state = {
world: [],
plants... |
var q = require('q');
var device_curator = require('../../lib/device_curator');
var utils = require('../utils/utils');
var qExec = utils.qExec;
var labjack_nodejs = require('labjack-nodejs');
var ljDevice = labjack_nodejs.getDeviceRef();
var ljm = labjack_nodejs.driver();
var modbus_map = require('ljswitchboard-modbus... |
// jQuery to collapse the navbar on scroll
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-top").addClass("top-nav-collapse");
} else {
$(".navbar-fixed-top").removeClass("top-nav-collapse");
}
});
// jQuery for page scrolling feature - requires jQuery Easing plugin
$... |
/**
*
* Copyright (c) 2015 Xinix Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge... |
define(['plugins/router', 'durandal/app'], function (router, app) {
return {
router: router,
search: function() {
//It's really easy to show a message box.
//You can add custom options too. Also, it returns a promise for the user's response.
app.showMessage('Searc... |
clippy.ready('Merlin', {
"overlayCount": 3,
"sounds": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32"],
"framesize": [128, 128],
"animations": {
"MoveLeft": {
... |
// Product can be invoked by the app (in app dir) or by the workers (in top level dir)
// Fix it so it can find the config file either way.
var currentDir = process.cwd()
if ( currentDir.indexOf('app') !== -1 ) {
currentDir = currentDir+'/..'
}
var mongoose = require('mongoose'),
config = require('boring-config')(c... |
$( document ).ready(function() {
var init = Math.floor(Math.random() * 10);
$('#quote').text(getQuote(init));
$('#title-author').text(getTitle(init));
function getQuote(rand) {
var quotes = ['"You forget what you want to remember and you remember what you want to forget." - The Man',
'"No man, for any... |
export const CONFIG = {
customer: {'all': '全部','may':'潜在客户','vip':'VIP客户','dealed':'成交客户','hot':'热点客户','tdays':'30天未更新','month':'本月创建'},
contact : ['全部','本周生日','常用分类','上级联系人','本周新建'],
record : ['全部','今日联系','本周联系','本月联系','常用分类','本月新增'],
order : ['全部','今日待处理','待审批','已审批','待发货','已作废','本月交付','常用分类','本月新增... |
/**
* Created by nporter on 9/7/16.
*/
$(document).on('click','#submit',function(){
mailer();
});
function mailer(){
$('#submit').html("<img src='Images/loader.gif' height='100p'>");
var name = $("#name").val();
console.log("name: " , name);
var email = $("#email").val();
console.log("email: ... |
"use strict";
var CryptoJS = require('crypto-js');
var HmacSHA256 = CryptoJS.HmacSHA256, AES = CryptoJS.AES, enc = CryptoJS.enc;
function encryptPassword(password) {
return HmacSHA256(password, process.env.REST_IO_HMAC_KEY).toString();
}
exports.encryptPassword = encryptPassword;
function createAuthToken(userId) {
... |
angular.module ('feastly.landing', [])
.controller('LandingController', function($scope, $location, Auth){
$scope.username = "";
$scope.password = "";
$scope.show = false;
$scope.login = function(){
Auth.login($scope.username, $scope.password)
.then(function(match){
if(match === 'success'){
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.