text stringlengths 7 3.69M |
|---|
var _nexus = function( scene, nexus, mob, id ) {
this.self = new _baseEnt( BABYLON.Mesh.CreateSphere("nexus_"+id, 10.0, 3.0, scene), scene );
var material = new BABYLON.StandardMaterial("material01", scene);
material.diffuseColor = new BABYLON.Color3(((id==0)?0:1), ((id==0)?1:0), 0);
this.self.self.material = ma... |
const express = require('express');
const Budget = require('./Budget.js');
const router = express.Router();
router
.route('/')
.get((req, res) => {
Budget
.find({})
.then(ans => {
res.status(200).json(ans);
})
... |
import { GraphQLObjectType, GraphQLID, GraphQLList } from 'graphql'
import organizationType from '../types/organization'
import { FilterInput } from '../types/inputs'
import resolve from '../resolvers/organizations'
const organizations = {
name: 'organizations',
type: new GraphQLList(organizationType),
args: {
... |
/* eslint-disable valid-jsdoc */
'use strict';
/**
* @author Dave Grix
* @param data string
* @return array
*/
const validateInventoryTransactions = async(data) => {
const supplierData = JSON.parse(data);
let result = {};
let finalObject = [];
const dateRegex = '/^\d{4}-\d{2}-\d{2}$/';
let request =... |
var vm = new Vue({
el: '#box',
data: {
editing: '',
newBookMessage: {
name: '',
author: '',
price: ''
},
bookMessage: {
name: '',
author: '',
price: ''
},
bookData: [
{
... |
module.exports.Calling = {
"base_path": process.env.VUE_APP_API,
"proxy_get": process.env.VUE_APP_PROXY_GET,
"proxy_test" : process.env.VUE_APP_PROXY_TEST,
"proxy_reassign": process.env.VUE_APP_PROXY_REASSIGN,
"proxy_update": process.env.VUE_APP_PROXY_UPDATE,
"account_login": process.env.VUE_APP_ACCOUNT_LOG... |
var requestsUtile = require('../utile/requests.server.utile.js');
var config = require('../../config/config.js');
var validate = require("validate.js");
var SEO = require('../../config/seo/seo.js');
var constraints = {
query: {
format: {
pattern: "[a-z0-9ãáàâíôóõúçéê_ ]+",
flags: "i",
message: ... |
// todo remove suppression on multiple exports
export const CoordState = {
typedWords: null,
foundWord: false,
usecase: null,
isTriSymOfAFound: false,
isTriSymOfCFound: false,
isSqSymOfAFound: false,
isSqSymOfBFound: false,
isSqSymOfCFound: false,
isSqSymOfDFound: false,
isPolySymOfAFound: false,
... |
$(function(){
var clenWidth = function(){
var bodyWidth = $(window).width();
var newHhtmlFontSzie = 100 * (bodyWidth/750) + 'px';
$('html').css({
'font-size' : newHhtmlFontSzie
})
}
clenWidth();
window.onresize = function(){
clenWidth();
}
})
|
const path = require('path'); //path 模块提供了一些工具函数,用于处理文件与目录的路径。
const merge = require('webpack-merge');
const common = require('./webpack.config.js');
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
const ip = require('ip').address();
const port = 9000
const resolve = function (pathNmae... |
var App = angular.module('App', ['ui.router', 'remoteValidation', 'permission', 'ODataResources','ui.grid']);
App.config(function ($stateProvider, $urlRouterProvider, $locationProvider, $provide) {
$provide.decorator("$exceptionHandler", function ($delegate, $injector) {
return function (exception, cause... |
import React from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
useColorScheme,
View,
} from 'react-native';
import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
import Image... |
import { graphql } from 'react-apollo'
import gql from 'graphql-tag'
import categoryFragment from '../fragments/category'
export const CategoryQuery = gql`
query CategoryQuery($categoryId: ID!) {
category(id: $categoryId) {
...CategoryFragment
}
}
${categoryFragment}
`
const queryConfig = {
opti... |
var tasks = [
{name: 'Recoger setas en el campo', completed: false},
{name: 'Comprar pilas', completed: true},
{name: 'Poner una lavadora de blancos', completed: true},
{name: 'Aprender cómo se realizan las peticiones al servidor en JavaScript', completed: false}
];
function pintarListaTares () {
... |
/**
* Created by alucas on 14/1/17.
*/
import React, { Component, PropTypes } from 'react';
import Cell from './Cell';
export default class SudokuBoard extends Component {
static propTypes = {
height: React.PropTypes.number,
width: React.PropTypes.number,
};
getStyles() {
return {
root: {
... |
const firebaseConfig = {
apiKey: "AIzaSyCe7qa6pcT1Nir5h9V5ldFCN46nf4Ln5xs",
authDomain: "hot-onion-restaurant-b3126.firebaseapp.com",
databaseURL: "https://hot-onion-restaurant-b3126.firebaseio.com",
projectId: "hot-onion-restaurant-b3126",
storageBucket: "hot-onion-restaurant-b3126.appspot.com",
messagingS... |
const Books = require('../models').Book;
const Authors = require('../models').Author;
const paginate = require('./paginate').paginate;
const returnObject = require('./paginate').returnObject;
module.exports = {
// add book to library
create(req, res) {
return Books
.create({
... |
/* eslint-disable no-undef,prefer-reflect */
const path = require('path');
const fs = require('fs')
// const sharp = require('sharp')
const mediaTags = require("jsmediatags")
// const BaseRest = require('./_rest')
module.exports = class extends think.Controller {
async postAction () {
const postModel = this.mode... |
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuetify from 'vuetify';
import VueRouter from 'vue-router';
import AuthorProfile from '../../src/components/AuthorProfile.vue';
import Snackbar from '../../src/components/Snackbar.vue';
// Store.
import store from '../Store.js';
Vue.use(Vue... |
var request = require('request');
//request list of subscribers CHANNEL IDs for given user
function getSubscriberChannelsIdApi (user, callback) {
//return ALL user subscriptions as an array of SUBSCRIBER IDs
getUserSubscriptions(user, function(err, subscriptions) {
if(err) return er... |
const { GraphQLID } = require("graphql");
const { getPost } = require("../../../services/post.service");
const postType = require("../../types/post");
module.exports = {
type: postType,
description: "Get a post",
args: {
postId: { type: GraphQLID }
},
resolve: async (root, { postId }) => {
return a... |
let studentScores = {
student1: {
id: 123456789,
scores: {
exams: [90, 95, 100, 80],
exercises: [20, 15, 10, 19, 15],
},
},
student2: {
id: 123456799,
scores: {
exams: [50, 70, 90, 100],
exercises: [0, 15, 20, 15, 15],
},
},
student3: {
id: 123457789,
sc... |
define(['zepto', 'underscore', 'backbone',
'echo', 'app/api', 'app/refreshtoken',
'app/utils',
'text!templates/bindPhoneStep2.html'
],
function($, _, Backbone, echo, Api, Token, utils, bindPhoneStep2Template) {
var $page = $("#bind-phone-step2");
var $phoneNumber ;
... |
import transformForTokens from './transformForTokens';
import forEachTheme from '../../test/utils/forEachTheme';
describe('transformForTokens', () => {
forEachTheme(({ theme }) => {
test('Rules', () => {
expect(
transformForTokens({
tokens: theme.tokens
})
).toMatchSnapshot(... |
const INITIAL_STATE = {
activeTasks: [],
historyTasks: [],
tasks: [],
profiles: []
}
export default function (state = INITIAL_STATE, action) {
switch (action.type) {
// [GN] action used to get the profile names' for each task
case 'GET_PROFILES':
return { ...state, profi... |
var request = require("../manager/request");
var config = require("../common/config");
var Time = {
serviceTime: null,
offset: 0,
update: function (dt) {
if (dt < 0.5) {
this.offset += dt
}
},
//同步服务器时间
sync: function (func) {
var param = {
GetC... |
var $ = require('./jquery-1.10.1.min.js');
require('./swiper-3.3.1.min.js');
var p = require('./swiper.animate1.0.2.min.js');
mainSwiper = new Swiper('.swiper-container',{
resistanceRatio:0, //边缘抵抗为0
pagination:'.swiper-pagination', //定义分页器
onInit:function(swiper){ //swiper 初始化完成以后
p.swiperAnimateCach... |
import React from "react";
import {Link} from "react-router-dom";
import styled from "styled-components";
const StyledLink = styled(Link)`
text-decoration: none;
color: inherit;
font-weight: 500;
padding: 0 1rem;
&:focus, &:hover, &:visited, &:link, &:active {
text-decoration: none;
}
... |
import Promise from 'bluebird'
import _ from 'lodash'
import moment from 'moment'
let fs = Promise.promisifyAll(require('fs'))
let EventEmitter = require("events").EventEmitter
function year(item){
return moment(new Date(item.date)).year()
}
function computeHistogram(items, filterFunc){
let matches = _.fi... |
var Launcher = window.Launcher || {};
Launcher.init = function() {
function wait( delay ) {
var deferred = $.Deferred();
setTimeout(function() {
deferred.resolve();
}, delay);
return deferred.promise();
}
function gapiCall(method, data) {
var deferred = $.Deferred();
gapi.client.gezzoo[method... |
import React from 'react'
import { View, StyleSheet, Text, Animated, Easing } from 'react-native'
class ProgressBar extends React.Component {
constructor(props) {
super(props)
this.width = new Animated.Value(0)
}
componentDidUpdate(prevProps) {
if (prevProps.value !== this.props.v... |
import { catarse } from '../api';
import h from '../h';
import m from 'mithril';
import prop from 'mithril/stream';
import moment from 'moment';
import _ from 'underscore';
import models from '../models';
const currentContribution = prop({});
const getUserProjectContributions = (userId, projectId, states) => {
co... |
// NOTES
// - new Date().toISOString()
//Firebase
const functions = require("firebase-functions");
const admin = require("firebase-admin");
admin.initializeApp();
const firebase = require("firebase");
firebase.initializeApp({
apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
authDomain: process.env.REACT_APP_... |
//
module.exports = function (config) {
config.set({
autoWatch: true,
basePath: '../..',
browsers: [ 'Chrome' ],
frameworks: [ 'mocha', 'chai' ],
colors: true,
exclude: [],
files: [
'vendor/bower_components/angular/angular.js',
'v... |
// import helpers function to assert for equality
let assertEqual = require('./assertEqual');
const head = function(item) {
let length = item.length;
if (length > 0) {
return item[0];
} else {
return 'underfined';
}
};
module.exports = head;
|
/**
* Contrôleur de la page logout.
*/
var LogoutController = function($scope, $location, $cookies) {
/**
* Méthode de déconnexion.
*/
$scope.logout = function() {
// On supprime le cookie
$cookies.remove("access_token");
// On redirige vers la page de connexion
$loc... |
//Project : DoDo
module.exports =
{
db : 'mongodb://127.0.0.1/resterdb',
sessionSecret : "rester",
} |
import React from "react"
import {
View,
Image,
ImageBackground,
TouchableOpacity,
Text,
Button,
Switch,
TextInput,
StyleSheet,
ScrollView
} from "react-native"
import Icon from "react-native-vector-icons/FontAwesome"
import { CheckBox } from "react-native-elements"
import { connect } from "react-re... |
$(document).ready(()=>{
gatAllData();
})
let getAllData=()=>{
console.log("making request")
$.ajax({
type:"GET",
datatype:"json",
Url:"artos.json",
success: (data)=>{
console.log(data)
let allPeople = data.people
for(people of allPeople){
... |
function listCard(params) {
self = this;
}
module.exports = ko.components.register('listCard', {
viewModel: listCard,
template:
`<section class="panel panel-primary">
<!--panel-heading-->
<div class="panel-heading" role="tab">
<div class="panel-title">
<button class="btn btn-icon" type="button"... |
const test = require('tape');
const isWeakMap = require('./isWeakMap.js');
test('Testing isWeakMap', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof isWeakMap === 'function', 'isWeakMap is a Function');
//t.deepEqual(isWeakMap(a... |
import Router from 'vue-router'
import routes from './routes'
//服务端渲染需要
export default ()=>{
return new Router({
routes,
mode: 'history'
})
} |
(function () {
angular.module('photoGallery').controller('WinningPhotoController', WinningPhotoController);
function WinningPhotoController($scope, $rootScope, winningPhoto) {
var self = this;
self.closeModal = closeModal;
self.winningPhotoFile = winningPhoto.filename;
$rootS... |
var Note = require('../models/note');
// extracting the server side of things from server.js
module.exports.create = function (req, res) {
var note = new Note(req.body);
note.save(function (err, result) {
// sends back to client via callback
res.json(result);
});
}
module.exports.query = function (req, res) {
... |
const utils = require("./utils");
const determinePricing = (quantity, pricePer, location) => {
const priceInCents = utils.normalizePricingToCents(pricePer);
const taxRate = utils.determineTaxRate(location);
const priceBeforeDiscountAndTax = quantity * priceInCents;
const discountRate = 100 - utils.determineDi... |
const express = require("express")
const routes = express.Router()
const Usermodel = require("../Models/RegisterSchema")
const bcrypt = require("bcryptjs")
const passport = require("passport")
const JWT = require("jsonwebtoken")
routes.post("/register", async (req, res) => {
const { name, email, pswd, pswd2 } = req... |
module.exports = {
HelperRock: {
1: "",
4: "0x05C3D763a070d01C3731Bb2DECfa76D5Fb74A7Fb",
},
EtherRock: {
1: "0x37504AE0282f5f334ED29b4548646f887977b7cC",
4: "0xBC0dAA15d70d35f257450197c129A220fb1F2955",
},
};
|
const { randomInt } = require('crypto');
const { writeFileSync, readFileSync } = require('fs');
const { resolve } = require('path');
module.exports = function () {
this.rootPath = process.cwd();
this.dest = resolve(this.rootPath, 'serverless.yaml');
// new时读取string
this.destString = readFileSync(
resolve(t... |
const objectMapper = require('../mappers/objects');
exports.bodyToCamelCase = (req, res, next) => {
req.body = objectMapper.keysToCamelCase(req.body);
return next();
};
|
function doOnLoad() {
if (getSetting("configured") != 1) {
setSetting("configured", 1);
loadDefaults(false);
var delayedReload = function() { window.location.reload(); clearInterval(delayedReload); };
setInterval(delayedReload, 3000);
}
var streamUrl = getSetting("streamurl")... |
import Vue from 'vue'
import App from './app.vue'
import router from '@/router'
import VConsole from 'vconsole';
import store from '@/store'
import mixins from '@global/mixins'
require('@global/components')
require('@global/directives')
import {project} from '@config'
Vue.config.productionTip = false
if (process.env.NO... |
const config = {
MAX_ATTACHMENT_SIZE: 5000000,
s3: {
REGION: "ap-northeast-1",
BUCKET: "serverlessknx-notes-app-upload",
},
apiGateway: {
REGION: "ap-northeast-1",
URL: "https://14vdtec3ub.execute-api.ap-northeast-1.amazonaws.com/dev",
},
cognito: {
REGION: "ap-nort... |
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = {
/**
* baseUrl 为活动名,上线后正式地址为 https://activity.wps.com/xxx
* 上线时需要把 baseUrl 设置为 CDN 地址 https://d3nwz1fzrto4dz.cloudfront.net/xxx
*/
//
publicPath: "", // 本地调试,默认为空
chainWebpack: config => {
// #region 忽略生产环境打包的文件
... |
angular.module('dataCoffee').controller('newPeriodo', newPeriodo);
newPeriodo.$inject = ['$scope', '$http', '$rootScope', '$location'];
function newPeriodo($scope, $http, $rootScope, $location) {
$scope.reset = function (){
$scope.name = '';
}
$scope.salvar = function() {
$scope.data = JSON.... |
let mongoose = require('mongoose');
let Schema = mongoose.Schema;
let readingSchema = new Schema({
username: String,
todo: String,
isDone: Boolean,
hasAttachment: Boolean
});
module.exports = mongoose.model('Reading', readingSchema); |
import React from 'react';
import { connect } from 'react-redux';
import { setUsers, setUsersClear, setSearchKey } from '../../Redux/MainGridReducer';
import EditModulePage from './EditModulePage';
import Axios from 'axios';
class EditModulePageAPI extends React.Component {
editUser = (userId, userName, userSurn... |
import {useState} from 'react';
import "./PlayerListItem.scss";
import { FaUser } from "react-icons/fa";
import { IoIosCopy } from "react-icons/io";
import { CopyToClipboard } from 'react-copy-to-clipboard';
const classNames = require('classnames');
function PlayerListItem(props) {
const [copied, setCopied] = useS... |
/*
Copyright (c) 2004-2009, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/
/*
Author: unscriptable
Date: Jan 31... |
({
getSiteURL : function(cmp, event, helper) {
var action = cmp.get('c.getCurrentCommunitySiteUrl');
action.setCallback(this, function (response) {
if (response.getState() == 'SUCCESS') {
cmp.set('v.siteUrl', response.getReturnValue());
}
});
$A.e... |
import('./math').then(function(m) {
console.log(m.default(1, 2));
});
|
$(document).ready(function(){
printElementsGroup("best_sellers");
});
|
import React from 'react'
import { StyleSheet } from 'quantum'
import { RowLayout, Layout } from 'bypass/ui/layout'
import { Condition } from 'bypass/ui/condition'
import Toggle from './Toggle'
const styles = StyleSheet.create({
self: {
width: '100%',
background: '#f5f5f5',
},
})
const Controls = ({ show,... |
let questionCount =0;
const question =document.querySelector(".question");
const option1 =document.querySelector("#option1");
const option2 =document.querySelector("#option2");
const option3 =document.querySelector("#option3");
const option4 =document.querySelector("#option4");
const sumbit =document.querySelector("#s... |
/* eslint-env node, mocha */
const assert = require('assert');
const { Client } = require('../../../src/index.js');
const generateClient = require('../../seed/generated/generateRlayClient.js');
const { Kafka } = require('kafkajs');
const config = require('../../../config.js');
const kafkaClient = new Kafka({
brokers... |
import React from 'react';
import {Popover,Form,Input,Button,Select} from 'antd'
import BaseComponent from "./BaseComponent";
export default class PopoverWrapper extends BaseComponent {
close(){
this.setState({
popover:false
})
}
render() {
let { title,children,conten... |
const Keyboard = {
element: {
main: null, /* main keyboard element*/
keyContainer: null, /* keys container*/
keys: [] /* an array of buttons for the keys*/
},
eventHandlers: {
oninput: null /* fire off when keyboard gets input */
},
properties: { /* current ... |
const color = "#000000"
const option = {
stroke: "#000000",
'stroke-width': 2,
'fill-opacity': 0,
};
App.Two = class {
constructor(app, svgElement){
this.app = app;
this.surface = SVG(svgElement.getAttribute('id'))
this.surface.attr('viewBox', [0, 0, svgElement.clientWidth, svgElement.clientHeig... |
import React from 'react';
import { Route, Redirect } from 'react-router-dom';
import SVG, { Circle, Defs, G, Line, Rect, Text, Use } from 'react-svg-draw';
const lineHeight = '8';
const solidLineDim = { height: lineHeight, width: 70, x:'0', y:'0' };
const dottedLineDim = { height: lineHeight, width: '32', x:'0', x2: ... |
const gulp = require('gulp');
const autoprefixer = require('gulp-autoprefixer');
gulp.task('autoprefixer', function(){
gulp.src('./dev/*.css')
.pipe(autoprefixer({
browsers: ['last 5 versions'],
cascade: true
}))
.pipe(gulp.dest('./site/'))
});
const htmlmin = requ... |
// Members
import React from 'react';
import { Link, Route} from 'react-router-dom'
import styles from './style.css'
const Members = ({ match }) => {
return (
<div>
<h2>Member<b>s</b></h2>
<Link to={`${match.url}/member`}><button className={styles.menuButton}>Member</button></Link>
</div>
)
}
... |
module.exports = function (app) {
app.route('/logout')
.get(function (req, res) {
res.redirect('/login');
})
} |
angular.module("EcommerceModule").controller("OrderListProducerController", function ($scope, $state, $mdDialog, OrderPageProducerService){
$scope.productData;
$scope.orderData = [];
var getData = function(callback){
OrderPageProducerService.getWaitingOrderDetail().then(
function(response){
$scope.productDa... |
// scripts.js
var a = prompt("Podaj wartość a:"),
b = prompt("Podaj wartość b:"),
value = (a * a) + (2 * a * b) - (b * b);
console.log('Wynik działania (a * a) + (2 * a * b) - (b * b), gdzie a: ' + a + 'i b: ' + b + ' wynosi: ' + value);
if (value > 0) {
console.log("Wynik dodatni");
} else if (value < 0) ... |
'use strict'
// relative paths (this is to ensure that everything resolves appropriately)
require('app-module-path').addPath(__dirname)
// libs
const sinon = require('sinon')
const expect = require('chai').expect
const chai = require('chai')
const spies = require('chai-spies')
chai.use(spies)
// App
const App = require... |
const express = require('express');
const TacoController = require('../controllers/TacoController');
const router = express.Router();
const tacoController = new TacoController();
router.get('/', tacoController.get);
router.get('/:id', tacoController.getById);
module.exports = router;
|
import React from 'react';
import {Provider} from 'react-redux';
import {BrowserRouter as Router, Route , Switch} from 'react-router-dom';
import store from './Redux/store';
//Views
import Home from './Views/Home/Home.jsx';
import Receta from './Views/Receta/Receta.jsx';
import SignUp from './Views/SignUp/SignUp.jsx';... |
const repeater = (string, n) => {
return string.repeat(n);
}
|
// Saves options to chrome.storage
function save_options() {
localStorage['leftWidth'] = document.getElementById('leftWidth').value;
var calendarLeft = document.getElementById('calendarLeft').checked;
if(calendarLeft == true)
localStorage['calendarLeft'] = "true";
else
localStorage['calendarLeft'] = "false";
... |
module.exports = {
'url':process.env.STACKABLES_MONGO_URI || process.env.LOCAL_MONGO_URI || process.env.MONGOLAB_URI || null
};
|
dojo.provide("dojox.validate.tests.creditcard");
dojo.require("dojox.validate.creditCard");
tests.register("dojox.validate.tests.creditcard",
[{
name:"isValidLuhn",
runTests: function(tests) {
tests.t(dojox.validate.isValidLuhn('5105105105105100')); //test string input
tests.t(dojox.validate.isValidLuhn('5... |
// React
import React, { useState, useEffect } from 'react';
import API from '../utils/API';
import BookCover from '../components/BookCover';
import GenreSelect from '../components/GenreSelect';
import LikeDislike from '../components/LikeDislike';
import TextBox from '../components/TextBox';
const AppFrame = ({ ...pro... |
import React from 'react';
import Mixin from './Mixin.jsx'
const Elem = (props) => <div><button className="btn btn-primary" onClick={props.update}>You have clicked me <span className="badge">{props.value}</span> times!</button><br/><br/></div>
export default Elem;
|
import { Logger } from './Logger';
export const DEFAULT_LOGGER = new Logger();
if (!global.METALOG) {
global.METALOG = DEFAULT_LOGGER.log.bind(DEFAULT_LOGGER);
}
export * from './Level';
export * from './LevelSpec';
export * from './Logger';
|
// 优惠管理
SystemLogManagePanel = Ext.extend(Disco.Ext.CrudPanel, {
id: "systemLogManagePanel",
baseUrl: "systemLog.java",
gridSelModel: 'checkbox',
batchRemoveMode: true,
pageSize: 20,
showView: false,
showAdd: false,
showEdit: true,
baseQueryParameter : {
types : 1
},
showRemov... |
function showDistance(speed, time) {
alert(speed * time);
}
showDistance(10, 5);
showDistance(85, 1.5);
showDistance(12, 9);
showDistance(42, 21); |
const Moniker = require("moniker");
const names = Moniker.generator([
Moniker.adjective,
Moniker.noun,
Moniker.verb,
]);
export default async function handler(req, res) {
res.json(names.choose());
}
|
var maxSumAfterPartitioning = function(A, K) {
let bigArr = [];
let i = 0;
while (i < A.length) {
}
}; |
var texts;
var randquote;
//Tells our console the bot is starting
console.log("The Bot is Starting Now!");
//Require twit package
var Twit = require('twit');
var fs = require('fs');
//comment
preload();
function preload(){
texts = fs.readFileSync("Greetings.txt", "utf8").toString().split("\n");
console.log... |
function reverseInParentheses(inputString) {
if (inputString.length < 1) return "";
let level = 0;
let newstring = "";
let lookup = new Array(inputString.length);
lookup.fill("")
for (let i = 0; i < inputString.length; i++) {
let char = inputString[i];
if (char !== "(" && char !=... |
document.addEventListener('DOMContentloaded', () => {
let tl = new TimelineMax();
tl.fromTo('.bg-loader', 1,
{ width: '100%' },
{ width: '0%', ease: Expo.easeInOut })
}
) |
const users = [
{ name: 'Mark', gender: 'male', salary: '1500' },
{ name: 'Igor', gender: 'male', salary: '500' },
{ name: 'Anna', gender: 'female', salary: '1000' },
{ name: 'John', gender: 'male', salary: '2100' },
{ name: 'Oleh', gender: 'male', salary: '3000' },
{ name: 'Mary', gender: 'female', salary:... |
'use strict';
import gulp from 'gulp';
import RevAll from 'gulp-rev-all';
import awspublish from 'gulp-awspublish';
import cloudfront from 'gulp-cloudfront';
gulp.task('deploy', function() {
let bucket = 'embed-viewsay',
distributionId = "E1A0KLTDNUDEVM";
if (global.env === "staging") {
bu... |
import "./style.css";
import { useState } from "react";
import ErrorForm from "../ErrorForm";
// para el registro (nuevo usuario) tenemos 2 imputs para el email y la password
const FormularioRegistro = () => {
const [email, setEmail] = useState("");
const [contraseña, setContraseña] = useState("");
const [error, ... |
var dir_84d4ec99856759213102e4209c09c524 =
[
[ "backtrace.c", "backtrace_8c.html", "backtrace_8c" ],
[ "common.c", "common_8c.html", "common_8c" ],
[ "graphviz.c", "graphviz_8c.html", "graphviz_8c" ],
[ "lib.h", "debug_2lib_8h.html", "debug_2lib_8h" ],
[ "notify.c", "debug_2notify_8c.html", "debug_2... |
import {
MESSAGES_LOADING,
MESSAGES_LOADED,
SET_CURRENT_MESSAGE,
SEND_MESSAGE,
UPDATE_MESSAGE,
DELETE_MESSAGE,
} from '../actions/types';
const initialState = {
messages: [],
currentMessage: {},
loading: true,
};
export default function (state = initialState, action) {
const { type, payload } = ac... |
let express = require('express');
let router = express.Router();
let User = require('../models/User');
let Content = require('../models/Content');
let responseData;
router.use((req,res,next) => {
// 防止下次请求的时候把上次的结果给带上
responseData = {
code: 0,
message: ''
};
next();
})
... |
"use strict";
let popup = new PopupUtils();
$(function () {
$("#loginBtn").click(function () {
let userName = $("input[name=userName]").val();
let pwd = $("input[name=password]").val();
if (!userName || userName.length < 6) {
popup.layerTips("账号格式错误!");
return false;... |
/**@jsx jsx */
import React, { Fragment } from 'react';
import { jsx, Styled, Flex, Badge } from 'theme-ui';
import { graphql } from 'gatsby';
import Img from 'gatsby-image';
import MDXRenderer from 'gatsby-plugin-mdx/mdx-renderer';
import moment from 'moment';
// importing this locale set the global to french
... |
import React from "react";
import {
View,
StyleSheet,
ScrollView,
Dimensions,
Text,
SafeAreaView
} from "react-native";
import LinearGradient from "react-native-linear-gradient";
import Header from "../components/Header";
import Tabs from "../components/Tabs";
import Item from "../components/Item";
import... |
var APE = {Config: {identifier: "ape", init: true, frequency: 0, scripts: []}, Client: function (a) {
if (a) {
this.core = a
}
}};
APE.Client.prototype.eventProxy = [];
APE.Client.prototype.fireEvent = function (c, b, a) {
this.core.fireEvent(c, b, a)
};
APE.Client.prototype.addEvent = function (d, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.