code stringlengths 2 1.05M |
|---|
import React from 'react';
import AutoField from 'uniforms-semantic/AutoField';
import SubmitField from 'uniforms-semantic/SubmitField';
import ErrorsField from 'uniforms-semantic/ErrorsField';
import AutoForm from 'uniforms-semantic/AutoForm';
import FormMaskedInput from '../../lib/FormMaskedInput';
const FormBank = ... |
class system_runtime_remoting_contexts_synchronizationattribute {
constructor() {
// bool IsReEntrant {get;}
this.IsReEntrant = undefined;
// bool Locked {get;set;}
this.Locked = undefined;
// string Name {get;}
this.Name = undefined;
// System.Object TypeI... |
/*
* Kendo UI v2014.2.716 (http://www.telerik.com/kendo-ui)
* Copyright 2014 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial licen... |
var {Helper, Type} = require("@kaoscript/runtime");
module.exports = function() {
function foobar() {
if(arguments.length === 1 && Type.isString(arguments[0])) {
let __ks_i = -1;
let x = arguments[++__ks_i];
if(x === void 0 || x === null) {
throw new TypeError("'x' is not nullable");
}
else if(!Ty... |
var url = require('url');
/**
*
* @param options
* mustLogin 必须登陆的路径
* mustNotLogin 必须没登陆的路径
* @returns {Function}
*/
module.exports = function(options){
if(!options)
options = {};
return function(req,res,next){
var pathname = url.parse(req.url).pathname;
if(pathname != "/"){
... |
var clipper = require('../');
Promise.promisifyAll(clipper);
function wrap(args) {
return function() {
clipper.orientation.apply(null, args);
};
}
describe('clipper.orientation()', function() {
it('should throw an error if no arguments are provided', function() {
expect(wrap([])).to.throw... |
var MySql = require('../../../../src/dialect/my-sql');
describe("MySql Dialect", function() {
beforeEach(function() {
this.dialect = new MySql();
});
describe(".field()", function() {
it("formats a column with `varchar` by default", function() {
var field = this.dialect.field({ name: 'title' })... |
console.log('Hello!');
var thermostat = new Thermostat();
$(document).ready(function() {
$('#temperature_display').text(thermostat.temperature);
$('#temperature_display').css('color', thermostat.colour);
$('#increase_button').on('click', function() {
thermostat.increaseTemp();
$('#temperature_display'... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
System.config({
"baseURL": "/",
"transpiler": "babel",
"paths": {
"*": "*.js",
"github:*": "jspm_packages/github/*.js",
"npm:*": "jspm_packages/npm/*.js"
}
});
System.config({
"map": {
"FezVrasta/bootstrap-material-design": "github:FezVrasta/bootstrap-material-design@0.2.2",
"angular": "g... |
/**
@fileoverview File watcher for Grunt.js
Copyright (c) 2013 Daniel Steigerwald
*/
module.exports = function(grunt) {
var fs = require('fs');
var path = require('path');
var tinylr = require('tiny-lr');
var semver = require('semver');
var RESTART_WATCHERS_DEBOUNCE = 10;
var WAIT_FOR_UNLOCK_INTERVAL ... |
(function(window) {
'use strict';
var utils = utils || {};
utils.byId=function(selector){
return document.getElementById(selector);
}
utils.selector=function(selector){
return document.selector();
}
utils.selectorAll=function(selector){
return document.selectorAll();
}
utils.addEvent = f... |
module.exports = {
"google": {
search: "mail.google.com",
title: "Gmail - Free Storage and Email from Google"
}
}; |
'use strict';
import Base from './ArticleBase';
import Render from './ArticleRender';
export default class Article extends Base {
constructor (props) {
super(props);
}
render () {
return Render.call(this, this.props, this.state);
}
}
|
function test(fun,expected){/*若干项测试用例能否保障 执行一段代码 expected的值*/
}
/*测试一定需要构造测试用例,怎么样才能判断测试通过还是失败,*/
module.exports=mix(x,{
test:test
});
|
var _ = require('underscore');
module.exports = function(app, nox) {
var json = function(res, json) {
res.writeHead(200, { 'content-type': 'text/json' });
res.write(JSON.stringify(json));
res.end('\n');
};
app.get('/', function(req, res){
res.render('index', {
title: "Nox",
reque... |
/*!
* JSHint, by JSHint Community.
*
* Licensed under the same slightly modified MIT license that JSLint is.
* It stops evil-doers everywhere.
*
* JSHint is a derivative work of JSLint:
*
* Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
*
* Permission is hereby granted, free of charge, to any pers... |
describe('Test Parser: ', function () {
// TODO: Fix files to load in karma.conf.js
// beforeEach( function() {
// module('textAngular');
// module('pdfDelegate');
// module('LatexEditor');
// inject(function($controller) {
// buttonController = $controller('EditorButtonController');
// });
// });
... |
import Configuration from "../data/Configuration";
import MessageService from "../services/MessageService";
import PageScriptService from "../services/PageScriptService";
/* global chrome */
class ContentScriptService {
static init(config: Configuration) {
PageScriptService.run(`
window.Beyon... |
import { setData } from '@progress/kendo-angular-intl';
setData({
name: "en-MT",
likelySubtags: {
en: "en-Latn-US"
},
identity: {
language: "en",
territory: "MT"
},
territory: "MT",
numbers: {
symbols: {
decimal: ".",
group: ",",
... |
(function(window) {
function Ball() {
this.initialize();
}
//p est un raccourci
var p = Ball.prototype = new createjs.Container();
// public properties:
p.BallBody;
p.vX;
p.vY;
p.bounds;
p.hit;
p.largeurDeplacement;
p.hauteurDeplacement;
// constructor:
p.Container_initialize = p.initialize; /... |
this.NesDb = this.NesDb || {};
NesDb[ 'D32CCAFB8B336BFCB0666DBD60B1364CF226C3FC' ] = {
"$": {
"name": "Nigel Mansell's World Championship Racing",
"class": "Licensed",
"catalog": "NES-NC-USA",
"publisher": "GameTek",
"developer": "Gremlin",
"region": "USA",
"players": "2",
"date": "1993-10"
},
"cart... |
import F from 'funcunit';
import QUnit from 'steal-qunit';
import 'pitbull-client/models/test';
import 'pitbull-client/login/login-test';
import 'pitbull-client/components/login-page/login-page-test';
import 'pitbull-client/components/nav-bar/nav-bar-test';
import 'pitbull-client/components/pitbull-footer/pitbull-... |
define(['angular'], function (angular) {
'use strict';
return angular.module('directives', []);
});
|
function report(str) { console.log(str); }
r = require('rethinkdb');
function createTable(conn, tableName)
{
r.db('test').tableCreate(tableName).run(conn, function(err, res) {
if(err) {
//throw err;
report("err: "+err);
report("Cannot create table "+tableName);
}
else {
console.log(res);
... |
import createDebug from 'debug'
const debug = createDebug('sa:debug')
export default debug
|
var className =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) ... |
App.controller('AdminNodesController', /*@ngInject*/ function ($scope, Nodes, OrderByMixin, lodash) {
angular.extend($scope, OrderByMixin);
$scope.nodes = {};
$scope.currentId = [];
$scope.types = [];
$scope.newNode = {};
$scope.orderBy = 'name';
Nodes.getData().then(func... |
(function() {
var Ext = window.Ext4 || window.Ext;
/**
* shows days remaining for timebox
*/
Ext.define('TimeboxEnd', {
extend: 'Gauge',
alias:'widget.statsbannertimeboxend',
requires: [
'Rally.util.Timebox',
'Rally.util.Colors'
],
... |
;(function(root, factory) {
if (typeof exports === "object") {
// CommonJS
module.exports = factory()
}
else if (typeof define === "function" && define.amd) {
// AMD
define([], factory)
}
else {
// Global Variables
root.Pjax = factory()
}
}(this, function() {
"use strict";
funct... |
// corresponding video for the code
// https://www.youtube.com/watch?v=BMUiFMZr7vk
// functions are values in javascript
// they are good for composition
// functions allow us to compose
// which leads to code reuse
// example
var triple = function triple(x) {
return x * 3
}
var waffle = triple
// sample arra... |
import { combineReducers } from 'redux';
import layoutReducer from './layout_reducer';
const rootReducer = combineReducers({
layouts: layoutReducer
});
export default rootReducer; |
import React, {Component, PropTypes} from 'react';
import keycode from 'keycode';
import {fade, emphasize} from '../utils/colorManipulator';
import EnhancedButton from '../internal/EnhancedButton';
import DeleteIcon from '../svg-icons/navigation/cancel';
function getStyles(props, context, state) {
const {chip} = con... |
const session = require('express-session'),
bodyParser = require('body-parser'),
express = require("express"),
app = express(),
urlencodedParser = bodyParser.urlencoded({
extended: false
});
app.use(require("body-parser").json());
app.use(express.static("public"));
for (let k in data) {
... |
/**
* DevExtreme (integration/angular/components.js)
* Version: 16.2.5
* Build date: Mon Feb 27 2017
*
* Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/
"use strict";
var $ = require("jquery"),
ngModule = require("./modul... |
// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';
// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
// terminate the ... |
8.0-alpha3:146ab886922b4588872062d7e07480518020c90f072a1befdeea86178fb80d9c
8.0-alpha4:3750702f6f026215b2c1019e41559f79a0c7a37135e22f1dfaedc124df796b0f
8.0-alpha5:3750702f6f026215b2c1019e41559f79a0c7a37135e22f1dfaedc124df796b0f
8.0-alpha6:3750702f6f026215b2c1019e41559f79a0c7a37135e22f1dfaedc124df796b0f
8.0-alpha7:cc1c2... |
describe("About Functions", function() {
it("should declare functions", function() {
function add(a, b) {
return a + b;
}
expect(add(1, 2)).toBe(3);
});
it("should know internal variables override outer variables", function () {
var message = "Outer";
function getMessage... |
'use strict';
var mongoose = require('mongoose');
var User = require('../models/user').User;
var Playlist = require('../models/user').Playlist;
var Item = require('../models/user').Item;
module.exports = function(app){
//Create Playlist
app.route('/movies/playlist/create')
.post(function(req, res, next){
if(req.b... |
// @flow
import { connect } from "react-redux";
import { fetchCoveo } from "../data/searchActions";
import locationSearch from "./locationSearch";
import SearchResults from "../components/search/SearchResults";
export const mapStateToProps = (state: Object) => {
return {
results: state.search.results,
fetchi... |
/**
* Created by carl.hand on 30/03/2017.
*/
import React from 'react';
var App;
|
'use strict';
/**
* Module dependencies.
*/
var config = require('../config'),
express = require('express'),
app = express(),
morgan = require('morgan'),
logger = require('./logger'),
bodyParser = require('body-parser'),
session = require('express-session'),
MongoStore = require('connect-... |
'use strict';
const assert = require('assert');
const congress = require('../../../src/services/lib/congress');
const states = require('../../../src/services/lib/states');
const rp = require('request-promise');
//const app = require('../../../src/app');
describe('reps service', function() {
it('registered the reps... |
module.exports = function(http, server) {
return function(request, response) {
var message = '';
if(response.message) {
message = response.message.toString();
}
if(response.state === 404) {
server.trigger('response-404', request, response);
}
try {
response.writeHead(response.state, respo... |
/*jshint esnext: true */
/*
* filetype.js
*
* FileType "static" class
*
*/
const FileType = {
UNKNOWN: 1,
ARCHIVE: 2,
BINARY: 3,
CODE: 4,
TEXT: 5,
XML: 6
};
Object.freeze(FileType);
exports.FileType = FileType;
|
Appbus.MultiButton = new Class({
Extends : Appbus.Box,
namespace: 'multibutton',
items: [],
buttons: [],
cindex: 0,
multiSelect: false,
initialize : function(options) {
this.parent(options);
},
prepare: function() {
var o = this.options;
var self = this;
this.multiSelect = o.multi... |
import { draw } from "./draw";
(async () => {
const fetchVertex = fetch("glsl/main.vert").then(req => req.text());
const fetchFragment = fetch("glsl/main.frag").then(req => req.text());
const waitLoading = new Promise(resolve => {
window.addEventListener("DOMContentLoaded", resolve, { capture: fal... |
var assert = require("assert");
var uuid = require("node-uuid");
var DummyAggregateRoot = require("./support/DummyAggregateRoot");
var DummyAggregateRootCreatedEvent = require("./support/DummyAggregateRootCreatedEvent");
describe("Test Aggregate Root", function() {
it("Should remove all uncommitted events when ma... |
(function() {
'use strict';
angular
.module('demoApp')
.controller('ElementsController', ElementsController);
/** @ngInject */
function ElementsController() {
}
})();
|
"use strict";
debugger;
let bufferObj = new ArrayBuffer(32);
let oneObj = new Int16Array(bufferObj);
console.log(oneObj.length);
console.log(oneObj.byteLength);
let twoObj = new Int32Array(bufferObj);
console.log(twoObj.length);
let dummy;
|
var React = require("react");
var ErrorView = React.createClass({
render() {
return (<li className="error-message">
<span>{this.props.text}</span>
<span className="dismiss-button">{this.props.dismissed}</span>
</li>);
}
});
var SuccessView = React.createClass({
render() {
return (<... |
/* global module */
var pkg = require('../package.json');
module.exports = Object.assign({}, pkg.jest, {
rootDir: '../',
moduleNameMapper: {
'/src/index$': '<rootDir>/dist/index',
},
});
|
/*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.form.CheckedMultiSelect"]){ //_hasResource checks added by build. Do not use _hasResource dire... |
var async = require('async');
var assert = require('assert');
var sinon = require('sinon');
var ThunderBatch = require('..');
// The actual URL is irrelevant, because we're never going to actually make a
// real request.
var URL = 'http://localhost:9999/test';
function fakeWorkingRequest(options, callback) {
setTim... |
'use strict';
var fs = require('fs');
module.exports = /*@ngInject*/
function yearPicker (dateFilter) {
return {
restrict: 'EA',
replace: true,
template: fs.readFileSync(__dirname + '/templates/year.html', 'utf8'),
require: '^datepicker',
link: function(scope, element, attrs, ctrl)... |
// LPdefs.js
//
// definition of lpProblem object
// for solution of LP problems by simplex method
//
// Copyright (C) 2017 Steven R. Costenoble and Stefan Waner
// lp modes
const lp_Integral = 1; // solve using integers?
const lp_Fraction = lp_Integral+1; // using fractions?
const lp_Decimal = lp_Fraction+1; //... |
var https = require('https');
var cheerio = require('cheerio');
var iconv = require('iconv-lite');
module.exports = function() {
function hebUrlEncode(string)
{
var u = "";
for (var i = 0; i < string.length; i++)
{
var code = string.charCodeAt(i);
if... |
'use strict';
require('mocha');
const assert = require('assert');
const Comments = require('..');
const doctrine = require('doctrine');
const { tag, type } = require('../lib/parse');
/**
* some of these integration tests are based on tests from doctrine
* https://github.com/eslint/doctrine/LICENSE.BSD
* https://gi... |
/**
* @author: @AngularClass
*/
const helpers = require('./helpers');
/**
* This object is the diff required to add coverage support to karma.
* Every property set here will OVERWRITE the property in the original config, no merges.
*/
const COVERAGE_CONFIG_DIFF = {
preprocessors: {
'./config/spec-bundle.js... |
/*
VRT - Copyright © 2014 Odd Marthon Lende
All Rights Reserved
*/
define([
'types/widget'
], function (
Widget
) {
function DateTime (fields) {
Widget.call(this, fields);
}
DateTime.prototype = Object.create(Widget.prototype);
DateTime.required = {
'(options)' ... |
'use strict';
var Derivative = require('./Derivative');
var DerivativeNumber = require('./DerivativeNumber');
var DerivativeBoolean = require('./DerivativeBoolean');
var DerivativeString = require('./DerivativeString');
var DerivativeList = require('./DerivativeList');
var DerivativeMap = require('./DerivativeMap');
... |
var tools = require('./tools')
var async = require('async')
var AllocateServer = require('./allocateserver')
function loadAllocations(etcd, state, done){
var runJobs = []
/*
loop over each job in proc and make sure it has an entry in /run (i.e. it is allocated)
*/
Object.keys(state.proc || {}).forEach(fun... |
'use strict';
const fs = require('fs');
const path = require('path');
const { exec } = require('child_process');
const { BrowserWindow } = require('electron');
const simulator = root => {
const WIDTH = 800;
const HEIGHT = 600;
//Deserialize project info from projInfo file, contains path to index.html and presen... |
var animation = require('../../touchstone/animation');
var Container = require('react-container');
var Sentry = require('react-sentry');
var React = require('react');
var Tappable = require('react-tappable');
var Social = require('../../mixins/social');
var PeopleList = require('../../components/PeopleList');
var Spon... |
MobTemplates = {
shroom : {
tick : function(mob) {
if(Math.random() > 0.7) {
GameState.lord.energy += 1;
Stage.flashText(mob.pos.x, mob.pos.y, '+');
}
},
},
}
Rules = {
mobsAt : function(x, y) {
var result = [];
$.each(GameState.mobs, function(idx, mob) {
... |
'use strict';
const Bcrypt = require('bcrypt');
const BasicAuth = require('hapi-auth-basic');
exports.register = (server, options, next) => {
const basicValidation = (request, username, password, callback) => {
const user = server.users[username];
if (!user) {
return callback(null, false)
}
... |
module.exports = function(body, user, serverCallback) {
serverCallback('Available commands: STOP, /sub [category name], /unsub [category name]. To send a message, text "#[category name] [your renting item]"');
};
|
import {expect} from 'chai';
import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import TokenizerInput from '../src/TokenizerInput.react';
import states from '../example/exampleData';
describe('<TokenizerInput>', () => {
it('renders a TokenizerInput', () => {
const instance = Rea... |
import createBrowserHistory from 'history/createBrowserHistory';
import { routerMiddleware } from 'react-router-redux';
import logger from 'redux-logger';
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import rootSaga from '../sagas';
import reducers from '../reduce... |
/*
* jQuery UI Effects 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/
*/
jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)retur... |
$('.like-buttons-containers').on('click', '.like-button', function(e) {
var url = $(this).attr('url');
$.getJSON( url );
$(this).css("display", "none");
$(this).parent().children('.unlike-button').css('display', 'inline-block');
var count = parseInt($(this).parent().parent().find('.like-span:first').text());
coun... |
import './nav-menu-item.css';
const navMenuItemTemplate = `
<md-list-item ng-click="$ctrl.onItemClick($ctrl.item)">
<md-icon md-svg-icon="{{ $ctrl.item.icon }}" aria-label="{{ $ctrl.item.title }}"></md-icon>
<p class="md-body-2">{{ $ctrl.item.title }}</p>
</md-list-item>
`;
class NavMenuItemController { }... |
import "babel-polyfill";
/* globals document */
// import "babel-core/register";
import React from 'react';
import { render } from 'react-dom';
import { Router, hashHistory } from 'react-router';
import { Provider } from 'react-redux';
import routes from './routes';
import configureStore from 'store/configure_store';... |
window.onload = (function () {
var students = [
{ firstname: 'Jelio', lastname: 'Jelev', age: 15,},
{ firstname: 'Boiko', lastname: 'Atanasov', age: 23, },
{ firstname: 'Dimitar', lastname: 'Ovcharov', age: 20, },
{ firstname: 'Teodor', lastname: 'Mihailov', age: 27, },
];
... |
$(function(){
$( "#inputFecha" ).datepicker({ dateFormat: 'dd-mm-yy' });
}); |
import React from 'react';
import 'react-native';
import renderer from 'react-test-renderer';
import Organization from './Organization';
import organization from './Organization.mock';
it('renders correctly', () => {
const tree = renderer.create(
<Organization organization={organization} />,
).toJSON();
ex... |
module.exports = function (grunt) {
/* Generates localization excel files */
grunt.registerMultiTask(
"genL10nExcels",
"Generate localization excel files",
function () {
var locale = grunt.option('locale'),
locales,
templateLocale = gru... |
module.exports = function(config){
config.set({
basePath : './',
files : [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/components/**/*.js',
'app/users/**/*.js',
... |
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'utils/styled-components';
import { StaggeredMotion } from 'react-motion';
import { connect } from 'react-redux';
import colors from 'theme/color';
import { routeIsReady as routeIsReadyAction } from '../../containers/App/actions';
import ... |
var TypeOtter = (function(obj, $) {
var regMarkup = /^[\s\b]*<[\w]+/;
/**
* Wrap free text in paragraph tags, call recusively on children.
*/
function recWrap(elem) {
if (elem.html() === undefined) {
return elem; // ignore special elements without markup: style, script..
... |
__report = {"info":{"file":"lib/tokens.js","fileShort":"tokens.js","fileSafe":"tokens_js","link":"files/tokens_js/index.html"},"complexity":{"aggregate":{"line":1,"complexity":{"sloc":{"physical":16,"logical":15},"cyclomatic":1,"halstead":{"operators":{"distinct":4,"total":18,"identifiers":["__stripped__"]},"operands":... |
import m from 'mithril';
import replaceDiacritics from 'replaceDiacritics';
const vm = postgrest.filtersVM({
full_text_index: '@@',
deactivated_at: 'is.null'
}),
paramToString = function(p) {
return (p || '').toString().trim();
};
// Set default values
vm.deactivated_at(null).orde... |
import React from 'react';
import SearchStore from '../stores/SearchStore';
import Result from './Result';
class ResultList extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
results: SearchStore.getResults()
};
this.onChange = this.onChange.bind(thi... |
var helpers = require('./helpers')
require('should')
var target = 'IncreaseStreamRetentionPeriod',
request = helpers.request,
opts = helpers.opts.bind(null, target),
randomName = helpers.randomName,
assertType = helpers.assertType.bind(null, target),
assertValidation = helpers.assertValidation.bin... |
// @flow
//
// Copyright (c) 2018 DDN. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
import logInputToQsParser from "./log-input-to-qs-parser.js";
import logQsToInputParser from "./log-qs-to-input-parser.js";
import logCompleter from "./lo... |
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions ... |
(function () {
'use strict';
angular
.module('rtsApp')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider
.state('document', {
parent: 'entity',
url: '/document',
... |
'use strict';
const fs = require('fs');
const path = require('path');
/*
* 将文件输出base64编码字符串
* @param file : 文件路径
*/
function encode(file) {
let bitmap = fs.readFileSync(file);
return new Buffer(bitmap).toString('base64');
}
/*
* 将base64编码字符串保存为文件
* @param base64Str : base64编码字符串
* @param file : ... |
/**
* a HUD container and child items
*/
game.HUD = game.HUD || {};
game.HUD.Container = me.ObjectContainer.extend({
init: function() {
// call the constructor
this.parent();
// persistent across level change
this.isPersistent = true;
// non collidable
this.collidable = false;
/... |
var gulp = require('gulp');
var util = require('gulp-util');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var clean = require('gulp-clean-css');
var less = require('gulp-less');
var watch = require('gulp-watch');
var browserSync = require('browser-sync').create();
var sourceMaps = require('... |
!function(t){"use strict";t.fn.bootstrapTable.locales["ar-SA"]={formatLoadingMessage:function(){return"جاري التحميل, يرجى الإنتظار..."},formatRecordsPerPage:function(t){return t+" سجل لكل صفحة"},formatShowingRows:function(t,n,r){return"الظاهر "+t+" إلى "+n+" من "+r+" سجل"},formatSearch:function(){return"بحث"},formatNoM... |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
var aurelia_pal_1 = require("aurelia-pal");
var aurelia_validation_1 = require("aurelia-validation");
var ui_validation_1 = require("./utils/ui-va... |
export default {
_id: '60eea4803b352ff0441d4843',
type: 'form',
components: [
{
label: 'Day',
hideInputLabels: false,
inputsLabelPosition: 'top',
useLocaleSettings: false,
tableView: false,
fields: { day: { hide: false }, month: { hide: false }, year: { hide: false } },
key: 'day',
type: 'd... |
var cHelpers = require('./helpers'),
gruntMod = require('grunt');
var PYTHON_BINARY = 'python';
// path to depswriter from closure lib path
var DEPSWRITER = '/closure/bin/build/depswriter.py';
var depsWriter = {};
/**
* Perform validations for given options
*
* @return {boolean|Object} false if error
*/
d... |
// All code points in the `Kaithi` script as per Unicode v8.0.0:
[
0x11080,
0x11081,
0x11082,
0x11083,
0x11084,
0x11085,
0x11086,
0x11087,
0x11088,
0x11089,
0x1108A,
0x1108B,
0x1108C,
0x1108D,
0x1108E,
0x1108F,
0x11090,
0x11091,
0x11092,
0x11093,
0x11094,
0x11095,
0x11096,
0x11097,
0x11098,
0x... |
'use strict';
const AstNodeInfo = require('../helpers/ast-node-info');
const Rule = require('./base');
module.exports = class NoInvalidMeta extends Rule {
logNode({ node, message }) {
return this.log({
message,
line: node.loc && node.loc.start.line,
column: node.loc && node.loc.start.column,
... |
// @flow
import buildCommon from "../buildCommon";
import defineFunction from "../defineFunction";
import delimiter from "../delimiter";
import mathMLTree from "../mathMLTree";
import ParseError from "../ParseError";
import utils from "../utils";
import {assertNodeType, checkSymbolNodeType} from "../parseNode";
import... |
//= require vendor/rot
//= require vendor/rant
//= require vendor/rant.dic
//= require vendor/rung
//= require vendor/overprint
|
var webpackCfg = require('./webpack.config');
// want more?
// https://github.com/krasimir/react-webpack-starter
module.exports = function(config) {
config.set({
basePath: '',
browsers: ['PhantomJS'],
files: [
'test/loadtests.js'
],
port: 8080,
captureTimeout: 60000,
frameworks: ['p... |
Array.prototype.remove = function(object) {
let index = this.indexOf(object)
if (index < 0)
return null
this.splice(index, 1)
return object
}
let testItems = [{
description: 'Do shopping',
done: true
}, {
description: 'Do code',
done: false
}, {
description: '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.