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 |
|---|---|---|---|---|---|
var $ = global.jQuery = require('jquery');
var add = require('lodash/math/add');
var flow = require('lodash/function/flow');
require('bootstrap/js/button');
function square(n) {
return n * n;
}
var addSquare = flow(add, square);
$('#myButton').on('click', function() {
var $btn = $(this);
var loading = $btn.dat... | BigAB/simple-boilerplate | src/js/main.js | JavaScript | mit | 550 |
import { ConnectDataClass, UserClass, UserDataClass } from './class_models'
import { ivanka } from './base64img'
const createConnectData = (description, text) => {
return new ConnectDataClass(description,text)
}
const createUser = () => {
let userData_personalData_name = createConnectData('Name','Trump')
le... | Florenz23/sangoo_04 | src/db/db_mock_ivanka.js | JavaScript | mit | 2,668 |
var bell_sounds = function () {
var ctx = new AudioContext();
var ring_bell = function (freq, length) {
var osc = ctx.createOscillator();
var gain = ctx.createGain();
osc.frequency.value = freq;
osc.connect(gain);
gain.connect(ctx.destination);
osc.start();
... | benwr/tintinnabulation | bell_sounds.js | JavaScript | mit | 746 |
import React, { Component } from 'react';
import {sub} from 'elegant-react';
import Counters from './Counters';
import {on, stream} from 'flyd';
import counterPlugin from './counter-plugin';
export default class App extends Component {
constructor(props) {
super(props);
const {atom} = this.props;
this.... | gilbox/elegant-react-hot-demo | src/App.js | JavaScript | mit | 2,004 |
'use strict';
/**
* @ngdoc function
* @name com.module.users.controller:LoginCtrl
* @description Login Controller
* @requires $scope
* @requires $routeParams
* @requires $location
* Contrller for Login Page
**/
angular.module('com.module.users')
.controller('LoginCtrl', function($scope, $routeParams, $locatio... | Bmantl/diravolution | client/app/modules/users/controllers/login.ctrl.js | JavaScript | mit | 2,866 |
'use strict';
// Returns a random whole number between the min (inclusive) and max (exclusive).
function randomize(min, max){
return Math.floor(Math.random() * (max - min) + min);
}
// Selects a random question.
function selectQuestion(questionType){
var attackQuestions = JSON.parse(localStorage.getItem('attackQu... | kurtrm/time-wizards | combat.js | JavaScript | mit | 11,508 |
var mariadb = require('../database/mariadb');
module.exports = function (email, callback) {
mariadb.get(function (err, con) {
if (err) {
if (con) {
con.release();
}
console.log("Failed to get mariadb.");
return callback(err);
}
... | descrify/descrify | src/account/findEmail.js | JavaScript | mit | 761 |
/* Handles converting the app's concept of a 'project'
* to/from the GitHub API's concept of an 'issue'
*/
const commentExtractionRegex = /<!-- ([.\d]+),([.\d]+) -->/
function parseCoordinatesFromComment (commentLines) {
var lastLine = commentLines.slice(-1)[0]
var matches = commentExtractionRegex.exec(lastLine... | pangaunn/hackmap | src/github-serialization.js | JavaScript | mit | 1,120 |
var searchData=
[
['lecture_5fdata',['lecture_data',['../projet__MAUSSION__RIOU_8cpp.html#a667003cfd6f66a62d7f583af4a61459b',1,'projet_MAUSSION_RIOU.cpp']]]
];
| Matthieu-Riou/Blade_Flyer | Documentation/html/search/functions_6c.js | JavaScript | mit | 162 |
// All code points in the `Inscriptional_Pahlavi` script as per Unicode v9.0.0:
[
0x10B60,
0x10B61,
0x10B62,
0x10B63,
0x10B64,
0x10B65,
0x10B66,
0x10B67,
0x10B68,
0x10B69,
0x10B6A,
0x10B6B,
0x10B6C,
0x10B6D,
0x10B6E,
0x10B6F,
0x10B70,
0x10B71,
0x10B72,
0x10B78,
0x10B79,
0x10B7A,
0x10B7B,
0x10B7C... | mathiasbynens/unicode-data | 9.0.0/scripts/Inscriptional_Pahlavi-code-points.js | JavaScript | mit | 353 |
//tv.js
Page({
data: {
listArray:[
{date:"2016年11月20日 星期五 今天",
items:[
{name:"战神",imageUrl:"http://www.hzeduask.com/edit5.0/uploadfile/201009/20100918133824708.jpg"
,scores:"9.0",id:"123123"
}
]
}
],
},
onLoad: function () {
},
didSelected:fu... | BurningCoder/WeChatWeb | pages/game/game.js | JavaScript | mit | 385 |
import React, { Component } from 'react';
/**
* Button that counts how many times it was pressed and exposes a `@public` method to reset itself.
*/
export default class CounterButton extends Component {
constructor() {
super();
this.state = {
value: 0,
};
}
/**
* Sets the counter to a particular value... | bluetidepro/react-styleguidist | examples/basic/src/components/CounterButton/CounterButton.js | JavaScript | mit | 852 |
/**
CSRF
Provides Cross-Site Request Forgery protection for applications.
» Configuration Options
{string} tokenSuffix: Suffix to append to csrf tokens
{int} onFailure: HTTP Error code to respond on token validation failure
» Usage example
The ideal usage is to create the csrf toke... | derdesign/protos | middleware/csrf/csrf.js | JavaScript | mit | 2,809 |
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","topic_0000000000000C16.html"],['1984',"Tlece.Recruitment.Models.Company Namespace","topic_0000000000000699.html"],['1998',"CompanyDto Class","topic_00000000000006A8.html"],['2000',"Properties","topic_00000000000006A8_props--.html"],['2009',"Compan... | asiboro/asiboro.github.io | vsdoc/toc--/topic_00000000000006CB.html.js | JavaScript | mit | 384 |
const mongoose = require("mongoose");
const db = require("../../models");
mongoose.Promise = global.Promise;
//This file seeds the database
mongoose.connect(
process.env.MONGODB_URI || "mongodb://localhost/petrescuers",
{
useMongoClient: true
}
);
//Seeding the breed collection with the breed recommendatio... | Contrapuntist/petrescuers | scripts/seeds/seedBreedLookup.js | JavaScript | mit | 3,106 |
/**
* This module formats precise time differences as a vague/fuzzy
* time, e.g. '3 weeks ago', 'just now' or 'in 2 hours'.
*/
/*globals define, module */
(function (globals) {
'use strict';
var times = {
year: 31557600000, // 1000 ms * 60 s * 60 m * 24 h * 365.25 d
month: 2629800000, // ... | npmcomponent/philbooth-vagueTime.js | lib/vagueTime-en-fr.js | JavaScript | mit | 5,000 |
Package.describe({
summary: 'A solution for the allow/deny vs methods dilemma',
name: 'mquandalle:collection-mutations',
version: '0.1.0',
documentation: null,
});
Package.onUse(function(api) {
api.versionsFrom('1.2-rc.7');
api.use('mongo');
api.use('ecmascript');
api.use('underscore');
api.use('dbur... | mquandalle/meteor-collection-mutations | package.js | JavaScript | mit | 388 |
var co = require('co')
var os = require('os')
var fs = require('fs')
var path = require('path')
var http = require('http')
var request = require('..')
var tmpdir = os.tmpdir()
var uri = 'https://raw.github.com/component/domify/84b1917ea5a9451f5add48c5f61e477f2788532b/component.json'
var redirect = 'https://raw.github... | KenanSulayman/cogent | test/cogent.js | JavaScript | mit | 1,345 |
/*!
* This file is part of me-cms.
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Mirko Pagliai
* @link https://github.com/mirko-pagliai/me-cms
*... | mirko-pagliai/me-cms | webroot/js/display-password.js | JavaScript | mit | 1,653 |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M17.09 11h4.86c-.16-1.61-.71-3.11-1.54-4.4-1.73.83-2.99 2.45-3.32 4.4zM6.91 11c-.33-1.95-1.59-3.57-3.32-4.4-.83 1.29-1.38 2.79-1.54 4.4h4.86zM15.07 11c.32-2.59 1.88-4.79 4.06-6-1.6-1.63-3.74-2.71... | lgollut/material-ui | packages/material-ui-icons/src/SportsBasketball.js | JavaScript | mit | 726 |
/*jshint node:true*/
module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.13',
dependencies: {
'ember': '~1.13.0'
},
resolutions: {
'ember': '~1.13.0'
}
},
{
name: 'ember-2.0',
dependencies: {... | poteto/ember-toggle-helper | config/ember-try.js | JavaScript | mit | 1,381 |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Bars = f()}})(... | Mike96Angelo/Bars | src/v1.7.1/bars.js | JavaScript | mit | 184,674 |
describe('wokArmyBuilder.builder.army.optionList', function () {
beforeEach(module('wokArmyBuilder'));
describe('wokOptionListController', function () {
var controller, $scope, Army, Models, gameSizes;
beforeEach(function () {
module('wokArmyBuilder.builder.army.coreList', function ($provide) {
... | dsusco/wok-army-builder | src/app/builder/army/option-list/option-list.spec.js | JavaScript | mit | 2,929 |
//
const express = require('express');
const Activity = require("../models/activities");
const Trip = require("../models/trip");
const User = require("../models/user");
const router = express.Router();
var app = express();
/* GET activities. */
router.get('/trip/:id/activities', (req, res, next) => {
var tripi... | arnauguadall/mytrip | routes/activity.js | JavaScript | mit | 1,397 |
'use strict';
const assert = require('assert');
//const app = require('../../../src/app');
describe('user service', function() {
it('registered the users service', () => {
// assert.ok(app.service('users'));
});
});
| andreagoulet/callmyreps | server/test/services/user/index.test.js | JavaScript | mit | 225 |
'use strict'
const sgf = require('staged-git-files')
const Listr = require('listr')
const has = require('lodash/has')
const pify = require('pify')
const makeCmdTasks = require('./makeCmdTasks')
const generateTasks = require('./generateTasks')
const resolveGitDir = require('./resolveGitDir')
const debug = require('deb... | galenscook/algorithms | javascript/node_modules/lint-staged/src/runAll.js | JavaScript | mit | 2,076 |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes');
var app = express();
// view engine setup
app.set('views', path.... | dooks/arthound | app.js | JavaScript | mit | 736 |
//document.write 只能重绘整个页面
//
//innerHTML 可以重绘页面的一部分
var d = document.getElementById("d");
| zouyang2015/node-test | 面试题/37.documen.write和 innerHTML 的区别.js | JavaScript | mit | 128 |
import Test from '../../_helpers/Test'
import bp from '../../_helpers/breakpoints'
import mq from '../../_helpers/mq'
import report_result_summary from '../../_helpers/report_result_summary'
import sequence from '../../_helpers/sequence'
import ResultTracker from '../../_helpers/ResultTracker'
import apply_style from '... | Dan503/mq-js | tests/height-based/outsideHeight/outsideHeight.js | JavaScript | mit | 4,106 |
// gulpfile.js
"use strict";
import gulp from "gulp";
import path from "path";
import fs from "fs";
import htmlmin from "gulp-htmlmin";
import uglify from "gulp-uglify";
import rename from "gulp-rename";
import concatCss from "gulp-concat-css";
import csso from "gulp-csso";
import inject from "gulp-inject";
import r... | var-bin/angularjs-training | NoteWrangler/gulpfile.babel.js | JavaScript | mit | 5,239 |
import React from 'react'
import cookie from 'react-cookie'
import { Link } from 'react-router'
import url from '../../config.js'
// components
import NavBar from './NavBar'
import Header from './Header'
import ToggleDisplay from 'react-toggle-display'
import FlatButton from 'material-ui/lib/flat-button'
import Raised... | kakapo2016-projects/tooth-and-pail | src/components/RecipientSignup.js | JavaScript | mit | 4,877 |
import React from 'react';
import style from 'PVWStyle/ReactProperties/CheckboxProperty.mcss';
export default React.createClass({
displayName: 'Checkbox',
propTypes: {
idx: React.PropTypes.number,
label: React.PropTypes.string,
onChange: React.PropTypes.func,
value: React.PropTypes.bool,
},
... | CordyChen/VisMechan | paraviewweb/src/React/Properties/CheckboxProperty/Checkbox.js | JavaScript | mit | 926 |
/**
* runApp
* Created by dcorns on 1/3/15.
* Returns a new object with a run method that executes os commands in node.
*/
'use strict';
module.exports = function(){
this.run = function run(arg, cnn, cmd){
var spawn = require('child_process').spawn;
var proc = spawn(cmd, arg);
proc.on('exit', fu... | dcorns/processThis | runApp.js | JavaScript | mit | 603 |
define(function () {
var Meal = function () {
this.ids = {};
this.time = null;
this.timezone = null; // if available
this.params = {
};
/*
this.params = { // in grams or ml
'calories': 900,
'fat': 99
};
*/
};
... | intefit/intefit-sync | src/intefit/meal.js | JavaScript | mit | 340 |
var gulp = require('gulp');
var del = require('del');
var config = require('../config');
gulp.task('clean', function(cb) {
del([config.dir_dist + '/**'], cb);
});
| waifung0207/gulp_templates | 2_js_sass/gulpfile.js/tasks/clean.js | JavaScript | mit | 166 |
module.exports = {
re: /^https?:\/\/(?:[\w\-]+\.)?genius\.com\/(?!jobs)([a-zA-Z\-]+)/i,
mixins: [
"domain-icon",
"*"
],
getLinks: function(urlMatch, twitter) {
var id = twitter.app.url.iphone.match(/\d+/)[0];
if (id) {
return {
html: '<di... | loklak/loklak_webclient | iframely/plugins/domains/rapgenius.com.js | JavaScript | mit | 886 |
// Karma configuration
// Generated on Thu Oct 01 2015 17:56:10 GMT+0900 (JST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/k... | inotom/react_with_redux_counter_sample | karma.conf.js | JavaScript | mit | 1,859 |
var creds = (function () {
var creds = {};
creds.API_SECRET="";
creds.API_KEY="";
creds.AUTHOR='';
return creds;
}());
| Parsely/api-examples | authorDashboard/creds.js | JavaScript | mit | 129 |
/*
* grunt-arcgis-press
* https://github.com/agrc/grunt-arcgis-press
*
* Copyright (c) 2015 Steve Gourley & Scott Davis
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
var PythonShell = require('python-shell');
var chalk = require('chalk');
var mixin = require('... | agrc/grunt-arcgis-press | tasks/arcgis_press.js | JavaScript | mit | 4,242 |
var d = global.d;
describe("bfs", function () {
it("should throw a TypeError when no arguments are given", function () {
expect(() => d.bfs().next()).toThrow(new TypeError("Argument 1 must be an Object or Array"));
});
it("should throw a TypeError when any arguments are the wrong type", function () {
expect(() ... | Floofies/Differentia.js | spec/searchIterator.js | JavaScript | mit | 2,695 |
window.onload = function() {
var video = document.getElementById('video');
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var tracker = new tracking.ObjectTracker('eye');
tracking.track('#video', tracker, { camera: true });
tracker.on('track', function(event) {
... | krishagel/tg-tracker | track.js | JavaScript | mit | 1,085 |
'use strict';
exports.init = function(req, res){
res.render('new/index');
};
| benshiue/partjs_crawler | views/new/index.js | JavaScript | mit | 80 |
var CancelTextCommand = function() {
this.Extends = SimpleCommand;
this.execute = function(note) {
//alert("CancelTextCommand");
var mediator = note.getBody();
var textEditor = null;
if (mediator instanceof ModelObjectsTextsEditorMediator) {
textEditor = mediator.getViewComponent().gridListSplitter.rig... | sjamayee/sjamayee | src/sjamayee/js_old/pmvc/controller/model/texts/CancelTextCommand.js | JavaScript | mit | 1,104 |
version https://git-lfs.github.com/spec/v1
oid sha256:1d9080414602f6f5917e7b36b5aba29a65872741dae9d855477b867a38088897
size 7969
| yogeshsaroya/new-cdnjs | ajax/libs/zeroclipboard/1.1.2/ZeroClipboard.min.js | JavaScript | mit | 129 |
'use strict';
var React = require('react-native');
var Navigation = require('./Navigation');
var CatalogCell = require('./CatalogCell');
var {
StyleSheet,
Text,
View,
ListView,
Image,
DrawerLayoutAndroid,
TouchableHighlight,
TouchableNativeFeedback,
ToolbarAndroid,
} = React;
import {manager, Reac... | InfiniteLibrary/infinite-reader | android/app/components/MyBooks.js | JavaScript | mit | 2,855 |
/* */
"format cjs";
import ActionAccessibility from './action/accessibility';
export { ActionAccessibility };
import ActionAccessible from './action/accessible';
export { ActionAccessible };
import ActionAccountBalanceWallet from './action/account-balance-wallet';
export { ActionAccountBalanceWallet };
import ActionAc... | nayashooter/ES6_React-Bootstrap | public/jspm_packages/npm/material-ui@0.14.4/src/svg-icons/index.js | JavaScript | mit | 78,162 |
// Always request javascript when sending xhr
$(function() {
$.ajaxSetup({
'beforeSend': function(xhr) {
xhr.setRequestHeader("Accept", "text/javascript");
}
});
});
$().ready(function(){
jQuery(top).trigger('initialize:frame');
// hide roxanne toolbar if mercury toolbar is present in parent wi... | grrrisu/Roxanne | app/assets/javascripts/roxanne/show.js | JavaScript | mit | 1,320 |
const
weekly = require('./'),
botMessages = require('../messages/bot-msgs'),
sendMessage = require('../tools/sendMessage')
;
module.exports = function (datastore, userObject, quick_reply) {
let day = quick_reply.payload.split('_')[1].toLowerCase();
weekly(datastore, userObject, day).then(postsElem... | unaorganizacion/productive-nights | weekly/handleQuickReply.js | JavaScript | mit | 1,185 |
var app = angular.module('js');
app.controller('RegistrationOwnEditCtrl', function($scope, $filter, $routeParams, $location, NotificationSvc, ActivitiesSvc, RegistrationSvc, conf, PlatformSvc) {
//$scope.busyPromise = RegistrationSvc.findById;
$scope.cities = PlatformSvc.getCities();
$scope.platform = PlatformSvc;... | appztreme/JugendsommerOrig | public/src/Registrations/registrationOwnEdit.ctrl.js | JavaScript | mit | 4,903 |
(function(window, document, undefined) {
'use strict';
console.log('This would be the main JS file.');
particlesJS("particles-js", {
"particles": {
"number": {
"value": 400,
"density": {
"enable": true,
"value_area... | maheshgadge/about | javascripts/main.js | JavaScript | mit | 6,391 |
import differenceInCalendarWeeks from '../differenceInCalendarWeeks/index.js'
import lastDayOfMonth from '../lastDayOfMonth/index.js'
import startOfMonth from '../startOfMonth/index.js'
/**
* @name getWeeksInMonth
* @category Week Helpers
* @summary Get the number of calendar weeks a month spans.
*
* @description... | js-fns/date-fns | src/getWeeksInMonth/index.js | JavaScript | mit | 1,713 |
(function(){
'use strict';
var app = angular.module('readingList', []);
app.controller = ('ReadingListController', function(){
this.books = books;
this.genres = genres;
}
);
var genres = ['fable', 'fantasy', 'fiction', 'folklore', 'horror', 'humor', 'legend', 'metafiction', 'mystery', 'myt... | mrweckel/angular-reading-list | app/js/app.js | JavaScript | mit | 1,607 |
module.exports.createCommands = (world) => {
return [
new world.Command({
name: `look`,
positions: world.constants().positionsAwake,
execute: async (world, user, buffer, args) => {
if ( typeof args[0] == `string` ) {
/** If the first argument is 'in'... */
if ( `in`.s... | om-mani-padme-hum/muddy | senses.js | JavaScript | mit | 19,447 |
'use strict';
// Load modules
const Code = require('code');
const Hapi = require('hapi');
const Lab = require('lab');
const Info = require('../lib/modules/hello-world');
// Declare internals
const internals = {};
// Test shortcuts
const lab = exports.lab = Lab.script();
const it = lab.it;
const describe = lab.de... | cilindrox/docker-node-sample | test/index.js | JavaScript | mit | 932 |
'use strict';
var commander = require('../../lib/commander');
var config = require('../../lib/config');
var gulp = require('gulp');
var gulpIf = require('gulp-if');
var gulpLess = require('gulp-less');
var gulpWatchLess = require('gulp-watch-less');
var mac = require('mac');
var path = require('path');
module.exports... | treshugart/chippy | src/task/dist/less.js | JavaScript | mit | 688 |
/**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { BigNumberDependencies } from './dependenciesBigNumberClass.generated'
import { UnitDependencies } from './dependenciesUnitClass.generated'
import { createBoltzmann } from '../../factoriesAny.js'
export const boltzmannDependencies = {
BigNumbe... | Michayal/michayal.github.io | node_modules/mathjs/src/entry/dependenciesAny/dependenciesBoltzmann.generated.js | JavaScript | mit | 375 |
const path = require("path");
var DuplicatePackageCheckerPlugin = require("../../src");
module.exports = function(options, mode = "development") {
return {
entry: "./entry.js",
mode,
context: __dirname,
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js"
},
plug... | darrenscerri/duplicate-package-checker-webpack-plugin | test/simple/make.webpack.config.js | JavaScript | mit | 378 |
/*
Known Modes:
- neutral
- walkaway
- Enable walkaway option
- play-by-play
- Enable play-by-play popup window showing the history of this game
- condition-random
- Utilize a random condition provided by the auth server
- condition
- Utilize a specific condition provided by the auth server
- ... | lifeandscience/frenemy | config-mode.js | JavaScript | mit | 2,937 |
version https://git-lfs.github.com/spec/v1
oid sha256:cc94bba58e6d6997e534f1aad9e9b1f76f8b8c5ee0356b423bebed6ad1024ace
size 2601
| yogeshsaroya/new-cdnjs | ajax/libs/angular-i18n/1.2.10/angular-locale_ar-jo.min.js | JavaScript | mit | 129 |
define('dojorama/layers/nls/release_zh-cn',{
'dojorama/ui/release/mixin/nls/_ReleaseActionsMixin':{"indexLabel":"Overview","createLabel":"Create New Release"}
,
'dojorama/ui/release/mixin/nls/_ReleaseBreadcrumbsMixin':{"homeLabel":"Home","releaseIndexLabel":"Releases","releaseCreateLabel":"Create New Release"}
,
'dojor... | sirprize/dojorama | builds/single-file-v002/dojorama/layers/nls/release_zh-cn.js.uncompressed.js | JavaScript | mit | 1,766 |
import { elt, removeChildren } from "../util/dom"
import { indexOf } from "../util/misc"
import { updateGutterSpace } from "./update_display"
// Rebuild the gutter elements, ensure the margin to the left of the
// code matches their width.
export function updateGutters(cm) {
var gutters = cm.display.gutters, specs ... | INTELOGIE/CodeMirror | src/display/gutters.js | JavaScript | mit | 1,252 |
/**
* Users
* Pokemon Showdown - http://pokemonshowdown.com/
*
* Most of the communication with users happens here.
*
* There are two object types this file introduces:
* User and Connection.
*
* A User object is a user, identified by username. A guest has a
* username in the form "Guest 12". Any user whose u... | MasterFloat/Pokemon-Showdown | users.js | JavaScript | mit | 54,380 |
import isArray from '../util/isArray'
import isNumber from '../util/isNumber'
import isArrayEqual from '../util/isArrayEqual'
/**
@internal
*/
class Coordinate {
/**
@param {Array} path the address of a property, such as ['text_1', 'content']
@param {int} offset the position in the property
*/
construct... | andene/substance | model/Coordinate.js | JavaScript | mit | 1,680 |
(function () {
angular
.module('mogul')
.constant('OPTS', {
'server': 'http://localhost:9292/',
'itemsPerPage': 12
});
})();
| kyleaedwards/mogul | client/v1/js/constants.js | JavaScript | mit | 155 |
angular.module('companyService',[])
.factory('Company', function($http){
var companyFactory = {};
companyFactory.create = function(companyData){
return $http.post('/api/companycreate', companyData);
};
companyFactory.allCompany = function(){
return $http.get('/api/companygetall');
};
// com... | nikhilhaya/spegan3 | client/app/services/companyService.js | JavaScript | mit | 446 |
define([
"dojo/_base/declare",
"mijit/_WidgetBase",
"mijit/_TemplatedMixin",
"dojo/dom-construct"
], function (
declare,
_WidgetBase,
_TemplatedMixin,
domConstruct
) {
return declare([_WidgetBase, _TemplatedMixin], {
templateString: '<input type="text" data-dojo-att... | sirprize/dojo-form-controls | MappedTextbox.js | JavaScript | mit | 2,394 |
/*
* ComposeJS, object composition for JavaScript, featuring
* JavaScript-style prototype inheritance and composition, multiple inheritance,
* mixin and traits-inspired conflict resolution and composition
*/
(function(define){
"use strict";
define([], function(){
// function for creating instances from a prototyp... | johanlajili/lajiliboilerplate | script/vendor/compose.js | JavaScript | mit | 9,497 |
'use strict';
var path = require('path')
, _ = require('lodash')
, chalk = require('chalk')
, yo = require('yeoman-generator')
, utils = require('../lib/utils')
, Base = yo.generators.Base;
_.mixin(require('lodash-deep'));
var AppGenerator = Base.extend({
constructor: function () {
Base.appl... | kasperisager/generator-vanilla | app/index.js | JavaScript | mit | 6,037 |
/*
--- Day 15: Science for Hungry People ---
Today, you set out on the task of perfecting your milk-dunking cookie recipe.
All you have to do is find the right balance of ingredients.
Your recipe leaves room for exactly 100 teaspoons of ingredients. You make a
list of the remaining ingredients you could use to finish... | Mistereo/adventofcode-solutions | solutions/day15/1.js | JavaScript | mit | 3,213 |
import run from './run';
/**
* Compiles the project from source files into a distributable
* format and copies it to the output (build) folder.
*/
async function build() {
await run(require('./clean'));
await run(require('./copy'));
await run(require('./bundle'));
}
export default build;
| peinanshow/react-redux-samples | tools/build.js | JavaScript | mit | 301 |
const assert = require('assert');
const { execSync } = require('child_process');
const fs = require('fs');
const specMarkdown = require('../');
const shouldRecord = Boolean(process.env.RECORD);
function testSource(dir, input, options) {
return [input || `test/${dir}/input.md`, `test/${dir}/ast.json`, `test/${dir}/... | leebyron/spec-md | scripts/test.js | JavaScript | mit | 3,199 |
import { Mongo } from 'meteor/mongo'
import { SimpleSchema } from 'meteor/aldeed:simple-schema'
const Articles = new Mongo.Collection('articles')
export const UPVOTE = 1
export const DOWNVOTE = -1
export const ELASTIC_SEARCH_INDEX = 'articles'
export const ELASTIC_SEARCH_TYPE = 'publications'
export const ArticleRep... | FractalFlows/Emergence | app/imports/both/collections/articles.js | JavaScript | mit | 3,337 |
angular.module('devlogin', [
'devlogin.index',
'devlogin.forgot',
'devlogin.reset'
]); | florenm2/MF-ang | client/src/app/developerlogin/index.js | JavaScript | mit | 92 |
'use strict';
const assert = require('assert');
const Browscap = require('../src/index.js');
suite('checking for issue 1725. (29 tests)', function () {
test('issue-1725-00000 ["Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.43 (KHTML, like Gecko) AppleNews/607 Version/2.0"]', function () {... | mimmi20/browscap-js | test/issue-1725.js | JavaScript | mit | 217,598 |
// @flow strict
import { renderHook, act } from '@testing-library/react-hooks';
import * as PopperJs from '@popperjs/core';
// Public API
import { usePopper } from '.';
const referenceElement = document.createElement('div');
const popperElement = document.createElement('div');
describe('userPopper', () => {
afterE... | souporserious/react-popper | src/usePopper.test.js | JavaScript | mit | 3,386 |
// JavaScript Document
var datable_result;
var _url_path = baseurl+'enrolment/new_enrolment/';
var _url_edit = baseurl+'enrolment/new_enrolment/';
var _url_del = baseurl+'enrolment/delete/';
$(document).ready(function() {
datable_result = $('#datable_score_student').DataTable( {
// fixedColumns : true,... | vuthysin5284/school | assets/js/enrolment/score_student.js | JavaScript | mit | 2,694 |
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define('three.SoftwareRenderer', ['three'], factory);
}
else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {
module.exports = factory(require('three'));
}
else {
factory(root.T... | OlegLazaryev/photo-sphere | bower_components/three.js-examples/examples/js/renderers/SoftwareRenderer.js | JavaScript | mit | 38,128 |
import React from 'react';
import { shallow } from 'enzyme';
import FormElementControl from '../FormElementControl';
describe('<FormElementControl />', () => {
let mounted = null;
const child = <div className="foo" />;
beforeEach(() => {
mounted = shallow(<FormElementControl>{child}</FormElementControl>);
... | propertybase/react-lds | src/components/Form/__tests__/FormElementControl.spec.js | JavaScript | mit | 1,982 |
function init_types_categories() {
var init = function () { init_edit_modal(); };
load_modal_on_click('#create-type', { target: '#modal-sm', controller: 'admin', action: 'type' }, { todo: init });
load_modal_on_click('#create-category', { target: '#modal-sm', controller: 'admin', action: 'category' }, { todo: init ... | SergeAimeLesKiwis/critiques | assets/js/scripts/admin/types-categories.js | JavaScript | mit | 2,181 |
module.exports = {
verbose: true,
testURL: "http://localhost",
transform: {
".+\\.tsx?$": "ts-jest"
},
transformIgnorePatterns: ["/node_modules/", "/dist/"],
testRegex: "/__tests__/.*\\.spec\\.tsx?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]
};
| xaviergonz/js-angusj-clipper | jest.config.js | JavaScript | mit | 287 |
import config from '../config';
import path from 'path';
import gulp from 'gulp';
import {Server} from 'karma';
gulp.task('unit', ['blogViews'], function(cb) {
new Server({
configFile: path.resolve(__dirname, '../..', config.test.karma),
singleRun: true
}, cb).start();
});
| dnaloco/digitala | gulp/tasks/unit.js | JavaScript | mit | 299 |
/**
* Vehicle payload
*
* LIGNA scenario: step 15
*
* Display description: - A chart of the vehicle payload for the current day
*
* Input variables: - machine[mid].technical_data.vehicle_payload
*
* @@source_header
*
* --
*
* This file is part of the focus-app-demonstrator package.
*
* For the full... | focusnet/focus-app-demonstrator | src/app/vehicle-payload/vehicle-payload.js | JavaScript | mit | 4,405 |
Chartled.registerChartleEditor( Chartled.ChartChartle, {
initialize: function( definition ) {
this.configuringChartle = false;
this._chartEditorDialog= new Chartled.ChartleEditDialog({
title: "Edit Chart"
});
this._metricEditors=[];
}
, dispose: function() {
this._disposeMe... | ciaranj/chartled | public/javascripts/chartled/chartles/chart/Editor.js | JavaScript | mit | 7,519 |
import cp from 'child_process';
import fs from 'fs';
import path from 'path';
import test from 'ava';
import helpers from 'yeoman-test';
const files = [
'lib/config.js',
'lib/persister.js',
'lib/logger.js',
'lib/sub.js',
'sub/commands.js',
'sub/completions.js',
'sub/example.js',
'sub/help.js',
'sub/init.js',... | doug-wade/generator-sub | test/app.js | JavaScript | mit | 2,559 |
export default class {
constructor(jsonInputData = {}, storyInputData = {}) {
this.jsonInputData = jsonInputData;
this.storyInputData = storyInputData;
}
get input() {
let {jsonInputData = {}, storyInputData = {}} = this;
let {radioButtons = []} = jsonInputData;
let ... | influencetech/ivx-js | src/modules/data/ivx-io/input-validators/options.radio.js | JavaScript | mit | 1,174 |
// @flow
import * as React from 'react';
import Benchmark, { type BenchmarkRef } from '../Benchmark';
import BenchmarkType from '../BenchmarkType';
import { act, render, waitFor } from '@testing-library/react';
import type { Sample } from '../types';
type Props = {| testID: number |};
function Test({ testID }: Props)... | paularmstrong/react-component-benchmark | src/__tests__/Benchmark.test.js | JavaScript | mit | 2,728 |
Cufon.replace('h1', {fontFamily: 'Comfortaa'});
Cufon.replace('p.c_soon strong', {fontFamily: 'Comfortaa'}); | vcelis/AlmaCheck-web | public/js/main.js | JavaScript | mit | 108 |
import React from 'react';
class AboutPage extends React.Component {
render() {
return (
<div>
<h1>About </h1>
</div>
)
}
}
export default AboutPage; | Maricha/Courses | src/components/about/AboutPage.js | JavaScript | mit | 215 |
/*
Function: buttonPress
Params: - onclick - Function to call when button is clicked.
Returns: Nothing.
Operation: Adds consistent onmouse* events to a button.
*/
Element.prototype.buttonPress = function(onclick) {
this.onmouseover = function() {
this.style.borderColor = DEFAULT_COLOR;
};
this.onmouseo... | awlodge/ShareExtension | extension/popup/popup.js | JavaScript | mit | 4,263 |
(function (window, document) {
var layout = document.getElementById('layout'),
menu = document.getElementById('menu'),
menuLink = document.getElementById('menuLink');
function toggleClass(element, className) {
var classes = element.className.split(/\s+/),
length = cla... | zhangmingkai4315/es6-homepage | app/src/js/ui.js | JavaScript | mit | 1,068 |
'use strict';
/* Controllers */
angular.module('restBrowser.controllers', [])
.controller('MyCtrl1', ['$scope', 'Restangular', function($scope, Restangular) {
$scope.itemSelected = function(item) {
console.log(item.attr('id'));
var listing = Restangular.all(item.attr('id')).getList();
return listi... | hbmartin/angular-rest-api-browser | app/js/controllers.js | JavaScript | mit | 337 |
/**
* Created by marciso on 10/02/2017.
*/
$('#nota').click(function(){
console.log('funcionou');
if($('#nota').is(":checked")){
$("#notaFiscal").prop('disabled',false);
$("#notaFiscal").val('');
}else{
$("#notaFiscal").prop('disabled',true);
$("#notaFiscal").val("S/N");
... | r1ff/seriema-transporte | js/funcoes.js | JavaScript | mit | 10,212 |
/* OrderPortal
Meta documents indexed by id.
Value: title.
*/
function(doc) {
if (doc.orderportal_doctype !== 'meta') return;
emit(doc._id, null);
}
| ewels/OrderPortal | orderportal/designs/meta/views/id.js | JavaScript | mit | 163 |
(function () {
"use strict";
angular.module("mailCRMApp", ["ngRoute", "MailCRM.services", "MailCRM.controllers"])
.config(function ($routeProvider, $locationProvider) {
$routeProvider.when("/login", {
controller: "loginCtrl",
templateUrl: "../../template... | OfficeDev/PnP-OfficeAddins | Samples/Outlook.MailCRM/DXDemos.Office365/Scripts/Apps/MailCRM/app.js | JavaScript | mit | 2,487 |
Meteor.startup(function() {
/**
* Sets Mideor.MIDI to the Web MIDI API object if there is a MIDI device
* detected otherwise false.
*
* Handles API change in Chrome 29.
*/
navigator.requestMIDIAccess()
.then(function (m) {
// Web MIDI API changed in Chrome 29 here's a catchall.
// Chr... | MISC-ellaneous/mideor | client/startup/MIDI-init.js | JavaScript | mit | 787 |
// All symbols in the Kangxi Radicals block as per Unicode v6.1.0:
[
'\u2F00',
'\u2F01',
'\u2F02',
'\u2F03',
'\u2F04',
'\u2F05',
'\u2F06',
'\u2F07',
'\u2F08',
'\u2F09',
'\u2F0A',
'\u2F0B',
'\u2F0C',
'\u2F0D',
'\u2F0E',
'\u2F0F',
'\u2F10',
'\u2F11',
'\u2F12',
'\u2F13',
'\u2F14',
'\u2F15',
'\u2F16'... | mathiasbynens/unicode-data | 6.1.0/blocks/Kangxi-Radicals-symbols.js | JavaScript | mit | 2,534 |
import { Base } from './base';
export class Asset extends Base {
setStage(stage) {
this.stage = stage;
}
set(params) {}
}
| ozio/moe | src/core/asset.js | JavaScript | mit | 134 |
import Utils from './Utils';
import TestIDs from '../playground/src/testIDs';
const { elementById } = Utils;
describe.e2e('Lazy Registration', () => {
beforeEach(async () => {
await device.relaunchApp();
await elementById(TestIDs.STACK_BTN).tap();
});
it('push and pop lazily registered screen', async (... | wix/react-native-navigation | e2e/LazyRegsitration.test.js | JavaScript | mit | 662 |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* The Physics Manager is responsible for looking after all of the running physics systems.
* Phaser supports 4 physics... | yupaul/phaser-ce | src/physics/Physics.js | JavaScript | mit | 11,809 |
class x509enrollment_cx500distinguishedname {
constructor() {
// string EncodedName (EncodingType) {get}
this.Parameterized = undefined;
// string Name () {get}
this.Name = undefined;
}
// void Decode (string, EncodingType, X500NameFlags)
Decode(string, EncodingType, X... | mrpapercut/wscript | testfiles/COMobjects/JSclasses/X509Enrollment.CX500DistinguishedName.js | JavaScript | mit | 491 |