code stringlengths 2 1.05M |
|---|
'use strict';
module.exports = function(grunt) {
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
jshint: {
js: {
src: ['Gruntfile.js', 'tasks/*.js']
},
options: {
report... |
var lexer = require('../lib/lexer.js');
TokenType = lexer.TokenType;
exports['get null if empty string'] = function (test) {
var lxr = lexer.createLexer('');
test.strictEqual(lxr.nextToken(), null);
}
exports['get null if blank string'] = function (test) {
var lxr = lexer.createLexer(' ... |
/**
* Tests for the parser/tokenizer
*/
"use strict";
var JSHINT = require('../../src/jshint.js').JSHINT;
var fs = require('fs');
var TestRun = require("../helpers/testhelper").setup.testRun;
var path = require("path");
exports.unsafe = function (test) {
var code = [
"var a\u000a = 'Here is a unsafe c... |
// THIS TEST WAS GENERATED AUTOMATICALLY ON Wed Dec 07 2016 14:07:23 GMT+0200 (EET)
'use strict';
import chai from 'chai';
import Handler from '../../../../../backend/src/account/unlink-user/Handler';
import Kernel from '../../../node_modules/deep-framework/node_modules/deep-kernel';
import KernelFactory from '../../... |
version https://git-lfs.github.com/spec/v1
oid sha256:233cff7b258425a580ac5c2ed140679e7c1c2b1444dce9fa317178e860c82422
size 3193
|
var passport = require('passport');
module.exports = {
login: function(req, res) {
var auth = passport.authenticate('local', function(err, user) {
var errorsMessage = '';
if(err) {
errorsMessage += 'Could not fetch user';
}
if (!user) {
... |
var searchData=
[
['toplevel',['TOPLEVEL',['../classEnsamZ.html#ad705bf3f945fd15280c825a6595e0af0ae8920199c1c8e6078d7f9e58a9fd5e75',1,'EnsamZ::TOPLEVEL()'],['../classMacroEnsamZ.html#aa2646d12de2e04f0b00f1acf9656cd42aa4792641feef81b203912f1811035950',1,'MacroEnsamZ::TOPLEVEL()']]]
];
|
/**
* Sinon-jQuery
*
* Sinon matcher for matching jQuery collections.
*
* Copyright (c) Jadu
*
* Released under the MIT license
* https://github.com/jadu/sinon-jquery/blob/master/LICENSE.txt
*/
'use strict';
import _ from 'lodash';
import $ from 'jquery';
import Matcher from '../src/Matcher';
const expect = ... |
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (https://getbootstrap.com/customize/?id=46beb5de394549d86024dec05739246e)
* Config saved to config.js... |
/**
* Copyright 2013 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... |
var gulp = require("gulp");
var browserSync = require('browser-sync');
var less = require("gulp-less");
var plumber = require("gulp-plumber");
var notify = require("gulp-notify");
var cleanCSS = require("gulp-clean-css");
var minifyJs = require("gulp-minify");
var rename = require("gulp-rename");
gulp.task("move", fu... |
import React from 'react'
import { storiesOf } from '@storybook/react'
import {
FileUploadIllustration,
LoginIllustration,
SearchIllustration,
SearchNoResultIllustration,
} from 'fyndiq-illustrations'
const h2 = {
color: '#666',
fontSize: '15px',
padding: '8px 10px',
background: '#EEE',
fontFamily: '... |
/**
* Test
*
* @module :: Model
* @description :: A short summary of how this model works and what it represents.
*
*/
module.exports = {
attributes: {
/* e.g.
nickname: 'string'
*/
}
};
|
'use strict'
/**
* The partitioning mode used by the tessellator to derive the number and spacing of segments used to subdivide a corresponding edge.
* @typedef {Object} MTLTessellationPartitionMode
* @property {number} pow2 -
* @property {number} integer -
* @property {number} fractionalOdd -
* @property {nu... |
define(['dispatcher', 'slider/slider.store'], function(dispatcher, store) {
"use strict";
var items = {}
var idName = 'slider-arrow-id-';
var idNum = 1;
var _handleChange = function() {
var storeData = store.getData();
var checkItem = function(item) {
var id;
var itemData;
id = item.sliders[0];... |
const extend = require('deep-extend')
function addCraftCofig (files = {}, context) {
// If Craft
if (context.props.projectusage === 'craft' || context.props.projectusage === 'craftCB') {
extend(files.pkg, {
'dist': {
'dist': 'dist/',
'base': 'dist/public/',
'markup': 'dist/craft/'... |
version https://git-lfs.github.com/spec/v1
oid sha256:39c0b016eca99eb576761ac4b8e06966887e87d1d0e80f7b0e87b05a23671a8f
size 183077
|
'use strict';
module.exports = function (grunt) {
grunt.config('jshint', {
options: {
jshintrc: '.jshintrc'
},
src: ['gruntfile.js', 'grunt/**/*.js', 'src/**/*.js', 'demo/**/*.js']
});
grunt.config('jscs', {
options: {
config: '.jscs.json'
}... |
'use strict';
var _ = require('lodash'),
async = require('async'),
moment = require('moment'),
cheerio = require('cheerio'),
request = require('request'),
url = require('url'),
util = require('util'),
searchQueue,
onComplete,
requests = require('./requests');
searchQueue = async.queue(doRequest, 3);
... |
import ListFormController from 'ember-flexberry/controllers/list-form';
export default ListFormController.extend({
/**
Name of related edit form route.
@property editFormRoute
@type String
@default 'ember-flexberry-dummy-suggestion-type-edit'
*/
editFormRoute: 'ember-flexberry-dummy-suggestion-... |
var config = require('../config').otp;
var superagent = require('superagent');
/**
* Expose `get`
*/
module.exports.get = function(opts, callback) {
superagent
.get(config.host + ':' + config.port + config.path + opts.url)
.set(opts.headers || {})
.end(function(err, res) {
if (err || res.error |... |
// Design Basic Game Solo Challenge
// This is a solo challenge
// Your mission description:
// Overall mission: Become the Kami
// Goals: Collect Items from other people by winning a guessing game.
// Characters: honored_one, sunglasses guy, forest bear, magic flower fairy
// Objects: sunglasses, table, flower magi... |
'use strict'
import './Stylesheets'
import Elm from './Main'
let container = document.getElementById('container')
var counter = Elm.Main.embed(container, { path: '/' })
window.onpopstate = event => {
counter.ports.path.send(window.location.hash.split('#')[1])
}
counter.ports.pushPath.subscribe(path => {
window.... |
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../../..'
export const run = editor => {
Editor.delete(editor, { unit: 'character', distance: 3 })
}
export const input = (
<editor>
<block>
<cursor />
word
</block>
</editor>
)
export const output = (
<editor>
<bloc... |
// Don't commit this file to your public repos. This config is for first-run
//
exports.creds = {
returnURL: 'http://localhost:3000/auth/openid/return',
identityMetadata: 'https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration', // For using Microsoft you should never need to change thi... |
'use strict'
var mongoose = require('mongoose');
let q = require('q');
let EventModel = require('../model/eventModel');
let FavoriteModel = require('../model/favoriteModel');
class FavoriteDAO {
findUser(req) {
var defer = q.defer();
let eventos = [];
FavoriteModel.find({ userId: req.decoded.id })
.then(resu... |
import assert from 'assert'
import {PrivateKey, PublicKey} from 'shared/ecc'
import {encode, decode} from 'shared/chain/memo'
import {serverApiRecordEvent} from 'app/utils/ServerApiClient'
export const browserTests = {}
export default function runTests() {
let rpt = ''
let pass = true
function it(name, fn... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
import React, { Component, PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import {LinkContainer} from 'react-router-bootstrap';
import { Grid, Row, Glyphicon, Col, Button} from 'react-bootstrap';
import * as CHK from "../../../const/ChkConst.js"
export default class G... |
/**
* @copyright Maichong Software Ltd. 2016 http://maichong.it
* @date 2016-02-22
* @author Liang <liang@maichong.it>
*/
'use strict';
const alaska = require('alaska');
const numeral = require('numeral');
class NumberField extends alaska.Field {
init() {
let field = this;
this.underscoreMethod('format... |
module.exports = {
options: {
host: '127.0.0.1'
},
test: {
port: 8765,
runInBackground: true
},
demo: {
port: 8000
}
};
|
var $ = require('jquery')
$("#plastic-injection").click(function() {
window.location='/plastics'
})
$("#laser-cutting").click(function() {
window.location='/laser'
})
$("#prototype").click(function() {
window.location='/prototype'
})
$("#3d-printing").click(function() {
window.location='/3Dprint'
})
$("#packag... |
$(document).ready(function(){
$("#marge-link").css("top", "-50px");
$("#marge").hover(function(){
//console.log("Hovered");
$("#marge-link").animate({
top: '0px'})
}, function(){
//console.log("Not Hovered");
$("#marge-link").animate({
top: '-50px'})
});... |
/**
* BSA.Dialogs - Object dialog functions
*
* This object allows:
* - output ProgressBar
* - output messages
*
* JavaScript
*
* @author Sergii Beskorovainyi <bsa2657@yandex.ru>
* @license MIT <http://www.opensource.org/licenses/mit-license.php>
* @link https://github.com/bsa-git/zf-myblog/
*/
... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M8 5h8v14H8z" opacity=".3" /><path d="M19 7h2v10h-2zm3 2h2v6h-2zM0 9h2v6H0zm16.5-6h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5zM16 ... |
(function() {
'use strict';
var controller = function($scope, $attrs, ramlParserWrapper) {
$scope.ramlConsole = this;
if ($attrs.hasOwnProperty('withRootDocumentation')) {
this.withRootDocumentation = true;
}
if ($scope.src) {
ramlParserWrapper.load($scope.src);
}
this.keycha... |
var voices = new Array();
var synthContext = null;
var isMobile = false; // we have to disable the convolver on mobile for performance reasons.
function frequencyFromNoteNumber( note ) {
return 440 * Math.pow(2,(note-69)/12);
}
function noteOn( note, velocity ) {
//clog(' note on '+note+' '+velocity);
$('not... |
'use strict';
const request = require('request');
const EventEmitter = require('events').EventEmitter;
class AuthService extends EventEmitter {
constructor(appId, appSecret, options) {
super();
this._appId = appId;
this._appSecret = appSecret;
options = options |... |
Type.registerNamespace("SitefinityWebApp.WidgetDesigners.Display");
SitefinityWebApp.WidgetDesigners.Display.DisplayDesigner = function (element) {
/* Initialize Message fields */
this._message = null;
/* Calls the base constructor */
SitefinityWebApp.WidgetDesigners.Display.DisplayDesigner.initia... |
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
require('electron-context-menu')({
prepend: (params, browserWindow) => [{
label: 'Rainbow',
// only show it when right-c... |
const types = {
'SHOW_TOP_BAR': 'SHOW_TOP_BAR',
'HIDE_TOP_BAR': 'HIDE_TOP_BAR',
'SHOW_FOOT_BAR': 'SHOW_FOOT_BAR',
'HIDE_FOOT_BAR': 'HIDE_FOOT_BAR'
}
const state = {
showTop: true,
showFoot: true
}
const mutations = {
[types.SHOW_FOOT_BAR] ({showTop}) {
state.showTop = true
},
[types.HIDE_TOP_BAR... |
/**
* Created by Strawmanbobi
* 2016-12-05
*/
var app = require('../irext_console.js');
var navigationService = require('../services/navigation_service.js');
app.post('/irext/nav/nav_to_url', navigationService.navToURL); |
import React from 'react';
import {Container, Row, Col, Card} from '../../src/Grid';
import styles from './ExampleGrid.scss';
export default () =>
<div data-hook="card-example" className={styles.exampleContainer}>
<Container>
<Row>
<Card>
<Card.Header title="Grid Row - RTL support">
... |
/* eslint no-bitwise: 0 */
/**
* Volume of Interest Lookup Table Function
*
* @typedef {Function} VOILUTFunction
*
* @param {Number} modalityLutValue
* @returns {Number} transformed value
*/
/**
*
* @param {Number} windowWidth Window Width
* @param {Number} windowCenter Window Center
* @returns {VOILUTFunc... |
require('./harness');
var recvCount = 0;
var body = "hello world";
connection.addListener('ready', function () {
puts("connected to " + connection.serverProperties.product);
//var e = connection.exchange('node-ack-fanout', {type: 'fanout'});
var e = connection.exchange();
var q = connection.queue('node-123ac... |
var assert = require('assert');
var Readable = require('stream').Readable;
var u = require('util');
var express = require('express');
var router = express.Router();
var jsdom = require('jsdom');
var debug = require('debug')('scraper');
u.inherits(Scraper, Readable);
function Scraper(opts, doc, sel, pgSel, endWhen) {... |
var searchData=
[
['state',['State',['../class_dao_net_1_1_dao_access.html#a097058769337d1e5557cad4b4a0a320b',1,'DaoNet::DaoAccess']]],
['statecode',['StateCode',['../class_dao_net_1_1_r_p_cresponse.html#af2073f6381ce9ba9cd3cc717a29a3b81',1,'DaoNet::RPCresponse']]]
];
|
import { hashHistory } from 'react-router';
export const redirectTo = path => hashHistory.push(path);
|
'use strict';
const Jii = require('../../index');
const Article = require('../models/Article');
const Pagination = require('../../data/Pagination');
const Collection = require('../../base/Collection');
const InvalidParamException = require('../../exceptions/InvalidParamException');
const ChangeEvent = require('../../d... |
// Thunk convertion
// ES5
function Thunk(fn) {
return function() {
var args = Array.prototype.slice.apply(arguments);
return function(callback) {
args.push(callback);
return fn.apply(this, args);
};
};
}
function f(num, callback) {
callback(num);
}
let log = console.log;
let ft = Thunk... |
import PostAdapter from 'ember-tumblr/adapters/tumblr-post';
export default PostAdapter.extend({
blogUrl: 'jordanhawker.tumblr.com',
apiKey: 'djHwrb13Yd636cWzgzjRms29YwoB3fmHp0VXG4mB9GEAxcB6MX'
});
|
'use strict';
// Define the `topBar` module
angular.module('topBar', []); |
//BUG: unselect needs to be triggered when events are dragged+dropped
function SelectionManager() {
var t = this;
// exports
t.select = select;
t.unselect = unselect;
t.reportSelection = reportSelection;
t.daySelectionMousedown = daySelectionMousedown;
// imports
var opt = t.opt;
var trigger = t.trig... |
// npm install -g gulp
// npm install --save-dev gulp
// npm install --save-dev gulp-uglify
// npm install --save-dev gulp-concat
// npm install --save-dev gulp-rename
// npm install --save-dev gulp-clean
// npm install --save-dev gulp-typescript
// npm install --save-dev gulp-sourcemaps
// npm install --save-dev gulp-... |
/**
* Created by Florin Chelaru ( florin [dot] chelaru [at] gmail [dot] com )
* Date: 2/8/2016
* Time: 1:39 PM
*/
goog.require('ngb.d.MultiselectList');
goog.exportSymbol('ngb.d.MultiselectList', ngb.d.MultiselectList);
goog.exportProperty(ngb.d.MultiselectList.prototype, 'link', ngb.d.MultiselectList.prototype.l... |
'use strict';
module.exports = {
db: 'mongodb://heroku_7w00n9dr:67g9498qm2c41qjo9egtl4qtoo@ds047571.mlab.com:47571/heroku_7w00n9dr',
debug: true,
logging: {
format: 'tiny'
},
// aggregate: 'whatever that is not false, because boolean false value turns aggregation off', //false
aggregate: false,
mong... |
export const USERS = '/api/users.json';
export const SESSION = '/api/session.json';
|
"use babel";
import {SwiftSourceKitGrammar} from "./grammar"
export default {
activate: () => {
console.log(new SwiftSourceKitGrammar(atom.grammars));
atom.grammars.addGrammar(new SwiftSourceKitGrammar(atom.grammars))
}
}
|
define(['./common_enhance',
'./tbtools',
'./item_ed_dialog',
'domReady!'], function (comnEnh,
tbtools,
itEdDlg,
document) {
return {
activate: function(partial_text_id) {
comn... |
"use strict";
const expect = require('chai').expect;
const hoodiecrow = require("hoodiecrow-imap");
const DEBUG_HOODIECROW = false;
const MESSAGES = [{
raw: "Subject: hello 1\r\n\r\nWorld 1!",
internaldate: "14-Sep-2013 21:22:28 -0300"
}, {
raw: "Subject: hello 2\r\n\r\nWorld 2!",
flags: ["\\Seen"],
... |
import {expect} from 'chai';
import {parseBoolean, removePrefix} from '../../../src/server/common/string';
describe('server/common/string', () => {
it('parses boolean', () => {
expect(parseBoolean('foo')).to.be.true;
expect(parseBoolean('true')).to.be.true;
expect(parseBoolean('1')).to.be.true;
expec... |
require("./scraper")("semesters.json", null, true); |
#!/usr/bin/env node
var fs = require('fs'),
compressor = require('node-minify');
new compressor.minify({
type: 'gcc',
fileIn: 'playbook.js',
fileOut: 'playbook.min.js',
callback: function (err) {
if (err) {
console.log(err);
} else {
console.log("JS minified successfully.");
}
}
})... |
module.exports = { prefix: 'fas', iconName: 'mobile-android', icon: [320, 512, [], "f3ce", "M272 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h224c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-64 452c0 6.6-5.4 12-12 12h-72c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12v8z"] }; |
import * as types from '../../constants/actionTypes';
import initialState from '../../reducers/initialState';
export default function (state = initialState.foods, action) {
switch (action.type) {
case types.RETRIEVE_CATEGORIES_SUCCESS:
return {
...state,
categories: action.categories
};
case types.... |
'use strict';
/* Controllers */
var phonecatControllers = angular.module('phonecatControllers', []);
phonecatControllers.controller('PhoneListCtrl', ['$scope', 'Phone',
function($scope, Phone) {
$scope.phones = Phone.query();
$scope.orderProp = 'age';
}]);
phonecatControllers.controller('PhoneDetailCtrl... |
// This returns the pid of the server process, and is the default server for "spawnServer".
// It's most useful for verifying a connection to the server.
const http = require('http');
const minimist = require('minimist');
const parsedArgs = minimist(process.argv);
const port = parsedArgs.port || process.env.SERVER_PO... |
/*
* ComposedQL
* For the full copyright and license information, please view the LICENSE.txt file.
*/
/* jslint node: true */
'use strict';
module.exports = require('./lib/composedql'); |
/* global angular */
(function(angular) {
angular.module('hrAngularYoutube')
.directive('playerTotalTime', function() {
return {
restrict: 'EA',
require: '^youtubePlayer',
link: function(scope, elm, attrs,youtubePlayerCtrl) {
youtubePlayerCtrl.getPlay... |
import EditableField from './EditableField'
import { EditableFieldComposite } from './EditableFieldComposite'
export default EditableField
export { EditableFieldComposite }
|
const env = process.env;
exports.kibanaUser = {
username: env.TEST_KIBANA_USER || 'elastic',
password: env.TEST_KIBANA_PASS || 'changeme'
};
exports.kibanaServer = {
username: env.TEST_KIBANA_SERVER_USER || 'kibana',
password: env.TEST_KIBANA_SERVER_PASS || 'changeme'
};
exports.admin = {
username: env.TES... |
module.exports = [
{
type: 'item',
icon: 'fa fa-dashboard',
name: 'Dashboard',
router: {
name: 'Dashboard'
}
},
{
type: 'item',
icon: 'fa fa-users',
name: 'Teams',
badge: {
type: 'Integer',
data: 3
},
router: {
name: 'Teams'
}
},
{
ty... |
app.directive('modalDialog', [
"settings",
"SessionService",
"$location",
function(
settings,
SessionService,
$location
) {
return {
templateUrl: settings.widgets + 'modal/dialog.html',
replace: true,
transclude: true,
scope: {
show: '='
},
link: funct... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... |
(function (ns) {
'use strict';
ns.controllers.ActivityController = function () {
return {
system: undefined,
init: function(){
this.system.mapHandler('Config:init', 'activityView', 'configHandler');
}
};
};
}(chalk)); |
nile.typeref.resolve = function(env)
{
return env.getTypedef(this.name) || this;
};
nile.vardecl.resolve = function(env)
{
var type_ = this.type.resolve(env);
var this_ = nile.vardecl(this.name, type_);
return env.addVardecl(this_);
};
nile.vardecl.resolveWithType = function(env, type)
{
var type_ = this.ty... |
var barelog__device__mem__manager_8h =
[
[ "barelog_device_mem_manager_t", "structbarelog__device__mem__manager__t.html", "structbarelog__device__mem__manager__t" ],
[ "BARELOG_DEBUG", "barelog__device__mem__manager_8h.html#af7df0739b5e31f131926969c00d0ed27", null ],
[ "barelog_debug_log", "barelog__device_... |
describe('when weekends option is set', function() {
it('should show sat and sun if true', function() {
initCalendar({
weekends: true
})
var sun = $('.fc-day-header.fc-sun')[0]
var sat = $('.fc-day-header.fc-sun')[0]
expect(sun).toBeDefined()
expect(sat).toBeDefined()
})
it('shoul... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('/kit-sectionable', 'Integration | Component | kit sectionable', {
integration: true
});
test('it renders', function(assert) {
assert.expect(2);
// Set any properties with this.set('myProper... |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { PropTypes, Component } from 'react';
import classNames from 'classnames';
import styles from './Navigation.css';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
@withStyles(styles)
class Navigati... |
import React, { Component } from 'react';
import NotificationSystem from 'react-notification-system';
class Notifications extends Component {
showNotification(position) {
this.notificationSystem.addNotification({
message: 'Welcome to Crystal Dashboard - a beautiful React dashboard for everyone.',
le... |
dc.ui.TemplateFieldListing = Backbone.View.extend({
events: {
'click .delete': 'deleteField'
},
initialize: function() {
_.bindAll(this, 'deleteField');
this.model.on('destroy', this.deleteView, this);
},
render: function(options) {
this.$el.html(JST['template/te... |
var packageData = require('./package.json');
// expose the API to the world
module.exports.createServer = require('./lib/server.js');
module.exports.createSimpleServer = require('./lib/simpleserver.js');
module.exports.connect = require('./lib/client.js');
module.exports.createClientPool = require('./lib/pool.js');
mo... |
var G = {
'delayInit': [],
'opts': {},
};
/*******************************************************************************
* Switcher panel
******************************************************************************/
(function () {
var list = document.getElementById('list');
function generateButton(ta... |
/**
* Created by way on 16/8/29.
* knife 引入模块
* 可添加扩充、覆盖 k模块的功能
*/
const $ = require('./knife');
['width', 'height'].forEach(function (dimension) {
var Dimension = dimension.replace(/./, function (m) {
return m[0].toUpperCase();
});
$.fn['outer' + Dimension] = function (margin) {
var elem = this;
... |
import RestClient from './restClient';
export default class AjaxClient extends RestClient {
getConfig(method, data, cookie) {
const config = {
credentials: this.getCredentialsConfig(this.baseUrl),
method,
headers: {
'Content-Type': 'application/json'
}
};
if (cookie) {
config.headers.Cookie ... |
const uuid = require('uuid/v4')
const zmq = require('zeromq')
const events = require('events')
const Handle = function (id, callback) {
this.id = id
this.callback = callback
}
Handle.prototype = Object.create(events.EventEmitter.prototype)
/**
* A client submits tasks to a broker.
*/
const Client = function (o... |
import React, {Component} from "react";
import PropTypes from 'prop-types';
export default class Col extends Component{
static propTypes = {
children: PropTypes.any,
sizes: PropTypes.string
};
static defaultProps = {
children: null,
sizes: ''
};
render(){
... |
version https://git-lfs.github.com/spec/v1
oid sha256:e425c02659d08eeb06a69b5b4b0e595d829102fec22d40755a277fc708130ee2
size 66495
|
var helper = require('./support/helper')
var assert = require('core-assert')
module.exports = function (cb) {
helper.run('safe/fixtures/nested-test.js#sub', function (er, result, log) {
assert.equal(result, true)
log.assert(
'TAP version 13',
'1..2',
'ok 1 - "sub test2" - test #1 in `safe/f... |
import React from 'react';
// eslint-disable-next-line
import PresenceStatusIcon from 'ringcentral-widgets/components/PresenceStatusIcon';
const props = {};
props.userStatus = 'Available';
/**
* A example of `PresenceStatusIcon`
*/
const PresenceStatusIconDemo = () => (
<PresenceStatusIcon
{...props}
/>
);
... |
/*
* ------------------------------------------
* 超链接执行命令封装实现文件
* @version 1.0
* @author genify(caijf@corp.netease.com)
* ------------------------------------------
*/
/** util/editor/command/link */
NEJ.define([
'base/global',
'base/klass',
'util/editor/command/card',
'ui/editor/command/link'
... |
// This defines the output rate, with unit of RF/t. Must be float-point number, i.e. has decimals.
var gen_level = 40.0;
var Opcodes = org.objectweb.asm.Opcodes;
var methodGenLevelGetter = node.methods.stream().filter(function (m){
return m.name.equals("genLevel");
}).findFirst().orElseThrow(function (){
retu... |
import chai from 'chai';
import dirty from 'dirty-chai';
import sinonChai from 'sinon-chai';
import sinon from 'sinon';
import DependenciesManager from '../../lib/dependenciesManager';
chai.use(sinonChai);
chai.use(dirty);
const { describe, it } = global;
const { expect } = chai;
describe('dependenciesManager', () =... |
var angularApiAdapter = angular.module('angularApiAdapter', []); |
angular.module('mnBusy',[])
.factory('busyTrackerFactory',['$timeout','$q',
function($timeout,$q) {
return function() {
var tracker = {};
tracker.delayPromise = null;
tracker.durationPromise = null;
tracker.processingPromise = null;
tracker.busyPromise = null;
tracker.reset = ... |
define(['jquery', 'storage'], function($, Storage) {
var App = Class.extend({
init: function() {
this.currentPage = 1;
this.blinkInterval = null;
this.previousState = null;
this.isParchmentReady = true;
this.ready = false;
this.storag... |
var config = {
viewfolder: 'views',
extension: 'html',
container: '#content',
view:'home',
};
|
import template from './letters-list.html';
import appSettings from '../../app.settings';
class Controller {
/** @ngInject */
constructor(AllRestService) {
AllRestService.getAll()
.then(all => {
this.mailbox = all.mailboxes.find(mailbox => mailbox._id === this.mailboxId);... |
var fs = require('fs');
var path = require('path');
function rmdir(dstPath) {
var files = [];
if (fs.existsSync(dstPath)) {
files = fs.readdirSync(dstPath);
files.forEach(function(file, index) {
var curPath = path.join(dstPath, file);
if(fs.statSync(curPath).isDirect... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.