code stringlengths 2 1.05M |
|---|
'use strict'
var _ = require('./icebreaker')
module.exports = function (events) {
return _.map(function (e) {
if (events[e.type] != null && _.isFunction(events[e.type])) return events[e.type].call(this, e) || e
return e
})
} |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
/**
* 类对象构造器
* @returns {Class}
* @constructor
* @require System,Object,ReferenceError;
*/
function Class() {
}
Class.valueOf=Class.toString=function () {return '[object Class]'};
Class.prototype = Object.create( Object.prototype );
Class.prototype.constructor = Class;
Class.prototype.valueOf=function valueOf()
{
... |
'use strict';
/* global describe,it */
const should = require('should');
const constants = require('../../../../lib/constants');
const ErrorInfoInterpreter = require('../../../../lib/translator/error-info-interpreter');
const ErrorResponseFactory = require('../../../../lib/translator/error-response-factory');
const E... |
var Selector = module.exports = exports = function Selector(element){
return {
hasClass : function(selector){
var classes = this.attr('class');
if(!classes)
return false;
var regexSelector = new RegExp(selector);
var hasSelectorClass = classes.match(regexSelector);
if(!hasSelectorClass)
... |
describe("PDF", function() {
it('should combine HTML into single file', function(done) {
var uid = triggerBuild({
builds: [{ format: "pdf" }],
finish: function() {
expect(buildPath(uid, "build1/consolidated.html")).toExist();
expect(buildPath(uid, "build1/consolidated.html")).toHaveCo... |
var mongoose = require('mongoose');
// Create the AttractionSchema
var AttractionSchema = new mongoose.Schema({
created: { type: Date, default: Date.now },
description: { type: String, default: '', trim: true },
imageUrl: { type: String, default: '' },
locationLat: { type: Number, required: true },
locationL... |
'use strict';
var request = require('../util/request'),
Promise = require('promise');
/**
* Module containing Clan functions
* @module Clan
*/
function Clan(config) {
//Read the clans data from a csv to an array object
var readClan = function(data) {
var members = [],
space = new R... |
/* globals describe it expect */
import React from 'react'
import Formsy from 'formsy-react'
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import SchoolInput from 'components/signup/school_input'
import { pack } from "../../helpers/pack"
Enzyme.configure({adapter: new Adapter()})
describe(... |
// IIFE
(function() {
// shorthand for $(document).ready
$(function() {
//$('#welcomeModal').modal('show');
//probably a better way to do this
$('input').parent("td").css("padding", "0px 0px");
$('div.input-group').parent("td").css("padding", "0px 0px");
// End TODO
var numIngredient;
$(... |
'use strict';
angular.module('whateverApp')
.controller('HouseindexCtrl', ["$scope", "Data", "dataUrl", "$routeParams", "Param", function ($scope, Data, url, $routeParams, Param) {
$scope.cur = Param.get("cur") || "tab1";
$scope.type = "houseDetail";
Param.set("cur", $scope.cur);
$scope.cli... |
// @flow
import React from 'react'
import cx from 'classnames'
import { MDCLinearProgressFoundation } from '@material/linear-progress/dist/mdc.linearProgress'
import * as helper from '../helper'
import type { PropsC } from '../types'
type PropsT = {
/** 0-1 */
progress: number,
/** 0-1 */
buffer?: number,
in... |
/**
* The gulp tasks to run webpack or the webpack hot-reload server
*/
const gulp = require('gulp');
const spawn = require('./spawn');
const config = require('./config');
gulp.task('webpack', callback => {
if (config.context === 'production') {
process.env.NODE_ENV = 'production';
}
proce... |
const nock = require('nock');
const chai = require('chai');
const Area = require('models/area.model');
const fs = require('fs');
const config = require('config');
const { createArea, mockGetUserFromToken } = require('../utils/helpers');
const { USERS } = require('../utils/test.constants');
chai.should();
chai.use(requ... |
(function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['swiper.hbs'] = template({"1":function(depth0,helpers,partials,data) {
var helper;
return " <div class=\"swiper-slide\" style=\"background-image:url("
+ this.escapeExpression(((... |
function replaceLazyImg() {
var replaceImgx = document.getElementsByTagName('img');
[].forEach.call(replaceImgx, function(m, index) {
var dsrc = m.getAttribute('data-src');
if (dsrc) {
m.src = dsrc;
}
})
}
replaceLazyImg();
|
"use strict";var exports=module.exports={};
module.exports = function(){ /* empty */ }; |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _simpleGit = require('simple-git');
var _simpleGit2 = _interopRequireDefault(_simpleGit);
var _mkdirp = require('mkdirp');
var _mkdirp2 = _interopRequireDefault(_mkd... |
(function () {
"use strict";
function zKillboard($q, $http) {
var service = {
corpKills: [],
shipLosses: {},
corporationKills: function (corporationID) {
var chill = $q.defer();
$http.get('https://zkillboard.com/api/corporationID/'+cor... |
var data_set = {
death_rate: {
ROC: [6.6, 6.6, 6.7],
JP: [9.9, 10.0, 10.1],
ZAF: [11.3, 11.0, 10.7]
// 國家: [2011年, 2012年, 2013年]
},
born: {
TPE: [
[Date.UTC(2006, 1, 1), 21151],
[Date.UTC(2007, 1, 1), 21620],
[Date.UTC(2008, 1, 1), 2069... |
/*global require, module*/
var mongoose = require('mongoose'),
logSchema = new mongoose.Schema({
moduleName: {
required: true,
type: String,
trim: true
},
moduleVersion: {
required: true,
type: String,
trim: true
... |
import tape from 'tape';
import describe from '../describe';
import {config} from '../../src/fixes/renameProperty';
describe('renameProperty', (it) => {
it('should add all specified alternate properties', (t) => {
const renameProperty = config({
alternateProperties: {
testProperty: ['testProperty_... |
/**
* Created by mysim1 on 21/05/15.
*/
export function FireOnceAndWait(object) {
if (object.once) {
return new Promise(function (resolve) {
object.once('ready', function () {
resolve();
});
});
} else return Promise.resolve();
}
export function Regist... |
module.exports.up = function createTables(options) {
return options.connection.raw('ALTER TABLE users ADD country VARCHAR(100);');
};
module.exports.rollback = function (options) {
return options.connection.raw('ALTER TABLE users DROP COLUMN country;');
};
|
(function() {
'use strict';
angular.module('civic.services')
.factory('OrganizationsResource', OrganizationsResource)
.factory('Organizations', OrganizationsService);
// @ngInject
function OrganizationsResource($resource) {
return $resource('/api/organizations', {
}, {
query: {
m... |
var chai = require('chai');
var should = chai.should();
var sm = require('sandboxed-module');
var EventsMock = require('statwolf-mocks').events;
var CCMock = require('statwolf-mocks').codeconverter;
var SSMock = require('statwolf-mocks').statwolfservice;
describe('The index module', function() {
var uut;
var eve... |
xdescribe('assessment: languageChangesAreIdentified', function () {
var client, assessments, quailResults, cases;
// Evaluate the test page with Quail.
before('load webdrivers and run evaluations with Quail', function () {
return quailTestRunner.setup({
url: 'http://localhost:9999/languageChangesAreI... |
(function () {
'use strict';
var waitListForm = function() {
return {
restrict: 'E',
templateUrl: 'console/directives/wait-list-form.tpl.html',
replace: false,
controller: function($scope, formValidate, waitList) {
$scope.credentials = {};
$scope.formError = '';
... |
const sway = require('sway')
const definition = require('../swagger')
// 单例模式
let getSwaggerAsync = (() => {
let swagger = null
return async () => {
if (!swagger) {
swagger = await sway.create({definition})
}
return swagger
}
})()
module.exports = async (ctx, next) => {
let swagger = await ... |
;(function(ns){
ns.Target = function(targetElement){
var record
, logRecord = function(executedTime){
if(record === undefined){
record = executedTime;
}
else if(executedTime < record){
record = executedTime;
}
$(".record").text("Your... |
// Backbone Control v0.0.1 / Base
//
// https://github.com/biril/backbone-control
// Licensed and freely distributed under the MIT License
// Copyright (c) 2014-2015 Alex Lambiris
/*globals define */
define(['underscore', 'backbone'], function (_, Backbone) {
'use strict';
return Backbone.View.ex... |
module.exports = class File
{
constructor(fs, parent, name)
{
this.fs = fs;
this.parent = parent;
this.name = name;
}
get path ()
{
return this.parent.path + '/' + this.name;
}
async open ()
{
}
} |
const express = require('express');
const LocalStorage = require('node-localstorage').LocalStorage;
const cueboys = require(global.root + '/cueboys');
const router = express.Router();
router.get('/', cueboys.middleware.isLoggedIn, (req, res) => {
res.render('dashboard', {
title: 'Dashboard',
message: req.fl... |
var Q = require("q");
var URL = require("url2");
var Negotiation = require("./negotiate");
var HtmlApps = require("./html");
/**
* @param {String} path
* @param {Number} status (optional) default is `301`
* @returns {App}
*/
exports.PermanentRedirect = function (location, status, tree) {
return function (reque... |
var __ks__ = require("@kaoscript/runtime");
var Dictionary = __ks__.Dictionary, Helper = __ks__.Helper;
module.exports = function() {
var Foobar = Helper.class({
$name: "Foobar",
$create: function() {
this.__ks_init();
this.__ks_cons(arguments);
},
__ks_init_0: function() {
this._values = new Dictiona... |
/*
* =============================================================
* elaostrap
*
* (c) 2015 Jeremy FAGIS <jeremy@fagis.fr>
* =============================================================
*/
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if... |
/*
Copyright (c) 2017, Dogan Yazar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, su... |
var moment = require('alloy/moment');
var units = require('units');
exports.definition = {
config: {
columns: {
id: 'TEXT UNIQUE',
ride: 'TEXT',
timestamp: 'INTEGER',
latitude: 'REAL',
longitude: 'REAL',
accuracy: 'INTEGER',
altitude: 'REAL',
altitudeAccuracy: 'REA... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'ui.router'
]).config(['$locationProvider','$routeProvider','$stateProvider', function($locationProvider,$routeProvider,$stateProvider) {
// $locationProvider.hashPrefix('/');
//$routeProvider.... |
export default function getParsedDate(state) {
const date = state.getIn(['form', 'assignmentCreator', 'values', 'date']);
if (date) {
return date.parsedDate;
}
return null;
}
|
(function() {
var run;
module.exports = run = function(grunt) {
var helpers, local, remote;
helpers = require('./helpers')(grunt);
local = function(platform, device, fn) {
var cmd;
cmd = "cordova run " + platform + " " + (helpers.setVerbosity());
if (device) {
if (device === '... |
import crypto from 'crypto';
import * as LibTaxes from '@opencollective/taxes';
import config from 'config';
import debugLib from 'debug';
import { get, isNil, omit, pick, set } from 'lodash';
import { isEmail } from 'validator';
import activities from '../../../constants/activities';
import { types } from '../../../... |
var friendjs = require('./friend');
var settings = require('../settings');
var defaultOptions = {
mongo: {
url: 'localhost',
db: 'friendjs',
port: 27017
},
redis: {
port: 6379,
host: 'localhost',
maxAttempts: 5,
client: undefined
},
twilio: {
accountSID: '',
authToken: ''... |
var RTCPeerConnection = null;
var getUserMedia = null;
var attachMediaStream = null;
var reattachMediaStream = null;
var webrtcDetectedBrowser = null;
function trace(text) {
// This function is used for logging.
if (text[text.length - 1] == '\n') {
text = text.substring(0, text.length - 1);
}
c... |
(function (t) {
// no
t.add("This value should be false.", "Verdien m\u00e5 v\u00e6re usann.", "validators", "no");
t.add("This value should be true.", "Verdien m\u00e5 v\u00e6re sann.", "validators", "no");
t.add("This value should be of type {{ type }}.", "Verdien skal ha typen {{ type }}.", "validators", "no");
t.ad... |
game.EnemyCreep = me.Entity.extend({
init: function (x,y,settings){
this._super(me.Entity, 'init', [x,y, {
image: "creep1",
width:32,
height: 64,
spritewidth: "32",
spriteheight: "64",
getShape: function(){
return(new me.Rect(0, 0, 32, 64)).toPolygon();
}
}]);
this.health = game.data.enemyCreepHealth;
this.al... |
var fadeIn = function (component) {
var fadeInDuration = component.props.fadeIn || 0
if (isNaN(fadeInDuration) || !fadeInDuration) {
component.setState({ opacity: 1 })
return
}
var interval = 10
var increment = interval / fadeInDuration
var animateOpacity = function () {
var opacity = Math.min(... |
'use strict';
define('ace/snippets/php', ['require', 'exports', 'module'], function (require, exports, module) {
exports.snippetText = "snippet <?\n\
<?php\n\
\n\
${1}\n\
snippet ec\n\
echo ${1};\n\
snippet <?e\n\
<?php echo ${1} ?>\n\
# this one is for php5.4\n\
snippet <?=\n\
<?=${1}?>\n\
snippet ns\n\
names... |
var User = require('../../../model');
module.exports = {
setPreferences: function(req, res) {
var id = req.body.id;
console.log(req.body);
var preferences = req.body.preferences || req.body;
var distance = preferences.distance;
var gtAge;
var ltAge;
if (preferences.maxAge < preferences.... |
// All code points in the Combining Diacritical Marks block as per Unicode v5.0.0:
[
0x300,
0x301,
0x302,
0x303,
0x304,
0x305,
0x306,
0x307,
0x308,
0x309,
0x30A,
0x30B,
0x30C,
0x30D,
0x30E,
0x30F,
0x310,
0x311,
0x312,
0x313,
0x314,
0x315,
0x316,
0x317,
0x318,
0x319,
0x31A,
0x31B,
0x31C,
0x... |
// node module requires
const express = require('express')
const path = require('path');
const favicon = require('serve-favicon');
const logger = require('morgan');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const lessMiddleware = require('less-middleware');
const exphbs =... |
/**
* DeviceOrientationControls - applies device orientation on object rotation
*
* @param {Object} object - instance of THREE.Object3D
* @constructor
*
* @author richt / http://richt.me
* @author WestLangley / http://github.com/WestLangley
* @author jonobr1 / http://jonobr1.com
* @author arodic / http://aleks... |
import { isWindows, global, readMemberExpression, cjsRequireRegEx, noop } from './common.js';
export default function (loader) {
loader.set('@@cjs-helpers', loader.newModule({
requireResolve: requireResolve.bind(loader),
getPathVars: getPathVars
}));
loader.set('@@global-helpers', loader.newModule({
... |
(function(/*! Brunch !*/) {
'use strict';
var globals = typeof window !== 'undefined' ? window : global;
if (typeof globals.require === 'function') return;
var modules = {};
var cache = {};
var has = function(object, name) {
return ({}).hasOwnProperty.call(object, name);
};
var expand = function... |
var path = require('path')
var express = require('express')
var webpack = require('webpack')
var config = require('./webpack.config')
var app = express()
var compiler = webpack(config)
app.use(require('webpack-dev-middleware')(compiler, {
noInfo: true,
publicPath: config.output.publicPath
}))
app.use(require('we... |
$(document).ready(function(){
$("#submit").click(function(){
var t = $("#t").val();
var password = $("#password1").val();
var password2 = $("#password2").val();
if((password == "") || (password2 == "")) {
$("#message").fadeOut(0, function (){
$(this).html("<div class=\"alert a... |
version https://git-lfs.github.com/spec/v1
oid sha256:fa3d66c7b3a7358939a30e05dcf3cae24958c0ccebdcbc0719185d5f8f7c7ca2
size 1564614
|
version https://git-lfs.github.com/spec/v1
oid sha256:25ec1e9019570522bb499420a2d45d2325288d289060682b932bc50a3a1a9b4b
size 74814
|
// functions that associate with square
var click = 0;
var plausibleMoves = [];
var moves = [];
var end = false;
function squareOnMouseOver( game, square ) {
if ( end ) return;
if ( click == 0 ) {
if ( checkTurn( game, square.type[0] ) ) {
square.setAttribute( "style", "cursor: pointer;");
}
} else if ( c... |
const proxy = require("http-proxy-middleware");
module.exports = function(app) {
app.use(proxy("/api", {
target: "https://localhost:4444",
secure: false
}));
app.use(proxy("/auth", {
target: "https://localhost:4444",
secure: false
}));
};
|
var TodosExample;
var todos = new Thorax.Collection([
{
title: "First Todo",
done: true
}
]);
TodosExample = Thorax.View.extend({
collection: todos,
events: {
"submit form": function(event) {
event.preventDefault();
console.log(this.serialize());
this.collection.a... |
import jsdom from 'jsdom';
const doc = jsdom.jsdom('<!doctype html>' +
'<html><body></body></html>');
const win = doc.defaultView;
global.document = doc;
global.window = win;
Object.keys(window).forEach((key) => {
if (!(key in global)) {
global[key] = window[key];
}
}); |
module.exports = function stringify(tree) {
// TODO: Better error message
if (!tree) throw new Error('We need tree to translate');
function _t(tree) {
var type = tree.type;
if (_unique[type]) return _unique[type](tree);
if (typeof tree.content === 'string') return tree.content;
... |
'use strict';
var stringUtils = require('./utils/string');
var collectionUtils = require('./utils/collection');
function Value(type, text, options) {
options = options || {};
this.type = type;
this.text = text;
this.key = typeof options.key !== 'undefined' ? options.key + '' : '';
this.any = options.any |... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Message = mongoose.model('Message'),
Project = mongoose.model('Project');
var activity = require('../controllers/activity');
exports.projectMessages = function (req, res) {
var project_id = req.params.project_id;
Project.findOne... |
var express = require('express'),
router = express.Router(),
mongoose = require('mongoose');
//Connect to mongoose for accounts getting/setting
mongoose.connect('mongodb://localhost/lav');
var Schema = mongoose.Schema;
var Account = new Schema({
username : String,
password : String
});
var accountModel... |
$(document).ready(function(){
$("#finder").val('frm1');
$("#frm1_submit").click(function(event){
if( event.preventDefault ) event.preventDefault ; else event.returnValue=false ;
pagenav(1);
});
$("#frm1_reset").click(function(event){
if( event.preventDefault ) event.preventDefault ; else event.returnValue=fal... |
Template.comments.onRendered(function () {
$('.ui.rating.post').rating('disable');
});
|
var gulp = require('gulp'),
coffee = require('gulp-coffee'),
concat = require('gulp-concat'),
ngmin = require('gulp-ngmin'),
uglify = require('gulp-uglify'),
gutil = require('gulp-util'),
karma = require('gulp-karma'),
ngHtml2Js = require("gulp-ng-html2js");
var fi... |
/*
Copyright (c) 2008 John Leach
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, subl... |
/* eslint-enable */
import React from 'react';
import ReactDOM from 'react-dom';
import { useStrict } from 'mobx';
import { Provider } from 'mobx-react';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import App from './components/App';
import Main from './components/Main';
import * as stores... |
/*
* Capture a screenshot of a page
*/
var Util = require("./util.js");
function PageRenderer(page, logger, options) {
"use strict";
this.page = page;
this.logger = logger;
this.options = {
filename: (options && options.filename) || null,
extension: ".png"
};
}
PageRenderer.prot... |
// JavaScript Variables and Objects
// I paired [by myself, with:] on this challenge.
// __________________________________________
// Write your code below.
var secretNumber = 7, password = "just open the door", allowedIn = false, members = ["John", "Doe", "Jane", "Mary"];
// ___________________________________... |
import React from 'react';
import Helmet from 'react-helmet';
import Header from '../Header';
if (process.env.BROWSER) require('./App.less');
class App extends React.Component {
render() {
return (
<div id="wrap">
<Helmet
title="Machina Forum"
meta={[
{"name": "d... |
console.clear && console.clear();
const { Server } = require('./server');
const getParams = require('./server/utils/get-params.js');
const loadCredentials = require('./server/utils/load-credentials.js');
const params = getParams(process.argv.slice(2));
global.SHOW_DEBUG_MESSAGES = true;
global.log = (...args) => {
... |
var path = require('path')
var env = process.env["NODE_ENV"] || 'development'
var config = require(__dirname + '/' + env)
module.exports = config
|
import {setRules} from './actions';
import {getRules} from '../model/selectors';
export function changeRuleField(ruleSelected, field, value, store) {
let rules = getRules(store.getState()).slice();
let editRule = rules.find(rule => rule.rid === ruleSelected.rid);
editRule[field] = value;
store.dispat... |
const Route = require('lib/router/route')
const {Role} = require('models')
const QueryParams = require('lib/router/query-params')
const queryParams = new QueryParams()
module.exports = new Route({
method: 'get',
path: '/',
handler: async function (ctx) {
const filters = await queryParams.toFilters(ctx.reque... |
import Controller, { inject as controller } from '@ember/controller'
import { reads } from '@ember/object/computed'
import Paginate from '../mixins/table-pager/controller'
import Column from '../mixins/table-pager/column'
export default Controller.extend(Paginate, {
queryParams: ['quickSearchField', 'q'],
// loa... |
function VisualGraph(id, paper, graph, graphDrawer, autoDraw, vertexVisualInfo, edgeVisualInfo) {
this.id = id;
this.paper = paper;
this.graph = graph;
this.graphDrawer = graphDrawer;
this.hasDrawing = false;
if(vertexVisualInfo) {
this.vertexVisualInfo = vertexVisualInfo;
}
els... |
goog.provide('app.PagreportController');
goog.provide('app.pagreportDirective');
goog.require('app.Notify');
/**
* @param {string} appPagreportTemplateUrl URL to directive template.
* @return {angular.Directive} The Directive Definition Object.
* @ngInject
*/
app.pagreportDirective = function(appPagreportTemplat... |
$(document).ready(function() {
$("#new-answer").on("submit", function(event){
event.preventDefault();
var url = $(this).attr("action");
var answerBody = $(this).serialize();
var method = $(this).attr("method");
var id = $(this).parent().attr("id");
$.ajax({
url: url + "?" + answerBody,
... |
// Generated by CoffeeScript 1.6.2
var Tana;
Tana = (function() {
function Tana(di) {
this.di = di;
}
Tana.prototype.util_round = function(list) {
return list.map(function(x) {
if (x != null) {
return Math.round(x * 100) / 100;
}
});
};
Tana.prototype.util_ema = function(arg... |
doTests = function () {
function getInnerText(element) {
return (element.text === undefined ? element.innerText : element.text);
}
QUnit.test("prettyDate.format", function (assert) {
function testDate(then, expected) {
var now = "2014-09-17T22:24:17Z";
asser... |
import IPad from './iPad.jsx';
export default IPad; |
import '../app/cors/server';
import '../app/sms';
import '../app/2fa/server';
import '../app/analytics/server';
import '../app/api/server';
import '../app/apple/server';
import '../app/assets/server';
import '../app/authorization';
import '../app/autolinker/server';
import '../app/autotranslate/server';
import '../app/... |
module.exports = DataComponent7;
var DONE = false;
function DataComponent7() {}
DataComponent7.prototype.storeData = function($happn, path, data, callback){
try{
$happn.data.set(path, data, {}, function(e, response){
return callback(e, response)
});
}catch(e){
callback(e);
}
}
// DataCompone... |
(function(){
$(document).ready(function(){
// Counter code starts
var note = $('#note'),
ts = new Date(2014, 2, 9),
newYear = true;
if((new Date()) > ts){
// The new year is here! Count towards something else.
// Notice the *1000 at the end - time must be in milliseconds
ts = ... |
export const AUTH_URL = 'http://localhost:3000/auth'
export const API_URL = 'http://localhost:3000/api'
export const emailRegex = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0... |
/** @constructor */
ScalaJS.c.java_lang_Float$ = (function() {
ScalaJS.c.java_lang_Object.call(this);
this.TYPE$1 = null;
this.POSITIVE$undINFINITY$1 = 0.0;
this.NEGATIVE$undINFINITY$1 = 0.0;
this.NaN$1 = 0.0;
this.MAX$undVALUE$1 = 0.0;
this.MIN$undNORMAL$1 = 0.0;
this.MIN$undVALUE$1 = 0.0;
this.MAX$u... |
var express = require('express');
var router = express.Router();
var register = require('../config/register');
var crypto = require('crypto');
router.post('/user/register', function(req, res) {
//查表
console.log(req.body.email,req.body.password)
register.regsiterModel.find({
"email": req.body.email... |
import axios from 'axios';
import { createApolloFetch } from 'apollo-fetch';
import { CREATE_USER, FETCH_USER } from 'constants/actionTypes';
export const createUser = (values, history) => async dispatch => {
const response = await axios.post('/api/signup', values);
history.push('/');
return dispatch({ type: CR... |
version https://git-lfs.github.com/spec/v1
oid sha256:a757a2d563d12b1a0cec85bcd6ec57db0513dab4f8e8c48735d48d4f91bc94bb
size 987
|
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
var obstacleColor = Color.Material.getRandomColor();
/**
* Creates and obstacle which the ships crash into
*
* @param pos The position vector of the obstacle (centre of the rect)
* @param w The width
* @param h The height
* @param [create] Boolean which changes the maths for drawing when ... |
import './polyfills.js';
export { WebGLRenderTargetCube } from './renderers/WebGLRenderTargetCube.js';
export { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js';
export { WebGLRenderer } from './renderers/WebGLRenderer.js';
// export { WebGL2Renderer } from './renderers/WebGL2Renderer.js';
export { ShaderLi... |
var db = require('../lib/db');
/**
* Provides a global mapping for other functions to utilize across the app.
* @type {{fosterParent: string, caseWorker: string}}
*/
exports.roles = {
fosterParent: 'fosterParent',
caseWorker: 'caseWorker'
}
exports.createUserTable = createUserTable;
exports.createMessageTa... |
// -------------------------------------------------------------------------- \\
// File: ScrollView.js \\
// Module: ContainerViews \\
// Requires: View \\
// Author: Nei... |
var t = require('assert')
module.exports = ({advanced}) => {
before(async () => {
await advanced.bringToFront()
})
it('access to file URLs', async () => {
t.strictEqual(
await advanced.evaluate(() =>
origins.state.file
),
true,
'origins.state.file should be true'
)... |
// 数据库表
var db = {
job: {
id: {
type: 'increments',
nullable: false,
primary: true
},
uuid: {
type: 'string',
maxlength: 36,
nullable: false,
validations: {
'isUUID': {
c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.