code stringlengths 2 1.05M |
|---|
window.onload = function fixActiveX ()
{
if(navigator.appName == "Microsoft Internet Explorer" && navigator.userAgent.indexOf('Opera') == -1)
{
var changeElements = new Array(3);
changeElements[0] = "applet";
changeElements[1] = "embed";
changeElements[2] = "object";
//mooooooo!
offScreenBuffer = doc... |
/**
*
* @author : Mei XinLin
* @version : 1.0
*/
'use strict';
import gulp from 'gulp';
import runSequence from 'run-sequence';
import gutilsModule from 'gulp-load-utils';
const config = require(process.cwd() + '/config');
const gutils = gutilsModule(['colors', 'env', 'log']);
gulp.task('default', ()=> {
... |
var ws = require('websocket-stream')
var stream = ws('ws://localhost:8099')
stream.end('hello\n')
|
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { loadAbout } from 'redux/about/actions';
import { getAbout } from 'redux/about/selectors';
import fetchData from 'lib/fetchData';
/* eslint-disable react/prefer-stateless-function */
@fetchData(... |
const toolingPresetReact = require('../')
test('main', () => {
expect(typeof toolingPresetReact).toBe('function')
})
|
/*global describe, before, it */
'use strict';
var fs = require('fs');
var path = require('path');
var yeoman = require('yeoman-generator');
describe('yui-library generator', function () {
var OUT_DIR = path.join(__dirname, 'output');
var APP_DIR = path.join(__dirname, '../app');
var MOD_DIR = path.join(__... |
var searchData=
[
['rt_5fcontroltype',['RT_ControlType',['../thermistor__lab_2src_2main_8c.html#union_r_t___control_type',1,'']]],
['rt_5fcontroltype_2ebits',['RT_ControlType.Bits',['../thermistor__lab_2src_2main_8c.html#struct_r_t___control_type_8_bits',1,'']]]
];
|
var R = require('../source/index.js');
var eq = require('./shared/eq.js');
describe('dec', function() {
it('decrements its argument', function() {
eq(R.dec(-1), -2);
eq(R.dec(0), -1);
eq(R.dec(1), 0);
eq(R.dec(12.34), 11.34);
eq(R.dec(-Infinity), -Infinity);
eq(R.dec(Infinity), Infinity);
... |
/*jshint unused:false */
function NodeController( $scope ){
this.initialize= function () {
$scope.calculateImagePosition();
};
$scope.calculateImagePosition = function(){
var depth = $scope.node.depth;
var width = $scope.treeWidth[depth];
if( width === undefined ) { width ... |
import React from 'react'
import { Table } from 'shengnian-ui-react'
const TableExampleDisabled = () => (
<Table celled>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Notes</Table.HeaderCell>
... |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Evmit = f()}})... |
const express = require('express');
const path = require('path');
const favicon = require('serve-favicon');
const logger = require('morgan');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const routes = require('./routes/index');
const othello = require('./routes/othello');
... |
import React, { Component } from 'react';
import InfoSection from '../components/InfoSection';
import InfoSectionToggle from '../components/InfoSectionToggle';
class SearchContainer extends React.Component {
constructor(props) {
super(props);
this.state = {
message: '',
error: '',
showConte... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Ticket = new Schema({
date: Date,
seat: Number,
customer:Object
});
module.exports = mongoose.model('Ticket', Ticket); |
define([
'thruster/graphics/color',
'thruster/graphics/surface'
], function(
Color,
Surface
){
/**
* @namespace
* @memberof thruster
*/
var graphics = {
Color: Color,
Surface: Surface
};
return graphics;
}); |
/*
* Globalize Culture mn
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in this file need to b... |
var db = require('../db.js')
var Promise = require('bluebird')
var General = require('../lib/general.js');
var Contacts = module.exports = General.access('contacts');
module.exports.retrieveByName = function(string){
if (string.length < 4){
return db.select('contacts.name','contac... |
//=======================================================
// Файл: api.js
// Разработчик: CodeBits Interactive
// Версия: 1.0
// Назначение: CBP API Wrapper
//=======================================================
// CodeBits Platform API Wrapper нужен для выполнения
// запросов к API на... |
// All symbols in the `Lu` category as per Unicode v6.3.0:
[
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z',
'\xC0',
'\xC1',
'\xC2',
'\xC3',
'\xC4',
'\xC5',
'\xC6',
'\xC7',
'\xC8',
'\xC9',
'\xCA',
'\x... |
// @flow
import React, {Component, PropTypes as t} from 'react';
import AddObservations from './add-observations';
import Breadcrumbs from '../share/breadcrumbs';
import ButtonSet from '../share/button-set';
import DataDisplay from './data-display';
import DataEntry from './data-entry';
import DateRange from '../share/... |
import Ember from 'ember';
import EditorAPI from 'ghost-admin/mixins/ed-editor-api';
import EditorShortcuts from 'ghost-admin/mixins/ed-editor-shortcuts';
import EditorScroll from 'ghost-admin/mixins/ed-editor-scroll';
import {invokeAction} from 'ember-invoke-action';
const {TextArea, run} = Ember;
export default Tex... |
import React, {PropTypes} from 'react';
import CourseListRow from './CourseListRow';
const CourseList = ({courses}) => {
return(
<table className="table">
<thead>
<tr>
<th> </th>
<th>Title</th>
<th>Author</th>
<th>Categoty</th>
<th>Length</th>
... |
import { expect } from 'chai';
import * as constants from 'client/constants/contact';
import * as actions from 'client/actions/form';
describe('form actions', () => {
it('tests nameChange action with incorrect name', () => {
const value = 'na';
const name = {
value,
valid: false,
touched: t... |
export default {
UPDATE_MATCH: '@@found/UPDATE_MATCH',
RESOLVE_MATCH: '@@found/RESOLVE_MATCH',
};
|
$(document).ready(function() {
$.localScroll();
}); |
import React from 'react';
import ReactDOM from 'react-dom'
class FilterInfo extends React.Component {
render() {
return (
<div className="filterInfo">
We found <span>{this.props.itemNum}</span> item!
</div>
)
}
}
export default FilterInfo; |
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
View,
Text,
TouchableOpacity,
Button
} from 'react-native';
import MenuSide from './App/MenuSide'
import LogArea from './App/LogArea'
import { Pages, Co... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('swapcase', 'helper:swapcase', {
integration: true
});
test('It formats the input text with `swapcase` format', function(assert) {
assert.expect(2);
this.set('input', 'this Is some TEXT');
this... |
/*
* GFXRenderer v1.0.4 Copyright (c) 2016 AJ Savino
* https://github.com/koga73/GFXRenderer/
*
* 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 limitat... |
'use strict';
describe('Controller: MainCtrl', function () {
// load the controller's module
beforeEach(module('ngBrxApp'));
var MainCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
MainCtrl = $controll... |
function CategoryDetailsCtrl($scope, User, Comment, $http, $filter, showFormMessage, $compile, $location, $anchorScroll) {
$scope.baseUrl = Config.baseUrl;
$scope.limit = 7;
$scope.getStoreImage = function(store) {
if (store.logo) {
return store.logo;
}
return 'http://l... |
import {
cssWordIsVariable,
optionsHaveIgnored,
report,
ruleMessages,
validateOptions,
} from "../../utils"
export const ruleName = "declaration-block-no-duplicate-properties"
export const messages = ruleMessages(ruleName, {
rejected: p => `Unexpected duplicate property "${p}"`,
})
export default functio... |
import React, { Component, PropTypes } from 'react';
import emptyFunction from 'fbjs/lib/emptyFunction';
import s from './App.scss';
import Header from '../Header';
import Footer from '../Footer';
import Daytime from '../../models/daytime';
class App extends Component {
static propTypes = {
context: PropTypes.sh... |
Search.setIndex({envversion:46,filenames:["index"],objects:{},objnames:{},objtypes:{},terms:{content:0,index:0,modul:0,page:0,search:0},titles:["Welcome to K nearest neighbours’s documentation!"],titleterms:{document:0,indic:0,nearest:0,neighbour:0,tabl:0,welcom:0}}) |
'use strict';
var assert = require('assert');
var markdownit = require('../');
describe('Utils', function () {
it('fromCodePoint', function () {
var fromCodePoint = require('../lib/common/utils').fromCodePoint;
assert.strictEqual(fromCodePoint(0x20), ' ');
assert.strictEqual(fromCodePoint(0x1F60... |
var $table = $('.table');
var $fixedColumn = $table.clone().insertBefore($table).addClass('fixed-column');
$fixedColumn.find('th:not(:first-child),td:not(:first-child)').remove();
$fixedColumn.find('tr').each(function (i, elem) {
$(this).height($table.find('tr:eq(' + i + ')').height());
}); |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DecoratorParamsController = void 0;
const tslib_1 = require("tslib");
const route_1 = require("@appolo/route");
const manager_1 = require("../manager/manager");
const userMiddleware_1 = require("../middleware/userMiddleware");
const in... |
'use strict';
// Clients controller
angular.module('clients').controller('ClientsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Clients','$mdToast', '$animate','$mdDialog','Devices','$uibModal','$log','ClientsUsers','$http',
function($scope, $stateParams, $location, Authentication, Clients,$m... |
beforeEach(() => {
const gmfModule = angular.module('gmf');
gmfModule.constant('angularLocaleScript', 'http://fake');
module('gmf', ($provide) => {
$provide.value('gmfTreeUrl', 'http://fake/gmf/themes');
$provide.value('gmfShortenerCreateUrl', 'http://fake/gmf/short/create');
$provide.value('authenti... |
/**
* This is the startup script for a basic Postvox interchange server.
*
* An interchange server is a data-hosting server for one or more Postvox
* streams, which are identified by a URL like "vox://<source>". It's like a
* network-accessible database of messages and user metadata.
*
* Start it like so:
*
*... |
version https://git-lfs.github.com/spec/v1
oid sha256:e932813a72f5b25e41020dcd05cda2ffc04743196a9dc3d16eb5d2ff4f1900bf
size 1536
|
version https://git-lfs.github.com/spec/v1
oid sha256:032ce2000da04ad5dc4c1e5d13ede6873568a099dbf775d39afe21aecf82dab6
size 101984
|
import React, { Component } from 'react';
import OnClickOutside from 'react-onclickoutside';
import './SimplePopover.scss';
const TOOLTIP_MARGIN = 10;
const getPopoverOnBottomStyle = (position, popoverWidth) => ({
position: 'absolute',
top: `${position.bottom + TOOLTIP_MARGIN}px`,
left: `${(position.left + (pos... |
/**
* @author Vincent
* @description can also use node-fs fetch..
*/
'use strict';
var _=require('../lib/underscore.js');
function Template(options){
var opts=options||{};
this.tmpl_name=opts.tmplName;
this.tmpl_data=opts.tmplData;
}
Template.prototype.getHtml=function() {
var tmpl_name=this.tmpl_name,tmpl_data=... |
/**
* This script automatically creates a default Admin user when an
* empty database is used for the first time. You can use this
* technique to insert data into any List you have defined.
*
* Alternatively, you can export a custom function for the update:
* module.exports = function(done) { ... }
*/
/*
export... |
/*!
* js-file-browser
* Copyright(c) 2011 Biotechnology Computing Facility, University of Arizona. See included LICENSE.txt file.
*
* With components from: Ext JS Library 3.3.1
* Copyright(c) 2006-2010 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
*/
/*!
* Ext JS Library 3.3.1
* Copyrigh... |
var model = require( "../../model.js" );
module.exports = function( host ) {
return {
name: "board",
actions: {
self: {
include: [ "id", "title" ],
method: "get",
url: "/:id",
embed: {
lanes: {
resource: "lane",
render: "self",
actions: [ "self", "cards" ]
}
},
... |
/*!
* uaDetector
*
* @author Van Zheng (zgbjili2009@126.com)
* @copyright Copyright (c) Van Zheng.
* @license This uaDetector is licensed under the MIT licenses.
* @version Version 0.8.0
*
*/
(function(root) {
var ua = window.navigator.userAgent.toLowerCase(),
matches,
browse... |
var test = require("tape"), routes = require("../uru/routes"), _ = require("lodash");
test("api should comprise: navigate, router, resolve, reverse", function(t){
"use strict";
var total = 0, keys = {navigate:1, router:1, resolve:1, reverse:1};
_.each(routes, function(value, key){
if(_.isFunction(... |
module.exports = function(grunt) {
grunt.initConfig({
// https://github.com/ck86/main-bower-files#usage-with-grunt
bower: {
dev: {
dest: 'components/bower',
options: {
checkExistence: true,
debugging: true
}
}
},
sass: {
dev: {
o... |
/* eslint-disable import/prefer-default-export */
import visibleItems from './visible-items';
export default {
visibleItems,
};
|
/**
* Copyright (c) 2015 Guyon Roche
*
* 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, publis... |
/**
* Since we moved our documentation to our website repo, we want to point to the
* website from the docs in this repo
*
* This script write the link to the website in every READMEs.
*/
const { join } = require("path");
const { readdirSync, writeFileSync } = require("fs");
const cwd = process.cwd();
const pac... |
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* ... |
'use strict';
var should = require('should'),
request = require('supertest'),
path = require('path'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Beneficiary = mongoose.model('Beneficiary'),
express = require(path.resolve('./config/lib/express'));
/**
* Globals
*/
var app, agent, cred... |
import Ember from 'ember';
import EmberUploader from 'ember-uploader';
import config from '../config/environment';
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
export default Ember.Controller.extend({
img_bytes:null,
isViewable: false,
init() {
},
valu... |
import React from 'react';
import { connect } from 'react-redux';
import { Modal, ModalHeader, ModalBody } from '../../../components/Modal';
import { getUser } from '../../../actions/user-mgmt-action';
import { closeUserModal } from '../../../actions/modal-action';
import { deAuthenticate } from '../../../actions/auth-... |
(function(glob) {
var undefined = {}.a;
function definition(Q) {
/**
@author Matt Crinklaw-Vogt
*/
function PipeContext(handlers, nextMehod, end) {
this._handlers = handlers;
this._next = nextMehod;
this._end = end;
this._i = 0;
}
PipeContext.prototype = {
next: function() {
// var args = Array.prototype... |
version https://git-lfs.github.com/spec/v1
oid sha256:535bf21931a460b270b2dcbb7d6fe53ae9b5a0499fd593e340ba5df2162be7f6
size 820
|
var searchData=
[
['adc_5fconversion_5fspeed_185',['ADC_CONVERSION_SPEED',['../namespace_a_d_c__settings.html#aab853fc1fcb1992fd5d51408adf7688e',1,'ADC_settings']]],
['adc_5ferror_186',['ADC_ERROR',['../namespace_a_d_c___error.html#ad050c44d1f3422d02e5f9726edeee8f0',1,'ADC_Error']]],
['adc_5finternal_5fsource_187... |
export var doNothing = (() => {
let instance = Object.freeze({
reducible: false,
equals: (other) => other === doNothing,
evaluate: (environment) => environment,
toJS: () => `(function (e) { return e; })`,
toString: () => 'do-nothing',
});
return () => instance;
})();
export var assign = (nam... |
"use strict";
module.exports = function(player, data) { // eslint-disable-line no-unused-vars
data.entities.setComponent(player, "recovering", false);
};
|
module.exports = {
plugins: {
'postcss-import': {},
'postcss-custom-properties': {},
'postcss-custom-media': {},
'postcss-cssnext': {
browsers: ['last 2 versions', '> 5%'],
},
},
}
|
var _ = require('lodash'),
hbs = require('express-hbs'),
config = require('../config'),
errors = require('../errors'),
i18n = require('../i18n'),
templates = require('../controllers/frontend/templates'),
escapeExpression = hbs.Utils.escapeExpression,
_private = {},
errorHandler = {};
/*... |
/**
* Created by kusamao_abe on 2015/11/17.
*/
var gulp = require( 'gulp' ),
jade = require( 'gulp-jade' ),
scss = require( 'gulp-sass' ),
browser = require( 'browser-sync' ),
please = require( 'gulp-pleeease' ),
plumber = require( 'gulp-plumber' ),
data = require( 'gulp-data' );
var PLEASE_OPTIO... |
import { map } from 'lodash';
export default {
render(h) {
h('div', {
domProps: {
innerText: map([1, 2, 3], n => n * 2).join(',')
}
});
}
};
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { utils: Cu, interfaces: Ci, classes: Cc, results: Cr } = Components;
Cu.import("resource://... |
var Bjs = Bjs || require('../better.js')
;(function(){
// needed to trigger an exception in .iceWrite()
"use strict";
var foo = {
bar : 'slota'
}
// foo = Bjs.iceWrite(foo)
foo = Bjs.ObjectIcer(foo, 'write')
// console.log('unknown property', foo.bla)
foo.bar = 'bip'
// foo.bla = 'bop'
console.log(fo... |
var request = require('request');
var IFTTT_CONNECTION_TIMEOUT_MS = 20000;
module.exports = function (RED) {
// This is a config node holding the keys for connecting to PubNub
function IftttKeyNode(n) {
RED.nodes.createNode(this, n);
}
RED.nodes.registerType('ifttt-key', IftttKeyNode, {credentials: {key: ... |
'use strict';
// dependencies
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import uiBootstrap from 'angular-ui-bootstrap';
//import accordion from 'angular-ui-bootstrap/src/accordion';
// configurations
import {routesConfig} from './app.routes.config';
// modules
import '../common/common.... |
alchemy.storage = (function() {
var db = window.localStorage;
function set(key, value) {
value = JSON.stringify(value);
db.setItem(key, value);
}
function get(key) {
var value = db.getItem(key);
try {
return JSON.parse(value);
} catch(e) {
... |
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const autoprefixer = require('autoprefixer');
module.exports = {
devtool: 'source-map',
entry: './src/index.js',
module: {
loaders: [
... |
module.exports = {
tags: ['special', 'password'],
beforeEach : function (browser) {
browser
.url('http://localhost:8000/')
.waitForElementVisible('#password', 1000);
},
'Ctrl x key combination is ignored' : function (browser) {
browser
.sendKeys('#password', 'Password1')
.sendKey... |
var http = require("http");
var url = require("url");
function start(route, handle) {
function onRequest(request, response) {
var pathname = url.parse(request.url).pathname;
console.log("Request for " + pathname + " received.")
route(handle, pathname, response, request);
}
http.createServer(onRequest).list... |
//Node namespaces
var fs = require("fs");
var extend = require("./Extend.js");
var Colors = require("./Colors.js");
/**
* Module designed get all CSS and create a readable hierarchy object from the content
* @param {String} uncompiledCssPath Path to uncompiled CSS root
* @param {String} cssCompiler One of the... |
var {Helper, Type} = require("@kaoscript/runtime");
module.exports = function() {
if(Type.isValue(foo) ? Helper.concatString(foo.bar(), "world") === "hello world" : false) {
console.log(foo);
}
}; |
import { combineReducers } from 'redux'
import todos from './todos'
import visibilityFilter from './visibilityFilter'
const todo = combineReducers({
todos,
visibilityFilter
})
export default todo
|
// Copyright 2007 The Closure Library Authors. 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
//
// Unl... |
import Ember from 'ember';
export default Ember.ArrayController.extend({
actions: {
inceaseWins: function(user){
user.set('wins', user.get('wins')+1);
user.save();
},
inceaseLosses: function(user){
user.set('losses', user.get('losses')+1);
user.save();
},
createPlayer: ... |
'use strict';
angular.module('myApp.home', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/home', {
templateUrl: 'view/home.html',
controller: 'homeCtrl'
});
}])
.controller('homeCtrl', [function($scope,$http) {
}]);
|
social.addModule("twitter", null, {
name: "twitter",
oauth: {
version: '1.0',
authorize_uri: 'api.twitter.com/oauth/authorize',
reg_oauth_token: /oauth_token=([^&]+)(?:&oauth_verifier=([^&]+))?/,
request_token_uri: 'api.twitter.com/oauth/request_token',
access_token_uri: ... |
module.exports = {
"domain": "example.com",
"email": "support@example.com",
"disqus": "films-online",
"theme": "skeleton",
"top": [320, 321, 322, 323, 324, 325, 326, 327],
"top_category": "imdb-vote-up",
"abuse": [350, 351, 352],
"protocol": "http://",
"st": "st.kp.yandex.net",
"... |
'use strict';
module.exports = {
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/drawr',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',... |
/*!
* js-file-browser
* Copyright(c) 2011 Biotechnology Computing Facility, University of Arizona. See included LICENSE.txt file.
*
* With components from: Ext JS Library 3.3.1
* Copyright(c) 2006-2010 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
*/
/*!
* Ext JS Library 3.3.1
* Copyrigh... |
/*
Tracklist View is rendered within a stack.
It contains Track views
*/
define(["jquery","backbone","handlebars",
"models/track", "views/controls/track","text!templates/controls/track.list.html"],
function($,Backbone,Handlebars,Tracks,TrackView,trackListTemplate){
var TrackListView = Back... |
/**
* @name isInstanceOf
* @description Checks if given flair class/struct instance is an instance of given class/struct type or
* if given class instance implements given interface or has given mixin mixed somewhere in class
* hierarchy
* @example
* isInstanceOf(obj, type)
* @params
... |
var expect = require('../base-test').expect;
var proxyquire = require('proxyquire');
var indexHandler = require('../../src/handlers/index');
describe('Index handler', function () {
it('# should return hello world object', function () {
indexHandler({}, {
json : function(data){
expect(data).to.deep.equal({
... |
'use strict';
module.exports = function(req, res) {
res.render('index', {
'query': req.query.q || req.query.query || ''
});
} |
(function(){
var NormalTangentHelper = {
create(mesh, size) {
if (!size) {
size = 1;
}
var node = new Hilo3d.Node();
var geometry = mesh.geometry;
var normals = geometry._normals;
var tangents = geometry._tangents;
... |
'use strict';
const _ = require('lodash');
const helpers = require('./helpers');
// We've supplemented `Events` with a `triggerThen` method to allow for
// asynchronous event handling via promises. We also mix this into the
// prototypes of the main objects in the library.
const Events = require('./base/events');
//... |
import breadcrumbsPathFactory from './BreadcrumbsPathFactory';
describe('BreadcrumbsPathFactory', () => {
it('should create an options from a url', () => {
const url = 'aaa/bbb/ccc';
const options = [
{id: 0, value: 'aaa', link: '/aaa'},
{id: 1, value: 'bbb', link: '/aaa/bbb'},
{id: 2, val... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'format', 'de', {
label: 'Format',
panelTitle: 'Absatzformat',
tag_address: 'Adresse',
tag_div: 'Normal (DIV)',
tag_... |
/**
* implementation of a Sender model
*/
'use strict';
var mongoose = require('mongoose');
var simpleSchema = require('./schema.js');
module.exports = mongoose.model('Sender', simpleSchema); |
/*! jQuery UI - v1.11.4 - 2015-03-11
* http://jqueryui.com
* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.j... |
const bcrypt = require('bcrypt');
const {
getByEmail,
getById,
} = require('../database/controllers/user');
const passport = require('passport');
const LocalStrategy = require('passport-local').Strategy;
passport.use(new LocalStrategy({
usernameField: 'email',
passwordField: 'password',
},
(email, pass... |
$(document).ready(function () {
var vertices = [
[200, 200],
[100, 300],
[300, 200],
[200, 100]
];
var edges = [
[0, 1],
[0, 2],
[0, 3]
];
var g = new Graph(vertices, edges);
g.makeInteractive({
canvas: $('#canvas'),
clearCanvas: true,
onChange: function(g) {
cmp = geom.angleCompare(g.vertice... |
exports.name = 'marco'
global.marco = 'polo'
|
/*
Copyright (c) 2014 Joseph B. Hall [@groundh0g]
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, publish,... |
// # Ghost bootloader
// Orchestrates the loading of Ghost
// When run from command line.
var express,
ghost,
parentApp,
errors;
// Make sure dependencies are installed and file system permissions are correct.
//确定依赖的包都已经准确安装,以及文件系统的权限没有问题。
require('./core/server/utils/startup-check').check();
// Proceed... |
import React from 'react';
import classSet from 'classnames';
import Const from './Const';
class SelectRowHeaderColumn extends React.Component{
render(){
var thStyle = {
width: 35
};
return(
<th style={thStyle}>
<div className="th-inner table-header-column">
{this.props.children... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.