text stringlengths 7 3.69M |
|---|
/**
* Name:Adam Zaimes
* Date: 9-23-2013
*
* Created by the JavaScript Development Team
* Class: PWA
* Goal: Goal7
*/
(function(){
//constructor
var Person = function(name, row) {
this.name = name;
this.action = Person.actions[Math.floor(Math.random() * Person.actions.length)];
this.job = Person.jobs[... |
import React from 'react';
import './MainFeatures.css';
import Heading from '../../components/Heading';
import Paragraph from '../../components/Paragraph';
import Image from '../../components/Image';
import List from '../../components/List';
import ListItem from '../../components/ListItem';
import Container from '../.... |
var express = require('express');
var Word = require('../services/word');
var router = express.Router();
var mongoose = require('mongoose');
function isMongoId(req, res, next) {
if (!mongoose.Types.ObjectId.isValid(req.params.id)) {
return res.status(400).send({
success: false,
msg:... |
angular
.module("hotel.service", [])
.factory('hotel', ['$http', 'auth', function($http, auth) {
// Might use a resource here that returns a JSON array
var headers = {};
headers[API.token_name] = auth.getToken();
var dataHotel = {};
dataHotel.getHoteles = function() {
... |
import { graphql, useStaticQuery, navigate } from "gatsby"
import React from "react"
import Select from "react-select"
import makeAnimated from "react-select/animated"
import { theme } from "../utils/styles"
const animatedComponents = makeAnimated()
const styles = {
control: (styles, { isFocused, isSelected }) => (... |
define([
'../module'
],
function (module) {
'use strict';
module.directive('cmnBackButton', cmnBackButton);
cmnBackButton.$inject = ['$ionicConfig', '$window', '$timeout'];
return cmnBackButton;
function cmnBackButton($ionicConfig, $window, $timeout){
var directive = {
restric... |
let hw11_m_cases = {
2: [
[`first_half("foobar")`, "foo"],
[`first_half("hi")`, "h"],
[`first_half("abcdefghijkl")`, "abcdef"]
],
3: [
[`surround("<-->", "use substring")`, "<-use substring->"],
[`surround("####", "hashtag")`, "##hashtag##"],
[`surround("-__-"... |
ns("common") ;
var respParser = common.ajax.responseParser;
function makeDeviceHtml(devices, groupid) {
var muserid = $("#userSensorInfo>em").attr("value");
var html = "";
var devicename = undefined;
var max = 5;
var len = 0;
var checkboxhtml = "";
var selectedCheck = "";
len = devices.length;
if (devices... |
import React from 'react';
import { Box, useInView } from '@sparkpost/matchbox';
import { describe, add } from '@sparkpost/libby-react';
describe('useInView', () => {
add('example usage', () => {
const [ref, inView] = useInView();
React.useLayoutEffect(() => {
if (inView) {
console.log('scroll... |
import React, { Component } from 'react'
import { Jumbotron, Modal } from 'react-bootstrap'
class LogOut extends Component {
state = { show: false }
logOut() {
if (sessionStorage.getItem('jwtToken')) {
sessionStorage.removeItem('jwtToken')
return true
} else return false
}
render() {
return (
<div>... |
describe('Layout', () => {
it('should render non-mobile layout', () => {
cy.viewport(1500, 500);
cy.visit('/iframe.html?path=Layout__annotated-example-in-page&source=false');
cy.get('[data-id="annotated-section"]').should('have.attr', 'width', '0.3333333333333333');
cy.get('[data-id="detail-section"]'... |
var shaders = {}
function compileShader(gl, shaderSource, shaderType) {
// Create the shader object
var shader = gl.createShader(shaderType);
// Set the shader source code.
gl.shaderSource(shader, shaderSource);
// Compile the shader
gl.compileShader(shader);
// Check if it compiled
var success = gl... |
function sum() {
var sum = 0;
var args = [].slice.call(arguments);
args.forEach(function(el) {
sum += el;
});
return sum;
}
Function.prototype.myBind = function(obj) {
var fn = this;
var args = [].slice.call(arguments, 1);
return function() {
args = args.concat([].slice.call(arguments, 0));
... |
const connection = require('./lib/ogmneo');
const nodes = require('./lib/ogmneo-node');
const query = require('./lib/ogmneo-query');
const relations = require('./lib/ogmneo-relation');
const cypher = require('./lib/ogmneo-cypher');
const index = require('./lib/ogmneo-index');
const where = require('./lib/ogmneo-where')... |
var pager_8h =
[
[ "Pager", "structPager.html", "structPager" ],
[ "MUTT_PAGER_NO_FLAGS", "pager_8h.html#a0a536da5cd7ad9b881a8079052853818", null ],
[ "MUTT_SHOWFLAT", "pager_8h.html#a9de40b1f09f9cfecdf91e9caf90d76ae", null ],
[ "MUTT_SHOWCOLOR", "pager_8h.html#a6a24d55872e15f42b6dfcf7d560953e2", null ]... |
var abilities, heros, vaingloryData;
vaingloryData = require('./index.js');
heros = vaingloryData.heros;
abilities = vaingloryData.abilities;
console.log(heros[0]);
/*
{ key: 'adagio', name: 'アダージオ' }
*/
console.log(abilities[0].key);
/*
adagio
*/
|
import React from 'react'
export default function Title({ children, title, subtitle }) {
return (
<div className='mx-2 mb-3'>
<h5 className='is-size-5 has-text-link'>{title}</h5>
<h3 className='has-text-link is-size-3 has-text-weight-bold has-text-link'>
{subtitle}
</h3>
<div styl... |
angular.module("wunderlistApp")
.controller("listCtrl", function ($scope, $http, listsUrl) {
$scope.addNewList = function (newListName) {
if (newListName == undefined || newListName == "") {
alert("You do not lead a list name! Please specify the field for the list name!");
... |
import React, { Component } from 'react';
export default class Controls extends Component{
render() {
return (
<div className="Controls">
<div className="Button">
<i className="fa fa-fw fa-play"></i>
</div>
</div>
)
}
}
|
//获取id,class,tagName
function getId(id) {
return typeof id === "string" ? document.getElementById(id): id;
}
function getClass(sClass, oParent) {
var aClass = [];
var reClass = new RegExp("(^| )" + sClass + "( |$)");
var aElem = getTagName("*", oParent);
for (var i = 0; i < aElem.length; i++) {
reClass.te... |
const path = require('path');
const Dotenv = require('dotenv-webpack');
const TerserJSPlugin = require('terser-webpack-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniC... |
import history from '../history';
import routes from '../constants/routes';
import {
EDIT_TOURNAMENT, TOURNAMENT_CREATED, TOURNAMENT_SAVED, TOURNAMENT_DELETED, SELECT_TOURNAMENT, SELECT_TOURNAMENT_TAB,
EDIT_USER, USER_CREATED, USER_SAVED,
CANCEL_EDIT
} from '../constants/action-types';
const mappings = {
[EDIT... |
// Find the indices wchich add up k in an array
var a = [4, 2, 5, 1, 6, 0, 8, 0, 2],
k = 6,
x = 0,
r = {};
for (var i = 0; i < a.length; i += 1) {
for (var j = (i + 1); j < a.length; j += 1) {
sum = a[i] + a[j];
if (sum == k) {
r[x++] = i + ":" + j;
}
}
}
alert(J... |
(function () {
/**
* Function that search if an object has all the specified methods and all those methods are functions.
*
* @since 4.7.7
*
* @param {Object} obj The object where all the methods might be stored
* @param {Array} methods An array with the name of all the methods to be tested
* @re... |
/// <reference path="Lib/jquery.d.ts"/>
/// <reference path="Lib/knockout.d.ts"/>
/// <reference path="ViewBase.ts"/>
/// <reference path="DynamicViewModel.ts"/>
var CordSharp;
(function (CordSharp) {
var Binder = (function () {
function Binder() {
}
Binder.addBindingAttribute = function (t... |
import React, { PropTypes, Component } from 'react';
import styles from './SelectStations.module.scss';
import cssModules from 'react-css-modules';
import { Snackbar } from 'material-ui';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as StationsActionCreators from '../../ac... |
const request = require('superagent')
const cheerio = require('cheerio')
const fs = require('fs-extra')
const index_fn = async (ctx, next) => {
let url = 'http://www.mmjpg.com/tag/meitui/'
request
.get(url + '1')
.then(function (res) {
console.log(res.text)
})
}
module.exports = {
'GET /repti... |
(function() {
angular.module('Data', ['ngProgress'])
.factory("Data", ['$http', 'ngProgressFactory', '$rootScope', '$q',
function ($http, ngProgressFactory, $rootScope, $q) {
var timestamp = new Date().getTime();
timestamp = '?&i='+timestamp;
var progressBar = ngProgressFactory.createInstance();... |
$(document).ready(function(){
buildFormValidate();
//Form
buildActivityFormSubmit();
buildActivityEditFormSubmit();
//View Activities
buildActivityEdit();
buildActivityDelete();
$('input[name=name]').on('blur', function(){
if (typeof localStorage.edit == "undefined"){
... |
module.exports = function(RED) {
function signalKSendPathValue(config) {
RED.nodes.createNode(this,config);
var node = this;
var app = node.context().global.get('app')
var source = config.name ? 'node-red-' + config.name : 'node-red'
var sentMeta = false
function showStatus(text) {
no... |
/*
Author: Kevin Ward
Class: ASD1211
*/
$("#home").on("pageinit", function() {
console.log("Home page loaded! Yay!");
// Home page code goes here.
$("header nav")
.slideDown()
;
var changePage = function(pageId) {
$('#' + pageId).trigger('pageinit');
$.mobile.changePage($('#' + pageId), {
type:"post",
... |
/*
* JavaScript Custom Forms 1.4.1
*/
jcf = {
// global options
modules: {},
plugins: {},
baseOptions: {
unselectableClass:'jcf-unselectable',
labelActiveClass:'jcf-label-active',
labelDisabledClass:'jcf-label-disabled',
classPrefix: 'jcf-class-',
hiddenClass:'jcf-hidden',
focusClass:'jcf-focus',
w... |
/* eslint-disable no-unused-vars */
import Vue from 'vue';
import Vuex from 'vuex';
import { mount } from 'avoriaz';
import Home from '@/components/Home';
/* eslint-enable no-unused-vars */
Vue.use(Vuex);
describe('Home.vue', () => {
let store = null;
it('should render correct contents', () => {
store = new V... |
export const MODEL_SELECT_REQUEST_REFERENCE = {
header: "",
fields: [
{
title: "Company Name",
key: "comName",
placeholder: "Company Name",
validation: false,
messageError: "",
columnField: true,
type: "select",
canEdit: true,
onChange: null
},
{
... |
'use strict';
const path = require('path');
const pkg = require(path.join(__dirname, '/../package.json'));
const abiMap = require(path.join(__dirname, '/../abi-map.json'));
const os = require('os');
const Utils = require('./utils').Utils;
const ProfileRecorder = require('./profile_recorder').ProfileRecorder;
const Sam... |
// import IframeResizer from 'iframe-resizer-react'
// const Code = (props) => {
// let lang = props.data.lang;
// const code = RichText.asText(props.data.code);
// return (
// <div>
// <IframeResizer
// src={`https://nnja-carbon.now.sh/embed?code=${code}&l=${lang}&bg=rgba(255%2C255... |
const utils1 = require("../../../modules/IMPmodules/util")
const util = new utils1()
function collisions2player(entities, i, j) {
entity_1 = entities[i]
entity_2 = entities[j]
if (entity_1 && entity_2) {
if (entity_2.type == 40) {
if (entity_1.type == 2 || entity_1.class == "Food"... |
export const SHOW_ALERT = 'SHOW_ALERT';
export const HIDE_ALERT = 'HIDE_ALERT';
export const GET_CARS = 'GET_CARS';
export const SET_CAR_STATUS = 'SET_CAR_STATUS';
export const SET_LOADING = 'SET_LOADING';
|
#!/usr/bin/env node
import start from '../fileSystem_function';
start(); |
/**
This is a Book class object created to be consumed and generate 5 different books
*/
class Book {
//Attributes
constructor(name, author, genre, price, pagesNumber, selling) {
(this.name = name),
(this.author = author),
(this.genre = genre),
(this.price = price),
(this.pagesNumber =... |
import React from 'react';
class Logout extends React.Component {
click = ( ) => {
localStorage.clear()
this.props.history.push('/')
// <div className='log-out-div'>
// <button onClick={this.click}>logout</button>
// </div>
}
render() {
return (
<div className='log-out-div' onCli... |
'use strict';
import React, {Component} from 'react';
export class CardTitleInput extends Component{
constructor(props) {
super(props);
this.state = {
item: props.item
};
this.handleTitleChange = this.handleTitleChange.bind(this);
this.onUpdate = props.onUpdate;... |
import React from "react";
// react component that copies the given text inside your clipboard
// import { CopyToClipboard } from "react-copy-to-clipboard";
// reactstrap components
import { } from "reactstrap";
// core components
import Header from "components/Headers/Header.js";
// reactstrap components
import {
... |
import React from "react";
import withStyles from "@material-ui/core/styles/withStyles";
import { styles } from "../styles/modalStyles";
import { Typography } from "@material-ui/core";
import {
FacebookIcon,
TwitterIcon,
TwitterShareButton,
EmailShareButton,
FacebookShareButton,
EmailIcon
} from ... |
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Box, TextInput } from 'grommet';
import KeyboardEventHandler from 'react-keyboard-event-handler';
import Button from 'UI/Button';
import { Label } from 'UI/Labels';
import { Tag, Close } from 'grommet-icons';
// eslint-disa... |
/*
** 右键菜单
*/
HROS.popupMenu = (function () {
return {
init: function () {
$('.popup-menu').on('contextmenu', function () {
return false;
});
//动态控制多级菜单的显示位置
$('body').on('mouseenter', '.popup-menu li', function () {
if ($(this... |
import React from 'react'
import ReactDOM from 'react-dom'
import { Link } from 'react-router-dom'
class Button extends React.Component {
constructor(props) {
super(props)
this.state= {
active: false
}
}
handleMouseOver = (e) => {
if(e.target.classList.contains('btn-style-1')) {
this.setState({
a... |
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
browserify: {
dist: {
src: 'js/main.js',
dest: 'build/build.js'
}
}
});
Object.keys(pkg.devDependencies).forEach(function (devDep... |
/*EXPECTED
42
*/
class _Main {
static function main(args : string[]) : void {
[ [42] ].forEach((item) -> {
log item.join(", ");
});
}
}
// vim: set expandtab tabstop=2 shiftwidth=2 ft=jsx:
|
var weatherStation = {
update: [],
addObserver: function(f) {
this.update.push(f);
},
notify: function() {
for (var i = 0; i < this.update.length; i++) {
var f = this.update[i];
f.apply(this, arguments);
}
}
};
weatherStation.addObserver(function(weat... |
import Helpers from './Helpers';
// import useSound from 'use-sound';
// import boop from '../../sounds/boop.mp3';
const Socket = () => {
const [CreateElement] = Helpers();
// const [emitBoop] = useSound(
// boop,
// { volume: 0.25 }
// );
const postMessage = (emittedUser, emittedMessage, userClass... |
{
"version": 1586742186,
"fileList": [
"data.js",
"c2runtime.js",
"jquery-2.1.1.min.js",
"offlineClient.js",
"images/sprite-sheet0.png",
"images/regis-sheet0.png",
"images/sprite3-sheet0.png",
"images/sprite4-sheet0.png",
"images/saka.png",
"media/theme (online-audio-converter.com) (1).ogg",
"i... |
const JenisHarga = require(model + 'guru/jenis-harga.model')
async function index(req,res){
let data = await JenisHarga.query()
this.responseSuccess({
code:200,
status: true,
values: data,
message: 'Data Jenis Harga Berhasil di Dapatkan'
})
}
async function store(req,res){... |
const {db}=require('./db/models')
const {app}=require('./server')
const start=async()=>{
try{
await db.sync();
app.listen(3131,()=>{
console.log("Server started")
})
}
catch(e){
console.error(e)
}
}
start() |
'use strict';
var path = require('path');
var yeoman = require('yeoman-generator');
var assert = require('yeoman-generator').assert;
var helpers = require('yeoman-generator').test;
var os = require('os');
var fs = require('fs');
var mkdirp = require('mkdirp');
describe('angularwebpackgenerator:app', function () {
... |
import React from 'react';
import { View, Text, StyleSheet, Button } from 'react-native';
import { Navigation } from 'react-native-navigation';
export class HomeScreen extends React.Component {
goToSecond = () => {
Navigation.showModal({
stack: {
children: [{
component: {
nam... |
import { Link } from "react-router-dom";
import Like from "./common/like.jsx";
import Table from "./table";
const FoodsTable = ({
items = [],
onToggleLike,
onDelete,
sortColumn,
onSort,
}) => {
const columns = [
{
label: "Title",
path: "title",
content: (food) => <Link to={`/foods/${... |
const express = require('express');
const app = express();
const path = require('path');
const passport = require('./server_modules/passport');
const profileRoute = require('./server_modules/routes/profile');
const searchRoute = require('./server_modules/routes/searchRoute');
const bodyParser = require('body-parser');... |
import { useEffect, useState } from "react";
import walpaper from '../img/walpaper.jpg'
const BASE_URL = 'https://api.themoviedb.org/3/trending/all/day?'
const KEY = 'api_key=cc6ee35910514ca0be06cec0f3330408'
function Movies() {
const [trendingMovies, setTrendingMovies] = useState([])
useEffect(() => {
c... |
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
const home = () => import('views/home/home');
const cart = () => import('views/cart/cart');
const category = () => import('views/category/category');
const profile = () => import('views/profile/profile');
const routes=[
{path:'/home',componen... |
var counter = 1 // This is a 'counter' variable.
var total = 0 // This is our utility variable, 'total'
while (counter <= 10) { // If the condition is true, it enters the loop
total = total + counter // We add the current value of 'counter' to 'total'
counter = counter + 1 ... |
import express from "express";
import levelSchema from "../model/model.level";
const router = express.Router();
// router.use("/", getLevel);
// function getLevel() {
router.get("/", async (req, res, next) => {
console.log("GET Route /");
try {
let result = await levelSchema.find();
res.status(200).send... |
import axios from 'axios'
import * as Loading from "./loading";
import {Message} from "element-ui";
export function request(config) {
// 1.创建axios的实例
// axios.create返回的是一个函数,当用小括号调用时,返回的是一个Promise
const instance = axios.create({
baseURL: 'http://www.phpdemo.com',
timeout: 5000,
headers: {
'Conte... |
function mash(){
return "You will live in a " + getHouse() + " , travel to " + getTravelCount() + " countries, have a pet named "+ getPet() +
", and go to " + getdestination();
}
function ranNumGenerator(Num1){
let ranDecimal = Math.random();
let randNum = ranDecimal * Num1;
let ranInteger =... |
const dbConn = require('../config/db');
// Constula básica para obtener todas las categorias de la tabla 'category' , sin filtros
const SQL_FIND_ALL = "SELECT * FROM category";
const SQL_ADD = "INSERT INTO category set ?";
const SQL_EDIT = "SELECT * FROM category WHERE category_id = ?";
const SQL_UPDATE = "UPDATE ca... |
var searchData=
[
['wczytaj',['wczytaj',['../class_collar.html#afc3896d8ee90af37df36c85e79618708',1,'Collar::wczytaj()'],['../class_dog.html#ac733e8051c2b086366871ad8b037873c',1,'Dog::wczytaj()']]]
];
|
var generate = function (number) {
switch (number) {
case 1:
window.location.href = "https://www.php.net/";
break;
case 2:
window.location.href = "https://kotlinlang.org/";
break;
case 3:
window.location.href = "https://www.javascri... |
exports.contactTemplate = event => {
const {
emailAddress,
galleryPieceLink,
galleryPieceName,
message,
name,
phoneNumber,
website
} = event;
let html = "";
html += `
<html>
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Cont... |
import axios from 'axios'
const marvelAPI = axios.create({
baseURL : 'http://gateway.marvel.com/v1/public',
headers :{
Accept : 'application/json',
'Content-Type' : 'application/json'
},
timeout : 10000
})
marvelAPI.defaults.params = {
apiKey : 'bda12c2070a7b1fd1ea89ad1... |
/*
* Trial databases
*/
app.component('prmSearchResultJournalIndicationLineAfter', {
bindings: { parentCtrl: '<' },
controller: 'prmSearchResultJournalIndicationLineAfter',
template: `<div class="trial-indicator"></div>`,
});
app.controller('prmSearchResultJournalIndicationLineAfter', ['$scope', '$root... |
import Koa from "koa";
import bodyParser from "koa-bodyparser";
import convert from "koa-convert";
import logger from "koa-logger";
import mongoose from "mongoose";
import cors from "koa-cors";
import setUpPassport from "../src/middleware/passport";
import { errorMiddleware } from "../src/middleware";
import config fro... |
import * as wss from "./wss.js";
import * as webRTCHandler from "./webRTCHandler.js";
import * as ui from "./ui.js";
let strangerCallType;
export const changeStrangerConnectionStatus = (status) => {
const data = { status };
wss.changeClusterAConnectionStatus(data);
};
// ClusterB Connection status
ex... |
let path = require('path');
let express = require('express');
let cors = require('cors');
const SDC = require('statsd-client');
let sdc = new SDC({host: '192.168.0.100', port: process.env.STATSD_PORT || 8125, debug: false});
let app = express();
let staticPath = path.join(__dirname, '/');
app.use(cors());
app.use(e... |
//helper class for custom XR events
class Event {
constructor(name) {
this.name = name;
this.callbacks = [];
}
registerCallback(callback) {
this.callbacks.push(callback);
}
}
class EventHandler {
constructor() {
this.events = {};
}
registerEvent(eventName) {
var event = new Event(eve... |
import addZero from './addZero.js';
export const musicPlayerInit = () => {
const audio = document.querySelector('.audio');
const audioPlayer = document.querySelector('.audio-player');
const audioImg = document.querySelector('.audio-img');
const audioHeader = document.querySelector('.audio-header');
const audioButtonPla... |
/*
* @Description: 常规路线
* @Author: 彭善智
* @LastEditors: 彭善智
* @Date: 2019-04-24 18:26:49
* @LastEditTime: 2019-05-15 10:41:26
*/
import { getRoutePriceDetails } from 'getData'
import { nowDate, copy } from 'utils/common'
const state = {
calendarDate: "", //日期信息
opt: "", //日期列表
sureDate: "", ... |
function odswierzanie_cpr()
{
var zegarek= new Date();
var sekunda = zegarek.getSeconds();
var sekunda_wynik= zegarek.sekunda_wynik;
sekunda_wynik= 59-sekunda;
if (sekunda_wynik<10) sekunda_wynik = "0"+sekunda_wynik;
var min = zegarek.getMinutes();
var min_minus= 60;
... |
import checksum, { getOddPositions, getEvenPositions, getSum} from './checksum';
it('checksum returns correct value as per documentation', () => {
expect(checksum('8533218192162301367')).toEqual(3);
});
it('filter odd positions', () => {
expect(getOddPositions([1, 2, 3, 4, 5])).toEqual([2,4]);
});
it('filter... |
const DB = require("./DB");
const Order = require("./Orders");
let id = 0;
//GENERATING USER ID STARTING FROM 1
function idGenerator() {
id == 0 ? (id = 1) : (id = ++id);
return id;
}
function User(name, email, password) {
this.id = idGenerator();
this.name = name;
this.email = email;
this.password ... |
import * as R from "ramda";
import { recipeTypes } from "./types";
const initialState = {
items: {},
};
export const recipeReducer = (state = initialState, action) => {
switch (action.type) {
case recipeTypes.RECIPE_GET_ITEMS_SUCCESS: {
const items = R.indexBy(R.prop("id"))(action.payload);
retur... |
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import { getArrivalsToStop, getStopData } from '../../helpers/fetchUtils';
import { Map } from '../Map/Map';
import { Loading } from '../Loading/Loading';
import { LineItem } from '../LineItem/Li... |
class Configer {
constructor () {};
static SOURCE_GAME_WIDTH = 750;
static SOURCE_GAME_HEIGHT =1334;
static GAME_WIDTH = Configer.SOURCE_GAME_WIDTH;
static GAME_HEIGHT = Configer.SOURCE_GAME_HEIGHT;
static HALF_GAME_WIDTH = Configer.GAME_WIDTH * .5;
static HALF_GAME_HEIGHT = Configer.GAME_HE... |
/*
*@desc the Subscriber container used by REDUX
*@author Sylvia Onwukwe
*/
import { connect } from "react-redux";
import SubscribersComponent from "../../Admin/AllSubscribers/allSubscribers";
import {
fetchSubscribers,
deleteSubscriber
} from "../../actions/actions_admin_subscribers"
const mapStateToProps = stat... |
import YoutubePlaylistAdapter from 'ember-youtube-data-model/adapters/youtube/playlist';
export default YoutubePlaylistAdapter;
|
import WItems from "./WItems.js";
import { observer } from "mobx-react";
import styled from "styled-components";
import { useState } from "react";
const List = styled.div`
padding: 10px;
display: grid;
float: left;
font-size: 13pt;
margin-right: 30px;
background: #f2f3f5;
width: 400px;
`;
const Title = ... |
const staticData = require('./staticData');
const getCategoryResponse = (category = '') => {
const tasks = staticData.hasOwnProperty(category) ? staticData[category] : [];
const hasTasks = tasks.length > 0;
return {
status: hasTasks ? 200 : 404,
categoryName: category.toString(),
totalResults: tas... |
import React, {Fragment} from 'react';
import {Form, Input, InputNumber, Upload, DatePicker, Icon, Button, Select, message, Switch} from 'antd';
import moment from 'moment';
const Option = Select.Option;
const FormItem = Form.Item;
const {TextArea} = Input;
const BasicInfo = ({form, wEmpresa, editAnimal, handleEm... |
function ShootingStars( position, velocity ){
this.position = position;
this.velocity = velocity.normalize();
this.velocity.mult(random(20, 60));
}
ShootingStars.prototype.show = function(){
fill(255);
ellipse(this.position.x, this.position.y, 1, 1);
}
ShootingStars.prototype.update = function(){
this.position.... |
'use strict';
var assign = require('object-assign');
hexo.config.calendar = assign({
single: true,
root: 'calendar/'
}, hexo.config.calendar);
hexo.extend.generator.register('calendar', require('./lib/generator'));
|
import React, {Component} from 'react';
import { Route, NavLink } from 'react-router-dom';
import WorkSpaceCard from '../components/WorkSpaceCard'
class DocumentsShow extends Component {
render() {
const {match, documents} = this.props
return (
<div>
{documents.map(document => (
... |
/*
*
* productInfoService.js
*
* Copyright (c) 2016 HEB
* All rights reserved.
*
* This software is the confidential and proprietary information
* of HEB.
*
*
*/
'use strict';
/**
* Constructs a service to pass data between a hosting controller and the product information panel.
*/
(function(){... |
import $ from 'jquery'
module.exports = (str) => {
var pagetop = $(str)
pagetop.on('click', () => {
$('html,body').animate(
{
scrollTop: '0'
},
1000,
'easeOutExpo'
)
})
}
|
;(function(Date) {
var test_date = new Date('2000')
, offset = test_date.getTimezoneOffset()
, offset_hour = Math.abs(Math.floor(offset / 60))
, offset_minute = Math.abs(offset % 60)
, isodate = /^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?:\:(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:?\d{2}))?$/
if(of... |
export function initialize(container, application) {
//application.deferReadiness();
//
var session = container.lookup('session:current-user');
debugger;
if (session.access_token) {
$.ajaxSetup({
headers: { "Authorization": "Bearer " + session.access_token }
});
}
... |
'use strict';
// 首页控制器
app.controller('HomeController', ['$scope','$state', '$cookieStore',
function($scope,$state, $cookieStore) {
var cookie = $cookieStore.get('username');
console.log(cookie);
if(!cookie){
$state.go('access.signin');
return;
}
//left menu Array
$scope.ini... |
$(document).ready(function() {
$('#mail_smtpauth').change(function () {
if (!this.checked) {
$('#mail_credentials').addClass('hidden');
} else {
$('#mail_credentials').removeClass('hidden');
}
});
$('#mail_smtpmode').change(function () {
if ($(this).val() !== 'smtp') {
$('#setting_smtpauth').addCl... |
const GROUND_COVER = {
url: 'images/groundcover',
description: 'ground cover'
}
const PAVERS = {
url: 'images/pavers',
description: 'pavers'
}
const TURF = {
url: 'images/grass',
description: 'turf'
}
const LOGO = {
url: 'images/yardzen-logo-black',
description: 'Yardzen logo'
}
const HANGING_LIGHT ... |
import React from 'react';
import GoogleMapReact from 'google-map-react';
import './map.css';
const Marker = () => (
<div className="drawnMarker"></div>
);
const API = {
KEY_GOOGLE: 'AIzaSyBEf_H_vpLcCgnZT2Z_EQ4eGiq5THzGz1k',
LANGUAGE: 'en'
};
const MAPDATA = {
ZOOM: 15,
LAT: 35.6895000,
LNG: 139.6917100
... |
// 自定义组件名, 组件 json vue
Vue.component( 'page-head' , {
// 反引号 Esc 下面的那个按键, 反引号定义的字符串, 内部可以换行, 不需要拼接字符串
// 这里没错, 是外面的 detail.html 页面代码的问题,已经修改
template : `
<div class="container header">
<div class="span5">
<div class="logo">
<a href="index.html">
<img src="image/r__________... |
import React from 'react';
import { Link } from 'react-router-dom';
const NavBar = props => (
<nav className="light-blue lighten-1" role="navigation">
<div className="nav-wrapper container">
<Link id="logo-container" className="brand-logo" to="/">
<i className="material-icons">local_library</i> MHA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.