code stringlengths 2 1.05M |
|---|
var app = require('app'); // Module to control application life.
var BrowserWindow = require('browser-window'); // Module to create native browser window.
require('./server/server');
// Report crashes to our server.
require('crash-reporter').start();
// Keep a global reference of the window object, if you don't, t... |
/*jslint node:true plusplus:true white:true */
'use strict';
/*
* this solution is solid, but not nearly as simple and beautiful as the
* expected solution, which is:
*
module.exports = function map(arr, fn) {
return arr.reduce(function(acc, item, index, arr) {
return acc.concat(fn(item, index, ... |
(function() {
var ApiBase, debug, querystring, slumber,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.p... |
'use strict';
var _ = require('../../undash');
const buildChoicesMap = (replaceChoices) => {
var choices = {};
replaceChoices.forEach(function (choice) {
var key = choice.value;
choices[key] = choice.label;
});
return choices;
};
const getTagPositions = (text) => {
var lines = text.split('\n');
va... |
$( document ).ready(function() {
$("#kereses").live('click', function () {
$( "#main" ).load( "./table.php", function() {
$("#adattar").live('click', function () {
$("#main").load("./about.html", function() {
});
});
$("#sugo").live('click... |
import React, { Component, PropTypes} from 'react'
import { Link } from 'react-router-dom';
import { connect} from 'react-redux';
import styles from './styles.scss';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
import SettingsAddAHVCluster from '../../components/SettingsAddAHVCluster/SettingsAddAHVClust... |
(function ($) {
var _accountService = abp.services.app.account;
var _$form = $('form[name=TenantChangeForm]');
function switchToSelectedTenant () {
var tenancyName = _$form.find('input[name=TenancyName]').val();
if (!tenancyName) {
abp.multiTenancy.setTenantIdCookie(null);
... |
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### ####... |
// Mongoose User Schema
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
moment = require('moment');
moment().format();
var ListingSchema = new mongoose.Schema({
owner: { type: String, required: true }
, ownerName: { type: String, required: true }
, type: { type: String, required: true }
... |
// All code points in the `Gujarati` script as per Unicode v8.0.0:
[
0xA81,
0xA82,
0xA83,
0xA85,
0xA86,
0xA87,
0xA88,
0xA89,
0xA8A,
0xA8B,
0xA8C,
0xA8D,
0xA8F,
0xA90,
0xA91,
0xA93,
0xA94,
0xA95,
0xA96,
0xA97,
0xA98,
0xA99,
0xA9A,
0xA9B,
0xA9C,
0xA9D,
0xA9E,
0xA9F,
0xAA0,
0xAA1,
0xAA2,
0x... |
var config = module.exports;
config["My tests"] = {
environment: "node", // or "browser"
rootPath: "../",
sources: [
],
tests: [
"test/*Test.js"
]
};
|
define([
'src/Type'
], function(Type) {
const $type = Symbol.for('cell-type');
const $attrs = Symbol.for('cell-type.attrs');
const $statics = Symbol.for('cell-type.statics');
const $inner = Symbol.for('cell-type.inner'); // reference to the wrapped inner function
describe("Type", functi... |
$('.form').find('input, textarea').on('keyup blur focus', function (e) {
var $this = $(this),
label = $this.prev('label');
if (e.type === 'keyup') {
if($this.is('#question')) {
if ($this.val() === '') {
label.removeClass('bigActive highlight');
} else {
label.addClass('bigActive highlight... |
(function(Radiometal, $) {
Radiometal.controller('EmissionsController', ['$scope',
function($scope){
$scope.selected = 1;
$scope.select = function(id) {
$scope.selected = id;
};
}
]);
})(Radiometal,jQuery);
var Radiometal = angular.module('Rad... |
/**
* A mechanism for displaying data using custom layout templates and formatting.
*
* The View uses an {@link Ext.XTemplate} as its internal templating mechanism, and is bound to an
* {@link Ext.data.Store} so that as the data in the store changes the view is automatically updated
* to reflect the changes. The v... |
/**
* Angular loading bar configuration.
*/
define([
], function () {
"use strict";
var LoadingBarConfig = function ($stateProvider, $urlRouterProvider, cfpLoadingBarProvider) {
// set loading bar preferences
cfpLoadingBarProvider.includeSpinner = true;
// only show the loading bar i... |
let Action = require('./Action'),
calc = require('../inc/calc'),
utils = require('../inc/utils'),
simulations = require('./simulate/simulations');
const DEFAULT_PROP = 'velocity';
class Simulate extends Action {
constructor(...args) {
super(...args);
this.calculatesVelocity = true;
... |
/**
* Created by Vicky on 5/26/2017.
*/
function fruitOrVeggie(item){
"use strict";
switch (item){
case 'banana':
case 'apple':
case 'kiwi':
case 'cherry':
case 'lemon':
case 'grapes':
case 'peach':
console.log('fruit');
break;
... |
define([], function() {
"use strict";
var $__default = {
"abstract": true,
"controller": true,
"template": true,
"url": ""
};
return {
get default() {
return $__default;
},
__esModule: true
};
});
|
"use strict";
exports.__esModule = true;
var core_1 = require("@angular/core");
var ImagePreviewDirective = (function () {
function ImagePreviewDirective(el, renderer) {
this.el = el;
this.renderer = renderer;
}
ImagePreviewDirective.prototype.ngOnChanges = function (changes) {
var r... |
const next = require('next');
const express = require('express');
const port = parseInt(process.env.PORT, 10) || 3000;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();
app.prepare().then(() => {
const server = express();
// use pages/index.js ... |
/* eslint-disable
react/prefer-stateless-function,
no-use-before-define,
react/jsx-no-bind,
react/prop-types
*/
import React, { Component } from 'react-native';
import FriendEntry from '../components/friend_entry';
import { connect } from 'react-redux';
import Immutable from 'immutable'; // just for testing
import { ... |
var jef = require('jef');
function TextControl(model, element, contentBinding){
var control = this;
this._render = function(){
if(typeof window === 'undefined'){
this.element = element;
}else{
this.element = document.createTextNode(element.textContent);
elem... |
/**
* Created by SASi on 14-May-16.
*/
module.exports = (function () {
const mongoose = global.mongoose;
const jwt = global.jwt;
const bcrypt = global.bcrypt;
const request = require("request");
const UserModel = require('../models/user');
const ProjectModel = require('../models/project');... |
angular.module('app.posts-index', []).
config(function($stateProvider) {
$stateProvider.state( 'posts-index', {
resolve:{
posts: function(getPosts){
// $http returns a promise for the url data
//return $http({method: 'GET', url: '/posts'});
return getPosts.init();
... |
'use strict';
angular.module('myApp.loginDirective', ['ngRoute']).directive('login', function () {
return {
restrict: 'E',
scope: {},
templateUrl: 'components/directives/templates/login-template.html',
controller: function ($scope, loginService, $cookies) {
$scope.logge... |
angular.module('arBlog')
.controller('TagsCtrl',[
'$scope',
'postsFactory',
'metaService',
'marked',
function($scope,postsFactory,metaService,marked){
$scope.posts = postsFactory.posts;
$scope.resume = function(body){
//console.log(body);
return body.split(/\s+/).slice(0,10).join(" ") + "...";
};
$s... |
// default message object
function messages(type) {
switch(type) {
case 'home':
var message = {
title: 'Escribe en el buscador lo que quieres encontrar',
advices: [
'Escribe tu búsqueda en el campo que figura en la parte superior de la pantalla... |
var searchData=
[
['disablecompare_124',['disableCompare',['../class_a_d_c___module.html#ac635f675a9690a4db016c73c31818262',1,'ADC_Module']]],
['disabledma_125',['disableDMA',['../class_a_d_c___module.html#ac1610dcab46476f287c2dd4d96465c47',1,'ADC_Module']]],
['disableinterrupts_126',['disableInterrupts',['../cla... |
/*
Product Name: dhtmlxSuite
Version: 4.3
Edition: Standard
License: content of this file is covered by GPL. Usage outside GPL terms is prohibited. To obtain Commercial or Enterprise license contact sales@dhtmlx.com
Copyright UAB Dinamenta http://www.dhtmlx.com
*/
//please beware that function started from _in_head... |
React.createElement(Component, React.__spread({}, x, { y: 2, z: true }));
|
// when the extension is first installed
chrome.runtime.onInstalled.addListener(function(details) {
chrome.storage.sync.get("muted_list", function (data) {
if (!data["muted_list"]) {
chrome.storage.sync.set({"muted_list": null});
}
});
chrome.storage.sync.get("transparency", function (data) {
... |
const { UIPlugin } = require('@uppy/core')
const { h } = require('preact')
const { SearchProvider, Provider } = require('@uppy/companion-client')
const { SearchProviderViews } = require('@uppy/provider-views')
/**
* Unsplash
*
*/
module.exports = class Unsplash extends UIPlugin {
static VERSION = require('../pack... |
const SUPPORTED_BROWSERS = [
// based on free plan with BrowserStack
'chrome',
'firefox',
'ie'
]
exports.config = {
framework: 'mocha',
seleniumAddress: 'http://hub-cloud.browserstack.com/wd/hub',
specs: [ 'test-all.js' ],
commonCapabilities: {
'browserstack.user': process.env.BROWSERSTACK_USERNAME... |
import Rollbar from 'rollbar';
import omit from 'lodash/omit';
import isFunction from 'lodash/isFunction';
import { bunyanLevelToRollbarLevelName } from '../common/rollbar';
/**
* @description Custom bunyan stream that transports to Rollbar from a node process.
* See https://rollbar.com/docs/notifier/node_rollbar/ f... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["kompo"] = factory();
else
root["kompo"]... |
define([
'channel',
'backbone'
], function(){
var Channel = Backbone.Model.extend({
initialize: function(){
this._channel = null;
this._clientId = this.createId();
},
createId: function() {
var rand = Math.floor(Math.ra... |
(function () {
'use strict';
angular
.module('com.module.files')
.service('FileService', function ($http, CoreService, Setting, gettextCatalog) {
this.find = function () {
return $http.get(CoreService.env.apiUrl + 'containers/files/files').success(function (res) {
console.log(res.da... |
function CLASS_PHOTO_UPLOAD(){
this.init();
}
CLASS_PHOTO_UPLOAD.prototype = {
init:function(){
this.$upLoadBar = $('#up_file');
this.$unUploadTip = $('.unUploadTip');
this.$operationBtn = $('.operationBtn');
this.$startUpload = $('#startUpload');
this.$removeList = $('#removeList');
this.$album... |
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import loremipsum from './loremipsum';
import loremipsumAsReact from './loremipsumAsReact';
import IframeResizer from '../index';
// need to pass in checkOrigin=false for our tests
const iframeResizerOptions = {
// log: true,
// auto... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
const { EventEmitter } = require( "events" );
QUnit.module( "ConsoleReporter", hooks => {
let emitter;
let callCount;
hooks.beforeEach( function() {
emitter = new EventEmitter();
callCount = 0;
const con = {
log: () => {
callCount++;
}
};
QUnit.reporters.console.init( emitter, con );
} );
QU... |
// Copyright (c) 2008-2013 Kris Maglione <maglione.k at Gmail>
// Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
"use strict";
/** @scope modules */
// comm... |
angular.module("mainPage").controller("MainPageController", [
"$scope",
"Authentication",
function($scope, Authentication)
{
$scope.authentication = Authentication;
}
]);
|
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
ObjectId = Schema.ObjectId;
// create FPU schema
var FPUSchema = new Schema({
location: {
lat : Number,
long : Number
},
destination : ObjectId,
boardingPoint : ObjectId,
boardingTime : Number,
travelTime : Number,
bus : Object... |
'use strict';
/**
* Generates a guest name from the provided session id.
* @param {string} session_id - A session id.
* @returns {string} - A guest name generated from the socket session object.
* @readonly
*/
exports.generate = function(session_id) {
var value = parseInt(session_id.slice(-5), 16) % 100000;
... |
'use strict';
// Use application configuration module to register a new module
ApplicationConfiguration.registerModule('items');
|
// All code points in the `Elbasan` script as per Unicode v8.0.0:
[
0x10500,
0x10501,
0x10502,
0x10503,
0x10504,
0x10505,
0x10506,
0x10507,
0x10508,
0x10509,
0x1050A,
0x1050B,
0x1050C,
0x1050D,
0x1050E,
0x1050F,
0x10510,
0x10511,
0x10512,
0x10513,
0x10514,
0x10515,
0x10516,
0x10517,
0x10518,
0... |
import {expect} from 'chai'
import {d3Line} from 'ember-frost-chart/helpers/d3-line'
import {describe, it} from 'mocha'
describe.skip('Unit | Helper | d3 line', function () {
// Replace this with your real tests.
it('should work', function () {
let result = d3Line(42)
expect(result).not.to.equal(null)
})... |
import React from 'react';
import Range from '../../components/range';
class RangeTest extends React.Component {
state = {
range2: { first: 0, second: 5 },
range3: { first: 0, second: 1 },
};
handleChange = (range, value) => {
this.setState({ ...this.state, [range]: value });
};
render() {
... |
'use strict';
var
Vaulted = {},
Promise = require('bluebird'),
_ = require('lodash');
/**
* @module auth/token
* @extends Vaulted
* @desc Provides implementation for the Vault Auth Token backend APIs
*
*/
module.exports = function extend(Proto) {
Vaulted.getCreateTokenEndpoint = _.partialRight(
_... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
define(['snake/snake-objects','snake/snake-renderer'],function(Objects,Renderer) {
'use strict'
var Engine;
Engine = (function() {
var TILE_SIZE = 10,
TOTAL_HORIZONTAL_TILES=100,
TOTAL_VERTICAL_TILES = 50,
SNAKE_START_SIZE= 5,
DELLEY = 4;
fun... |
var expect = require('chai').expect;
describe('When adding renderer to tokens', function () {
var ebookr;
beforeEach(function () {
ebookr = require('../lib/ebookr').new();
});
it('should be able to add renderer individually', function () {
var fn = function () {};
ebookr.addRenderer('foo', fn);
expect(e... |
var CookiesHandler = function(){
this.startObserverMessage();
}
CookiesHandler.prototype.startObserverMessage = function(){
var handler = this;
$('#cookies-alert').show();
$('#cookies-alertButton').click(function(){
handler.createCookie();
$('#cookies-alert').fadeOut();
});
$('#accept-cookies-btn... |
import React, { Component } from 'react';
import {
StyleSheet,
View,
Dimensions,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 35.679976;
const LONGITUDE = 139.768458;
const LATITUDE_DELT... |
/*global
startLiveviewWS,
getTimeText,
log*/
//the current structure
let structure;
//keep a copy of the current amendment
let amendment;
//the current amendment and clause elements
let amendmentElements;
//list of last amendments
let lastAmdList;
//maps between string path segments and sub element selectors
const... |
export default {
en: {
save: 'Save',
shippingMethodLabel: 'Select Shipping Method'
},
es: {
save: 'Guardar',
shippingMethodLabel: 'Selecione Método de Envio'
}
};
|
import I from 'immutable';
import { createReducer, createAction } from 'redux/creator';
import {
FETCH_LIST_DATA,
FETCH_LIST_DATA_SUCCESS,
FETCH_LIST_DATA_FAIL
} from 'redux/action-types';
let defaultState = I.fromJS([
{
id: 1,
name: '复仇之魂 Shendelzare Silkwood'
},
{
id: ... |
'use strict';
angular.module('refugeesApp')
.controller('user-managementDeleteController', function($scope, $uibModalInstance, entity, User) {
$scope.user = entity;
$scope.clear = function() {
$uibModalInstance.dismiss('cancel');
};
$scope.confirmDelete = function (login) ... |
/*
* jQuery simple-color plugin
* @requires jQuery v1.4.2 or later
*
* See https://github.com/recurser/jquery-simple-color
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Version: 1.2.3 (Sat, 29 Aug 2020 11:55:25 GMT)
*/
(function($) {
/**
* simpleColor() provi... |
version https://git-lfs.github.com/spec/v1
oid sha256:b221b09f129c267d9c118ab0e7e193fd1990b0b27316d34f171dc2f38201237b
size 38076
|
import * as server from './server';
import * as logs from './logs';
export const api = { server, logs };
|
//= require socket
var myApp = angular.module('myApp', [
'ui.bootstrap',
'ui.ace',
'socket'
]);
myApp.controller('appCtrl', ['$scope', '$http', 'socket',
function($scope, $http, socket) {
$scope.editorW = 'col-md-6';
$scope.html = '';
$scope.css = '';
$scope.js = '';
... |
import {
SELECT_ITEM,
LOAD_DATA,
DATA_LOADING_SUCCESS,
DATA_LOADING_ERROR,
DRAG_MOVE_ITEM,
DRAG_RESET_ITEMS,
LOAD_RELATIONSHIP_DATA,
} from './constants';
import {
loadItems,
} from '../List/actions';
/**
* Select an item
*
* @param {String} itemId The item ID
*/
export function selectItem (itemId) {
re... |
myApp.factory('galleryModel', ['$http', function($http) {
return {
saveGallery: function(galleryData) {
return $http({
headers: {
'Content-Type': 'application/json'
},
url: baseUrl + 'galeri',
method: "POST",
... |
// @flow
import React, { Component } from 'react';
import Peaks from '../../../../node_modules/peaks.js/peaks.js';
//import Peaks from 'peaks.js';
import styles from './WaveformPeaks.css';
import LoadingDots from '../../LoadingDots';
class WaveformPeaks extends Component {
props: {
filePath: string,
... |
Package.describe({
name: "nova:voting",
summary: "Telescope scoring package.",
version: "0.26.0-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
});
Package.onUse(function (api) {
api.versionsFrom("METEOR@1.0");
api.use(['nova:core@0.26.0-nova']);
api.use([
'nova:posts@0.26.0-nova',
... |
/*
* /MathJax-v2/localization/gl/FontWarnings.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* 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.or... |
module.exports = { prefix: 'far', iconName: 'arrow-alt-left', icon: [448, 512, [], "f355", "M272 431.952v-73.798h128c26.51 0 48-21.49 48-48V201.846c0-26.51-21.49-48-48-48H272V80.057c0-42.638-51.731-64.15-81.941-33.941l-176 175.943c-18.745 18.745-18.746 49.137 0 67.882l176 175.952C220.208 496.042 272 474.675 272 431.952... |
import React from 'react';
import ReactDOM from 'react-dom';
import Nav from './Nav';
import Board from './Board';
import '../scss/App.scss';
ReactDOM.render(
<Nav />,
document.getElementById('navbar-container')
);
ReactDOM.render(
<Board count={20} />,
document.getElementById('react-container')
);
|
define(['content/extend', 'content/plugin'], function (extend, Plugin) {
function Admonition() {
}
Admonition.prototype = extend(Plugin.prototype, {
});
return Admonition;
}); |
//
// var tobi = require('tobi');
// var app = require('../app.js');
// var browser = tobi.createBrowser(app);
//
// browser.get('/', function(res, $) {
//
// browser.click('get_test', function(res, $){
// $('content').should.be('')
// });
//
// });
//
// app.close();
|
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
funct... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var attendeeSchema = new Schema({
name: String,
profileId: String,
meetingId: String
});
var Attendee = mongoose.model('Attendee', attendeeSchema);
module.exports = Attendee; |
import alt from '../alt';
import request from 'superagent';
class SignupActions {
createUser(user) {
request
.post('/api/users')
.send(user)
.set('Accept', 'application/json')
.end((err, result) => {
if(err) {
this.signupErrorDispatcher(err.response.body.message);
... |
export { default as Forms } from './forms';
export { default as Form } from './form';
export { default as SignInForm } from './signInForm';
export { default as SignUpForm } from './signUpForm';
export { default as Input } from './input';
export { default as Overlay } from './overlay';
|
function staticLandingPageEditor(collectionId, data) {
var newSections = [], newLinks = [];
var setActiveTab, getActiveTab;
var renameUri = false;
$(".edit-accordion").on('accordionactivate', function (event, ui) {
setActiveTab = $(".edit-accordion").accordion("option", "active");
if (setActiveTab !==... |
/**
* If you change this file, make sure to run `npm run require-script` and
* copy-paste the output to README.md and index.html
*/
;(function (
window,
document,
galiteName,
scriptString,
src,
scriptTag,
firstScriptTag
) {
window[galiteName] =
window[galiteName] ||
function () {
;(wind... |
var player_a = {
name : 'player a',
color : 'rgb(0, 255, 0)',
points : 0,
starting_cells : [
{x:0,y:10},
{x:0,y:11},
{x:1,y:10},
{x:1,y:11},
{x:6,y:5},
{x:5,y:6}
]
};
var player_b = {
name : 'player b',
color : 'rgb(255, 0, 0)',
points : 0,
starting_cells : [
{x:11,y:0},
{x:11,y:1},
{x:10,y:... |
{
return [let_index, let_value];
}
|
var main = (function() {
/* Initialise state */
var resourceTiming,
loadTimings,
allTimings,
perfData,
allResourceTimings,
memoryInital,
memoryMax,
sizeArray,
filteredArrays = {
scriptArray: [],
imgArray: [],
styleArray: []
},
wrapperEl = $('.chart-wrapper'),
topTenEl = $('#chart-... |
import UPopover from './UPopover'
export {
UPopover
}
|
/**
* @author Mat Groves http://matgroves.com/ @Doormat23
*/
/**
* The Graphics class contains methods used to draw primitive shapes such as lines, circles and rectangles to the display, and color and fill them.
*
* @class Graphics
* @extends DisplayObjectContainer
* @constructor
*/
PIXI.Graphics = function()... |
/**
* 删除对象里面value值为null的键值对
* @param {*} data 接口返回的blob数据
* @param {*} name excel名称
* @param {*} callBack 导出成功/失败回调 回调返回{type:fail/success} fail情况下 返回{ type: "fail", code, msg }
*/
function exportXls(data, name = 'excel', callBack) {
if (!data || data.size === 0) {
callBack && callBack({type: 'fail', msg: ... |
$(document).ready(function(){
$("#title").hide().fadeIn(2000);
$("#subtext").hide().fadeIn(2900);
$("#login_button").hide().fadeIn(2000);
$("#tour_button").hide().fadeIn(3300);
$("#login_button").click(function(){
$("div#slide_div").animate({ "height": "toggle", "opacity": "toggle"}, 600);
$("#log... |
/**
* Created by souzaalves on 11/05/16.
*/
function Model (path,server){
"use strict";
console.log('Models ready!');
var path = require('path');
var Schema = require(path.resolve('back_end/schemas/Schema')),Mongoclient = require('mongodb').MongoClient,
assert = require('assert'), url = 'mon... |
/*
* GET home page.
*/
exports.view = function(req, res){
res.render('index'
, {
'projects': [
{ 'name': 'Waiting in Line',
'image': 'lorempixel.people.1.jpeg',
'id': 'project1'
},
{ 'name': 'Needfinding',
'image': 'lorempixel.city.1.jpeg',
'id': 'project2'
},
{ 'name': 'Prototypi... |
var Buffer = require('buffer').Buffer
var fs = require('fs')
var test = require('tape')
var http = require('../..')
test('requestTimeout', function (t) {
var req = http.get({
path: '/browserify.png?copies=5',
requestTimeout: 10 // ms
}, function (res) {
res.on('data', function (data) {
})
res.on('end', fu... |
$("#addTripForm").unbind().bind('submit',function(){
var form = $(this);
var url = form.attr('action');
var type = form.attr('method');
$.ajax({
url:url,
type:type,
data:form.serialize(),
dataType:'text',
success:function(data){
$("#tripResponse").html(data);
}
});
return false;
}); |
module.exports = function (sub, base) {
for (var i = 0, keys = Object.keys(base.prototype) ; i < keys.length; i++) {
sub.prototype[keys[i]] = base.prototype[keys[i]];
}
};
|
define(['exports', 'aurelia-logging', 'aurelia-route-recognizer', 'aurelia-dependency-injection', 'aurelia-history', 'aurelia-event-aggregator'], function (exports, _aureliaLogging, _aureliaRouteRecognizer, _aureliaDependencyInjection, _aureliaHistory, _aureliaEventAggregator) {
'use strict';
Object.defineProperty... |
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'bootstrap'
], factory);
} else {
// Browser globals:
factory(
window.jQuery
);
}
}(function ($) {
'use strict';
$.extend($.fn.modal.Constructor.pr... |
/**
* @fileOverview OpenStack integration
* @author Mike Grabowski (@grabbou)
* @version 0.2
*/
'use strict';
var util = require('util'),
_ = require('underscore'),
AmazonClient = require('./amazon');
/**
* Creates new OpenStack instance
* @class
* @classdesc OpenStack integration.
* Explanation:
* - `con... |
var cheerio = require("cheerio");
var http = require('http');
var https = require('https');
var Iconv = require('iconv').Iconv;
var querystring = require('querystring');
var cookies = {};
var doNotParseTwice = false ;
var doNotDisplayLog = false ;
var urlsParsed = {};
/* Generic page reading, supports redirection... |
let expect = require("chai").expect;
let rgbToHexColor = require('../06. RGB to Hex')
describe("rgbToHexColor(red, green, blue)", function() {
describe("Nominal cases (valid input)", function() {
it("should return #FF9EAA for 255, 158, 170", function() {
let hex = rgbToHexColor(255, 158, 1... |
'use strict'
const _ = require('lodash')
const Analyzer = require('./analyzer')
const Beautifier = require('nested-beautifier')
const Cache = require('../cache/cache')
const Error = require('../common/error')
const MySqlWorker = require('../mysql/worker')
class Djin {
constructor(config) {
const host = co... |
'use strict';
module.exports = function (grunt) {
require('jit-grunt')(grunt);
grunt.loadNpmTasks('grunt-jest');
grunt.loadNpmTasks('grunt-jsxhint');
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.loadNpmTasks('grunt-flow');
grunt.initConfig({
less: {
development: {
options: {
... |
"use strict";
exports.__esModule = true;
exports.hexToRgba = void 0;
// https://stackoverflow.com/a/51564734
var hexToRgba = function hexToRgba(hex, alpha) {
if (alpha === void 0) {
alpha = 1;
}
if (!hex) {
hex = '#OOO';
}
if (hex.startsWith('var')) {
return hex;
}
var hexColorRegexp = he... |
import gotDownload from '../src';
import { startServer, stopServer } from './file-server';
import path from 'path';
import fs from 'fs';
import promisify from 'es6-promisify';
import mkdirpModule from 'mkdirp';
import rmrfModule from 'rimraf';
const readFile = promisify(fs.readFile);
const readdir = promisify(fs.readd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.