code stringlengths 2 1.05M |
|---|
// version: V1
const util = require("util")
const AnyState = function (context) {
this.context = context
}
// Partial evaluate
require("./AnyState.evaluate")(AnyState)
// ----------
// State Logic Implement Below
// ----------
AnyState.prototype.OnUpdate = function(stateData, dt) {
// Logic Code Here
return th... |
// All code points in the Early Dynastic Cuneiform block as per Unicode v9.0.0:
[
0x12480,
0x12481,
0x12482,
0x12483,
0x12484,
0x12485,
0x12486,
0x12487,
0x12488,
0x12489,
0x1248A,
0x1248B,
0x1248C,
0x1248D,
0x1248E,
0x1248F,
0x12490,
0x12491,
0x12492,
0x12493,
0x12494,
0x12495,
0x12496,
0x12497... |
/**
* Used for making idempotent anotation functions
* that can be used for *tagging* resources.
*
* @example
* const Collection = makeAnnotation('Collection');
*
* assert(Collection(Bar) === Collection(Bar));
* assert(Collection(Foo) !== Collection(Bar));
* @param {string} [name=Annotation] - Name of the anno... |
import Vue from 'vue';
//
// Plugins
//
require('./plugins/vuex');
require('./plugins/router');
|
module.exports =
{
extends: ['@commitlint/config-conventional'],
rules:
{
'scope-enum':
[
2, 'always',
[
'core', 'file_types', 'gui', 'minsynth', 'render', 'tests', 'window',
'editor', 'engine', 'painter', 'pixel', 't3d'
]
... |
$(function() {
//重构begin
$(".tab li").click(function() {
var index = $(this).index();
$(this).addClass("on").siblings().removeClass("on");
$(".tab-cont").eq(index).show().siblings(".tab-cont").hide();
});
//重构end
//工具函数begin
utility = {
jsonpAjax: function(url, success, type, data, error, timeout) {
t... |
var http = require('http').createServer(function (req, res) {
res.writeHead(200, {'X-Frame-Options': 'DENY'});
res.end('Hello World!');
}).listen(3000)
setTimeout(function() {
ifabc = document.getElementById("abc");
ifabc.src = "http://127.0.0.1:3000/"
},200); |
export { default } from 'ember-data-twitch/serializers/twitch-channel-feed';
|
var input = require('./input.json');
var fs = require('fs');
var a = input.a;
var b = input.b;
var c = input.c;
var sol = {x1:"-", x2:"-", D:"-"};
if(a==0 && b!=0 && c!=0)
{
sol.x1 = ((c-2*c)/b);
sol.x2 = "Empty.";
sol.D = "Empty.";
}
else if(a==0 && b==0 && c==0)
{
sol.x1 = "All x.";
sol.x2 = "Empty.";
sol.D ... |
"use strict";
var page = require('webpage').create()
var system = require('system')
var devices = require('./devices.json')
var deviceName = system.args[2] || 'iPhone5'
var theDevice = devices[deviceName]
var startTime = (new Date()).getTime()
var wd = system.args[1]
var url = encodeURI('https://baidu.com/s?wd=' + wd... |
'use strict';
import angular from 'angular';
import uiRouter from '@uirouter/angularjs';
import ngResource from 'angular-resource';
import ngMaterial from 'angular-material';
import ngMdIcons from 'angular-material-icons';
import 'angular-material/angular-material.css';
import Routes from './config/routes';
import ... |
exports.run = async (client, message, args) => {
await message.channel.send("pong!").catch(console.error);
}
exports.conf = {
enabled: false,
aliases: []
};
exports.help = {
name: "ping",
description: "PONG!",
usage: "ping"
}; |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { createStructuredSelector } from 'reselect';
import { apiCall } from 'utils/remoteCall';
import { firstItem } from 'utils/helpers';
import { selectWindow } from 'containers/App/selectors';
import { selectDbVm } from 'containers/App... |
version https://git-lfs.github.com/spec/v1
oid sha256:5dc91fc0221ec9a85f5e4118f6d4d2338da2a31538a039da2cac14b3490217b5
size 278
|
angular.module('myapp')
.controller('HomePageCtrl', ['$scope',
function ($scope) {
$scope.test = "Welcome to restaurant finder";
$scope.model={};
$scope.cities = [
{
name: 'Bangalore',
value: 'BNG'
},
{
name: 'Mumbai',
value: 'MUM'
}];
$scope.localities = [
{
name: 'In... |
// grunt/tasks/default.js
module.exports = function(grunt) {
grunt.registerTask('default', [
'jshint'
, 'jsonlint'
, 'browserify'
, 'stylus:dev'
, 'templatize'
]);
grunt.registerTask('build', [
'jshint'
, 'jsonlint'
, 'stylus:build'
, 'browserify'
, 'uglify'
, 'templatize'
]);
};
|
[
"<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n\nbody {\n background: #333;\n overflow: hidden;\n}\n\ncircle {\n stroke: #000;\n stroke-width: 1.5px;\n}\n\n</style>\n<svg width=\"1400\" height=\"480\"><g transform=\"translate(700,240)\"></g></svg>\n<script src=\"http://d3js.org/d3.v4.0.0-alpha.35.min.js\">... |
/* global describe, it, require */
'use strict';
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Check whether an element is a finite number
isFiniteNumber = require( 'validate.io-finite' ),
// Check whether an element is `NaN`
isnan = require( 'validate.io-nan' ),
// Module to be test... |
$(document).ready(function() {
$('[data-toggle=offcanvas]').click(function() {
$('.row-offcanvas').toggleClass('active');
});
if (Func.$('#purchases_date_list')) {
cmdForm.render({
elem: Func.$('#purchases_date_list'),
inputs: [{
name: 'min_date',
inner: 'Desde',
type... |
// Recursion
function recursion_genome() {
"use strict";
var code = "def dna_molekuli_generaator(genoomi_loik,n):\n if len(genoomi_loik) == n:\n print(genoomi_loik)\n else:\n for nukleotiid in [\"A\",\"T\",\"C\",\"G\"]:\n dna_molekuli_generaator(genoomi_loik + nukleotiid,n)";
return pre(code);
} |
/*!
* Ext JS Library 3.1.1
* Copyright(c) 2006-2010 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
FeedViewer = {};
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.state.Manager.setProvider(new Ext.state.SessionProvider({state: Ext.appState}));
var tpl = Ext.Template.from('pre... |
/*
* Dependencies
*
*/
var app = require('./../../index');
/*
* Config
*
*/
var data = {
};
/*
* Export
*
*/
module.exports = data; |
var searchData=
[
['file',['file',['../classFenetre.html#a06028b804be54f4a24665250c9efcbb4',1,'Fenetre']]],
['fini',['fini',['../classListe.html#a877b1f3b7439804e81814c68edccfe58',1,'Liste']]]
];
|
RequireScript("euphoria/classes/BaseClass.js");
function WindowManagerClass() {
var me = this;
me.rightMargin = 32;
me.topMargin = 16;
me.superClass = BaseClass;
me.superClass();
me.textBoxes = [];
me.addTextOnObject = function(object, text, onCloseMessage, owner, timeout)
{
var id = Math.... |
import React from 'react'
import renderer from 'react-test-renderer'
import { TextInput } from './index'
describe('<TextInput />', () => {
let component
describe('with `valid` prop', () => {
beforeEach(() => {
component = renderer.create(<TextInput valid />).toJSON()
})
it('matches with snapsho... |
#!/usr/bin/env node
'use strict'
const fs = require('fs')
const path = require('path')
const alldata_dir = path.join(__dirname, '..', 'alldata')
const files = fs.readdirSync(alldata_dir)
files.forEach(processFile)
function processFile(f) {
const file_name = path.join(alldata_dir, f.replace('_API_v1', '').toLower... |
var TEST_STRING = "The quick brown fox jumps over the lazy dog.";
var SEARCH_ITEM_1 = "quick";
var SEARCH_ITEM_2 = "fox";
var SEARCH_ITEM_3 = "lazy dog";
var SEARCH_ITEM_4 = "unknown";
var SEARCH_ITEM_5 = "will not be found";
var REG_EXP = new RegExp(/quick|fox|lazy\sdog/);
function runCase() {
if (-1 !== ... |
define('canvas', [], function() {
function Canvas(w, h) {
this.el = document.createElement('canvas');
this.el.width = w;
this.el.height = h;
}
Canvas.prototype = {
get ctx () {
return this.el.getContext('2d');
},
clear: function() {
th... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Link, History } from "react-router"
export default class Tab extends React.Component {
constructor(props, context){
super(props, context)
this.router = context.router;
}
render () {
const isActive = (this.router.isActive(this.props.url)) ? ... |
#!/usr/bin/env node
'use strict';
const config = require('./../../../config');
const miteApi = require('./../../mite-api')(config.get());
const {
getCustomerOptions,
removeAlreadyUsedOptions
} = require('../helpers');
const options = require('./../../options');
const projectsCommand = require('./../../commands/pro... |
/*jslint node: true */
"use strict";
var $ = require('gulp-load-plugins')();
var argv = require('yargs').argv;
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var merge = require('merge-stream');
var sequence = require('run-sequence');
var colors = ... |
import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import StateSelector from '../mixins/stateSelector';
import {Unit} from './unit';
let defaultClassName = 'title';
const Title = React.createClass({
mixins: [ClassGenerator, StateSelector],
render: function () {
let {className... |
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var HttpException = require('./HttpException');
'use strict';
/**
* HTTPエラー。Failed Dependency.
*/
v... |
"use strict";
var tld = require('tldjs'),
Sequelize = require('sequelize');
var counter = 0;
module.exports = {
fields_map : {
'id' : { type: Sequelize.BIGINT, primaryKey: true, unique: true, allowNull: false, field: "creation_utc"},
'key' : { type: Sequelize.TEXT, allowNull: fal... |
batteryFunction=function(battery) {
console.log(battery);
// level
// status
// discharge time
level=battery.level;
charging=battery.charging;
timeToDie=battery.dischargingTime;
if (timeToDie=='Infinity') {
timeToDie='∞';
} else ... |
/*
* Copyright (c) 2017, Itai Reuveni <itaireuveni@gmail.com>
*
* License: MIT
*/
import React from "react";
export default class extends React.Component {
render() {
return (
<svg {...this.props} width="24" height="24" viewBox="0 0 24 24">
<g fill="none" fillRule="evenodd">
<pat... |
var koa = require("koa");
var router = require("koa-router");
var debug = require("debug")("offload");
var runner = require("./lib/runner");
var thunkify = require("thunkify");
var rawBody = require("raw-body");
var rimraf = require("rimraf");
var os = require("os");
var fs = require("fs");
var uuid = require("uuid");... |
var DomManipulation;
DomManipulation = function () {
var buffer = [],
BUFFER_APPEND_TRESHHOLD = 100;
function appendChild(element, selector) {
var parent = document.querySelector(selector);
parent.appendChild(element);
}
function removeChild(parentElement, selector){
v... |
let express = require('express'),
restServices = require('./restServices'),
app = express(),
restService = new restServices().build(app),
port = process.env.PORT || 3000;
app.listen(port, _ => {
console.log(`Server is running on port ${port} ${process.env.ENV}`)
});
module.exports = app;
|
var searchData=
[
['randomreadcloser_327',['RandomReadCloser',['../classargcv_1_1io_1_1_random_read_closer.html',1,'argcv::io']]],
['randomreader_328',['RandomReader',['../classargcv_1_1io_1_1_random_reader.html',1,'argcv::io']]],
['randomreadwritecloser_329',['RandomReadWriteCloser',['../classargcv_1_1io_1_1_ran... |
function Events(target){
var events = {}, empty = [];
target = target || this
/**
* On: listen to events
*/
target.on = function(type, func, ctx){
(events[type] = events[type] || []).push([func, ctx])
return target
}
/**
* Off: stop listening to event / specific callback
*/
target.of... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M12 2c-4.2 0-8 3.22-8 8.2 0 3.18 2.45 6.92 7.34 11.22.36.32.97.32 1.33 0C17.55 17.12 20 13.38 20 10.2 20 5.22 16.2 2 12 2zM7.69 12.49C8.88 11.56 10.37 11 12 11s3.12.56 4.31 1.49C15.45 13.98 13.85... |
/*
*
* InstituteDashboard
*
*/
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import makeSelectInstituteDashboard from './selectors';
import H1 from 'components/H1';
import {Tabs, Tab} from 'material-ui/Tabs';
import MuiThemePro... |
'use strict';
// Configuring the Articles module
angular.module('articles').run(['Menus',
function(Menus) {
// Set top bar menu items
Menus.addMenuItem('topbar', 'Articles', 'articles', 'dropdown', '/articles(/create)?');
Menus.addSubMenuItem('topbar', 'articles', 'List Articles', 'articles');
Menus.addSubMen... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {
TopLevelType,
DOMTopLevelEventType,
} from 'events/TopLevelEventTypes';
import type {
DispatchConfig,
... |
$(function() {
/* Tabs fix for bootstrap */
var hash = window.location.hash;
hash && $('ul.nav a[href="' + hash + '"]').tab('show');
$('.nav-pills a').click(function (e) {
$(this).tab('show');
var scrollmem = $('body').scrollTop() || $('html').scrollTop();
window.location.hash = this.hash;
$(... |
/*
*
* Login reducer
*
*/
import { fromJS } from 'immutable';
import {
SET_USER,
CHECK_LOGGED_IN,
LOGIN,
LOGIN_SUCCESS,
LOGIN_ERROR
} from './constants';
export const initialState = fromJS({
loading:false,
error:false,
user:false
});
function loginReducer(state = initialState, action) {
switch (ac... |
import React, { PropTypes } from 'react';
export default function InputLabel(props) {
const {
children,
style,
text
} = props;
const defaultStyle = {
display: 'inline-block',
height: 30,
lineHeight: '30px',
marginLeft: -75,
width: 75
};
const renderedStyle = {
...defaul... |
var loggly = require('node-loggly-bulk');
var stringifySafe = require('json-stringify-safe');
var noop = function () {};
function Bunyan2Loggly(logglyConfig, bufferLength, bufferTimeout, callback) {
if (!logglyConfig || !logglyConfig.token || !logglyConfig.subdomain) {
throw new Error('bunyan-loggly requir... |
import Component from 'react-pure-render/component';
import React, {PropTypes} from 'react';
export default function fetch(...actions) {
return Wrapped => class Fetch extends Component {
static contextTypes = {
store: PropTypes.object, // Redux store.
};
// Passed via react-router or can be passe... |
import walk from 'css-tree/walker'
import { CountableCollection } from '../countable-collection.js'
const sizeKeywords = {
'xx-small': 1,
'x-small': 1,
'small': 1,
'medium': 1,
'large': 1,
'x-large': 1,
'xx-large': 1,
'larger': 1,
'smaller': 1,
}
const keywords = {
// Global CSS keywords
'inheri... |
version https://git-lfs.github.com/spec/v1
oid sha256:9c892db4911469bbf0d900097bb84a59870c43a1814d8bd94f3aa7e5a28ff133
size 9113
|
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'requirejs'],
files: [
{pattern: 'test/vendor/*.js', included: false},
{pattern: 'lib/*.js', included: false},
{pattern: 'test/concurrent-test.js', included: false},
'test/test-main.js'
],
// list of file... |
var classtest_app =
[
[ "testApp", "classtest_app.html#a3d796120bccff4106a3ec028b9a81912", null ],
[ "adjustoverShotCameraPosition", "group___camera_animation.html#ga2a792bfdf269fd69951cbf97d4f574af", null ],
[ "animate", "group___camera_animation.html#ga1facfe2200dae7ad147b8f9ab31f68c6", null ],
[ "ass... |
import React from 'react';
import classNames from 'classnames';
import styles from './../../../assets/css/pages/settings.scss';
import { FormGroup, Col, FormControl, ControlLabel } from 'react-bootstrap';
import PropTypes from 'prop-types';
class SocialLinkInput extends React.Component {
constructor(props) {
... |
/** @type {import("../../../../").LoaderDefinition<string>} */
module.exports = function (source) {
//@ts-expect-error warnings must be Errors, string is not recommended and should lead to type error
this.emitWarning(this.query.substr(1));
return source;
};
|
/**
* Author: chenboxiang
* Date: 14-6-13
* Time: 下午10:18
*/
'use strict';
var EventEmitter = require('events').EventEmitter
var util = require('util')
var net = require('net')
var logger = require('./logger')
var protocol = require('./protocol')
var fs = require('fs')
var helpers = require('./helpers')
var BigNum... |
enyo.depends(
'../socket-io/',
'questionSlideable.js',
'main.js'
);
|
var gulp = require('gulp');
var lazypipe = require('lazypipe');
var browserSync = require("browser-sync");
// plugins
var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var paths = {
js: 'src/colorsocks.js'
};
var jsHint = lazypipe()
.pipe(jshint)
.pi... |
'use strict';
module.exports = {
db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/marketplace-hub',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.min.css',
'public/lib/bootstrap/dist/css/bootstrap-theme... |
questions = [
{
"question":"Short self presentation-tell me about yourself."
},
{
"question":"What is your motivation to apply for the job?"
},
{
"question":"How will you communicate to the client if at the last moment you get to know that you will be unable to deliver a product on tim... |
// https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
if (typeof Object.assign != 'function') {
Object.assign = function (target, varArgs) { // .length of function is 2
'use strict';
if (target == null) { // TypeError if undefined or null
throw new TypeError('Can... |
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin')
module.exports = {
entry: {
main: './js/main.js'
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist')
},
resolve: {
alias: {
... |
/*! jQuery UI Virtual Keyboard Typing Simulator v1.10.0 *//*
* for Keyboard v1.18+ only (9/14/2015)
*
* By Rob Garrison (aka Mottie & Fudgey)
* Licensed under the MIT License
*
* Use this extension with the Virtual Keyboard to simulate
* typing for tutorials or whatever else use you can find
*
* Requires:
* ... |
(function() {
logger = window.logger || {};
logger.appender = logger.appender || {};
logger.appender.serviceAppender = function() {
var _args;
var send = function(text) {
var jqxhr = $.post(self.args.url, { log_text : text })
.done(function(data) {
console.log(data);
... |
var fs = require('fs');
var path = require('path');
var reporter = function(baseReporterDecorator, config) {
baseReporterDecorator(this);
var suite = config.suiteName;
var pathToOut = path.join(__dirname, '..', 'results', suite + '.json');
var meta = {};
var opts = {};
var results = [];
this.specSucc... |
import GraphicObject from './GraphicObject.js';
/* *********************************************************************************************** *
* Rect
* =============================================================================================== *
* REQUIRE: GraphicObject
* ********************************... |
/* global RoleAssociations */
const dot = require('dot-object');
const moment = require('moment');
moment.locale('en');
const ISO8601Format = 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]';
const fs = require('fs');
const path = require('path');
const sharp = require('sharp');
const JsonValidator = require('../services/JsonValidato... |
window.onResize = (width) => {
console.log(width);
};
window.enterView = (msg) => {
console.log('enter-view', msg);
};
|
/*
* App 'status' or 'state'
* Just a simple hash for now
* Fields do not persist
*/
var l = require('./logger');
var exportTimer = require('./export-timer');
var drive = require('./drive');
var about= require('./about');
var config = require('./config');
exports.isExporting = false;
exports.exportingMessage = ""... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var arrowLeft2 = exports.arrowLeft2 = { "viewBox": "0 0 16 16", "children": [{ "name": "path", "attribs": { "fill": "#000000", "d": "M6.293 13.707l-5-5c-0.391-0.39-0.391-1.024 0-1.414l5-5c0.391-0.391 1.024-0.391 1.414 0s0.391 1.024 0 1.414l... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"a.\u00a0m.",
"p.\u00a0m."
],
"DAY": [
... |
import React, {
Component, PropTypes
}
from 'react';
import Modal from 'react-modal';
import AppointmentBooker from '../AppointmentBooker/AppointmentBooker.js';
import Radium from 'radium';
const customStyles = {
overlay: {
height: '138%',
backgroundColor: 'rgba(255, 255, 255, 0.01)',
position: 'absolu... |
import Icon from '../components/Icon.vue'
Icon.register({
'volume-mute': {
width: 512,
height: 512,
paths: [
{
d: 'M215 71.1c15-15 41-4.5 41 17v336c0 21.4-25.9 32-41 17l-89-89h-102.1c-13.3 0-24-10.8-24-24v-144c0-13.3 10.7-24 24-24h102.1zM461.6 256l45.6 45.6c6.3 6.3 6.3 16.5 0 22.8l-22.8 22.... |
'use strict';
var stv = require('..');
var assert = require('assert');
describe('Issue #1', function () {
var fn = stv(stv.stvSurplusAllocation, stv.stvLoserExclusion);
var party = {
votes: [{
options: [0, 2, 1],
count: 1
}, {
options: [1, 2, 0],
... |
const
CONNECT_THROTTLE = 5 // ms per connection
, OPEN_SEMAPHORE = 200
, Message = require('./lib/Message')
, Server = require('./lib/Server')
, Client = require('./lib/Client')
, EndPoint = require('./lib/EndPoint')
, debug = require('debug')
, debugWorker = debug('worker')
, uuid... |
var parser = require('woff-parser');
var Promise = global.Promise || require('es6-promise').Promise;
var fontStyle = require('./font-style.js');
module.exports = function (stream) {
return new Promise(function(resolve, reject) {
parser(stream).then(function(results) {
var name = results.name.nameRecords.English.... |
/*
* Pending Reducer for async actions.
* Keeps a count of all pending async actions.
*
* Every async action dispatches this meta when it starts loading
* { type: '..', payload: {..}, meta: { pending: 1 } }
* And dispatches the following after it is done loading
* { type: '..', payload: {..}, meta: { pending... |
import ExtendedError from './extended';
// This is experimental and not actually used by vulcan:errors
/**
* Rethrow an error that you caught in your code, adding an additional message,
* and preserving the stack trace
*
* Based on https://github.com/deployable/deployable-errors
* See https://stackoverflow.com/q... |
export default {
//API_URL: 'http://kanbanapi.pro-react.com'; //original value
API_URL: 'http://localhost:55685/api', //reads from ASP.NET CORE
CARD: 'card',
FETCH_CARDS: 'fetch cards',
FETCH_CARDS_SUCCESS: 'fetch cards success',
FETCH_CARDS_ERROR: 'fetch cards error',
TOGGLE_CARD_DETA... |
$(document).ready(function(){
/***************************************/
/* Form validation */
/***************************************/
$( '#j-forms' ).validate({
/* @validation states + elements */
errorClass: 'error-view',
validClass: 'success-view',
errorElement: 'span',
onkeyup: false,
onclick: fa... |
function ActiveCommands() {
this.constructor.apply(this, arguments);
}
ActiveCommands.prototype = {
commands: null,
constructor: function() {
this.commands = [];
},
addCommand: function(command) {
this.commands.push(command);
var self = this;
command.on('finished', function() {
self.... |
IRIS.ThreejsAssetProvider = IRIS.assetProvider.extend({
init: function(opts) {
this._super(opts);
},
getAssetObject: function(index, data, oEntity) {
var assetId = this.getAssetId(index, data, oEntity);
var assetOpts = this.getAssetOpts(assetId);
if (assetId !== false && asse... |
$('#update-url').on('click', function() {
$('#activity-overlay').show();
if (confirm("Warning: Changing the vehicle search will delete the current vehicle history!")) {
$.ajax({
type: "POST",
url: "./update",
data: 'url=' + encodeURIComponent($('#url').val()),
cache: false,
success: function(da... |
define({
"viewer": {
"loading": {
"step1": "LADATAAN TARINAA",
"step2": "LADATAAN AINEISTOA",
"step3": "ALUSTETAAN KIERROSTA",
"loadBuilder": "VAIHDETAAN RAKENNUSTILAAN",
"redirectSignIn": "OHJATAAN SISÄÄNKIRJAUTUMISSIVULLE",
"redirectSignIn2": "(sinut ohjataan tänne si... |
'use strict'
const fs = require('fs')
const miss = require('mississippi')
const config = require('../config')
function filterJobsList (jobs) {
var list = []
jobs.forEach(function (job) {
if (job.indexOf('.json') > -1) {
list.push(job)
}
})
return list
}
module.exports = miss.through(function ... |
export class ValidationResult {
constructor() {
this.isValid = true;
this.properties = {};
}
addProperty(name) {
if (!this.properties[name]) {
this.properties[name] = new ValidationResultProperty(this);
}
return this.properties[name];
}
checkValidity() {
for (let propertyName in ... |
/*
*
* Game.js
* Game specific methods and functionality.
*
* @author Collin Hover / http://collinhover.com/
*
*/
(function (main) {
var shared = main.shared = main.shared || {},
assetPath = "js/kaiopua/core/Game.js",
_Game = {},
_ErrorHandler,
_Scene,
_CameraControls,
_UIQueue,
_MathHelpe... |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { PropTypes } from 'react';
import classNames from 'classnames';
import styles from './Navigation.css';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
@withStyles(styles)
class Navigation {
sta... |
import React, { PropTypes } from 'react'
import { Field } from 'redux-form'
import { TextField } from 'redux-form-material-ui'
const DefaultInputField = ({
name,
floatingLabelText,
component,
children,
disabled,
normalize,
type,
}) => (
<Field
disabled={disabled}
style={{ width: '100%', height:... |
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
// 'webpack-dev-server/client?http://0.0.0.0:3000',
// 'webpack/hot/only-dev-server',
'./scripts/index'
],
output: {
path: __dirname + '/scripts/',
filename: 'bundle.js',
publicPath: '/scripts/'
},
plugin... |
(function($){
$(function(){
var network = Clank.connect(_CLANK_URI);
network.on("socket/connect", function(session){
$("#connected").html("Connected");
bindUi(session);
});
network.on("socket/disconnect", function(session){
$("#connected").html(... |
var express = require('express'),
mongoose = require('mongoose'),
bodyParser = require('body-parser');
var db;
////for test
//if (process.env.ENV === 'Test') {
// db = mongoose.connect('mongodb://localhost/bookAPI_test');
//} else {
// db = mongoose.connect('mongodb://localhost/bookAPI');
//}
var Seque... |
#! /usr/bin/env node
var pkg = require('../package');
var request = require('request-ms');
var program = require('commander');
var url = require('url');
var format = require('util').format;
/**
* Method to display the status message
*/
var displaySuccessMessage = function(message) {
console.log();
c... |
Package.describe({
name : "adamansky:qooxdoo",
version : "0.0.1",
summary : "Integrates qooxdoo into meteor app",
git : "https://github.com/Softmotions/meteor-qooxdoo.git",
documentation : "README.md"
});
Npm.depends({
});
Package.onUse(function(api) {
api.versionsFrom("1.1.0.2");
//api.us... |
/* jshint camelcase: false */
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Ninja Physics AABB constructor.
* Note: This class could be massively optimis... |
const getFileContents = require('./utils').getFileContents
const Botkit = require('botkit')
const BeepBoop = require('beepboop-botkit')
const storage = require('node-persist')
const {
HELP_MESSAGE,
ERROR_MESSAGE,
MISSING_AUTH,
BS_URL_MATCH,
UNRECOGNIZED_REQUEST
} = require('./constants')
const cont... |
import React, { Component } from 'react';
import Tbutton from './Tbutton';
export default class Header extends Component {
onTextChange() {
this.props.onRunSearch(this.refs.search.value);
}
addIp() {
this.refs.input.style.display = 'inherit';
}
qdAddIp() {
let val = this.refs.val.value.trim()... |
var eventproxy = require('eventproxy');
var accesstoken = function (req, res, next) {
var ep = new eventproxy();
ep.fail(next);
res.send({
success: true,
loginname: req.user.loginname,
avatar_url: req.user.avatar_url,
id: req.user.id,
});
};
exports.accesstoken = accesstoken;
|
app.directive('resourcesResources', [
"settings",
"User",
"$routeParams",
"$location",
"SessionService",
"Course",
function(
settings,
User,
$routeParams,
$location,
SessionService,
Course
) {
return {
templateUrl: settings.widgets + 'resources/resources.html',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.