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
/*global io,data*/ (function(){ // give up and resort to `target=_blank` // if we're not modern enough if (!document.body.getBoundingClientRect || !document.body.querySelectorAll || !window.postMessage) { return; } // the id for the script we capture var id; // listen on setup event from the...
DigitalArtisans/Homepage
lib/assets/iframe.js
JavaScript
mit
2,632
import React from 'react'; import PropTypes from 'prop-types'; import { View } from 'react-native'; import { Text } from 'native-base'; import Colors from '../../../native-base-theme/variables/commonColor'; const Messages = ({ message, type }) => ( <View style={{ backgroundColor: type === 'error' ...
mcnamee/react-native-starter-app
src/components/UI/Messages.js
JavaScript
mit
783
function updateImprovementsDisplay(i) { updateDisplay( 'desc_improvements', `improvements: ${i}` ); } function updateGenerationsDisplay(g) { updateDisplay( 'desc_generations', `generations: ${g}` ); } function updateBestSimilarityDisplay(s) { updateDisplay( 'best_desc_similarity', `$...
edwardsCam/mikado
utils/display.js
JavaScript
mit
1,255
import { createAction } from "redux-actions"; export default createAction("MARK_BLOCK");
sinnerschrader/patternplate
packages/client/src/app/actions/mark-block.js
JavaScript
mit
90
/* This is the example config file used to demonstrate turning leds of different types and protocols on and off. */ // converts a number to a hex function toHex(c) { var hex = c.toString(16); hex = hex.length == 1 ? "0" + hex : hex; return "0x" + hex; } // formats an input to be received by a tri-colo...
favor/examples
config_files/hello-world-leds.js
JavaScript
mit
1,933
const merge = require('webpack-merge'); const common = require('./webpack.common.js'); const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = merge(common, { module: { rules: [{ test: /\.css$/, use: ExtractTextPlugin.extract({ us...
jwtlake/jono-gram
app/webpack.prod.js
JavaScript
mit
569
const Request = require('request'); const env2 = require('env2'); const HapiCookie = require('hapi-auth-cookie'); env2('./config.env'); module.exports = { path: '/welcome', method: 'GET', handler: (req, rep) => { const accessUrl = `https://github.com/login/oauth/access_token`; Request.post({ heade...
The-Authenticators/gitpom
src/routes/welcome.js
JavaScript
mit
1,628
describe('Events:', function() { var it_prepends_to_the_jobs_list_view = function() { it('prepends to the jobs list view', function() { expect_text('#jobs li:first-child', this.data.repository.name + ' #' + this.data.number) }); }; var it_removes_the_job_from_the_jobs_list_view = function() { i...
rgaidot/travis
public/javascripts/tests/events/jobs_test.js
JavaScript
mit
1,325
const {npmPublishPackage, npmPublishAll} = require(`../../utils/publish`); module.exports = { command: `package <packageName>`, desc: `Publish a package to NPM`, builder: {}, handler: ({packageName}) => { if (packageName) { switch (packageName.toLowerCase()) { case `all`: return npmPubl...
Altocloud/alto-react-ciscospark
scripts/publish/commands/package.js
JavaScript
mit
431
/** * A Node.js module object. Every Node.js module receives a reference to * itself through a local variable named "module", and its global context. * * @external module * @see https://nodejs.org/api/modules.html#modules_the_module_object */ /** * The Node.js built-in "path" module. * * @external path * @se...
ricardo-kagawa/lignin
lib/docs.js
JavaScript
mit
5,702
// flow-typed signature: 03af697d18fe8a7b11299425ad8b778f // flow-typed version: <<STUB>>/webpack-manifest-plugin_v^1.1.0/flow_v0.41.0 /** * This is an autogenerated libdef stub for: * * 'webpack-manifest-plugin' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to...
rpowelll/universal-react-boilerplate
flow-typed/npm/webpack-manifest-plugin_vx.x.x.js
JavaScript
mit
2,157
/* * The MainMenu state displays the game menu and enters the Game state after the user clicks the screen. */ Game.MainMenu = function(game) { }; Game.MainMenu.prototype = { create: function() { this.add.sprite(0, 0, 'titlepage'); this.loadingText = this.add.text(510, 520, 'Click to start playin...
canac/linc-games
games/scripts/MainMenu.js
JavaScript
mit
682
const Path = require('path'); const webpack = require('webpack'); // Import the core config const webpackConfig = require('@silverstripe/webpack-config'); const { resolveJS, externalJS, moduleJS, pluginJS, moduleCSS, pluginCSS, } = webpackConfig; const ENV = process.env.NODE_ENV; const PATHS = { MODULES:...
assertchris/silverstripe-segment-field
webpack.config.js
JavaScript
mit
1,253
export const getMockState = { withNoNotes: ()=>({ byId: {}, ids: [], openNoteId: null }), withOneNote: ()=>({ byId: { 'id-123': { id: 'id-123', content: 'Hello World', timestamp: 1 } }, ids: ['id-123'], openNoteId: 'id-123' }), withTwoNotes: ()=>...
Remexllee/randr-practice
a-note-app/src/store/testUtils.js
JavaScript
mit
807
'use strict'; const path = require('path'); const { logError } = require('./util/logger'); const config = { user: process.env.MC_USER, pass: process.env.MC_PASS, serverHost: process.env.MC_SERVER_HOST || 'simpvp.net', serverPort: process.env.MC_SERVER_PORT || 25565, logFilePath: process.env.LOG_FILE_PATH |...
ypymc/simpvp-bot
src/config.js
JavaScript
mit
550
'use strict'; angular.module( 'webtypesetting.questions', [ 'sf.services', 'palaso.ui.listview', 'palaso.ui.typeahead', 'ui.bootstrap' ] ) .controller('QuestionsCtrl', ['$scope', 'questionsService', '$routeParams', 'sessionService', 'linkService', 'breadcrumbService', functi...
sil-jterm-2015/sfwebchecks
src/angular-app/scriptureforge/webtypesetting/views/legacy/questions.js
JavaScript
mit
5,782
"use strict"; let merge = (nums, index, length, increasing) => { if (length > 1) { let half = Math.floor(length / 2); for (let i = index; i < index + half; i++) { if ((nums[i] > nums[i + half] && increasing) || (nums[i] < nums[i + half] && !increasing)) { [nums[i], nums[i + half]...
sshh12/SchoolCode
Algorithms/SortingSeaching/BitonicSort.js
JavaScript
mit
913
// *********************************** // Firebase & jQuery HTML5 chat // *********************************** var messagesRef = new Firebase('https://cesarstechinsights.firebaseio.com'); // When the user presses enter on the message input, write the message to firebase. $('#messageInput').keypress(function (e) { if (...
reicek/firebase-gPlusHTML5chat
js/html5chat.js
JavaScript
mit
776
module.exports = { name: "datastore", ns: "nedb", description: "Nedb Datastore", phrases: { active: "Creating datastore" }, dependencies: { npm: { nedb: require('nedb') } }, ports: { input: { options: { title: "Options", type: "object", required: false...
nodule/nedb
datastore.js
JavaScript
mit
3,580
import React from "react"; import { Link } from "react-imvc/component"; import Layout from "../component/Layout"; export default function View({ state }) { return ( <Layout> {state.contents.map(({ type, list }) => { return ( <div key={type}> <h2> {type} ...
Lucifier129/react-imvc-template
src/home/view.js
JavaScript
mit
802
var sha1sum = require('sha1sum') module.exports = function (emitter, state) { //vvv will all be refactored out. //using this right now, to get a MVP going. //later, replace with a merkle tree. //track changes in doc... emitter.on('open', function (doc) { function onUpdate () { console.log('update...
dominictarr/rumours_
state-sync.js
JavaScript
mit
1,681
const subManager = new SubsManager(); BlazeComponent.extendComponent({ mixins() { return [Mixins.InfiniteScrolling, Mixins.PerfectScrollbar]; }, calculateNextPeak() { const cardElement = this.find('.js-card-details'); if (cardElement) { const altitude = cardElement.scrollHeight; this.cal...
nztqa/wekan
client/components/cards/cardDetails.js
JavaScript
mit
10,103
var expect = require("chai").expect, proxyquire = require("proxyquire"), sinon = require("sinon"); var models = {}; var app = sinon.stub(); var auth = { authenticated: sinon.stub() }; var get = app.get = sinon.stub(); var post = app.post = sinon.stub(); var Country = models.Country = sinon.stub(); var Vote = models....
fmcgough/eurovote
test/vote.test.js
JavaScript
mit
3,412
export default class Topic { constructor({text, likes = 0}) { this.text = text; this.likes = likes; } addLike() { this.likes++; } removeLike() { this.likes--; } }
tomasAlabes/talks
src/js/model/Topic.js
JavaScript
mit
195
import_module('Athena.Math'); v1 = new Athena.Math.Vector3(10, 20, 30); v = v1.negate(); CHECK_CLOSE(-10, v.x); CHECK_CLOSE(-20, v.y); CHECK_CLOSE(-30, v.z);
Kanma/Athena-Math
unittests/scripting/js/Vector3/Negate.js
JavaScript
mit
161
'use strict'; /** * Gulp Task - browserify */ var gulp = require('gulp'), gulpif = require('gulp-if'), config = require('../config.json'), sourcemaps = require('gulp-sourcemaps'), source = require('vinyl-source-stream'), buffer = require('vinyl-buffer'), browserify = require('browserify'), ...
nathan5x/Tic-Tac-Toe
gulp/tasks/browserify.js
JavaScript
mit
1,185
import assert from 'assert'; import Extractor from '../src/extractor'; describe('Sentence word extraction', () => { it('.match', function() { let e = new Extractor([ 'what', 'is', 'the', 'weather', 'in', 'vancouver' ]); let tag = { label: 'location', start: 5, end: 5 }; let match =...
mabrasil/mysam
test/extractor.test.js
JavaScript
mit
3,535
const filters = require('./filters'); const formats = require('./formats'); const tags = require('./tags'); const config = { bootstrapNodes: [ { address: 'router.bittorrent.com', port: 6881 }, { address: 'dht.transmissionbt.com', port: 6881 }, ], crawler: { address: '0.0.0.0', port: 6881, }, db: { /* ...
AlphaReign/scraper
config/index.js
JavaScript
mit
1,072
import React, { Component, PropTypes } from 'react'; import { DateBlock, RsvpBadge, Loading, SocialBtns } from '../'; import { eventsAPI } from '../../api'; import { dateTimeUtils, urlUtils } from '../../utils'; import { devMode } from '../../config'; import styles from './EventDetails.sass'; const renderAddress = (l...
dorono/resistance-calendar-frontend
src/components/EventDetails/EventDetails.js
JavaScript
mit
6,294
{ var progressSpy = jasmine.createSpy("progress"); var instance = axios.create({ onUploadProgress: progressSpy }); instance.get("/foo"); getAjaxRequest().then(function(request) { done(); }); }
stas-vilchik/bdd-ml
data/696.js
JavaScript
mit
213
/*! * express-outdatedhtml * * Make sites outdated by replace the new HTML5 element names, * such as 'canvas', 'section', etc. with proven ones like 'div'. * This is happening on the fly by parsing * the view render results string of the Express framework. * Of course only if an outdated browser is detec...
aldipower/express-outdatedhtml
lib/outdatedhtml.js
JavaScript
mit
2,478
var Backbone = require('backbone'); exports = module.exports = Backbone.Model.extend({ idAttribute: '_id', defaults: { roles: { admin: false, agent: false, user: true, app: false, }, business: { stage: 'test', types: { verify: false, base: false, whole: false }, times: { ...
williambai/beyond-webapp
lottery/app/src/models/Account.js
JavaScript
mit
561
var express = require('express'); var router = express.Router(); var spider = require("./spider"); router.get("/info",function(req,res,next){ spider(`/product/iteminfo?device=iphone&channel=h5&swidth=375&sheight=667&zoneId=1479&v=2.3.0&terminal=wap&page=https%3A%2F%2Fm.haoshiqi.net%2F%23detail%3Fsid%3D14369%26channel...
liupeijun/vue2-hybridapp-haoshiqi
backend/routes/spider/product.js
JavaScript
mit
798
module.exports = function(mode) { return { test: /\.js$/, loader: "eslint-loader", exclude: /node_modules/ }; };
lewie9021/webpack-base-app
build/webpack/pre-loaders/eslint.js
JavaScript
mit
145
// Math.random() devuelve número aleatorio entre 0 y 1. var numero = Math.random(); if (numero <= 0.5){ console.log('\n' + numero + ' MENOR que 0,5 \n'); } else{ console.log('\n' + numero + ' MAYOR que 0.5 \n');´ }
jgdiaz/random
random.js
JavaScript
mit
224
/** * @venus-library jasmine * @venus-include ../vendor/Reflection.js/reflection.min.js * @venus-code ../src/functions.js */ describe('functions', function () { it('should create two sub-objects of window', function () { namespace('Foo.Bar'); expect(window.Foo).not.toBe(undefined); e...
Baptouuuu/Sy
tests/functions.js
JavaScript
mit
2,318
// https://sourceforge.net/rest/p/nagios
LogIN-/ospnc
lib/modules/sourceforge.js
JavaScript
mit
40
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports", "./Container", "../../tweents/Ti...
mientjan/weasel
src/draw/display/MovieClip.js
JavaScript
mit
9,823
const regAttr = /="*'*\{*([_a-z\-0-9$]+)}*'*"*/; const regStart = /^\[/; const $ = window.rb.$; /** * Finds attribute linked elements on the first element in collection. * @function external:"jQuery.fn".attrLinked * @param {String} attributeSelector Attribute selector pattern to search for. ("[aria-controls="${id}"...
boffinHouse/rawblock
src/utils/$_attr-linked.js
JavaScript
mit
1,270
import React, { Component } from 'react' ; import { connect } from 'reslice' ; import Footer from './footer' ; import AddTodo from './addtodo' ; import TodoList from './todolist' ; /** * Top-level component. Embeds the AddTodo, TodoList and Footer * (application) components. These are each passed their slice of * ...
mike-es6/reslice
examples/todo/src/app.js
JavaScript
mit
1,637
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s...
jdl031/FHIR-test-app
node_modules/react-transform-catch-errors/lib/index.js
JavaScript
mit
2,723
/** * @fileoverview Rule to flag use of Thai character * @author Chang, Che-Jen */ 'use strict'; // ------------------------------------------------------------------------------ // Requirements // ------------------------------------------------------------------------------ const rule = require('../../../lib/ru...
chejen/eslint-plugin-i18n
tests/lib/rules/no-thai-character.js
JavaScript
mit
4,214
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: > The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] evaluates by evaluating ClassRanges to obtain a CharSet and returning that CharSet and th...
PiotrDabkowski/Js2Py
tests/test_cases/built-ins/RegExp/S15.10.2.13_A1_T17.js
JavaScript
mit
567
/* eslint-env mocha */ var assert = require('assert') var resolveEnv = require('./') var cases = [ ['Simple test', 'Simple test', {}], ['Hello $NAME!', 'Hello world!', { NAME: 'world' }], ['[ $a1, $a2 ]', '[ 4, 8 ]', { a1: '4', a2: '8' }], ['http://$HOST:$PORT/', 'http://google.com:80/', { HOST: 'google.com',...
LinusU/node-resolve-env
test.js
JavaScript
mit
1,064
import { inverse } from 'dummy/helpers/inverse'; import { module, test } from 'qunit'; module('Unit | Helper | inverse'); // Replace this with your real tests. test('it works', function(assert) { let result = inverse([42]); assert.ok(result); });
lifegadget/ui-knob
tests/unit/helpers/inverse-test.js
JavaScript
mit
253
var PRAHA = {coordinates: [50.051611, 14.407032], type:"Point"} module.exports = function(map) { var geocoder = new google.maps.Geocoder(); var addrInputEl = document.getElementById('geoJumper'); addrInputEl.addEventListener('keydown', function codeAddress(ev) { if (ev.keyCode === 13) { var address = docum...
CzechHackathon2014/zahrajeme-cz
public/js/geoJumper.js
JavaScript
mit
767
'use strict'; module.exports = function (grunt) { var files = [ "jsyg-wrapper/JSYG-wrapper.js", "jsyg-point/JSYG.Point.js", "jsyg-vect/JSYG.Vect.js", "jsyg-matrix/JSYG.Matrix.js", "jsyg-strutils/JSYG-strutils.js", "jsyg-utils/JSYG-utils.js", "jsyg-events...
YannickBochatay/JSYG
Gruntfile.js
JavaScript
mit
853
'use babel'; import RspecCopy from '../lib/main'; describe('RunInIterm', function() { let workspaceElement; beforeEach(function() { workspaceElement = atom.views.getView(atom.workspace); atom.packages.activatePackage('run-in-iterm'); }); describe('when the run-in-iterm:run event is triggered', funct...
diogobenica/run-in-iterm
spec/run-in-iterm-spec.js
JavaScript
mit
632
// Upload Demo // ----------------------------------- (function(window, document, $, undefined){ $(function () { 'use strict'; // Initialize the jQuery File Upload widget: $('#fileupload').fileupload({ // Uncomment the following to send cross-domain cookies: //xhrF...
hamedmehryar/laracancan
src/public/js/demo/demo-upload.js
JavaScript
mit
1,345
import nearestVector from 'ml-nearest-vector'; /** * Calculates the distance matrix for a given array of points * @ignore * @param {Array<Array<number>>} data - the [x,y,z,...] points to cluster * @param {function} distance - Distance function to use between the points * @return {Array<Array<number>>} - matrix wi...
mljs/kmeans
src/utils.js
JavaScript
mit
3,488
/* * File: jquery.dataTables.rowReordering.js * Version: 1.2.1. * Author: Jovan Popovic * * Copyright 2013 Jovan Popovic, all rights reserved. * * This source file is free software, under either the GPL v2 license or a * BSD style license, as supplied with this software. * * This source file is distr...
clearos/theme-admin-lte
js/plugins/datatables/jquery.dataTables.rowReordering.js
JavaScript
mit
10,573
// nehan.tip.js // Copyright(c) 2014-, Watanabe Masaki // license: MIT /** plugin name: tip description: create link that shows popup message when clicked. tag_name: tip close_tag: required attributes: - title: tip title example: <tip title="this is tip title">this text is popuped when c...
david43/nehan.js
plugins/tip/nehan.tip.js
JavaScript
mit
1,119
// import third-party CSS import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap-theme.css'; import 'font-awesome/css/font-awesome.min.css'; import 'react-flex/index.css'; // import our own main CSS import 'src/views/styles/styles.scss'; // import JS // import 'bootstrap'; // bootstrap JS...
Domiii/self-asssessment-app
src/main.js
JavaScript
mit
2,101
var React = require('react'); var Recommend = require('./recommend/index'); var ItemList = require('./itemList/index'); var Header = require('./header/index'); var Promo = require('./promo/index'); class Floor extends React.Component { render() { var { imgUrl, title, originPrice, price } = this.props;...
devWayne/ECWeb
src/mods/floor/index.js
JavaScript
mit
1,025
import React from 'react'; import { connect } from 'react-redux'; import { importLocations } from 'lib/actions/library'; const ImportPanel = ( props ) => { const onImport = () => props.importLocations( this.textInput.value ); const saveRef = input => this.textInput = input; return ( <div className="import fo...
sirbrillig/voyageur-js-client
app/components/import.js
JavaScript
mit
823
const chai = require('chai'), sinon = require('sinon'), sinonChai = require('sinon-chai'), mockRequire = require('mock-require'); mockRequire('jquery', { ajax: (args) => { args['success']('proper response'); } }); chai.use(sinonChai); const $ = require('jquery'), requester = require('...
Team-Cerberus/Invoice
tests/requester-tests.js
JavaScript
mit
11,900
/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.0.0-rc5-master-6b1d758 */ (function( window, angular, undefined ){ "use strict"; /** * @ngdoc module * @name material.components.subheader * @description * SubHeader module * * Subheaders are special list tiles that del...
daspec/daspec-js-protractor-example
app/bower_components/angular-material/modules/js/subheader/subheader.js
JavaScript
mit
3,485
(function(){ var app = angular.module('postal', []); app.controller('ResultsController',function(){ this.items = saves; }); //I think this is the code needed to read in data from a JSON file, it doesn't work locally because of browser security. ReQuires a small change to the html ...
GonePostal/GonePostal.github.io
js/gone-postal.js
JavaScript
mit
1,057
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M10 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 8...
kybarg/material-ui
packages/material-ui-icons/src/GrainSharp.js
JavaScript
mit
532
/* * MomboBox * https://github.com/luv2code/MomboBox * * Copyright (c) 2012 Matthew Taylor * Licensed under the MIT license. */ (function($, window) { var defaults = { data: [], templates: { buttonTemplate: '<button class="mombobutton">↓</button>', itemTem...
luv2code/MomboBox
src/MomboBox.js
JavaScript
mit
11,934
export default function isNumber(e) { return typeof e === 'number'; }
fallenswordhelper/fallenswordhelper
src/modules/common/isNumber.js
JavaScript
mit
70
//var pppp = require("printer"); console.debug("iniciando Appp"); function ValidURL(str) { var expression = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi; var pattern = new RegExp(expression); // fragment locater if(!pattern.test(str)) { alert("Please enter a valid UR...
ristorantino/nw-print-client
app/js/app.js
JavaScript
mit
6,511
import React from 'react' import GraphiQL from 'graphiql' import { buildClientSchema, introspectionQuery, isType, GraphQLObjectType } from 'graphql' const { POSTGRAPHQL_CONFIG } = window /** * The standard GraphiQL interface wrapped with some PostGraphQL extensions. * Including a JWT setter and live schema udpate c...
nbushak/postgraphql
src/postgraphql/graphiql/src/components/PostGraphiQL.js
JavaScript
mit
7,359
/* *Chris Samuel * ksamuel.chris@icloud.com * * October 5, 2015 * * Filename : Footer.js * * */ import React from 'react'; import {Link} from 'react-router'; import FooterStore from '../stores/FooterStore' import FooterActions from '../actions/FooterActions'; class Footer extends React.Component { constructor(...
Alayode/facesOfSpace
app/components/footer.js
JavaScript
mit
2,314
const BaseBundle = require('./base'); class TransactionBundle extends BaseBundle { constructor (config) { super(config); this.get('/', this.index.bind(this)); this.post('/', this.create.bind(this)); } async index (ctx) { let entries = await this.ledger.getTransactions(); return { entries };...
reekoheek/node-accounting
bundles/transaction.js
JavaScript
mit
578
var Type = require("@kaoscript/runtime").Type; module.exports = function() { function $format(message) { if(arguments.length < 1) { throw new SyntaxError("Wrong number of arguments (" + arguments.length + " for 1)"); } if(message === void 0 || message === null) { throw new TypeError("'message' is not nulla...
kaoscript/kaoscript
test/fixtures/compile/class/class.method.function.es6.js
JavaScript
mit
7,550
'use strict'; var agitoHttpRedirection = function() { var action = {}; /** * @type {String} */ action.name = 'http-redirection'; /** * @type {String} */ action.protocol = 'http'; /** * @param {http.ClientRequest} request - The HTTP request * @param {http.ServerResponse} response - The...
agitojs/agito-http-redirection
lib/agitoHttpRedirection.js
JavaScript
mit
692
import React from 'react'; import { withTheme } from '@material-ui/core'; const MuiColorChit = (props) => { let { theme } = props; let chitStyle = { flexGrow: 0, flexShrink: 0, width: props.size === "small" ? '16px' : '24px', height: props.size === "small" ? '16px' : '24px', ...
Charlie9830/pounder
src/components/AppSettingsMenu/ThemeControls/MuiColorChit.js
JavaScript
mit
1,279
'use strict'; import React from 'react'; import tweenState from 'react-tween-state'; import decorators from './decorators'; import assign from 'object-assign'; import ExecutionEnvironment from 'exenv'; React.initializeTouchEvents(true); const addEvent = function(elem, type, eventHandle) { if (elem == null || typeo...
jhen0409/nuka-carousel
src/carousel.js
JavaScript
mit
18,866
/** * @author maurobuselli@gmail.com */ (function () { 'use strict'; angular.module('AngularPanelsApp.pages.form', ['ui.select', 'ngSanitize']) .config(routeConfig); /** @ngInject */ function routeConfig($stateProvider) { $stateProvider .state('form', { url: '/form', t...
mauroBus/angular-panels-app
src/app/pages/form/form.module.js
JavaScript
mit
1,314
var basePath = '/api'; var app = angular.module('adminApp'); app.controller('AccountController', [ '$routeParams', '$location', 'AuthService', 'ReferenceResource', 'AccountResource', 'RelationResource' , function($routeParams, $location, AuthService, ReferenceResource, AccountResource, RelationResource) { ...
ysahnpark/ecofyphp-server
laravel/public/pages/js/admin-controllers.js
JavaScript
mit
8,606
/* eslint-disable */ /** * This script will extract the internationalization messages from all components and package them in the translation json files in the translations file. */ const fs = require('fs'); const nodeGlob = require('glob'); const transform = require('babel-core').transform; const animateProgress...
juanda99/arasaac-frontend
internals/scripts/extract-intl.js
JavaScript
mit
5,295
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); let _ = require('lodash'); let async = require('async'); const pip_services3_commons_node_1 = require("pip-services3-commons-node"); const pip_services3_commons_node_2 = require("pip-services3-commons-node"); const pip_services3_facade_node_1 ...
pip-services-infrastructure/pip-facade-infrastructure-node
obj/src/operations/version1/SmsOperationsV1.js
JavaScript
mit
1,842
import 'ui/stringify/editors/color.less'; import _ from 'lodash'; import IndexPatternsFieldFormatProvider from 'ui/index_patterns/_field_format/field_format'; import colorTemplate from 'ui/stringify/editors/color.html'; export default function ColorFormatProvider(Private) { const FieldFormat = Private(IndexPatternsF...
ashnewport/elasticsearch
kibana-5.0.2-linux-x86_64/src/ui/public/stringify/types/color.js
JavaScript
mit
1,725
#!/usr/bin/node // 09-timer.js //var count = 0; var timer; console.log('start...'); timer = setInterval(loop, 500); timer.unref(); function loop() { //count++; console.log('i will loop forever! times:', Date.now()); /* if(count === 10) { global.clearInterval(timer); console.log('enough! good bye!'); ...
wangding/demo-code
node/02-global/10-timer.js
JavaScript
mit
392
/*global app*/ var log = require('bows')('session-users'); var Users = require('client/js/models/users'); var UserView = require('client/js/views/users/view'); var UsersArea = require('client/js/views/users/area'); var config = require('client/js/helpers/clientconfig'); module.exports = UsersArea.extend({ initialize...
sinfo/sinfo-webapp
client/js/views/sessions/sessionUsers.js
JavaScript
mit
1,013
'use strict'; /** * An asynchronous bootstrap function that runs before * your application gets started. * * This gives you an opportunity to set up your data model, * run jobs, or perform some special logic. */ const path = require('path'); const fs = require('fs'); const _ = require('lodash'); module.exports...
strapi/strapi-examples
cheesecakes/plugins/upload/config/functions/bootstrap.js
JavaScript
mit
2,243
/* * @lc app=leetcode.cn id=1025 lang=javascript * * [1025] 除数博弈 */ // @lc code=start /** * @param {number} N * @return {boolean} */ var divisorGame = function (N) { return N % 2 == 0; }; // @lc code=end
zerob13/leetcode-for-fun
src/js/1025.除数博弈.js
JavaScript
mit
222
import NextImage from 'next/image' import src from '../../public/test.jpg' export default function Image() { return <NextImage src={src} /> }
JeromeFitz/next.js
test/integration/react-streaming-and-server-components/app/pages/next-api/image.server.js
JavaScript
mit
145
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2012, Ajax.org B.V. * 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 sou...
erikringsmuth/suri
app-built/bower_components/ace/lib/ace/mode/prolog.js
JavaScript
mit
2,166
/* =============================================================================================== Unify Project Homepage: unify-project.org License: MIT + Apache (V2) Copyright: 2011, Sebastian Fastner, Mainz, Germany, http://unify-training.com ==================================================================...
unify/unify
unify/framework/source/class/unify/fx/Opacity.js
JavaScript
mit
1,185
/** * "Language Key" : { * "languageDirection": "rtl or ltr" // for example english is left to right but arabic is right to left * "servicesUrl": // where we pull the services data from. This can be a local (ex. js/a.json) or an external url (ex. http://my-website/a.json) * "languageName": // The la...
PeaceGeeksSociety/services-advisor
src/angular/Services/defaultsettings.js
JavaScript
mit
2,942
// controls the loading dots and bar angular.module('homepageApp').controller('LoadingCtrl', LoadingCtrl); LoadingCtrl.$inject = ['$scope', '$rootScope', 'uiCalendarConfig', '$timeout']; function LoadingCtrl($scope, $rootScope) { // using the angular loading bar rootscope broadcast to know when all HTTP requests ...
calvinbui/Material-Usenet-Dashboard
assets/src/js/controllers/loading.js
JavaScript
mit
516
/*jslint browser: true*/ /*global $,THREE,PLANE_LENGTH,PLANE_WIDTH,PADDING,getRandomInteger */ function HeroObject() { 'use strict'; var hero = {}, heroGeometry = {}, heroMaterial = {}; heroGeometry = new THREE.CylinderGeometry(0, 2, 5, 10); heroMaterial = new THREE.MeshLambertMaterial({ color: 0xE91E63, ...
tursics/SaveTheFish
js/objects.js
JavaScript
mit
8,885
'use strict'; var grunt = require('grunt'); /* ======== A Handy Little Nodeunit Reference ======== https://github.com/caolan/nodeunit Test methods: test.expect(numAssertions) test.done() Test assertions: test.ok(value, [message]) test.equal(actual, expected, [message]) test.notEqual(actua...
pchorus/grunt-angular-translate-extract
test/angular_translate_extract_test.js
JavaScript
mit
2,260
/* * Responsible for all display, page or functional control on the status page. * * - Setting refresh timers. * - Rendering HTML for table. * - Logic for action buttons. */ jQuery(document).ready(function ($) { // Get extension background page for use within the code. var backgroundPage = chrome.extensio...
RichGuk/deluge-in-chrome
js/status/status.js
JavaScript
mit
20,033
//@flow import React, { Component } from 'react' import './DataForm.css' type Props = {} type State = { value: string, } class DataForm extends Component<Props, State> { state = { value: '', } handleChange = (ev: SyntheticEvent<HTMLInputElement>) => { this.setState({ value: ev.currentTarget.value })...
valueof/charted2
src/ui/DataForm.js
JavaScript
mit
866
import { Badge } from 'antd'; export default Badge;
EncontrAR/backoffice
src/components/uielements/badge.js
JavaScript
mit
52
$(document).ready(function() { //questions var questions = [{ 'questionNum': 1, 'question': 'When was the first mobile phone, Motorola Dyna TAC 8000X manufactured?', 'answer': ['1981', '1983', '1995', '1991'], 'correctAnswer': '1983', }, { 'questionNum': 2, ...
sanishj/TriviaGame
assets/javascript/trivia.js
JavaScript
mit
3,706
const TextPopupWindow = require("./TextPopupWindow.js") const getRefs = require("../../utils/getRefs.js") const cssClass = require("../../utils/cssClass.js") const TextPad = require("../../TextPad.js") class LinkBlotProperties extends TextPopupWindow { constructor(window, document, mycelium) { super(wi...
Jirka-Mayer/Mycelium
assets/js/ui/windows/LinkBlotProperties.js
JavaScript
mit
6,882
var sinon = require('sinon'); var assert = require('assert'); var Listen = require('listen-js'); describe('Device Manager', function (){ it('isMobile() should return false if nav user agent is empty string', function (){ var userAgentMock = ''; var eventManagerCreateTargetStub = sinon.stub(Lis...
mkay581/device-manager
tests/device-manager-tests.js
JavaScript
mit
3,323
const MessagingResponse = require('twilio').twiml.MessagingResponse; const response = new MessagingResponse(); const message = response.message(); message.body('Store Location: 123 Easy St.'); message.media('https://demo.twilio.com/owl.png'); console.log(response.toString());
TwilioDevEd/api-snippets
twiml/message/message/message-2/message-2.3.x.js
JavaScript
mit
280
/* Copyright (c) 2015 Giffo. All rights reserved.*/ var fs = require("fs"); var path = require("path"); var sep = path.sep; //author ~ giffo, dated: 10/10/2013 /** * just load the files, parse the data and then use a simple binary search to fetch the country */ var GeoIP = module.exports = (function(dir) { i...
giffo/geoip
index.js
JavaScript
mit
2,581
module.exports = Dependency1; function Dependency1() { } Dependency1.prototype.testMethod = function (callback) { setTimeout(function () { callback(null, 'success'); }, 2000); };
leebow/di-namic
test/lib/dependency-1.js
JavaScript
mit
197
$("document").ready(function() { var location = window.location.href.split("?id="); var api_base = "http://192.168.160.39/api/Movies/"; var viewMovies = new function(){ var self = this; var movieID = location[1]; self.movie = ko.observableArray(); getMovie = function () { var final_link = api_base + movie...
nightershadow/nightershadow.github.io
Scripts/movie.js
JavaScript
mit
1,268
KISSY.add(function (S, Node, ScrollView, ScrollbarPlugin) { function has3d() { var el = Node.all('<p></p>').prependTo(document.body), has3d; // Add it to the body to get the computed style. el.css('transform', "translate3d(1px,1px,1px)"); has3d = el.css('transform'); ...
tedyhy/SCI
kissy-1.4.9/src/scroll-view/sub-modules/plugin/scrollbar/demo/image-zoomer.js
JavaScript
mit
7,903
(function(angular, autobahn, console){ var services = angular.module('ngWAMP', []); services.factory('wamp', function($q) { var globalDeferred; function WampClient() { this.connections = {}; } WampClient.prototype = { _newConnection:...
ailabitmo/DAAFSE
alert-service/src/main/webapp/js/ng-wamp.js
JavaScript
mit
3,207
module.exports = [{ def:'Spacer', name:'Spacer', loadID:3, relations:{ li:[{ other:'Faction_9', goodwill:-100, hostile:true },{ other:'Faction_4', goodwill:-80 },{ other:'Faction_0', goodwill:0 ...
EnzoMartin/RimWorld-Save-Editor
test/mocks/factions.js
JavaScript
mit
1,333
// Description: // This kata is designed to test your ability to extend the functionality of built-in ruby classes. In this case, we want you to extend the built-in Array class with the following methods: square(), cube(), average(), sum(), even() and odd(). // Explanation: // square() must return a copy of the arra...
webbought/codewars-subject
6kyu/Array Helpers.js
JavaScript
mit
2,195
require('module-alias/register'); var generators = require('yeoman-generator'); var _ = require('lodash'); var mkdirp = require('mkdirp'); var ifNotDatabase = require('/utils/if-not-database'); var writeScript = require('/utils/write-script'); var sharedInput = require('/utils/shared-input'); var wipeableGenerator = ...
joelalejandro/generator-pgsql
generators/sequence/index.js
JavaScript
mit
2,592