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 |
|---|---|---|---|---|---|
function getData(q, $rootScope) {
var d = q.defer();
setTimeout(function() {
$rootScope.$apply(function() {
d.resolve(data);
});
}, 2000);
return d.promise;
}
var data = [
{
"count": 4,
"img": "http://placekitten.com/500/500",
"desc": "Id consequat non ut Lorem et est s... | mgamini/Angular-Tabs-Directive | data.js | JavaScript | mit | 18,222 |
function pr_dca(url, auth, auth_cb, timeout, async_job_check_time_ms, service_version) {
var self = this;
this.url = url;
var _url = url;
this.timeout = timeout;
var _timeout = timeout;
this.async_job_check_time_ms = async_job_check_time_ms;
if (!this.async_job_check_tim... | pranjan77/pr_dca | lib/javascript/Client.js | JavaScript | mit | 6,784 |
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
var JiraApi = require('jira-client');
function responder (jira, config) {
return function (match, callback) {
var issueId = match[2];
var link = config.protocol + '://' + config.host + ':' + config.port + '/browse/' + issueId;
var slackLink = '<' + ... | sjmelia/regexbot | src/jira.js | JavaScript | mit | 2,835 |
import React, { Component } from 'react';
export default class extends Component {
constructor(props) {
super(props);
this.renderFileList = this.renderFileList.bind(this);
}
componentDidMount() {
//console.log(this.props);
}
renderFileList() {
let { data } = t... | theMindPalace/gatsby-site | src/pages/my-files.js | JavaScript | mit | 1,010 |
define(['ko', 'text!app/components/flanders-keg-body/template.html'], function (ko, htmlString) {
function FlandersKegBody(model) {
var self = this;
};
return {
viewModel: FlandersKegBody,
template: htmlString
};
}); | RightpointLabs/Pourcast | RightpointLabs.Pourcast.Web/Scripts/app/components/movember/flanders-keg-body/viewModel.js | JavaScript | mit | 261 |
const path = require('path');
const webpack = require('webpack');
const WebpackBar = require('webpackbar');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const TerserPlugi... | pwcong/FrontEnd-Dev | webpack-babel-ie8/webpack.config.js | JavaScript | mit | 2,530 |
import PIXI from 'pixi.js';
import Hexagon from './hexagon.js';
import GroundLayer from './layer/groundLayer.js';
import UnitLayer from './layer/unitLayer.js';
let hexagon = new Hexagon(80);
/**
* Represents a tile in the game.
*/
export default class Tile {
constructor(x, y, entities) {
this.x = x;
this.... | tnRaro/FrozenWar | src/client/renderer/tile.js | JavaScript | mit | 926 |
/* */
module.exports = function(hljs) {
var LITERALS = {literal: 'true false null'};
var TYPES = [
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE
];
var VALUE_CONTAINER = {
end: ',', endsWithParent: true, excludeEnd: true,
contains: TYPES,
keywords: LITERALS
};
var OBJECT = {
begin: '{'... | dragoscirjan/dragoscirjan.github.io | coding-standards/jspm_packages/npm/highlight.js@9.2.0/lib/languages/json.js | JavaScript | mit | 944 |
import test from 'ava';
import challenge from '.';
// https://www.reddit.com/4msu2x/
test('Challenge #270 [Easy] Transpose the input text', t => {
// Some
// text.
const input = [['S', 'o', 'm', 'e', ' '], ['t', 'e', 'x', 't', '.']];
const output = [['S', 't'], ['o', 'e'], ['m', 'x'], ['e', 't'], [' ', '.']];... | hendrikniemann/dailyprogrammer | easy/c270/spec.js | JavaScript | mit | 366 |
import { getModule } from '../../store/index.js';
import { getOutline, renderOutline } from './renderSegmentationOutline.js';
import external from '../../externalModules.js';
import * as drawing from '../../drawing/index.js';
const { state } = getModule('segmentation');
jest.mock('../../drawing/index.js', () => ({
... | chafey/cornerstoneTools | src/eventListeners/internals/renderSegmentationOutline.test.js | JavaScript | mit | 9,561 |
describe('dsds', function () {
it('asdsa', function () {
expect(10).toEqual(123);
});
}); | akaguny/kkk | test/unit/testSpec.js | JavaScript | mit | 97 |
const settings = {};
export default settings;
| circlecell/lint.me | packages/frontend/js/linter/html/settings.js | JavaScript | mit | 46 |
const Discord = require('discord.js');
exports.run = (client, message, args) => {
let reason = args.slice(1).join(' ');
let user = message.mentions.users.first();
let modlog = client.channels.find('name', 'delet-this');
let muteRole = client.guilds.get(message.guild.id).roles.find('name', 'MUTED');
... | SuvanL/delet | commands/mute.js | JavaScript | mit | 2,561 |
'use strict';
module.exports = {
default: {
options: {
syntax: 'scss',
failOnError: false
},
src: [
'source/**/*.scss'
]
}
};
| machal/web-mine | grunt/stylelint.js | JavaScript | mit | 167 |
version https://git-lfs.github.com/spec/v1
oid sha256:804e6cd63076c116c7b20658b9f678161264c776a86abc12a984011681b0abcc
size 1518
| yogeshsaroya/new-cdnjs | ajax/libs/globalize/0.1.1/cultures/globalize.culture.oc-FR.min.js | JavaScript | mit | 129 |
var _ = require('lodash');
var fs = require('fs-extra');
var path = require('path');
var pathsHelper = require('../helpers/paths.helper');
exports.ADDABLE_NODES = ['Component', 'Layout', 'Page'];
exports.SCSS_PLACEHOLDER_DELIMITERS = [
'/* insert new ',
' */'
];
exports.JS_COMPONENT_STRING = 'addcomponenttothis'... | zeixcom/pingu | config/scaffold/scaffold.utils.js | JavaScript | mit | 2,608 |
(function() {
'use strict';
var express = require('express');
var path = require('path');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes.js');
var app = express();
// view engine setup
app.... | tapiwam/fileBrowserApp | server/server.js | JavaScript | mit | 903 |
import fetch from 'dva/fetch';
const parseJSON = (response) => {
return response.json();
}
const checkStatus = (response) => {
if (response.status >= 200 && response.status < 300) {
return response;
}
const error = new Error(response.statusText);
error.response = response;
throw error;
}
/**
* Requ... | anchoretics/ztf-work-app | manager/src/utils/request.js | JavaScript | mit | 1,372 |
(function (exports, $) {
const Module = exports.Helpers.API || {}
// Internal cache
let internalCache = {}
let formControls
// Default config
const settings = {
// This is the ajax config object
ajax: {
url: '/establishments.json',
type: 'GET',
dataType: 'json'
},
// Th... | ministryofjustice/advocate-defence-payments | app/webpack/javascripts/modules/Helpers.API.Establishments.js | JavaScript | mit | 3,659 |
import React from 'react';
import renderer from 'react-test-renderer';
import Enzyme, { mount } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import RatingMenu from '../RatingMenu';
Enzyme.configure({ adapter: new Adapter() });
describe('RatingMenu', () => {
it('supports passing max/min v... | algolia/react-instantsearch | packages/react-instantsearch-dom/src/components/__tests__/RatingMenu.js | JavaScript | mit | 8,509 |
var Backbone = require('backbone'),
Calendario = require('../models/calendario');
module.exports = Backbone.Collection.extend({
url: '/api/pistas/',
model: Calendario,
fecha: "",
getFecha: function(){
return this.fecha;
},
setFecha: function(newFecha){
this.fecha = newFecha;
}
}); | ilopezchamorro/pfc | src/js/collections/calendarios.js | JavaScript | mit | 308 |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... | guibson91/curso-ionic2 | node_modules/ionic-angular/esm/components/infinite-scroll/infinite-scroll-content.js | JavaScript | mit | 3,575 |
version https://git-lfs.github.com/spec/v1
oid sha256:a97a6fcdd4778db5080eab0aa923f0d19da2b4b6815eec4c2e4cadce2fab6a95
size 2589527
| yogeshsaroya/new-cdnjs | ajax/libs/winjs/3.0.0/js/ui.js | JavaScript | mit | 132 |
function formatScheduleURL(options){
var base = "https://citadelcollege.zportal.nl/api/v3/"
var start = new Date() // Sunday before, 12am (start of sunday)
start.setDate( start.getDate() + (7*options.offset) - start.getDay() )
start.setHours( 0,0,0,0 )
var end = new Date( start.getTime() )
end.setDate( end.... | Dantevg/rooster | get.js | JavaScript | mit | 13,382 |
/**
* Visitor Model for schema validation
* @type {Object}
*/
module.exports = {
"properties": {
"city": {
"type": "string"
},
"country_code": {
"type": "string"
},
"country_name": {
"type": "string"
},
"latitude": {
... | geo-c/OCT-Core | models/visitor.js | JavaScript | mit | 746 |
// Copyright Joyent, Inc. and other Node contributors.
//
// 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, modi... | zumwalt/start | node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/node_modules/bl/node_modules/readable-stream/test/simple/test-stream2-read-sync-stack-min.js | JavaScript | mit | 1,602 |
var SecretHandshake = require('./secret_handshake');
describe("Secret Handshake", function() {
it("1 is a wink", function() {
var handshake = new SecretHandshake(1);
expect(handshake.commands()).toEqual(["wink"]);
});
xit("10 is a double blink", function() {
var handshake = new SecretHandshake(2);
... | nicgallardo/xjavascript | secret-handshake/secret_handshake_test.spec.js | JavaScript | mit | 1,449 |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var iosFastforwardOutline = exports.iosFastforwardOutline = { "viewBox": "0 0 512 512", "children": [{ "name": "path", "attribs": { "d": "M48,155l183.5,101L48,356.9V155 M272,155.8L448,256L272,356.4v-95.6v-27.1V156 M256,128v123.2L32,128v256l... | xuan6/admin_dashboard_local_dev | node_modules/react-icons-kit/ionicons/iosFastforwardOutline.js | JavaScript | mit | 389 |
const {ul, li, i, button} = require('dom-gen')
const {on, component} = $.cc
/**
* TaskSection component.
*/
class TaskSection {
/**
* @param {jQuery} elem
*/
constructor (elem) {
this.tasks = elem.data('tasks')
this.elem = elem
}
appendTaskList (elem) {
return ul(this.tasks.map(task => li... | kt3k/view-todo | src/site/js/components/todo-section.js | JavaScript | mit | 1,199 |
import State, {makeInvalidMessage, isValidDataTypes} from '../../core/State';
import Data, {DataTypes} from '../../core/Data';
export default class Equal extends State {
constructor() {
super(
makeInvalidMessage("Equal", ["any", "any"]),
DataTypes.boolean
);
}
isValid(childrenNode) {
con... | RyosukeCla/skelt | src/graph/states/logic/Equal.js | JavaScript | mit | 660 |
import { combineReducers } from 'redux';
import dashboard from './dashboard';
export default combineReducers({
dashboard,
});
| ZeusTheTrueGod/background-geolocation-console | src/client/reducer/index.js | JavaScript | mit | 129 |
var DebugHelper = require('./../../lib/debug-helper');
var should = require('should');
var FakeLogger = function(){
this.logStack = [];
var self = this;
this.log = function(message){
self.logStack.push(message);
};
};
describe('log function', function(){
it('should correctly log simple messages', f... | bolek/lineminer | benchmarks/node_modules/api-benchmark/test/unit/debug-helper.js | JavaScript | mit | 1,671 |
/**
* @module express-universal-query-validator/util
* @description Utility functions needed for this module
*/
import url from 'url';
import { attempt, some, reject, isError } from 'lodash';
/**
* Checks if a key=value param can not be
* parsed by global `decodeURIComponent`
* @param {string} query
* @return... | wework/express-universal-query-validator | src/util/index.js | JavaScript | mit | 862 |
import React from 'react'
import { shallow, mount } from 'enzyme'
import { expect, assert } from 'chai'
import sinon from 'sinon'
import Donation from '../../public/lib/components/Donation'
import Button from '../../public/lib/components/Button'
describe('Donation', () => {
const fetchData = sinon.spy()
it('shoul... | noahpeden/adoptfund | test/components/donation.spec.js | JavaScript | mit | 1,415 |
'use strict';
(function() {
var self = this;
var DeathAnimations = function() {
self.deathSprites = [];
self.headSprites = [];
self.bloodEmitters = [];
self.animationDuration = 5000;
self.groundY = 650;
self.bloodParticles = [];
self.bloodTime = 8000;
... | kimspindel/christmas2016 | site/js/deathanimations.module.js | JavaScript | mit | 7,426 |
var {Helper, Operator, Type} = require("@kaoscript/runtime");
module.exports = function() {
let AnimalFlags = Helper.enum(Number, {
None: 0,
HasClaws: 1,
CanFly: 2,
EatsFish: 4,
Endangered: 8
});
function foobar(abilities) {
if(arguments.length < 1) {
throw new SyntaxError("Wrong number of arguments (... | kaoscript/kaoscript | test/fixtures/compile/operator/operator.junctive.xor.bin.match_e.js | JavaScript | mit | 711 |
/**
* $list
*/
var $list = (function (module) {
module.hasDuplication = function (list, checkDuplicateItem, comparator) {
for (var i = 0; i < list.length; i++) {
var item = list[i];
if (item != checkDuplicateItem) {
if (comparator.compare(item, ... | khoitnm/language-note | language-note-client/src/main/resources/static/common/jscommon-list.js | JavaScript | mit | 521 |
/**
* Constructs a segment <code>[(x_1, y_1), (x_2, y_2)]</code>. Use cases are as follows:
* <ul>
* <li><code>new Malakh.Segment()</code> (gives segment <code>[(0, 0), (0, 0)])</code></li>
* <li><code>new Malakh.Segment({x1: x1, y1: y1, x2: x2, y2: y2})</code></li>
* <li><code>new Malakh.Segment(x1, y... | Polona/malakh | src/utility_classes/segment.js | JavaScript | mit | 2,709 |
/*jshint node:true*/
module.exports = {
description: 'Generate default configuration for ember-cli-template-lint.',
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
}
};
| oriSomething/ember-cli-template-lint | blueprints/ember-cli-template-lint/index.js | JavaScript | mit | 285 |
//Copyright 2012 Massachusetts Institute of Technology. All rights reserved.
/**
* @fileoverview Visual blocks editor for App Inventor
* Initialize the blocks editor workspace.
*
* @author sharon@google.com (Sharon Perl)
*/
Blockly.BlocklyEditor = {};
Blockly.BlocklyEditor.startup = function(documentBody, form... | JDub20/CodeBlocks | appinventor/blocklyeditor/src/blocklyeditor.js | JavaScript | mit | 6,291 |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'liststyle', 'km', {
armenian: 'លេខអារមេនី',
bulletedTitle: 'លក្ខណៈសម្បត្តិបញ្ជីជាចំណុច',
circle: 'រង្វង់មូល',
decimal: 'លេខទសភាគ (... | waxe/waxe.xml | waxe/xml/static/ckeditor/plugins/liststyle/lang/km.js | JavaScript | mit | 1,496 |
define(function(require) {
var Core = require('../src/validator'),
$ = require('$');
describe('validator', function() {
test('basic', function() {
});
});
});
| woerwin/handy | lib/validator/tests/validator-spec.js | JavaScript | mit | 196 |
/**
* Object with data-attributes (HTML5) with a special <markup>
*
* @namespace Lungo
* @class Attributes
*
* @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
* @author Guillermo Pascual <pasku@tapquo.com> || @pasku1
*/
Lungo.Attributes = {
count: {
selector: '*',
html: '<span c... | atilag/Wappa | js/lungo/Lungo.Attributes.js | JavaScript | mit | 1,665 |
function clearLog () {
var logArea = document.getElementById("logArea");
logArea.value = "";
}
function addLog (txt) {
var logArea = document.getElementById("logArea");
logArea.value = txt + "\n" + logArea.value;
}
function clearConsole () {
var consoleArea = document.getElementById("consoleArea")... | koko-m/TtT | js/textarea.js | JavaScript | mit | 501 |
var Transform = require('pipestream').Transform;
var util = require('util');
var iconv = require('iconv-lite');
var LT_RE = /^\s*</;
var JSON_RE = /^\s*[\[\{]/;
function WhistleTransform(options) {
Transform.call(this);
options = options || {};
var value = parseInt((options.speed * 1000) / 8);
if (value > 0) ... | avwo/whistle | lib/util/whistle-transform.js | JavaScript | mit | 2,412 |
const fs = require('fs');
module.exports = async (page, scenario) => {
let cookies = [];
const cookiePath = scenario.cookiePath;
// READ COOKIES FROM FILE IF EXISTS
if (fs.existsSync(cookiePath)) {
cookies = JSON.parse(fs.readFileSync(cookiePath));
}
// // MUNGE COOKIE DOMAIN
// cookies = cookies.m... | garris/BackstopJS | test/configs/backstop_data/engine_scripts/puppet/loadCookies.js | JavaScript | mit | 723 |
'use strict';
var path = require('path'),
chai = require('chai');
chai.use(require('sinon-chai'));
chai.use(require('chai-as-promised'));
module.exports = {
expect: chai.expect
};
| LiveSafe/lvsf-tessel | test/test-helper.js | JavaScript | mit | 191 |
(function() {
var player;
player = new Coke.Character(Coke.settings.grid * 7, Coke.settings.grid * 5, 2, 'down', 'images/player.png');
Coke.updateables.push(player);
}).call(this);
| mybuddymichael/coke | game.js | JavaScript | mit | 190 |
var _ = require('lodash')
var chargeServer = require('../lib/server')
var config = require('../lib/config')
var fs = require('fs')
var Handlebars = require('handlebars')
var Hapi = require('hapi')
var path = require('path')
var AMOUNT = _.random(50, 100)
var CARD_CVC = '123'
var CARD_EXP_MONTH = 12
var CARD_EXP_YEAR =... | mericsson/heroku-stripe-checkout | test/server.js | JavaScript | mit | 1,487 |
var solution = a(1);
alert(solution); // what is the solution?
function a(foo) {
if(foo > 20) return foo;
return b(foo+2);
}
function b(foo) {
return c(foo) + 1;
}
function c(foo) {
return a(foo*2);
}
| JeremyCarlsten/FunSnippets | js/RecursiveHoisting.js | JavaScript | mit | 215 |
export const battery4 = {"viewBox":"0 0 2304 1792","children":[{"name":"path","attribs":{"d":"M1920 512v768h-1664v-768h1664zM2048 1088h128v-384h-128v-288q0-14-9-23t-23-9h-1856q-14 0-23 9t-9 23v960q0 14 9 23t23 9h1856q14 0 23-9t9-23v-288zM2304 704v384q0 53-37.5 90.5t-90.5 37.5v160q0 66-47 113t-113 47h-1856q-66 0-113-47t... | wmira/react-icons-kit | src/fa/battery4.js | JavaScript | mit | 411 |
import app from './app/reducer';
import auth from './auth/reducer';
import config from './config/reducer';
import device from './device/reducer';
import intl from './intl/reducer';
import todos from './todos/reducer';
import ui from './ui/reducer';
import users from './users/reducer';
import messages from './messages/... | syroegkin/mikora.eu | src/common/configureReducer.js | JavaScript | mit | 1,713 |
/**
* @ignore
* dom-attr
* @author yiminghe@gmail.com, lifesinger@gmail.com
*/
KISSY.add('dom/base/attr', function (S, DOM, undefined) {
var doc = S.Env.host.document,
NodeType = DOM.NodeType,
docElement = doc && doc.documentElement,
EMPTY = '',
nodeName = DOM.nodeName,
... | 007slm/kissy | src/dom/sub-modules/base/src/attr.js | JavaScript | mit | 23,490 |
module.exports = {
mockery: {
Wrapper: require('./src/mockery/Wrapper.js'),
Schema: require('./src/mockery/Schema.js')
},
Table: require('./src/Table.js'),
table: require('./src/table/index.js'),
object: require('./src/object/index.js'),
Collection: require('./src/Collection.js')
};
| b-heilman/bmoor-cache | bmoor-cache.js | JavaScript | mit | 295 |
var routes = {
}; | y-track/gce-node-client | lib/instances.js | JavaScript | mit | 18 |
// Copyright 2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this li... | sirchristian/v8DOM.NET | v8-read-only/test/mjsunit/in.js | JavaScript | mit | 4,863 |
/**
* Created by Jamie on 17/03/2017.
*/
var express = require('express');
var pug = require('pug');
var app = express();
// Set the default template engine
app.set('view engine', 'pug');
app.use('/static', express.static('public'));
function setupRoutes() {
// Setup routes
var index = require('./routes/... | j-c-w/MalariaDonationPortal | server.js | JavaScript | mit | 599 |
import React from 'react';
const ESCAPE_KEY = 27;
const ENTER_KEY = 13;
class TodoList extends React.Component {
handleKeyDown(event) {
if (event.which !== ENTER_KEY) {
return;
}
event.preventDefault();
let value = this.refs.task.getDOMNode().value.trim();
if... | gzoreslav/panda-iso | shared/components/TodoInput.js | JavaScript | mit | 712 |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" /></g>
, 'SubdirectoryArrowRight');
| cherniavskii/material-ui | packages/material-ui-icons/src/SubdirectoryArrowRight.js | JavaScript | mit | 226 |
'use strict';
angular.module('ideaBox.version.interpolate-filter', [])
.filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
};
}]);
| Powell-v2/IdeaBox | app/components/version/interpolate-filter.js | JavaScript | mit | 223 |
import React from 'react';
import { getDOMNode } from '@test/testUtils';
import TagGroup from '../TagGroup';
describe('TagGroup', () => {
it('Should output a TagGroup', () => {
const instance = getDOMNode(<TagGroup />);
assert.equal(instance.className, 'rs-tag-group');
});
it('Should have a custom clas... | suitejs/suite | src/TagGroup/test/TagGroupSpec.js | JavaScript | mit | 865 |
// ******************** Imports ********************
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
import ListItem from './ListItem';
import {eventAttributePropTypes} from '../Event';
// ******************** Container ********************
class EventList extends... | AbrahamTewa/timeline | src/scripts/components/Timeline/EventList/EventList.js | JavaScript | mit | 3,240 |
{
const original = obj[name];
obj[name] = function devMatcher() {
try {
original.apply(this, arguments);
} catch (e) {
global.__hadDevFailures = e.stack;
}
};
}
| stas-vilchik/bdd-ml | data/6191.js | JavaScript | mit | 192 |
'use strict';
import {RouteConfig, AbstractPage} from 'scaffi-ui-core'; // jshint unused: false
import template from './yo-scaffi-directive.html';
// export-params-start
const ROUTE = 'app.ui.yo-scaffi.directive';
const PARAMS = {
url: '/directive',
template: template,
resolve: {
},
ncyBreadcrumb: {
label: '... | ThirdCorner/scaffi-docs | src/ui/app/routes/ui/yo-scaffi/directive/yo-scaffi-directive.page.js | JavaScript | mit | 735 |
exports.index = function (req, res) {
res.render('index', {});
} | lgrcyanny/PartyTime | app/controllers/home.js | JavaScript | mit | 66 |
/**
* Created by hebao on 2017/5/27.
* this component's main job is to change LinearGradient in animated ,
* relay on two lib:
* 1 react-native-linear-gradient // realize linear gradient Git: https://github.com/react-native-community/react-native-linear-gradient
* Git: https://github.com/react-native-community... | walkerXiong/react-native-app-template | app/components/C_AniLinearGradient.js | JavaScript | mit | 3,818 |
/**
* HTTP Server Settings
* (sails.config.http)
*
* Configuration for the underlying HTTP server in Sails.
* Only applies to HTTP requests (not WebSockets)
*
* For more information on configuration, check out:
* http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.http.html
*/
module.expor... | jimmysyss/sails-hw | config/http.js | JavaScript | mit | 4,557 |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose');
var User = require('./user.server.model.js');
var chalk = require('chalk');
var async = require('async');
var ObjectId = require('mongoose').Types.ObjectId;
/**
* Create User
*/
exports.create = function(req, res) {
console.log(c... | elarkham/Animu-v2-MEAN | app/user/user.server.controller.js | JavaScript | mit | 11,103 |
var ajax = {
init: function(){
if (window.ActiveXObject)
return new ActiveXObject('Microsoft.XMLHTTP');
else if (window.XMLHttpRequest)
return new XMLHttpRequest();
return false;
},
arrayToString: function (ar,prefix) {
var out="";
for (var i in ar) {
if (ar[i] ... | SovGVD/microajax | ajax.js | JavaScript | mit | 1,848 |
'use strict';
var React = require('react');
var mui = require('material-ui');
var SvgIcon = mui.SvgIcon;
var createClass = require('create-react-class');
var ActionYoutubeSearchedFor = createClass({
displayName: 'ActionYoutubeSearchedFor',
render: function render() {
return React.createElement(
SvgIco... | mikamaunula/react-material-icons | icons/action/youtube-searched-for.js | JavaScript | mit | 735 |
'use strict';
import { Handler } from '../../src/og/webgl/Handler.js';
import { Renderer } from '../../src/og/renderer/Renderer.js';
import { SimpleNavigation } from '../../src/og/control/SimpleNavigation.js';
import { Axes } from '../../src/og/scene/Axes.js';
import { Vec3 } from '../../src/og/math/Vec3.js';
import {... | Zemledelec/OpenGlobus | examples/fonts/fonts.js | JavaScript | mit | 6,079 |
var utils = require('./utils')
, implode = require('implode')
exports.State = require('./state')
exports.initialize = exports.State.init
exports.Template = require('./template')
exports.Fragment = require('./fragment')
exports.Routes = {}
var isServer = exports.isServer = utils.isServer
, isClient = exports.i... | rkusa/swac | lib/index.js | JavaScript | mit | 4,002 |
"use strict";
var chai = require("chai");
var sinonChai = require("sinon-chai");
global.sinon = require("sinon");
global.expect = chai.expect;
chai.use(sinonChai);
chai.should();
| pbouzakis/hexy-ex | test/support/setup.js | JavaScript | mit | 182 |
/**
* ownCloud - myapp
*
* This file is licensed under the MIT License. See the COPYING file.
*
* @author Dennis Blommesteijn <dennis@blommesteijn.com>
* @copyright Dennis Blommesteijn 2015
*/
(function ($, OC) {
$(document).ready(function () {
$('#hello').click(function () {
alert('Hello from your scrip... | dblommesteijn/ownc-myapp | js/script.js | JavaScript | mit | 606 |
(function(){var a=!1,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(c){function d(){!a&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)f[g]=typeof c[g]=="function"&&typeof e[g]=="function"&&b.test(c[g])?function(a,b)... | ishaan2990/Framework-For-JavaScript-Application | target/build/util/Class.js | JavaScript | mit | 540 |
/*
jdPicker 1.0
Requires jQuery version: >= 1.2.6
2010 - ? -- Paul Da Silva, AMJ Groupe
Copyright (c) 2007-2008 Jonathan Leighton & Torchbox Ltd
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 w... | pixelweb2014/iwebnomina | public/admin/js/jquery.date_input.pack.js | JavaScript | mit | 20,221 |
(function ($) {
$(document).ready(function (event) {
var $page = $('#PageFrontIndex')
, previousPages = []
, $sample = $page.find('.PageFrontIndex-sample')
, $sampleContainer = $sample.find('.PageFrontIndex-sample-wrapper-content')
, $sampleBackButton = $sample.find('.PageFrontIndex-sample... | teapotio/teapotio-site | src/Teapotio/Site/CoreBundle/Resources/themes/teapotio-site/TeapotioSiteCoreBundle/page/front/index.js | JavaScript | mit | 1,205 |
// Using jquery solution
// (function(){
// app.el['input_city'] = $('input[bs-typeahead="listCity"]');
// app.el['input_city'].typeahead({
// source: function(query, process) {
// var objects = [], data = [{"id":1, "city":"London"},{"id":2, "city":"Madrid"},{"id":3, "city":"Paris"}]
// $.eac... | superher0/angular-flight | public/js/base.js | JavaScript | mit | 768 |
import { Component } from './component';
// input switch on native, input checkbox on web
class Switch extends Component {
tag(instance) {
let iSwitch;
if (instance) {
iSwitch = instance;
} else {
iSwitch = document.createElement('input');
iSwitch.type = 'checkbox';
}
return i... | dmikey/syr | lib/switch.js | JavaScript | mit | 354 |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'templates', 'no', {
button: 'Maler',
emptyListMsg: '(Ingen maler definert)',
insertOption: 'Erstatt gjeldende innhold',
options: 'Alterna... | waxe/waxe.xml | waxe/xml/static/ckeditor/plugins/templates/lang/no.js | JavaScript | mit | 441 |
import angular from 'angular';
import 'angular-mocks';
import {TodoItem} from './TodoItem';
describe('TodoItem component', () => {
beforeEach(() => {
angular
.module('todoItem', ['app/components/TodoItem.html'])
.component('todoItem', TodoItem);
angular.mock.module('todoItem');
});
it('shoul... | theigmo87/MvcApiAngularDemo | MvcApiAngularDemo/App/src.old/app/components/TodoItem.spec.js | JavaScript | mit | 1,429 |
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor =... | lozenlin/SampleCMS | layout/BackendPage/ckeditor/config.js | JavaScript | mit | 1,334 |
/*!
* 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.
*/
// Provides control sap.m.ActionListItem.
sap.ui.define(['jquery.sap.global', './ListItemBase', './library', 'sap/ui/core/EnabledProp... | marinho/german-articles | webapp/resources/sap/m/ActionListItem-dbg.js | JavaScript | mit | 2,594 |
import Application from '../../app';
import config from '../../config/environment';
import { merge } from '@ember/polyfills';
import { run } from '@ember/runloop';
import registerAcceptanceTestHelpers from './201-created/register-acceptance-test-helpers';
export default function startApp(attrs) {
let attributes = me... | 201-created/ember-cli-acceptance-test-helpers | tests/helpers/start-app.js | JavaScript | mit | 735 |
'use strict';
var mongoose = require('mongoose');
function AccountManager(options) {
this.core = options.core;
}
AccountManager.prototype.create = function(provider, options, cb) {
var User = mongoose.model('User');
var user = new User({ provider: provider });
Object.keys(options).forEach(function(... | madnanbashir/stitch1 | app/core/account.js | JavaScript | mit | 2,834 |
var colors = [
"#000000",
"#FFFF00",
"#1CE6FF",
"#FF34FF",
"#FF4A46",
"#008941",
"#006FA6",
"#A30059",
"#FFDBE5",
"#7A4900",
"#0000A6",
"#63FFAC",
"#B79762",
"#004D43",
"#8FB0FF",
"#997D87",
"#5A0007",
"#809693",
"#FEFFE6",
"#1B4400",
"#4FC601",
"#3B5DFF",
"#4A3B53",
"#FF2F80",
"#61615A",
"#BA0900",
"#6B7900",
"#00C2A0... | tarrow/factvis | colors.js | JavaScript | mit | 3,203 |
define([
'marionette',
'router',
'view/appLayout'
], function (Marionette, appRouter, appLayout)
{
"use strict";
var app = new Marionette.Application();
// This will store the application title
app.title = 'Sample-App';
// This will store the application url
app.url = '/';
// This will store the user info... | tchemineau/sample-app | modules/sampleapp/assets/app/app.js | JavaScript | mit | 1,421 |
import {injectReducer} from '../../store/reducers';
export default (store) => ({
path : 'login',
/* Async getComponent is only invoked when route matches */
getComponent (nextState, cb) {
/* Webpack - use 'require.ensure' to create a split point
and embed an async module loader (jsonp) when bundling... | dima-bu/b2b.core | src/routes/Login/index.js | JavaScript | mit | 811 |
var singlePage = angular
.module('single-page', [])
.component('singlePageComp', singleComponent())
.config(function($stateProvider) {
$stateProvider
.state('single', {
url: '/single',
template: '<single-page-comp></single-page-comp>'
... | BioPhoton/angular1-star-rating | examples/angula1-js/src/app/components/single/index.js | JavaScript | mit | 358 |
import assert from './assert';
import Vertex from './vertex';
/**
* 2D scattering algorithms.
* @type {Object}
*/
const algorithms = {
/**
* Uniform-random scattering algorithm.
* @param {Integer} width - the width of the scattering area
* @param {Integer} height - the height of the scattering area
* @... | axelboc/voronoi-delaunay | app/lib/scatter.js | JavaScript | mit | 1,857 |
module.exports = function(io) {
var sockets = io.sockets;
sockets.on('connection', function (client) {
console.log("sockets[chat] client.handshake",client.handshake);
client.on('send-server', function (data) {
var msg = "<b>"+data.nome+":</b> "+data.msg+"<br>";
client.... | embura/ntalk | sockets/chat.js | JavaScript | mit | 422 |
var time;
var delayTime;
$(function(){
// 增加浮动DIV
$('body').append("<div id='notice'><div class='notice_header'><span class='notice_title'> </span><span class='glyphicon glyphicon-remove cbtn'></span></div><div class='notice_content'></div></div>");
// 更改样式
$('#notice').css({right:"0",bottom:"0",cursor... | kuiguo1991/work-demo | js/notice.js | JavaScript | mit | 1,680 |
const Benchmark = require("benchmark");
const {
test,
match,
sort: fuzzySort,
filter: fuzzyFilter,
} = require("../build/cjs");
process.stdout.write("Setting up benmarks...");
let cities = require("./cities.json");
cities = cities.map((city, i) => ({ id: i, ...city }));
console.log(" Done.");
const benchm... | gjuchault/fuzzyjs | benchmark/index.js | JavaScript | mit | 1,843 |
/*eslint-disable import/default*/
import environment from '../environments/environment'; | ajames72/react-redux-template | src/config/Config.js | JavaScript | mit | 88 |
/*******************************************************************************
* Name: QuizziPedia::Back-End::Config::Passport;
* Description: classe che permette la registrazione all'applicazione.
* Creation data: 27-04-2016;
* Author: Franco Berton.
******************************************************************... | TheFellowshipOfTheCode/QuizziPedia | Back-End/Config/Passport.js | JavaScript | mit | 7,182 |
"use strict";
(function (Filter) {
Filter[Filter["all"] = 9000] = "all";
Filter[Filter["audio"] = 1000] = "audio";
Filter[Filter["lossless"] = 1101] = "lossless";
Filter[Filter["mp3"] = 1102] = "mp3";
Filter[Filter["video"] = 2000] = "video";
Filter[Filter["tv"] = 2101] = "tv";
Filter[Filter... | thakurarun/listdown | app/shared/filters.js | JavaScript | mit | 1,513 |
(function() {
var FuzzySet = function(arr, useLevenshtein, gramSizeLower, gramSizeUpper) {
var fuzzyset = {
};
// default options
arr = arr || [];
fuzzyset.gramSizeLower = gramSizeLower || 2;
fuzzyset.gramSizeUpper = gramSizeUpper || 3;
fuzzyset.useLevenshtein = (typeof useLevenshtein !==... | argyakrivos/justeat_scores_on_the_doors | src/js/fuzzyset.js | JavaScript | mit | 9,337 |
export class Empty {}
| atornes/aurelia-sb-admin-2 | src/empty.js | JavaScript | mit | 22 |
define("p3/widget/viewer/SpecialtyVFGeneList", [
"dojo/_base/declare", "./TabViewerBase", "dojo/on", "dojo/topic",
"dojo/dom-class", "dijit/layout/ContentPane", "dojo/dom-construct",
"../PageGrid", "../formatter", "../SpecialtyVFGeneGridContainer", "../../util/PathJoin", "dojo/request", "dojo/_base/lang"
], function... | aswarren/p3_web | public/js/release/p3/widget/viewer/SpecialtyVFGeneList.js | JavaScript | mit | 5,351 |
/*
借书作为主页
*/
import * as types from '../constant/actionTypes';
const initState = {
catalogList: [],
isLoading: true,
};
export default function MainReducer(state = initState, action) {
switch (action.type) {
case types.LOAD_CATALOG_LIST:
return Object.assign({}, state, {
isLoading: action.i... | Seeingu/borrow-book | src/redux/reducers/catalogReducer.js | JavaScript | mit | 541 |