code stringlengths 2 1.05M | repo_name stringlengths 5 114 | path stringlengths 4 991 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
/*
Experimental:
Point at a block and issue the following ...
/js var d = new Drone();
/js var clock = new LCDClock(d);
/js clock.start24();
... start the clock...
/js clock.stop24();
... stops the clock...
*/
var Drone = require('../drone').Drone;
var blocktype = require('../blocktype');
exports.LCDClock = ... | carlrobert/ScriptCraft | src/main/js/plugins/drone/contrib/lcd-clock.js | JavaScript | mit | 2,136 |
(function() {
'use strict';
var settings = [
{
el: '#wheel-1',
members: ['Hamburgers', 'Tacos', 'Steak', 'Burritos'],
colors: ['#C7181D', '#FCB937', '#A1B836', '#371979'],
radius: 250,
startAngle: 'random'
}
];
var wheels = [
new PrizeWheel(settings[0])
];
wheels... | miguelmota/wheel | demo/js/demo.js | JavaScript | mit | 739 |
/*
Functions to decide how particles should be reset, or have their
velocities mutated.
Life - How long has the particle been around?
If the particle has been around too long what do we do to it?
How much should we decrement the life by for the particle?
Bounds - Is the particle in bounds or out of bounds?
Is the par... | arlando/pixi-xp | js/Particles/BoundingStrategies.js | JavaScript | mit | 1,946 |
import feathers from 'feathers/client';
import hooks from 'feathers-hooks';
import auth from 'feathers-authentication-client';
import socket from 'feathers-socketio/client';
import io from 'socket.io-client';
let instance = false;
const config = global.CONFIG;
const storage = (global.TYPE === 'CLIENT') ? window.localS... | foxhound87/rfx-stack | src/shared/app.js | JavaScript | mit | 667 |
import {util} from '../../math';
import {resMan, device, store} from '../global';
import {Tw2TextureParameter} from '../parameter/Tw2TextureParameter';
/**
* Tw2Effect
*
* @property {string|number} _id
* @property {string} name
* @property {string} effectFilePath
* @property {Tw2EffectRes|null} effectRes
* @pro... | ccpgames/ccpwgl | src/core/mesh/Tw2Effect.js | JavaScript | mit | 21,105 |
// import React from 'react';
// import { shallow } from 'enzyme';
// import SingleCar from '../index';
describe('<SingleCar />', () => {
it('Expect to have unit tests specified', () => {
expect(true).toEqual(false);
});
});
| kondoSoft/react-car-rental | app/components/SingleCar/tests/index.test.js | JavaScript | mit | 235 |
'use strict';
describe('adjustments rest service', function() {
var server;
var right1, collection1, user1, renewal1, beneficiary1;
var today = new Date();
var tomorrow = new Date(today);
tomorrow.setDate(today.getDate()+1);
beforeEach(function(done) {
var helpers = require('..... | gadael/gadael | test/server/rest/admin/adjustmentsSpec.js | JavaScript | mit | 6,873 |
version https://git-lfs.github.com/spec/v1
oid sha256:ae9824293bbfe2edfda40caaf2f9ff1e750f8b12140e5bc524b6f08d91061d4c
size 11898
| yogeshsaroya/new-cdnjs | ajax/libs/skrollr/0.6.22/skrollr.min.js | JavaScript | mit | 130 |
version https://git-lfs.github.com/spec/v1
oid sha256:ddae42b3d00a52e9ecf2644819b1cb6e0649a650bdd49f4c339ee345bccbeb38
size 1592
| yogeshsaroya/new-cdnjs | ajax/libs/tablefilter/2.5.0/TF_Modules/tf_loader.min.js | JavaScript | mit | 129 |
(function() {
'use strict';
function config($stateProvider) {
$stateProvider
.state('root.movieSimilar', {
url:'/movieSimilar/:id',
views: {
'@': {
template: '<movie-similar></movie-similar>'
}
... | GuiNaud/waww | client/src/app/components/movieSimilar/route.js | JavaScript | mit | 444 |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M10 19H4v-2h6v2zm0-4H4v-2h6v2zm0-4H4V9h6v2zm0-4H4V5h6v2zm10 12h-8V9h8v10zm-2-8h-4v2h4v-2zm0 4h-4v2h4v-2z" opacity=".3" /><path d="M12 7V3H2v18h20V7H12zm-2 12H4v-2h6v2zm0-4H4v-2h6v... | callemall/material-ui | packages/material-ui-icons/src/CorporateFareTwoTone.js | JavaScript | mit | 445 |
'use strict';
module.exports = Queue;
const { isTargetName } = require('./Target');
const Unit = require('./Unit');
function Queue({ targets, operations, loaders, args }) {
const queue = args.reduce((acc, arg, i, col) => isTargetName(col[i - 1], arg)
? [ ...acc, Unit({ arg, targets, operations, loaders ... | machellerogden/targets | lib/Queue.js | JavaScript | mit | 365 |
'use strict'
const path = require('path')
const pkg = require('./app/package.json')
let config = {
// Name of electron app
// Will be used in production builds
name: 'MVM',
// Use ESLint (extends `standard`)
// Further changes can be made in `.eslintrc.js`
eslint: true,
// webpack-dev-server port
po... | JordanAssayah/MMWF | config.js | JavaScript | mit | 850 |
/**
* Created by at15 on 2016/9/8.
*/
'use strict';
const expect = require('chai').expect;
const Address = require('../../lib/model/address');
describe('Address', ()=> {
it('Can be turned into a string', () => {
let addr = new Address();
addr.city = 'Shanghai';
addr.addressLine = '800 Do... | tongquhq/about | test/model/address-spec.js | JavaScript | mit | 591 |
import path from 'path';
import Express from 'express';
import compression from 'compression';
import bodyParser from 'body-parser';
import webpack from 'webpack';
import webpackDevMiddleware from 'webpack-dev-middleware';
import webpackHotMiddleware from 'webpack-hot-middleware';
import webpackConfig from '../webpack.... | epilande/yaris | server/server.js | JavaScript | mit | 1,364 |
import http from 'http'
import https from 'https'
import path from 'path'
import os from 'os'
import cluster from 'cluster'
import fs from 'fs.extra'
import memored from 'memored'
import async from 'async'
'use strict'
let Routes = require('./routes')
class Urbano {
constructor (Conf, winston) {
this._config =... | backprog/urbano | lib/src/urbano.js | JavaScript | mit | 16,013 |
// Name : register.js
// Author: Cerek Hillen
//
// Description:
// Socket functionality covering registration of sockets.
/////////////
// Imports //
var common = require('../../common.js'),
helper = require('../helper.js');
//////////
// Code //
// Valiating the authentication and registering a socket.
func... | crockeo/chatterbox | src/sockets/methods/register.js | JavaScript | mit | 1,185 |
//
'use strict';
var A = require ('april1');
var tempBuild = require ('./templates/build');
/**
*
*/
function templateBuilder (params) {
var builder = A.modules.templates.build.templateBuilder (params);
builder.dispatchers = params.dispatchers;
return builder;
}
/**
*
*/
function defaultTemplateParams () {
... | RoboterHund/April1-HTML | modules/template.js | JavaScript | mit | 773 |
import GridRowForm from './grid_row_form';
export default class GridRow {
constructor(opts) {
this.on_grid_fields_dict = {};
this.on_grid_fields = [];
this.columns = {};
this.columns_list = [];
$.extend(this, opts);
this.row_check_html = '<input type="checkbox" class="grid-row-check pull-left">';
this.m... | vjFaLk/frappe | frappe/public/js/frappe/form/grid_row.js | JavaScript | mit | 16,544 |
'use strict';
export default {
setting: 'basic'
} | kenode/kenode-babel-express | frontend/data/page.js | JavaScript | mit | 51 |
import React from 'react';
import styles from '../../css/skeleton.css';
function Href(props) {
return (
<a className={styles.a} href={props.href}>{props.children}</a>
);
}
Href.propTypes = {
children: React.PropTypes.any.isRequired,
href: React.PropTypes.any.isRequired,
};
export default Href;
| awaseem/Jam | src/components/misc/link.js | JavaScript | mit | 310 |
var benv = require('benv');
var join = require('path').join;
var angularPath = join(__dirname, '../bower_components/angular/angular.min.js');
var checkPath = join(__dirname, '../node_modules/check-types/src/check-types.js');
require('lazy-ass');
var check = require('check-more-types');
describe('validating all names',... | bahmutov/ng-ast | test/validate-names-spec.js | JavaScript | mit | 1,610 |
var AWS = require('aws-sdk');
AWS.config.loadFromPath('./config.json');
var cloudwatchlogs = new AWS.CloudWatchLogs();
var initialParams = {
logGroupName: process.argv[2], /* required */
logStreamName: process.argv[3], /* required */
startFromHead: false
};
initialParams.startTime = new Date().getTime()-30000... | liamoehlman/cloudwatch-logs-tail | index.js | JavaScript | mit | 908 |
version https://git-lfs.github.com/spec/v1
oid sha256:b19eeba8fab7b6048fc7c1a0197936877b08ed8d241a18d7dfba2346e00405f9
size 2108
| yogeshsaroya/new-cdnjs | ajax/libs/angular.js/1.3.15/i18n/angular-locale_pt-br.js | JavaScript | mit | 129 |
// 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 ... | annewchen/Restaurant_Roulette | app/assets/javascripts/application.js | JavaScript | mit | 776 |
(function ($) {
var root = this,
MyMemoryTranslator;
MyMemoryTranslator = function () {
var self = this;
self.from = "";
self.to = "";
self.text = "";
var fixText = function (text) {
return ... | gogromat/yodatalk | scripts/MyMemoryTranslator.js | JavaScript | mit | 2,001 |
"use strict";
QUnit.module(module.id);
// These unit tests are borrowed from streamline.js
// They are a bit heavy because they test all sorts of variants of basic language constructs (loops, switch, etc.)
// This comes from streamline where it was important to test the transformation patterns for every contruct.
// We... | mllim3/graphgist-cms-api | node_modules/neo4j/node_modules/streamline/node_modules/galaxy/test/server/eval-test.js | JavaScript | mit | 15,139 |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... | PiotrDabkowski/Js2Py | tests/test_cases/language/directive-prologue/10.1.1-5gs.js | JavaScript | mit | 617 |
var fs = require('../util/fs');
var inflector = require('../util/inflector');
module.exports = function(resource) {
var resourceName = inflector.underscore(resource) + '_view';
fs.writeGenerator('view', resourceName, {
objectName: inflector.objectify(resourceName)
});
};
| denya133/neem | node_modules/ember-tools/src/generators/view.js | JavaScript | mit | 284 |
var mongoose = require('mongoose');
var contributorSchema = new mongoose.Schema({
//id: {type: String, required: true, index: { unique: true }},
name: {type: String, required: true, index: { unique: true }},
active: {type: Boolean, default: true, required: true},
expenditure: {type: Number, default: 0},
isDeletab... | wrick17/spendy-api | models/contributor.js | JavaScript | mit | 425 |
/**
* @jest-environment jsdom
*/
const { default: fetchJSON } = require('./fetchJSON');
test('Fetch JSON failed', async () => {
window.fetch = jest.fn(async () => ({
ok: false,
status: 404
}));
await expect(fetchJSON('http://example.com/', {})).rejects.toThrow('Server returned 404');
});
test('Fetch... | billba/botchat | packages/embed/src/fetchJSON.spec.js | JavaScript | mit | 724 |
module.exports = {
name: 'api-v1/plugins/oembed',
register: async server => {
const frontend = server.methods.config('frontend');
server.route({
method: 'GET',
path: '/',
options: {
auth: false
},
handler: async request... | datawrapper/datawrapper | plugins/api-v1/src/api/routes/plugins/oembed.js | JavaScript | mit | 1,099 |
require('magic-globals')
var jade = require('jade')
var fs = require('fs')
var o = console.log
// read index.jade
fs.readFile(__base+'/cv/index.jade', 'utf-8', function(err, read) {
if(err) return o(err)
var fn = jade.compile(read)
var htmlOutput = fn()
var parseString = require('xml2js').parseString;
var... | gavinengel/gavinengel.github.io | .test/x2js.js | JavaScript | mit | 423 |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define("angular-telephone-filter", [], factory);
else if(typeof exports === 'object')
exports["angular-teleph... | benjamincharity/angular-telephone-filter | dist/angular-telephone-filter.js | JavaScript | mit | 4,721 |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { filterProps } from "../../helpers/functions";
import WithWrapper from "./_WithWrapper";
// istanbul ignore next
const MutationObserver =
typeof window !== "undefined"
? window.MutationObserver ||
window.WebKitMutationObs... | tutti-ch/react-styleguide | src/components/Form/_Input.js | JavaScript | mit | 4,067 |
#!/usr/bin/env node
var fu = require('./folder-utils.js');
// 0 = node, 1 = script path, so we ignore those.
// 2 = target path
var target_path = process.argv[2];
fu.make_folder(target_path);
| moodboom/rad-scripts | make-folder-cmd.js | JavaScript | mit | 194 |
'use strict'
const { wait } = require('../../util/promise')
const { compactDate } = require('../../util/date')
const logger = require('../../util/logger')
const request = require('backendless').Request
module.exports = class StatusProgress {
static wait(options) {
const instance = new this(options)
return ... | Backendless/JS-Code-Runner | lib/server-code/services/status-progress.js | JavaScript | mit | 1,760 |
/*jslint node:true */
module.exports = {
name: "special"
}; | deitch/booster | test/resources/models/normal.js | JavaScript | mit | 60 |
import Vue from 'vue'
import axios from 'axios'
Vue.use(require('vue-moment'));
window.Vue = Vue;
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
let token = document.head.querySelector('meta[name="csrf-token"]');
if (token) {
window.axios.defaults.headers.co... | nusendra/nusendra-blog | resources/assets/js/frontend.js | JavaScript | mit | 460 |
var createRange = require('./_createRange');
/**
* Creates an array of numbers (positive and/or negative) progressing from
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
* `start` is specified without an `end` or `step`. If `end` is not specified
* it's set to `start` with `start` ... | mdchristopher/Protractor | node_modules/lodash/range.js | JavaScript | mit | 1,104 |
/*
Created by Freshek on 07.10.2017
*/
const HEADER_HEIGHT = 40;
class WindowFactory {
static createWindow(params) {
if (!window.mainFrameWindow) {
window.mainFrameWindow = this.windowsStructure({text: "Windows", isMain: true})[0];
if (window.globalSettings.windowsToTabs) {
... | freshstudio/Toshinou | src/js/WindowFactory.js | JavaScript | mit | 3,487 |
/*!
* imagesLoaded v3.1.8
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
( function( window, factory ) { 'use strict';
// universal module definition
/*global define: false, module: false, require: false */
if ( typeof define === 'function' && define.amd ) {
// AMD
def... | olegfox/lab-developers | src/Site/MainBundle/Resources/public/frontend/bower_components/imagesloaded/imagesloaded.js | JavaScript | mit | 8,773 |
'use strict';
var ConfigBuilder = require('./ConfigBuilder');
var SocialAccounts = require('../modules/SocialAccounts');
var SocialAccountsValidator = require('../validators/SocialAccountsValidator');
class SocialAccountsBuilder {
constructor(obj) {
this.helperName = obj && obj.helperName;
this.e... | oksana-khristenko/assemble-starter | app/helpers/builders/SocialAccountsBuilder.js | JavaScript | mit | 917 |
Ext.define('opc.model.PrayerPointModel', {
extend: 'Ext.data.Model',
requires: ['Ext.DateExtras','Ext.data.Field'],
config: {
fields: [
'id',
//Settings for Joomla Backend
/*{name: 'title', type: 'string'},
{name: 'introtext', type: 'string'},
... | Maultrommel/OPC | app/model/PrayerPointModel.js | JavaScript | mit | 5,242 |
// Tally Votes in JavaScript Pairing Challenge.
// I worked on this challenge with: Shin
// This challenge took me [1.25] hours.
// These are the votes cast by each student. Do not alter these objects here.
var votes = {
"Alex": { president: "Bob", vicePresident: "Devin", secretary: "Gail", treasurer: "Kerry" },
... | ttalhouk/phase-0 | week-8/tally_votes.js | JavaScript | mit | 7,053 |
'use strict';
module.exports = function handleSingleWord({context, entities}) {
console.log(context, entities);
const intent = entities.intent;
const messageBody = entities.message_body;
let isSingleWord = false;
let word = '';
intent.forEach((item) => {
if(item.value === 'single word') {
isSin... | sashimii/paperbot | ai/actions/handleSingleWord.js | JavaScript | mit | 877 |
var system = require("./process"),
fs = typeof process == "undefined" ?
require("./rhino-fs") :
require("./node-fs"),
print = system.print,
joinPath, homeDir, dirname, exists, separator;
if(typeof process == "undefined"){
separator = java.lang.System.getProperty("file.separator");
// Rhino
joinPaths = functi... | daveboden/CommaCQ | server/src/main/resources/html/js/lib/cpm-utils/path.js | JavaScript | mit | 3,296 |
const Error = module.exports = class {
constructor (message, position, stack) {
this.message = message
this.position = position || {
line: 0,
column: 0
}
this.stack = stack || []
}
toString () {
return 'Error: ' + this.message
}
}
| PeterMader/Karoline | util/error.js | JavaScript | mit | 274 |
var path = require('path'),
chai = require('chai'),
expect = chai.expect,
nock = require('nock'),
componentPath = path.join(process.cwd(), 'src/client/js/components/');
describe('FootballLeagueTable', function () {
var React = require('react'),
ReactDOM = require('react-dom'),
$ = ... | agreco/react-football-league-table | test/specs/FootballLeagueTable.spec.js | JavaScript | mit | 8,943 |
define([
'app/app',
'app/collections/messagesCollection',
'app/models/docModel',
'app/models/messageModel',
'app/collections/usersCollection',
'app/views/docMessageView',
'text!app/templates/docMessagesTpl.html'
], function(app, MsgCollection, DocModel, MessageModel, UsersCollection, DocMsgView, docMsgsT... | shaunsantacruz/document-mgmt | public/js/app/views/docMessagesView.js | JavaScript | mit | 1,851 |
import React, { Component } from 'react';
import axios from 'axios';
import Highlight from 'react-highlight';
import 'highlight.js/styles/monokai-sublime.css';
import Logbook from '../../Logbook';
let sampleComponent;
let timer;
export class AjaxExample extends Component {
constructor() {
super();
this.st... | sergiocruz/react-logbook | src/demo/Ajax/AjaxExample.js | JavaScript | mit | 2,100 |
<<<<<<< HEAD
<<<<<<< HEAD
var isWindows = process.platform === 'win32'
var path = require('path')
var exec = require('child_process').exec
var os = require('os')
// looking up envs is a bit costly.
// Also, sometimes we want to have a fallback
// Pass in a callback to wait for the fallback on failures
// After the fir... | ArcherSys/ArcherSys | node_modules/npm/node_modules/osenv/osenv.js | JavaScript | mit | 5,777 |
import {createStateMachineConfig} from 'specular'
import {ports} from './ports'
export const noteStateMachine = createStateMachineConfig({
initialState: {
on: false,
velocity: 0,
},
receiveState(nextState, oldState, { port, channel, note }) {
if (nextState.on && !oldState.on) {
// off -> on
... | madjam002/specular | packages/specular-midi/src/state-machine.js | JavaScript | mit | 928 |
(function ($) {
var date = new Date();
var calendarMonth = ("0" + (date.getMonth() + 1)).slice(-2);
var calendarEvents = [
{
title: 'Presentation',
description: 'Just presenting some UI examples.',
type: 'presentation',
allday: 'false',
bg: '#FF5722',
start: date.getFullYear()+'-'+calendarMonth... | lelenaic/Paradox | admin/html/examples/js/fullcalendar.js | JavaScript | mit | 4,378 |
var fs = require('fs')
var handlebars = require('handlebars')
var mix = require('mixy')
exports.addPseudoClass = function (data) {
var pseudoPat = /--(\w+)$/
data.sprites.forEach(function (sprite) {
var name = sprite.name
var matches = name.match(pseudoPat)
if (matches && matches[1]) {
sprite.nam... | Miller547719886/kopi6.com | node_modules/gulp.spritesmith-multi/lib/util.js | JavaScript | mit | 1,708 |
import { Action } from 'mva';
export const Play = Action();
export const Stop = Action(); | ordinarygithubuser/music-tabs | src/actions/synth.js | JavaScript | mit | 90 |
Vue.component('VueCart', {
props: {
cart: { type: Array, required: true, default: () => { return [] } },
title: { type: String, required: true },
type: { type: String, required: true }
},
methods: {
removeFromCart(index) {
return this.cart.splice(index, 1);
... | aslihanozfidan/Vue.js-Exercises | ShoppingCart/refactor/app.js | JavaScript | mit | 3,144 |
/*
AngularJS v1.3.8
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(function (M, Y, t) {
'use strict';
function T(b) {
return function () {
var a = arguments[0], c;
c = "[" + (b ? b + ":" : "") + a + "] http://errors.angularjs.org/1.3.8/" + (b ? b + "/" : "")... | nix-php-training/ads-board2 | application/assets/js/angular.min.js | JavaScript | mit | 244,048 |
version https://git-lfs.github.com/spec/v1
oid sha256:069b656e16ba863f09e7efbb2f47a00a5a20be9e8d7da9314b689c6663ee59fb
size 139466
| yogeshsaroya/new-cdnjs | ajax/libs/tablefilter/2.5.0/tablefilter_all_min.js | JavaScript | mit | 131 |
import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, hashHistory, browserHistory } from 'react-router';
import Main from './components/Main'; // Our custom react component
import Weather from './components/Weather'; // Our custom react component
import About from './compon... | arraqib/react-weather | src/app/app.js | JavaScript | mit | 827 |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('@angular/platform-browser/testing'));
//# sourceMappingURL=testing.js.map | luiscgoulart/angular2-app1 | node_modules/@angularclass/angular2-beta-to-rc-alias/dist/beta-17/platform/testing.js | JavaScript | mit | 202 |
/*!
* Nestable jQuery Plugin - Copyright (c) 2012 David Bushell - http://dbushell.com/
* Dual-licensed under the BSD or MIT licenses
*/
;(function($, window, document, undefined)
{
var hasTouch = 'ontouchstart' in document;
/**
* Detect CSS pointer-events property
* events are normally disabled on... | mispy/our-world-in-data-grapher | resources/assets/js/libs/jquery.nestable.js | JavaScript | mit | 17,771 |
'use strict';
/**
* Task that checks for unread messages from the DB and sends
* notification emails for users who have unread messages.
*
* Won't notify for very fresh (10min) messages, or else
* people would get email for each line of chat message somebody writes.
*
* Also if people are reading their messages... | mleanos/trustroots | modules/messages/server/jobs/message-unread.server.job.js | JavaScript | mit | 5,464 |
// @flow
import React, {Component} from 'react'
import {
Button,
Col,
ListGroup,
ListGroupItem,
Panel
} from 'react-bootstrap'
import * as feedsActions from '../../actions/feeds'
import FeedTransformRules from './FeedTransformRules'
import type {
Feed,
FeedTransformRules as FeedTransformRulesType,
Pr... | conveyal/datatools-manager | lib/manager/components/transform/FeedTransformationSettings.js | JavaScript | mit | 3,668 |
$(document).on('click', 'tr[data-url] td:not(.bulk-selector-item):not(:last-child):not(a)', function(){
var url = $(this).parents('tr').data('url');
var lightbox = $(this).parents('tr').data('lightbox');
if(lightbox){
$.fancybox.open({
type: 'iframe',
src: url,
toolbar: true,
smallBtn: f... | adventistmedia/dash | app/assets/javascripts/dash/table.js | JavaScript | mit | 3,326 |
/*
* SUCCESSOR WITH DELETE
*
* Given a set of N integers S = {0, 1, ..., N - 1} and a sequence of
* requests of the following form:
* - Remove x from S
* - Find the successor of x: the smallest y in S such that y >= x
*
* Design a data type so that all operations (except construction) should
* take logarit... | chrswt/algorithms-sedgewick | src/interview-problems/successorWithDelete.js | JavaScript | mit | 1,448 |
import React, {Component} from 'react';
import AppBar from 'material-ui/AppBar';
import RaisedButton from 'material-ui/RaisedButton';
import Dialog from 'material-ui/Dialog';
import {deepOrange500} from 'material-ui/styles/colors';
import FlatButton from 'material-ui/FlatButton';
import getMuiTheme from 'material-ui/st... | fengnovo/diary | others/material/test/src/js/Main.js | JavaScript | mit | 2,846 |
'use strict';
var isValid = require( './../lib' );
console.log( isValid( [-3,-1,0,-2] ) );
// returns true
console.log( isValid( [] ) );
// returns false
console.log( isValid( [-3.14] ) );
// returns false
console.log( isValid( [0,1] ) );
// returns false
| validate-io/nonpositive-integer-array | examples/index.js | JavaScript | mit | 261 |
/**
* File: rules.js
* Author: Jonathan Sawyer
* Copyright: 2013, Jonathan Sawyer <jonmsawyer@gmail.com>
* License: MIT License
*/
/**
* Object: rules
*
* rules is an array of arrays. The arrays inside the larger array contain
* regular expression rules for word filtering in the format of
* [regex literal, s... | jonmsawyer/word-filter | rules.js | JavaScript | mit | 830 |
var $ = require('jquery');
var DOM = require('jsx-dom-factory');
var LighthouseChrome = require('../../pages/lib/shared_chrome_code.js');
$('head')
.append('<title>Beacon - Login</title>') // Replace window title with "Beacon Login"
.append('<link rel="SHORTCUT ICON" src="/Content/images/favicon.ico">'); // Fix m... | OSPFNeighbour/Lighthouse | src/contentscripts/login.js | JavaScript | mit | 1,300 |
"use strict"
var db = require('../../utils/db');
var loanService = require('../../services/loan');
var userService = require('../../services/user');
var dates = require('../../utils/dates');
var async = require('simpleasync');
var scorings = require('../../data/scorings.json');
var loanId;
var adamId;
var eveId;
ex... | ajlopez/MoneyPool | test/business/newLoan.js | JavaScript | mit | 2,181 |
var mtg = require('./index');
var cards = {};
var cardsCountAgnostic = {};
var cardsCountCentric = {};
var assemble = function(event) {
event.decks.forEach(function(deck) {
var result = parseInt(deck.result);
deck.cards.forEach(function(card) {
cards[card.name] = 1;
cardsCountCentric[card.name] = cardsCou... | yaroslavkorzh/mtg_analytics | node_modules/mtgtop8/test.js | JavaScript | mit | 1,712 |
/*
* Rendelések
*/
Order = {
DELETE_LINK : null,
init: function(){
this.bindUIActions();
},
bindUIActions: function(){
/*
* Rendelés teljesítése megerősítő ablak
*/
$('body').on('click', '.fulfill-button', function(){
$('#modal-fulfill-o... | csmarton/webshop | src/Backend/AdminBundle/Resources/public/js/Order.js | JavaScript | mit | 2,426 |
import {Core} from './core';
import {show, showf, partial1, partial2} from './internal/fn';
import {isFunction} from './internal/is';
import {invalidArgument} from './internal/throw';
export function EncaseN2(fn, a, b){
this._fn = fn;
this._a = a;
this._b = b;
}
EncaseN2.prototype = Object.create(Core);
Encase... | mirotik666/-web-project-portfol | node_modules/fluture/src/encase-n2.js | JavaScript | mit | 1,036 |
/*! AdminLTE app.js
* ================
* Main JS application file for AdminLTE v2. This file
* should be included in all pages. It controls some layout
* options and implements exclusive AdminLTE plugins.
*
* @Author Almsaeed Studio
* @Support <http://www.almsaeedstudio.com>
* @Email <abdullah@almsaeedstudio... | Magik3a/PatientManagement_Admin | PatientManagement/PatientManagement.Web/wwwroot/Scripts/adminlte/app.js | JavaScript | mit | 23,405 |
// Moves jQuery inclusion to code injection via ghost_foot
var _ = require('lodash'),
Promise = require('bluebird'),
serverPath = '../../../../',
config = require(serverPath + 'config'),
models = require(serverPath + 'models'),
notifications = require(serverPath + ... | JonSmith/Ghost | core/server/data/migration/fixtures/004/01-move-jquery-with-alert.js | JavaScript | mit | 2,023 |
var xpos = 171;
var xpos2 = 291;
var speed = 0.5;
var speed2 = 0.5;
function setup() {
createCanvas(500,500);
background(207,212,192);
}
function draw() {
xpos = xpos + speed;
xpos2 = xpos2 + speed;
ellipse(240, 250, 320, 380);
fill(255,255,255);
ellipse(180, 200, 90, 100);
ellipse(300, 200, 90, 100)... | kathleenalexandra/kathleenbryan-CreativeCoding | CreativeCodingAssignment5/sketch.js | JavaScript | mit | 1,158 |
require("./72.js");
require("./144.js");
require("./289.js");
require("./577.js");
module.exports = 578; | skeiter9/javascript-para-todo_demo | webapp/node_modules/webpack/benchmark/fixtures/578.js | JavaScript | mit | 104 |
import Polymer from '../polymer';
// Beware: Polymer will not call computeHideIcon and computeHideValue if any of
// the parameters are undefined. Set to null if not using.
export default new Polymer({
is: 'ha-label-badge',
properties: {
value: {
type: String,
value: null,
},
icon: {
... | zwb800/home-assistant | homeassistant/components/frontend/www_static/home-assistant-polymer/src/components/ha-label-badge.js | JavaScript | mit | 919 |
import { assert } from 'chai';
import findAllConcatenatedWordsInADict from '../concatenated-words';
const sorter = (a, b) => a.localeCompare(b);
describe('Concatenated Words', () => {
const testCases = [
[
['cat', 'cats', 'catsdogcats', 'dog', 'dogcatsdog', 'hippopotamuses', 'rat', 'ratcatdogcat'],
... | jeantimex/javascript-problems-and-solutions | src/trie/__tests__/concatenated-words-test.js | JavaScript | mit | 26,481 |
var _ = require("lodash");
var util = require("../Utilities");
var ORMError = require("../Error");
var Accessors = { "get": "get", "set": "set", "has": "has", "del": "remove" };
exports.prepare = function (Model, associations) {
Model.hasOne = function () {
var assocName;
var assocTemplateName;
... | stueynz/node-orm2 | lib/Associations/One.js | JavaScript | mit | 8,863 |
System.config({
defaultJSExtensions: true,
transpiler: "traceur",
paths: {
"app/*": "src/*.js",
"content/*": "src/content/*.js",
"shared/": "src/shared/",
"forms/*": "src/forms/*.js",
"rentta/*": "src/*.js",
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
m... | Rentta/Rentta | app/config.js | JavaScript | mit | 4,091 |
"use strict";
describe("wu.cycle", (function() {
it("should keep yielding items from the original iterable", (function() {
var i = 0;
var arr = [1, 2, 3];
for (var $__0 = wu.cycle(arr)[$traceurRuntime.toProperty(Symbol.iterator)](),
$__1; !($__1 = $__0.next()).done; ) {
try {
throw u... | besarthoxhaj/wu.js | test-es5/test-cycle.js | JavaScript | mit | 577 |
class ConversationController {
constructor($scope, $mdSidenav, user, $state, $mdToast, rt, conversationCache, defaultConversation) {
'ngInject';
this.$mdSidenav = $mdSidenav;
this.userService = user;
this.$state = $state;
this.conversationCache = conversationCache;
this.defaultConversation =... | leeyeh/leanmessage-demo | src/app/conversation/conversation.controller.js | JavaScript | mit | 3,009 |
'use strict';
const pathToRegExp = require('path-to-regexp');
/**
* A wrapper for middleware and controller
*/
class Wrapper {
/**
* Constructor for a wrapper.
*
* @param {String} aRoute The route for this callback
* @param {Function} aCallback The callback for this middleware or callback
... | sateffen/nodgine | src/wrapper.js | JavaScript | mit | 2,805 |
#define DEBUG
#if DEBUG
#define DISPLAY_NAME(name) name.displayName = #name
#else
#define DISPLAY_NAME(name)
#endif
#define GLOBAL(name) name
#define COMMONJS
#define NODEJS
#define ENVIRONMENTS ["CommonJS","ObjJ"]
(function(mod)
{
if (typeof exports == "object" && typeof module == "object")
return mod... | mrcarlberg/objj-runtime | header.js | JavaScript | mit | 1,917 |
/*
The MIT License (MIT)
Copyright (c) 2014 UeiRicho
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, publ... | UeiRicho/cgi-node | src/CgiNodeSession.js | JavaScript | mit | 6,320 |
require("@app/named1.js");
require("@TestBundle/Resources/public/asset.js");
require("@root/app/Resources/public/asset.js");
require("@test/glob/glob1.js");
require("@test/glob/glob2.js");
require("@test/glob/subdirectory/glob3.js"); | mariusbalcytis/webpack-migration-bundle | test/Fixtures/expected/src/TestBundle/Resources/assets/index-1.js | JavaScript | mit | 233 |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var author = new Schema({
name: {type: String, required: 'Name is required', index: {unique: true}},
isAlive: Boolean,
age: {type: Number, default: 0}
});
exports.Author = mongoose.model('Author', author);
var book = new Schema({
title: {type:... | Webura/mongooseadmin | test/models.js | JavaScript | mit | 1,245 |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... | PiotrDabkowski/Js2Py | tests/test_cases/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js | JavaScript | mit | 848 |
import { run } from '../cli';
import runPercy from '@percy/react-percy-ci';
import yargs from 'yargs';
const VERSION = require('../../package.json').version;
// eslint-disable-next-line no-console
console.log = jest.fn();
let mockYargs;
jest.mock('yargs', () => {
const fakeYargs = () => mockYargs;
fakeYargs.show... | percy/react-percy | packages/react-percy/src/__tests__/cli-tests.js | JavaScript | mit | 3,407 |
var util = require('util')
var _ = require('lodash')
var assert = require('assert')
var fs = require('fs')
var path = require('path')
var fauxProject = require('../faux-project')
var chdirTemp = require('../test-chdir-temp')
var DESC = path.basename(__filename, path.extname(__filename))
/* global describe, it */
var ... | reggi/node-reggi | test/faux-project.js | JavaScript | mit | 1,125 |
'use strict';
angular.module('UTMQViewerApp')
.controller('NavCtrl', function ($scope, $http, $rootScope, persona) {
if (localStorage.getItem('personaEmail') && !$rootScope.email) {
$http({
url: '/login',
method: 'GET'
}).success(function (data) {
$rootScope.email = data.em... | UTMQ/utmq-core | app/scripts/controllers/nav.js | JavaScript | mit | 1,316 |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var msgSchema = new Schema({
deviceId:String,
//Msg Date-Time
msgDateTime:String,
//Msg Destination
msgDestinationId:String,
//Message ID
msgId:String,
//Msg Properties
msgProperties:{},
m... | nawfalCode/iotProject | models/device_msg.js | JavaScript | mit | 439 |
import React, { PropTypes } from 'react';
import Tap from 'tap.js';
export default class Menu extends React.Component {
componentWillMount() {
this.props.manager.menu = this;
new Tap(document.body);
this.isListeningForTap = false;
this.tapHandler = (e) => {
if (React.findDOMNode(this).contains... | esseb/react-aria-menubutton | src/Menu.js | JavaScript | mit | 2,036 |
export const ic_assistant = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M19 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5.12 10.88L12 17l-1.88-4.12L6 11l4.12-1.88L12 5l1.88 4.12L18 11... | wmira/react-icons-kit | src/md/ic_assistant.js | JavaScript | mit | 352 |
version https://git-lfs.github.com/spec/v1
oid sha256:2a92dde30d2600697e33c883731f29b7d482089e0889615e261df83876ed6760
size 10810
| yogeshsaroya/new-cdnjs | ajax/libs/backbone-react-component/0.7.0/backbone-react-component.js | JavaScript | mit | 130 |
import React from 'react';
import { connect } from 'react-redux';
import FadedBackground from "./fadedBackground.js";
import TrailerButton from "./trailerButton.js";
import InfoList from "./infoList.js";
import { info as infoActions } from "../actions";
class Info extends React.Component {
constructor(props) {
... | leon-4A6C/tplay | app/js/components/info.js | JavaScript | mit | 2,463 |
/**
* Created by alex,nils,romain,hen
*/
var ctx = {
majorPadding: 25,
minorPadding: 2,
cellDistance: 20,
textHeight: 90,
textSpacing: 3,
setSizeWidth: 700,
subSetSizeWidth: 200,
subSetSizeWidthMax: 200,
leftOffset: 90,
leftIndent: 10,
topOffset: 120,
/** The width... | patricknharris/IISUpset | upset.js | JavaScript | mit | 91,294 |
const Transform = require('stream').Transform
const util = require('util')
const FieldedSearch = function (options) {
Transform.call(this, { objectMode: true })
}
module.exports = FieldedSearch
util.inherits(FieldedSearch, Transform)
FieldedSearch.prototype._transform = function (doc, encoding, end) {
var options ... | fergiemcdowall/docproc | pipeline/FieldedSearch.js | JavaScript | mit | 776 |