code stringlengths 2 1.05M |
|---|
const Promise = require('./lib/Promise')
const fs = require("fs");
Promise.promisifyAll(fs)
const http = require('http')
const google = require('googleapis')
const moment = require('moment')
const PromiseCancelError = require('./lib/PromiseCancelError')
const GoogleAuth = require('./lib/GoogleAuth')
const create... |
var path = require('path');
var autoprefixer = require('autoprefixer');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
var paths = require('./paths');
module.exports = {
devtool: "eval-source-map... |
define([], function () {
"use strict";
});
//# sourceMappingURL=chat.js.map |
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Wor... |
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import fetchMock from 'fetch-mock';
import { Provider } from 'react-redux';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import foods from './__mocks__/foods.json';
i... |
Ext.define('Admin.view.BaseTreePanel', {
extend: 'Ext.TreePanel',
autoRender: true,
closable: true,
rootVisible: false,
displayField: 'uniqueName',
useArrows: true
});
|
$(document).ready(function() {
fiveChess.init();
});
var fiveChess = {
NO_CHESS: 0,
BLACK_CHESS: -1,
WHITE_CHESS: 1,
chessArr: [], //¼Ç¼Æå×Ó
chessBoardHtml: "",
humanPlayer: "black", //Íæ¼ÒÆå×ÓÑÕÉ«
AIPlayer: "white", //AIÆå×ÓÑÕÉ«
isPlayerTurn: true, //ÂÖµ½playerÏÂÆå
totalGames: cookieHandle.getCookie("total... |
const browserSync = require('browser-sync')
let serverInstance = false
const start = (syncConfig) => {
console.log('Initiating browserSync')
console.log(syncConfig)
browserSync.init(syncConfig)
serverInstance = browserSync.create()
return serverInstance
}
const isActive = () => {
return serverInstance !==... |
'use strict';
const expect = require('chai').expect;
const elasticsearch = require('elasticsearch');
const nockBack = require('nock').back;
const queries = require('../../');
const localEsClient = new elasticsearch.Client({ host: '127.0.0.1:9200', log: null, apiVersion: '6.3' });
describe('search.similar()', () => {... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash');
/**
* Load app configurations
*/
module.exports = _.extend(
{env: process.env.NODE_ENV},
require('./env/all'),
require('./env/' + process.env.NODE_ENV) || {}
);
|
/**
* Generate webpack configuration for Storybook React and Storybook Vue.
*/
const path = require('path');
const AutoPrefixer = require('autoprefixer');
module.exports = basePath => async ({ config }) => {
config.module.rules.push(
{
test: /\.jsx?$/,
include: [
path.resolve(basePath, '..... |
'use babel';
import fs from 'fs';
import path from 'path';
export default {
// check the folder could initialise weex project
checkProj(dir) {
if (fs.existsSync(dir)) {
if (fs.existsSync(path.join(dir, 'src'))) {
atom.notifications.addError(`Your directory "src" cannot be replaced`);
ret... |
/**
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
var searchRange = function(nums, target) {
let left = -1;
let right = -1;
let low = 0;
let high = nums.length - 1;
while (low <= high) {
const mid = Math.floor((high + low) / 2);
const midValue = nums[mid];
if(midVa... |
// moment.js locale configuration
// locale : vietnamese (vi)
// author : Bang Nguyen : https://github.com/bangnk
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')... |
import merge from 'lodash/object/merge';
import union from 'lodash/array/union';
// Creates a reducer managing pagination, given the action types to handle,
// and a function telling how to extract the key from an action.
export default function paginate({
types, mapActionToKey
}) {
if (!Array.isArray(types) |... |
/**
* Default model configuration
* (sails.config.models)
*
* Unless you override them, the following properties will be included
* in each of your models.
*
* For more info on Sails models, see:
* http://sailsjs.org/#!/documentation/concepts/ORM
*/
module.exports.models = {
/******************************... |
/**
* Test case for knClock.
* Runs with mocha.
*/
"use strict";
const knClock = require('../lib/kn_clock.js'),
assert = require('assert');
describe('kn-clock', () => {
before((done) => {
done();
});
after((done) => {
done();
});
it('Kn clock', (done) => {
done()... |
/* This file is part of the SWI-Prolog PlDoc package for online
documentation browsing. It defines JavaScript to issue HTTP requests
on the Prolog server that do not create a new page and handling
footnotes.
Author: Jan Wielemaker & Michiel Hildebrand
Copying: Public domain
*/
function HTTPreque... |
/*
* /MathJax-v2/localization/tr/FontWarnings.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.or... |
var logedIn = false;
var floatyTimer = null;
var floatyTime = 5000;
var popupVisible = false;
var ajaxTimeout = 5000;
$("#login").on("click",login);
$(document).ready(function() {
paper.setup('EditorCanvas');
$("#typearea").submit(function(event) {
event.preventDefault();
});
checkSessionLogin();
});
$(win... |
import { combineReducers } from 'redux';
import { reducer as reduxAsyncConnectReducer } from 'redux-connect';
import userReducer from '../services/user/userReducer';
export default combineReducers({
reduxAsyncConnect: reduxAsyncConnectReducer,
user: userReducer,
});
|
// #docregion
/**
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function(global) {
// map tells the System loader where to look for things
var map = {
'app': 'app', // 'dist',
'@angular': 'node_modules/@angula... |
'use strict';
exports.$$hook = true;
exports.nlapiSetFieldValues = (ctx) => {
/**
* Set the values of a multiselect field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @restriction synchronous arg is only supported in client SuiteScript
*
... |
'use strict';
let instances = {};
//= _functions.js
//= _store.class.js
//= _modal.class.js
//= _product.class.js
//= _basket.class.js
//= _filter.class.js
window.onload = () => {
// Store
let products = new Store('static/products.json', '#products .content');
products.onLoad = () => {
let nav = document.q... |
function search(seartext, options, path = "name") {
if (options instanceof Array) {
var hasFullmatch = false;
var a = options.map(o => {
var name = seek(o, path);
if (name === seartext) hasFullmatch = true;
var [power, m] = mark.power(name, seartext);
... |
var extend = require('util')._extend;
var common = require('./common.js');
module.exports = extend(common, {
entry: __dirname + "/../index.js",
output: {
path: __dirname + "/build/",
publicPath: "/build/",
filename: "bundle.js"
},
devtool: 'source-map',
cache: true
}); |
var fs = require("fs");
var allowedExtensions = require("./allowedExtensions");
var results = null;
// get contents of current directory
function getDir(directory){
try {
var currentFiles = fs.readdirSync(directory);
var dir = [];
currentFiles.forEach(function(fileName){
if (fs.statSync(directory + fileName)... |
function Ship(ctx){
gameMonitor.im.loadImage(['static/img/player.png']);
this.width = 80;
this.height = 80;
this.left = gameMonitor.w/2 - this.width/2;
this.top = gameMonitor.h - 2*this.height;
this.player = gameMonitor.im.createImage('static/img/player.png');
this.paint = function(){
ctx.drawImage(this.play... |
export default {
'placeholder': 'Layers are not defined',
'left-part': 'Left part',
'right-part': 'Right part',
};
|
/* eslint-disable consistent-return */
const { dirname } = require('path');
const { resolveFile, postcss: postcssUtils } = require('svg-mixer-utils');
/**
* TODO refactor this ugly code!
* @param {postcss.Root} root
* @param {Function<string>} [fileMatcher]
* @return {Promise<Array<{path: string, original: string... |
exports.up = function(knex, Promise) {
return knex.schema.table('archives', function (table) {
table.string('what_changed');
})
};
exports.down = function(knex, Promise) {
return knex.schema.table('archives', function (table) {
table.dropColumn('what_changed');
})
};
|
import Modal from 'flarum/components/Modal';
import Button from 'flarum/components/Button';
/**
* The `ChangeEmailModal` component shows a modal dialog which allows the user
* to change their email address.
*/
export default class ChangeEmailModal extends Modal {
constructor(...args) {
super(...args);
/*... |
function LockableContainerFunction(KEY) {
'use strict';
var _MSG_HAS_CONTENTS = "This container already has contents";
var _MSG_INCORRECT_KEY = "The key doesn't match the lock of this container";
var _MSG_LOCKED = 'This container is locked';
var _MSG_NO_CONTENTS = "This container has no contents";... |
/**
* @file mip-script-confirmTel 组件
* @author
*/
// confirmTel
define(function (require) {
var $ = require('zepto');
var customElement = require('customElement').create();
customElement.prototype.firstInviewCallback = function () {
var $el = $(this.element);
// 强行跳转主页为https协议
fun... |
import http from 'http';
import S from '../index';
let request = (options, postData = "") => new Promise((resolve, reject) => {
let req = http.request(options, (res) => {
let chunks = [];
let code = res.statusCode + '';
if (code.indexOf('2') !== 0)
reject(res.statusCode);
... |
/*====================================================
* A structured Message Support implementation in Javascript named Esp
*
* Structmsg FieldNameInfos for Esp (FieldNameInfos.js)
*
* Part of this code is taken from:
* http://yuilibrary.com/ YUI 3.3 version
*
* Released under BSD/MIT license.
* (BSD license ... |
'use strict'
let cli = require('heroku-cli-util')
let co = require('co')
function * run (context, heroku) {
let drain = yield heroku.request({
method: 'delete',
path: `/apps/${context.app}/log-drains/${encodeURIComponent(context.args.url)}`
})
cli.log(`Successfully removed drain ${cli.color.cyan(drain.u... |
/*
This file handles all the internal details of the Game. The game comprises of five parts -- the avatar who is the player,
the enemy who's out to get the player's avatar, the gems that the player intends to collect, the time that the player is racing against,
and the points that the player intends to gather.
There a... |
import { find } from 'ember-native-dom-helpers';
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('mdc-card/actions', 'Integration | Component | mdc card/actions', {
integration: true,
});
test('it renders', function(assert) {
// Set any prop... |
const mongoose = require('mongoose');
const config = require('../config');
const Question = require('./question');
const TestSchema = mongoose.Schema({
name: String,
questions: [Question.schema]
});
const SubjectSchema = mongoose.Schema({
code: {
type: String,
required: true
},
nam... |
var VSHADER_SOURCE = // Vertex shader program
"attribute vec4 a_Position;\n" +
"uniform mat4 u_ModelMatrix;\n" +
"void main() {\n" +
" gl_Position = u_ModelMatrix * a_Position;\n" +
"}\n";
var FSHADER_SOURCE = // Fragment shader program
"precision mediump float;\n" +
"uniform vec4 u_FragColor;\n" +
"void main() {\... |
/**
* Checks whether or not an object contains the given keys-value pairs.
* @param sources source object
* @param test test keys & values
* @returns {boolean}
*/
function contains(sources, test) {
var matches = true;
for(var k in test) {
if( !test.hasOwnProperty(k) ) continue;
if( !sourc... |
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
import $ from 'jquery';
global.$ = global.jQuery = $; |
import ISBN from './isbn-verifier.js';
describe('ISBN Verifier Test Suite', () => {
test('valid isbn number', () => {
const isbn = new ISBN('3-598-21508-8');
expect(isbn.isValid()).toEqual(true);
});
test('invalid isbn check digit', () => {
const isbn = new ISBN('3-598-21508-9');
expect(isbn.i... |
import Field from './src/field';
import InputField from './src/inputField';
import TextField from './src/textField';
import Validation from './src/validation';
export { Field, InputField, TextField, Validation };
|
'use strict';
angular.module('geboRegistrantHaiApp')
.controller('MainCtrl', function ($scope, Token, $location) {
$scope.verified = false;
$scope.admin = false;
/**
* Configure OAuth2 for interaction with gebo-server
*/
var baseUrl = window.location.origin;
Token.setEndpoints({
... |
var abbrev = require('abbrev');
var mout = require('mout');
var commands = require('./commands');
var PackageRepository = require('./core/PackageRepository');
var abbreviations = abbrev(expandNames(commands));
abbreviations.i = 'install';
abbreviations.rm = 'uninstall';
abbreviations.ls = 'list';
/**
* Description
... |
/**
* @overview datejs
* @version 1.0.0-beta-2014-03-25
* @author Gregory Wild-Smith <gregory@wild-smith.com>
* @copyright 2014 Gregory Wild-Smith
* @license MIT
* @homepage https://github.com/abritinthebay/datejs
*/
/*
2014 Gregory Wild-Smith
@license MIT
@homepage https://github.com/abritinthebay/datejs
2... |
import '../imports/api/tasks.js';
Meteor.startup(() => {
// code to run on server at startup
});
|
'use strict'
const Libp2p = require('libp2p')
const IPFS = require('ipfs')
const TCP = require('libp2p-tcp')
const MulticastDNS = require('libp2p-mdns')
const WebSocketStar = require('libp2p-websocket-star')
const Bootstrap = require('libp2p-bootstrap')
const SPDY = require('libp2p-spdy')
const KadDHT = require('libp2... |
/*!
* Copyright 2013 (C) Spirit-EDV-Beratung AG. All rights reserved.
*/
define(['durandal/activator', 'knockout'],function(activator, ko) {
var ctor = function( options ) {
var self = this;
this.isVisible = ko.observable(false);
this.isExpanded = ko.observable(false);
this.isNew = ... |
/*!
* jquery.fancytree.debug.js
*
* Miscellaneous debug extensions.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2017, Martin Wendt (http://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @ver... |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import fs from 'fs';
import path from 'path';
import marked from 'marked';
import jade from 'jade';
import fm from 'front-matter';
import Dispatcher from './Dispatcher';
import ActionTypes from '../constants/ActionTypes';
import DefaultComponents... |
---
layout: null
---
(function() {
// 取得URL參數
var getParameterByName = function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
var results = regex.exec(location.search);
return results === null ? "" : decod... |
var gulp = require('gulp');
var paths = require('../util/config').paths;
var connect = require('gulp-connect');
gulp.task('watch', function() {
connect.server({
root: './',
livereload: true
});
gulp.watch(paths.componentsSrc, ['suit', 'html']);
});
|
// import Promise from 'bluebird';
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
/**
* RefreshToken Schema
*/
const RefreshTokenSchema = new Schema({
// _id as clientId
token: {
type: String
},
salt: {
type: String
},
os: {
type: Schema.Types.Mixed,
defaul... |
var $ = require('jquery')
module.exports = function initTriangles () {
$(window).on('load resize', function () {
var width = $(window).innerWidth()
var leftWidth = Math.round(width / 2)
var rightWidth = leftWidth > (width / 2) ? leftWidth - 1 : leftWidth
$('.triangle').css({'border-left-width': leftW... |
CircleGraph = function (container) {
this.drawRegionalProjectsGraph = function(labels, regionsData, type) {
this.clearContainer();
// calculate central circle's dimensions
var innerCircleRadius = 0.13 * this.width;
var outerCircleRadius = 0.22 * this.width;
this.drawCentralCircle(innerCircleRa... |
import React from "react";
export default class CreateTodo extends React.Component {
render() {
return (
<form onSubmit={this.handleCreate.bind(this)}>
<div>
<div className="row large-6 large-offset-3 medium-6 medium-offset-3 small-6 small-offset-3 columns">
<input
... |
'use strict';
module.exports = function(sequelize, DataTypes) {
const animal = sequelize.define('animal', {
_id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
notNull: true
},
animalName : {
type: DataTypes.STRI... |
/**
* This file is managed by backtrack
*
* source: @backtrack/preset-node
* namespace: babel
*
* DO NOT MODIFY
*/
'use strict';
const Backtrack = require('@backtrack/core');
const nodeVersion = require('@backtrack/preset-node/lib/utils/node-version');
const packageId = require('@backtrack/preset-node/lib/util... |
import React from 'react';
import { Image } from 'react-native';
import Img from '../../../assets/images/icon.png';
import styles from './styles';
const Logo = () => <Image style={styles.image} source={Img} />;
export default Logo;
|
'use strict'
const sequrity = require('../security')
module.exports = dao => {
function findUser(query) {
return dao.findOne('users', query)
}
function getUser(id) {
return dao.findById('users', id)
}
function authenticate(user, password) {
if (user && sequrity.validatePassword(password, user.p... |
import React from "react";
import ReactDOM from "react-dom";
import {Provider} from "react-redux";
//components
import MainComponent from "./components/Main.js";
ReactDOM.render(
<MainComponent />
,document.getElementById("main")
);
|
version https://git-lfs.github.com/spec/v1
oid sha256:af3549dc0e6d2271fbc0555411eb2670e33fbe5b886e5dcc9c4438dce231bbad
size 1185823
|
const Base = require('./Base.js')
class FilterBase extends Base {
constructor (data, _saved) {
super(data, _saved)
/**
* Regular filters
* @type {Object<string, string[]>}
*/
this.filters = this.getField('filters', {})
/**
* Regex filters
* @type {Object<string, string>}
... |
var strOutput;
$.post('url',{id:111},function(json){
strOutput = json;
},'json');
function jsApiCall()
{
WeixinJSBridge.invoke(
'getBrandWCPayRequest',
strOutput,
function(res){
if(res.err_msg == "get_brand_wcpay_request:ok"){
layer.open({
title: '温馨提示'
,content: '支付成功。'
... |
/// <autosync enabled="true" />
/// <reference path="angular.js" />
/// <reference path="angular-mocks.js" />
/// <reference path="angular-route.min.js" />
/// <reference path="app.js" />
/// <reference path="bootstrap.min.js" />
/// <reference path="jquery-1.9.1.js" />
/// <reference path="jquery-1.9.1.min.js" />
|
'use strict';
var React = require('react/addons');
var ListGroupItem = require('react-bootstrap').ListGroupItem;
var ListGroup = require('react-bootstrap').ListGroup;
var Badge = require('react-bootstrap').Badge;
var Outcomes = React.createClass({
render: function() {
return (
<ListGroup fill>
<List... |
Meteor.startup(function () {
Template[getTemplate('feeds')].helpers({
feeds: function(){
return Feeds.find({}, {sort: {url: 1}});
},
feedItem: function () {
return getTemplate('feedItem');
}
});
});
|
Tinytest.add('SecurityAcl - ObjectIdentity', function (test) {
SecurityAclTestHelpers.cleanUpDatabase();
// data-fixtures
Posts.insert({
text: 'test'
});
var post = Posts.findOne();
test.throws(function () {
SecurityAcl.ObjectIdentity(post, 'posts');
}, 'Use "new" to construct a Se... |
import VPAEStore from './VPAEStore'
import {initialStates} from './VPAEStore'
describe('VPAEStore Migrations', function() {
it('Prehistory -> Reset to initial state', function() {
const preHistory = initialStates[0]
const currentVersion = VPAEStore.migrate(preHistory)
expect(currentV... |
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('videoslider.jquery.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.hom... |
var path = require('path'),
express = require('express'),
_ = require('lodash'),
subscribeRouter = express.Router(),
bodyParser = require('body-parser'),
// Dirty requires
api = require('../../../api'),
errors ... |
$(function () {
var seriesOptions = [],
// create the chart when all data is loaded
createChart = function () {
$('#forex-container').highcharts('StockChart', {
rangeSelector: {
selected: 4
},
yAxis: {
... |
sr.config({
baseUrl: "js"
});
require('module/m1', 'module/m2').done(function(m1, m2) {
console.log('完成', arguments);
}).require('module/m3').done(function(m3) {
console.log(m3);
}); |
import React, { Component, PropTypes } from 'react';
import classNames from 'classnames';
import shallowCompare from 'react-addons-shallow-compare';
class WinnerTile extends Component {
constructor() {
super();
this.onClick = this.onClick.bind(this);
}
/**
* Only re-render this component if props o... |
/*jslint nomen: true, vars: true, white: true */
/*global interstate,esprima,able,uid,console,window,jQuery,Raphael */
(function (ist, $) {
"use strict";
var cjs = ist.cjs,
_ = ist._;
var dom_template = cjs.createTemplate(
"<span class='dom_attachment_view'>" +
"<span class='tag'>{{'<'+tag+'>'}}</span>" +
... |
'use strict';
const mongoose = require('../lib/mongooseinit');
const ObjectId = mongoose.Types.ObjectId;
const rabbit = require('./rabbitfactory');
const constants = require('./constants');
const Run = require('../models/run');
const Job = require('../models/job');
const iostatus = require('./iostatus');
const notif... |
var ExtractText = require('extract-text-webpack-plugin');
var LessClean = require('less-plugin-clean-css');
var HtmlFile = require('html-webpack-plugin');
var Copy = require('copy-webpack-plugin');
var webpack = require('webpack');
var config = {
cache: true,
entry: {
android: './src/android/main.less',
io... |
function requirePropFactory(componentNameInError) {
if (process.env.NODE_ENV === 'production') {
return () => null;
}
const requireProp = requiredProp => (props, propName, componentName, location, propFullName) => {
const propFullNameSafe = propFullName || propName;
if (typeof props[propName] !== 'u... |
/*!
* Adorade (v1.0.0): tools/workbox/service-worker.js
* Copyright (c) 2018 - 2019 Adorade (https://adorade.ro)
* Licensed under MIT
* =============================================================================
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web... |
'use strict';
/* https://github.com/angular/protractor/blob/master/docs/toc.md */
describe('my app', function() {
browser.get('index.html');
it('should automatically redirect to /discover when location hash/fragment is empty', function() {
expect(browser.getLocationAbsUrl()).toMatch("/discover");
});
... |
import express from 'express';
import Corpse from './lib/corpse';
import Har from './lib/har';
export default class Main {
run () {
let harfile, port, url;
const app = express();
const harOpt = process.argv.indexOf('--har');
const fixOpt = process.argv.indexOf('--fixture');
const portOpt = proc... |
'use strict';
// Use Applicaion configuration module to register a new module
ApplicationConfiguration.registerModule('core');
ApplicationConfiguration.registerModule('core.admin', ['core']);
ApplicationConfiguration.registerModule('core.admin.routes', ['ui.router']);
ApplicationConfiguration.registerModule('core.prof... |
var Board = require('../src/js/Board');
describe('Board', function () {
var board;
var debugMode = false;
var debug = (debugMode ? console.log : function () {
});
// inject the HTML fixture for the tests
var fixture = '<div id="game">' +
'<div class="row">' +
'<div id="tile-00" class="tile"></di... |
'use strict';
var fse = require( 'fs-extra' ),
prompt = require( 'prompt' ),
_ = require( 'lodash' ),
async = require( 'async' ),
path = require( 'path' ),
crypto = require( 'crypto' ),
configPath = path.resolve( __dirname, '../config.json' );
function genSecret() {
return crypto.randomByt... |
import Component from 'react-pure-render/component';
import Header from './Header.react';
import NewTodo from './NewTodo.react';
import React, {PropTypes, View} from 'react-native';
import Todos from './Todos.react';
import appStyles from '../app/styles';
import fetch from '../../common/components/fetch';
import {fetch... |
import React from 'react';
class ChildQues8 extends React.Component{
render(){
return(<div>
</div>)
}
}
module.exports = ChildQues8; |
/* eslint-env node */
'use strict';
module.exports = {
name: 'xdate-range'
};
|
import Frame, { FRAME_TYPE_NORMAL, FRAME_TYPE_STRIKE, FRAME_TYPE_SPARE } from './frame';
class Game {
constructor() {
this.frames = [];
this.currentFrame = 0;
}
updateBonusScore() {
const currentFrame = this.getFrame(this.currentFrame);
const oneFrameBack = this.getFrame(this.currentFrame - 1);
... |
function valorPorDefecto () {
/*
Aplicamos los valores por defecto para las constantes
*/
//GWP
$("#CO2").val(1);
$("#CH4").val(25);
$("#N2O").val(298);
$("#PFC").val(12200);
$("#HFC").val(14800);
$("#SF6").val(23000);
//Papel
$("#papelcomun").val(3);
... |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
dist: {
files: [
{expand: true, cwd: 'src/', src: ['simple-js-views.js'], dest: 'dist/'}
]
}
},
uglify: {
options: {
preserveComments: 'some'
... |
(function() {
'use strict';
function MovieRated(MovieRatedService){
return {
restrict: 'EA',
replace: true,
templateUrl: './src/app/components/movieRated/template.html',
scope: {
filter: "@"
},
controllerAs: 'vm',
... |
/**
* THIS FILE IS GENERATED AUTOMATICALLY.
* DO NOT EDIT.
*
* You are probably looking on adding startup/initialization code.
* Use "quasar new boot <name>" and add it there.
* One boot file per concern. Then reference the file(s) in quasar.conf.js > boot:
* boot: ['file', ...] // do not add ".js" extension to ... |
import React from 'react';
import update from 'react-addons-update';
import CodeEditor from './CodeEditor.js';
// Bootstrap
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon.js';
import Alert from 'react-bootstrap/lib/Alert.js';
import Tabs from 'react-bootstrap/lib/T... |
/**************************** String Arithmetic**************************************
*
* Language: JQuery
* This program defines three functions for string manipulations namely:
* 1. Sub_arr - Subtraction
* 2. Sum_arr - Addition
* 3. rem_lead_zer - removes leading zeroes from a string-number
* Complexity: ~O(n+... |
const C_VIOLET = 16711819;
const C_DEFAULT = 536870911;
function ReadIniFile(FileName) {
var Data = system.readTextFile(FileName);
var Regex = {
Section: /^\s*\[\s*([^\]]*)\s*\]\s*$/,
Param: /^\s*([\w\.\-\_]+)\s*=\s*(.*?)\s*$/,
Comment: /^\s*;.*$/
};
var Value = {};
var Lines = Dat... |
import $ from 'zepto'
import wx from 'wx'
// 打印钩子函数运行的时间
export const hookTime = (component, hookFnName) => {
let date = new Date()
let m = date.getMinutes()
let s = date.getSeconds()
let ms = date.getMilliseconds()
console.log(`${component} ${hookFnName} ${m}-${s}-${ms}`)
}
// 加载动画
export const loader = {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.