code stringlengths 2 1.05M |
|---|
/**
* Created by easub on 2017/4/3.
*/
import React, { PureComponent } from 'react';
import { DropDownMenu, MenuItem } from 'material-ui';
import AddCircleOutline from 'material-ui/svg-icons/content/add-circle-outline';
import EachAd from './EachAd';
import EachCorner from './EachCorner';
import { PxWidth, PxHeight }... |
'use babel'
import quickSelect from 'atom-quick-select'
import data from '../data/status-codes.json'
module.exports = {
httpStatusCodesView: null,
activate (state) {
atom.commands.add('atom-workspace', 'http-status-codes:show', async () => {
const item = await quickSelect(data, {
normalizeItem... |
import React from 'react'
import PropTypes from 'prop-types'
import Button from 'components/Button'
import Delay from 'react-delay'
import { DRINK_STATUS_AVAILABLE } from 'store/bar'
import classNames from 'classnames'
import { withHandlers, compose } from 'recompose'
import CocktailImage from './assets/Cocktail.svg'
i... |
// flow-typed signature: 4733e08b2785a36d58b073a2125dae3a
// flow-typed version: <<STUB>>/babel-loader_v^7.1.2/flow_v0.54.0
/**
* This is an autogenerated libdef stub for:
*
* 'babel-loader'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with ... |
var registrationPage = {
statusBarOptions: {
showProfileControls: false,
useCustomStatusBarContent: true,
statusBarCustomContent: '<span class="statusBarRegistrationTitle">Registrazione</span>',
showBackButton: true,
backPage: 'homePage'
},
render: function(data){
var html = statusBar.re... |
!function(){
var JH = {
gId: function(id){
return document.getElementById(id);
},
setArgb: function(val) {
var valArr = val.split("(")[1].split(")")[0].split(","),
red = JH.toHex(valArr[0]),
green = JH.toHex(valArr[1]),
... |
'use strict';
require('colors');
var fs = require('fs');
var util = require('util');
var ytdl = require('ytdl');
var EventEmitter = require('events').EventEmitter;
var BASE_YOUTUBE_URL = "http://www.youtube.com/watch?v=";
var VIDEO_FORMAT = 'mp4';
function stripTitle(filename) {
return filename.replace(/[^A-Za-z... |
PDRClient.directive('responseStatus', [
function() {
return {
restrict: 'E',
replace: true,
scope: {
user: "=",
},
templateUrl: 'client/views/directives/response_status.html',
controller: [
'$scope',
'$timeout',
'$http',
'UrlService',
... |
// go to top link
$("a[href='#top']").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
$(document).ready(function (){
$('#table_admin').DataTable();
});
$('#table_admin').DataTable( {
language: {
processing: "Traitement en cours...",
search: ... |
'use strict';
/**
* Enum for locale types
* @type {{DEFAULT_LOCALE: string}}
*/
export const DEFAULT_LOCALE = 'en'; |
var keystone = require('keystone'),
async = require('async');
exports = module.exports = function(req, res) {
var view = new keystone.View(req, res),
locals = res.locals;
// Init locals
locals.section = 'blog';
locals.page.title = 'Blog - HS Hackers';
locals.filters = {
category: req.params.category
};
... |
import React from 'react';
import { Button , Row , Col , Modal , } from 'react-bootstrap';
import './Sidebar.scss';
class Sidebar extends React.Component {
render() {
return (
<Modal className='Sidebar left'
show={ this.props.isVisible } onHide={this.props.onHide}
autoFocus keyboard
... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
*/
'use strict';
let React;
let ReactFeatureFlags;
let ReactDOM;
let ReactDOMServer;
let ReactTestRenderer;... |
'use strict';
module.exports = {
type: 'error',
error: {
line: 2,
column: 1,
message: 'Unexpected end of file. The message declaration at 1:1 should be ending with a closing brace \'}\'.',
},
};
|
var crypto = require('crypto');
var lodash = require('lodash');
module.exports = function (marker, token) {
return {
flightSearch: createFlightSearchSignature.bind(null, marker, token)
};
};
var createFlightSearchSignature = function (marker, token, _params) {
var params = lodash.cloneDeep(_params);
para... |
/*! angular-async 2013-11-06 */
/*********************************************************************
Helios Kernel - javascript module loader
Licensed under MIT license, see http://github.com/asvd/helios-kernel
The Module lifecycle is processed by the following methods:
(assuming you have read the documenta... |
var Class = require('ee-class')
, log = require('ee-log')
, assert = require('assert');
var TTLCache = require('../')
, cache;
describe('The TTLCache', function(){
it('should not crash when instantiated', function() {
cache = new TTLCache({
ttl: 200
, maxLength: 5
});
});
... |
angular.module('BookChallenge')
.directive('rtgNavbarMenu', ['$cookies', '$location', 'envService', '$anchorScroll', function ($cookies, $location, envService, $anchorScroll) {
return {
scope: {},
replace: true,
restrict: 'E',
templateUrl: 'components/navbar/rtg-navbar-menu.html',
li... |
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([
'../polyfill.js',
'../node_modules/chai/chai.js'
], factory);
} else if (typeof exports === 'object') {
module.exports = factory(
require('../polyfill'),
require('chai')
);
} else {
t... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M8.5 14.5h2v1h-2zm6-7H16v3h-1.5z" /><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 13.5c0 .6-.4 1.1-.9 1.4l.49 1.13c.2.46-.14.97-.64.97-.27 0-.52-.1... |
function generateTagCloud(words, minFont, maxFont) {
var ocurences = {};
//counting the words
for (var i = 0; i < words.length; i++) {
var currWord = words[i].toLowerCase().trim();
if (!ocurences[currWord]) {
ocurences[currWord] = 0;
}
ocurences[currWord]++;
... |
import styled from 'styled-components'
import { ScreenConfig, mq } from '../../../constants/screen-config'
import TYPOGRAPHY from '../../../constants/typography-config'
import COLORS from '../../../constants/colors-config'
import { pxToRem, stepToRem } from '../../../helpers/utils/typography'
import { HEADER_HEIGHT } f... |
/*globals App*/
var auth = module.exports = {},
crypto = require('crypto'),
Users = App.require('/models/users/users');
auth.login = function(req, res, next){
Users.findOne({ email: req.body.email }, function(err, user){
if (err){return next(err);}
if (!user){err = new Error('This user does not exi... |
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
export default function (func, wait, immediate) {
... |
'use strict';
/**
* @ngdoc function
* @name cnodejs.controllers:SettingsCtrl
* @description
* # SettingsCtrl
* Main Controller of the cnodejs app
*/
angular.module('cnodejs.controllers')
.controller('SettingsCtrl', function($scope, $log, ENV, Settings) {
$log.log('settings ctrl');
// before enter view even... |
var actions = {
ADD_TODO: 'ADD_TODO',
TOGGLE_TODO: 'TOGGLE_TODO',
CLEAR_TODOS: 'CLEAR_TODOS'
}
module.exports = {
ADD_TODO: actions.ADD_TODO,
TOGGLE_TODO: actions.TOGGLE_TODO,
CLEAR_TODOS: actions.CLEAR_TODOS,
addTodo: function(text) {
this.dispatch(actions.ADD_TODO, {
text: text
})
},
... |
import { Observable } from 'rx';
function parseMilestone(milestone) {
const { title } = milestone;
return title;
}
export default function({ HTTP }) {
const updateMilestone$ = HTTP
.filter(({ request }) => {
const pattern = '^https://api.github.com/repos/[^/]+/[^/]+/milestones$';
return request.... |
(function(c){c.fn.moveitem=function(a){a=c.extend({speed:"slow",target:1,wrap:'<div class="moveitem-wrap"><ul></ul></div>',temp:'<li style="list-style-type:none;width:5px;height:0"></li>'},a);var b=this.parent().children(),e=b.index(this),d="number"===typeof a.target?e+a.target:b.index(a.target);if(0>d||d>=b.length||e=... |
//==================================================================
//
// Requires
//
//==================================================================
var html5video = require('./html5video');
var main = function() {
var argv = require('optimist')
.default('src', '')
.alias('src', 's')
... |
/**
* Module dependencies
*/
'use strict';
var _createClass = require('babel-runtime/helpers/create-class')['default'];
var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default'];
var _Object$assign = require('babel-runtime/core-js/object/assign')['default'];
var _interopRequireDefault = ... |
// Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.
//
//
// For example,
// Given nums = [0, 1, 3] return 2.
//
//
//
// Note:
// Your algorithm should run in linear runtime complexity. Could you implement it using only constant extra space compl... |
import { connect } from 'react-redux';
import * as shareModalActions from 'components/share-modal/share-modal-actions';
import * as exploreActions from '../explore-actions';
import * as reducers from './explore-map-reducers';
import initialState from './explore-map-initial-state';
import { getNexLocaGeeDatasetsIds, get... |
"use strict";
/**
* @fileoverview SIP Transactions
*/
/**
* SIP Transactions module.
* @augments SIP
*/
module.exports = function (SIP) {
var
C = {
// Transaction states
STATUS_TRYING: 1,
STATUS_PROCEEDING: 2,
STATUS_CALLING: 3,
STATUS_ACCEPTED: 4,
STATUS_COMPLETED: 5,
STAT... |
var accountData = (function() {
var position;
// getter/setter
function setIsFacebookAccount(loginType) {
sessionStorage.setItem("facebookAccount", loginType);
}
function isFacebookAccount() {
return sessionStorage.getItem("facebookAccount");
}
function setPoints(inputPoints) {
sessionStorage.setItem("p... |
'use strict';
var moment = require('moment'),
BaseRule = require('./BaseRule');
module.exports = BaseRule.extend({
apply: function(state) {
var maxDecreases = this._config.MaximumDecreasesToUsePerDay,
decreasesLeft = (maxDecreases - state.provisioning.NumberOfDecreasesToday),
endOfDa... |
'use strict';
angular.module('confRegistrationWebApp')
.service('PaymentsViewService', function PaymentsViewService(ConferenceHelper, U) {
this.getTable = function (conference, registrations) {
var table = [];
var header = getHeader();
table.push(header);
var rows = getRows(conference... |
var saveLinks = {};
var saveTitles = {};
var saveHeaders = {};
var currentSavePatternVersion = 1.3;
var savePatternVersion = checkForLegacy(); // Check for legacy save pattern
function saveSettings() {
console.log("Saving...");
// Save links
for (i = 1; i <= 12; i++) {
// Define variables
v... |
/**
* Module dependencies.
*/
var CAS = require('../lib/cas')
, should = require('should')
, nock = require('nock');
// Initial server infomation
var base_url = 'https://localhost/cas',
service = 'test_service',
sso_servers = ['test_remote_address'],
cas = new CAS({
base_url: base_url,
... |
"use strict"
var o = require("ospec")
var domMock = require("../../test-utils/domMock")
var vdom = require("../../render/render")
var m = require("../../render/hyperscript")
o.spec("textContent", function() {
var $window, root, render
o.beforeEach(function() {
$window = domMock()
root = $window.document.createE... |
// moment.js locale configuration
// locale : dutch (nl)
// author : Joris Röling : https://github.com/jjupiter
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // ... |
var imageResizer=function(){function t(t){t.naturalWidth;var e=t.naturalHeight,a=document.createElement("canvas");a.width=1,a.height=e;var n=a.getContext("2d");n.drawImage(t,0,0);for(var r=n.getImageData(0,0,1,e).data,i=0,o=e,u=e;u>i;)0===r[4*(u-1)+3]?o=u:i=u,u=o+i>>1;var c=u/e;return 0===c?1:c}function e(e,a,n,r,i,o,u... |
// All code points in the `Samaritan` script as per Unicode v8.0.0:
[
0x800,
0x801,
0x802,
0x803,
0x804,
0x805,
0x806,
0x807,
0x808,
0x809,
0x80A,
0x80B,
0x80C,
0x80D,
0x80E,
0x80F,
0x810,
0x811,
0x812,
0x813,
0x814,
0x815,
0x816,
0x817,
0x818,
0x819,
0x81A,
0x81B,
0x81C,
0x81D,
0x81E,
0... |
const LOAD = 'web-next/blitzSinglePastProject/LOAD';
const LOAD_SUCCESS = 'web-next/blitzSinglePastProject/LOAD_SUCCESS';
const LOAD_FAIL = 'web-next/blitzSinglePastProject/LOAD_FAIL';
const initialState = {
loaded: false,
data: {}
};
export function load(params) {
return {
types: [LOAD, LOAD_SUCCESS, LOAD_... |
import { partition } from "reiter";
import * as matchers from "./matchers.js";
expect.extend(matchers);
describe("partition(iteratee, iterable)", () => {
test("partitions an iterable", () => {
const mod3 = jest.fn(n => n % 3);
const numbers = [1, 1, 2, 3, 5, 8, 13, 21];
const partitions = partition(mod3... |
System.register(['angular2/core', 'angular2/router'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? d... |
export const ic_tram_twotone = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M12.97 7h-1.94c-2.75.08-3.62.58-3.9 1h9.74c-.28-.42-1.15-.92-3.9-1zM7 16v1c0 .45.3.84.74.95h3.11c-.22-.26-.35-.59-.35-.95 0-.39.15-.73.39-1H7zm6.... |
'use strict';
/**
* Module dependencies.
*/
var path = require('path'),
mongoose = require('mongoose'),
Vm = mongoose.model('Vm'),
Harness = mongoose.model('Harness'),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));
var Client = require('node-rest-client'... |
'use strict'
exports.name = 'EVN'
exports.fields = [
'SegmentType'
, 'TypeCode'
, 'RecordedDateTime'
, 'DateTimePlannedEvent'
, 'EventReasonCode'
, 'OperatorID'
, 'EventOccurred'
]
|
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define({widgetLabel:"Medi\u00e7\u00e3o de \u00c1rea",hint:"Inicie a medi\u00e7\u00e3o clicando no mapa para posicionar o seu primeiro ponto",unsupported:"A medi\u0... |
/* globals jQuery */
(function ($) {
// Selector to select only not already processed elements
$.expr[":"].notmdproc = function (obj) {
if ($(obj).data("mdproc")) {
return false;
} else {
return true;
}
};
function _isChar(evt) {
if (typeof evt.which == "undefined") {
return... |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global'],
function(jQuery) {
"use strict";
/**
* Token renderer.
* @namespace
*/
var TokenRend... |
const common = require('../../../common.js');
const mockery = require('mockery');
const assert = require('assert');
describe('test CLI Runner Mocha', function() {
beforeEach(function() {
process.env['ENV_USERNAME'] = 'testuser';
mockery.enable({useCleanCache: true, warnOnReplace: false, warnOnUnregistered: ... |
var index={};index={text:function(e){console.log("text")}},index.test();
var main=main||{};main.test=function(n){console.log("main test")},me.test(); |
const assert = require('assert');
import EwmaBandWidthEstimator from '../../../src/utils/ewma-bandwidth-estimator';
import Hls from '../../../src/hls';
describe('EwmaBandWidthEstimator', () => {
it('returns default estimate if bw estimator not available yet', () => {
var defaultEstimate = 5e5;
var bwEstim... |
THREE.WebGLProgram = ( function () {
var programIdCount = 0;
function getEncodingComponents( encoding ) {
switch ( encoding ) {
case THREE.LinearEncoding:
return [ 'Linear','( value )' ];
case THREE.sRGBEncoding:
return [ 'sRGB','( value )' ];
case THREE.RGBEEncoding:
return [ 'RGBE','( val... |
modulejs.define('Images', ['DownloadQueue'], function (DownloadQueue) {
// the image view and model are encapsulate functionality specific to a single page,
// mainly pre-loading and rendering the appropriate URL when page visibliity changes
var Images = {
Model: Backbone.Model.extend({
defaults: {
... |
"use strict";
describe('Thermostat', function(){
var thermostat;
beforeEach(function(){
thermostat = new Thermostat;
});
describe('by default', function(){
it('starts at 20 degrees', function(){
expect(thermostat.temperature).toEqual(20);
});
it('has the power save mode set to on', func... |
'use strict';
/*jshint asi:true */
var test = require('tap').test
, tutl = require('./tutl')
, cardinal = require('cardinal')
test('\nif statement', function (t) {
var code = '' +
function outer () {
if (true) {
console.log('true');
}
}
, expected = [
undefined
, '1:5'
... |
//** Views **/
Notes.NotesView = Ember.View.extend({
elementId: 'notes',
classNames: ['azureBlueBackground', 'azureBlueBorderThin']
});
Notes.SelectedNoteView = Ember.View.extend({
elementId: 'selectedNote'
});
Notes.NoteListView = Ember.View.extend({
elementId: 'noteList',
template: Ember.Handleb... |
const execute = require('../../lib/executeCommand');
module.exports = (vm, storagectl, device, port) => {
return new Promise((resolve, reject) => {
execute([
'storageattach', '"' + vm + '"',
'--storagectl', '"' + storagectl + '"',
'--device', device,
'--port', port,
'--medium', '"none"'
... |
import React from 'react'
import { connect } from 'react-redux'
import { getItems, searchItems, displayItemName } from 'store/items'
import { getLocations, searchLocations } from 'store/locations'
import displayLocation from 'components/display-location'
import {buildStockCardHref} from 'components/stockcard-link'
impo... |
var _ = require('underscore'),
q = require('q');
var Message = require('../models/message');
var MessageRoute = {
list: function (req, res) {
var service = req.query.service;
var page = req.query.page || 0;
var limit = req.query.limit || 10;
if (!service) return res.json(404, { error: 'service ... |
/**
* breach: session_s.js
*
* Copyright (c) 2013, Stanislas Polu. All rights reserved.
* (see LICENSE file)
*
* @log
* - 20130517 @spolu Cursor handling and event forwarding
* - 20130510 @spolu Key handling support
* - 20130502 @spolu Refresh and resize handling
* - 20130501 @spolu Changed API (i... |
app.controller('NavController', ['$scope', function($scope) {
$scope.hello = 'Hello, everyone!';
}]); |
import { baseUniDriverFactory } from 'wix-ui-test-utils/base-driver';
import { dataHooks } from './constants';
const byDataHook = dataHook => `[data-hook="${dataHook}"]`;
export const sortableGridUniDriverFactory = base => {
return {
...baseUniDriverFactory(base),
startFixedElementExists: async () =>
... |
var mongoose = require('mongoose'),
user = require('../models/User'),
machineName = require('../models/MachineName'),
monthlyReport = require('../models/MonthlyReport');
module.exports = function(config) {
mongoose.connect(config.db);
var db = mongoose.connection;
db.once('open', function(err... |
(function(angular) { 'use strict';
angular.module('playground', ['ng']);
//includes('services.js');
//includes('controllers.js');
//includes('directives.js');
//includes('filters.js');
//includes('config.js');
})(window.angular); |
// flow-typed signature: 9fbc423beae938674cba66a64b5d3192
// flow-typed version: <<STUB>>/autoprefixer_v^6.6.0/flow_v0.37.4
/**
* This is an autogenerated libdef stub for:
*
* 'autoprefixer'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with ... |
import checkTitle from '../support/check/checkTitle';
import isVisible from '../support/check/isVisible';
import waitForVisible from '../support/action/waitForVisible';
import waitForExist from '../support/action/waitForExist';
import checkContainsText from '../support/check/checkContainsText';
import checkContent from... |
'use strict';
var assert = require('assert');
var yaml = require('../../');
var simpleArray = [ 'a', 'b' ];
var arrayOfSimpleObj = [ { a: 1 }, { b: 2 } ];
var arrayOfObj = [ { a: 1, b: 'abc' }, { c: 'def', d: 2 } ];
it('space should be added for array, regardless of indent', function () {
assert.deepStrictEqual(
... |
/**
* Returns settings for plupload with default
*
* @param {Object} settings
* @return {Object}
*/
function pluploadHelpersSettings(settings) {
var defaults = {
runtimes: pluploadHelpersRuntimes(),
max_file_size: '10mb',
multi_selection: false,
multipart_pa... |
'use strict';
var util = require('util');
/**
* Application wide error codes.
* @type {ErrorCodes}
*/
// From http://dustinsenos.com/articles/customErrorsInNode
// Create a new Abstract Error constructor
var AbstractError = function (code, msg, constr) {
// If defined, pass the constr property to V8's
// capt... |
'use strict';
const path = require('path');
const exeQuery = require(path.resolve('./app/db/lib/exe-query'));
function errorHandler (error) {
console.log(error);
process.exit(1);
}
function createMockUsers () {
const mockUsers = [];
for (let i = 0; i < 3; i++) {
const fbUser = {
fbname: `fbuser${i}`,... |
var searchData=
[
['signal_5ffence_5facquire',['signal_fence_acquire',['../atomic__android_8h.html#a2881945020d7e7391a309a730df1447b',1,'signal_fence_acquire(): atomic_android.h'],['../atomic__linux_8h.html#a2881945020d7e7391a309a730df1447b',1,'signal_fence_acquire(): atomic_linux.h'],['../atomic__mac_8h.ht... |
console.log('template data', UTILS.getCurrentTemplateData());
$(document).ready(function () {
var moduleData = UTILS.getCurrentTemplateData();
var grid = new GRID_HELPER.GRID('.manage-trips-content', {
gridData: moduleData,
gridId: 'gridManageTrips',
rowConfig: {
... |
import 'core-js/fn/array/find';
import DataFetcher from '../../lib/DataFetcher';
import fetchList from '../../lib/fetchList';
import actionTypes from './actionTypes';
import {
getDataReducer,
getTimestampReducer,
} from './getAccountExtensionReducer';
import {
isEssential,
simplifyExtensionData,
} from './acco... |
import React from "react";
export default class MovieCard extends React.Component {
render() {
return (
<div className="fl w-50 w-25-m w-20-l pa2">
<a
href="https://www.themoviedb.org/?language=en"
className="db link dim tc"
>
<img
src={`https://ima... |
import {openFile, buildMenu} from '../src/menu';
import * as WindowManager from '../src/window-manager';
import {expect} from 'chai';
import Dialog from 'dialog';
import Menu from 'menu';
describe('menu', function() {
describe('#openFile', function() {
it('should display open file menu', function() {
this... |
// All code points in the `Arabic` script as per Unicode v7.0.0:
[
0x600,
0x601,
0x602,
0x603,
0x604,
0x606,
0x607,
0x608,
0x609,
0x60A,
0x60B,
0x60D,
0x60E,
0x60F,
0x610,
0x611,
0x612,
0x613,
0x614,
0x615,
0x616,
0x617,
0x618,
0x619,
0x61A,
0x61E,
0x620,
0x621,
0x622,
0x623,
0x624,
0x62... |
/**
* @file The file that does the log watching.
* @author willyb321
* @copyright MIT
*/
'use strict';
const events = require('events');
const os = require('os');
const path = require('path');
const fs = require('fs-extra');
const debug = require('debug')('wotch');
const POLL_INTERVAL = 1000;
const DEFAULT_SAVE_D... |
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {scrollbarSize} from '../utils';
import styles from './Weekdays.scss';
export default class Weekdays extends PureComponent {
static propTypes = {
locale: PropTypes.object,
theme: PropTypes.object,
};
render() {
co... |
/**
* @module components
*
*/
import Component from '@ember/component';
import layout from '../templates/components/bc-title';
/**
* `Component/BCTitle`
*
* @class BCTitle Component
*
* @extends Ember.Component
*/
export default Component.extend({
layout: layout,
classNames: ['bc-title'],
classNameBindings... |
import { createHistory, useBasename } from 'history'
import { syncReduxAndRouter } from 'redux-simple-router'
import routes from './routes'
import Root from './containers/Root'
import configureStore from './redux/configureStore'
const history = useBasename(createHistory)({
basename: __BASENAME__
})
const store = con... |
'use strict'
// Setting up route
angular.module('mean.meanStarter').config(['$meanStateProvider', '$urlRouterProvider',
function ($meanStateProvider, $urlRouterProvider) {
// For unmatched routes:
$urlRouterProvider.otherwise('/')
// states for my app
$meanStateProvider
.state('home', {
... |
export default class History {
constructor({delay = 500} = {}) {
this.history = []
this.pointer = -1
this.delay = delay
}
clear() {
this.history.length = 0
}
push(data) {
let timestamp = Date.now()
let lastEntry = this.history[this.pointer]
... |
describe('ProfileController', function() {
var scope, $location, createController;
beforeEach(inject(function ($rootScope, $controller _$location_) {
$location = _$location_;
scope = $rootScope.$new();
createController = function() {
return $controller('ProfileController', ... |
Template.projectPage.onCreated(function () {
this.commentDisabled = ReactiveVar(false);
this.editParticipation = ReactiveVar(false);
});
function findUserParticipation(userId, data) {
if (userId && data) {
const participation = Participations.findOne({authorId: userId, projectId: data._id});
... |
'use strict';
/**
* requestAnimationFrame Shim
*/
window.requestAnimFrame = (function()
{
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function( callback ){
window.setTimeout(callback, 1000 / 60)... |
'use strict';
angular.module('transcript.directive.tooltip', ['ui.router'])
.directive('$log', 'tooltip', [function ($log) {
return function (scope, element, attrs) {
$(element).hover(function(){
// on mouseenter
$(element).tooltip('show');
}, functi... |
x?.f(); |
// to use this script: in mongo shell use the command:
// load('path')
// load("H:\BD\FATEC A sem\Lab 3\projectsnodejs\skillsassignments\model\scripts\for_db.js")
// or
// mongo < for_db.js
use skills
function getNextSequence(name){
var ret = db.counters.findAndModify({
query: {_id: name},
update:... |
import BattleshipGame from '../src/battleship-game.js';
import Matrix from '../src/matrix.js';
import Grid from '../src/grid.js';
describe('BattleshipGame', () => {
it('should ensure two players are provided', () => {
expect(() => new BattleshipGame()).toThrow();
expect(() => new BattleshipGame(... |
exports.up = function(knex, Promise) {
knex.schema.createTable('profile', table => {
table.increments();
table.string('firstname');
table.string('lastname');
});
};
exports.down = function(knex, Promise) {
knex.schema.dropTable('profile');
};
|
module.exports.apiUserDelete = function(urlApiUsers, DELETE) {
return DELETE(urlApiUsers(':id'), function(currentUser, canDeleteUsers, endForbiddenTokenRequired, endForbiddenInsufficientRights, deleteUserWhereId, params, end404, end) {
if (currentUser == null) {
return endForbiddenTokenRequired();
}
... |
'use strict';
const CleanCSS = require('clean-css');
const micromatch = require('micromatch');
module.exports = async function(str, data) {
const options = this.config.clean_css;
const path = data.path;
const exclude = options.exclude;
if (path && exclude && exclude.length) {
if (micromatch.isMatch(path,... |
$(document).ready( function(){
day_frame = $("#days-frame");
course_frame = $("#courses-frame");
period_frame = $("#periods-frame");
load_days();
load_courses();
load_periods();
bingo_bool = false;
$("#days-day, #days-time").on('change', function(){
load_days();
});
... |
'use strict';
angular.module('app').service(
"javaAnalysisServices",
function ($http, $q) {
return ({
getScoreOfClass: getScoreOfClass,
cloneRepo: cloneRepo
});
function getScoreOfClass(className, repoName, id) {
var request = $http({
... |
/* global require:true, console: true */
'use strict';
var nconf = require('nconf'),
express = require('express'),
fs = require('fs'),
app = express(),
mysql = require('mysql'),
bodyParser = require('body-parser'),
//session = require('express-session'),
//MemoryStore = require('express-se... |
"use strict";
/* global ErrorReport */
// js/error_report.js
/* global MicroHistory */
// js/microhistory.js
/**
* This object handles ajax requests for pages. It also
* handles the reloading of the main menu and scripts.
*
* @test-module AJAX
*/
var AJAX = {
/**
* @var bool active Whether we are busy
*... |
(function poll() {
if (typeof ynabToolKit !== 'undefined' && ynabToolKit.actOnChangeInit === true) {
ynabToolKit.enterInRegisterNow = (function () {
let accountsController;
let transactionViewModel;
// this function was taken pretty much verbatim from YNAB source code
// they have a funct... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.