text
stringlengths
7
3.69M
import {request} from './request' export function getAgentList() { return request({ url:'/getAgentList' }); }
define([ "backbone", "modules/finger/finger-model" ], function (Backbone, FingerModel) { "use strict"; var Fingers = Backbone.Collection.extend({ model: FingerModel }); return Fingers; });
// format = [time at the start stop] or // [time, other] or // [time, start_stop, end_stop, other] STSP_orange_main_stop_name = ["Park 17<br />商場","馨園<br />宿舍","南科<br />實中","民生<br />水塔","臺鐵<br />南科站","南科<br />實中","社區<br />中心","西拉雅<br />廣場","台積電","群創<br />B廠","聯電","Park 17<br />商場"]; STSP_orange_main_stop_time_consume =...
var Shortcodes = require('smiley-caret-data/shortcodes'); module.exports = (function () { var exports = {}; var _sets = getSets(Shortcodes); function getSets(list) { var sets = []; for (var code in list) { for (var i = 0; i < code.length; i++) { sets[i] = sets...
/* * Origin Builder Project * * * * Must obtain permission before using this script in any other purpose * * or.tools.js * */ ( function($){ if( typeof( or ) == 'undefined' ) window.or = {}; $().extend( or.tools, { esc_slug : function (str){ if( str === undefined ) return 'origin-bui...
/** * Created by John on 2015-10-02. */ var express = require('express'); var url = require('url'); var path=require('path'); var swig=require('swig'); var bodyParser = require('body-parser'); var app = express(); app.use(express.static(path.join(__dirname, 'public'))); //设置模块引擎 app.engine('html',swig.renderFile); ap...
$(".dropdown").mouseover(function () { $(this).addClass("show").find(".dropdown-menu").addClass("show"); }); $(".dropdown .dropdown-menu").mouseout(function () { $(this).removeClass("show").parent(".dropdown").removeClass("show") }); function signout() { alert("您已退出登录"); window.location.href="/S...
import React from "react" import { connect } from "react-redux" import Link from "../../components/Link/index"; import CensorWord from "../CensoredWords/Index" import Image from "../Image/Index" import { renderToString } from 'react-dom/server' import Translate from "../../components/Translate/Index" class Season ex...
module.exports = function(grunt) { "use strict"; grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), watch: { ts: { files: ["src/\*\*/\*.ts"], tasks: ["newer:ts:src"] }, public: { files: ["public/js/\*\*/\*.ts"], tasks: ["newer:ts:public", "newer:u...
import {Value} from 'slate'; const questionDescription = JSON.stringify({ document: { nodes: [ { object: 'block', type: 'paragraph', nodes: [ { object: 'text', leaves: [ { text: '', }, ], }, ], }, ], }, }); const optionA= JSON.stringify({ d...
"use strict"; var twitter = require('ntwitter'); var when = require('when'); var _ = require('underscore'); var config = require('./config'); var processor = require('./process'); var TIME_BETWEEN_REQUESTS = 60*1000; // var TIME_BETWEEN_REQUESTS = 300;//TODO: change to once a minute var twit = new twitter(config.twi...
import axios from 'axios' export default { // 保存接口 save (params) { return axios.post('/myTask/save', params) }, // 更新接口 update (params) { return axios.post('/myTask/update', params) }, // 保存接口 saveTaskToSelf (params) { return axios.post('/myTask/saveTaskToSelf', params) }, // 通过候选人id查询 ...
var express = require("express"), router = express.Router({mergeParams: true}), Recipe = require("../models/recipe"), Comment = require("../models/comment"); middleware = require("../middleware"); //new comment form router.get("/new", middleware.isLoggedIn, f...
import React, { useState, useEffect } from 'react'; import { CSSTransitionGroup } from 'react-transition-group'; import { getDefaultState, getSets, isSet, getFormattedTime, getSetAnalysis, localStorageName } from './_util'; import SetHelp from './SetHelp'; import SetCard from './SetCard'; import SetsPossible from './S...
import React, {Component} from 'react'; import {Row, Col, Form} from 'antd'; import {QueryBar, FormElement} from '../../../index'; @Form.create() export default class Base extends Component { state = { collapsed: true }; handleCollapsedChange = (collapsed) => this.setState({collapsed}); rende...
/** * Created by ShriRam on 2/17/2017. */ //inc export function increment (index) { //noinspection JSAnnotator,JSAnnotator return { type: "INCREMENT_LIKES", index } } export function addComment(postId,author,comment){ return{ type:"ADD_COMMENT", postId, author...
$(function(){ //header里的微信二维码 $("#header .header .left .weixin").hover( function(){ $(this).find("img").show(); }, function(){ $(this).find("img").hide(); } ); //轮播图 var ord = 1; var myTimer = null; //下一张 function nextImg(){ ord++; if(ord>4){ $("#button li").eq(0).addClass("active").sibling...
var express = require('express'); var router = express.Router(); router.get('/', function(req, res, next) { res.render('home', { newPosts: [ { image: "images/a.jpg", title: "post1", href: "#" },{ image: "images/a.jpg...
import React from "react" import { Switch, Route, Redirect } from "react-router" import Home from "./home/Home" import Classroom from "./Classroom/Classroom" import Exit from "./Exit/Exit" import Logo from "./templates/Logo" import Nav from "./templates/Nav" import Footer from "./templates/Footer" export default prop...
import React from 'react' import { View, Text, StyleSheet, Image } from 'react-native' import { colors } from '../utils/index' import Forecast from './Forecast' // import moment from 'moment' const { PRIMARY_COLOR, SECONDARY_COLOR } = colors function convertTime(unixTime){ let dt = new Date(unixTime * 1000) l...
module.exports = { "env": { "node": true }, "extends": [ "eslint:recommended", ], "globals": { "Promise": 1 }, "parserOptions": { "ecmaVersion": 2018, "sourceType": "module" }, "rules": { "no-console":[ 0 ], "indent": [ 1, 2, {"SwitchCase": 1} ], "...
/** * Eventually this handler will be responsible for * determining what features a user has access to */ export default async function handler(_req, res) { let flags = []; // if (process.env.VERCEL_ENV === "development") { // flags.push("next"); // } res.json(flags); }
/* initialize suggest counters */ cur_sel_index = 0 max_sel_itms = 0 last_search_str = 'undefined' /* keeping last search string in order to skip ajax calls */ cur_sel_item_legth = 0 /* the lenght of the selected suggested item */ cur_attr_num = 1 /* pos handler when editing html tag */ cur_max_attrs_num = 0 /* counte...
import Decorations from './Decorations'; export default Decorations;
var video, player, events, filteredEvents, occurInOrder, count, attachListeners, contentUrl; filteredEvents = { contenttimeupdate: 1, contentprogress: 1, contentwaiting: 1, contentsuspend: 1, adtimeupdate: 1, adprogress: 1, adwaiting: 1, adsuspend: 1, timeupdate: 1, progress: 1, waiting: 1, sus...
import axios from 'axios' /** * Encode url for GET request * @param data * @returns {string} */ function encodeData (data) { return Object.keys(data) .map(key => [key, data[key]].map(encodeURIComponent).join('=')) .join('&') } /** * Utility to format a promise whatever the method is (support GET POST P...
import auth from './auth'; import { merge } from 'lodash'; import models from '../db/models'; export default { typeDefs: [auth.typeDefs].join(' '), resolvers: merge({}, auth.resolvers), context: req => ({ ...req, models }) };
app.controller("orderUpdateStateModelController",['$scope','$http','$modalInstance','orderStateService','id','orderState',function($scope,$http,$modalInstance,orderStateService,id,orderState){ $scope.formData = {} ; $scope.state = orderStateService.getOrderState(orderState) ; $scope.submit = function(){ $ht...
import uuidv4 from 'uuid/v4'; import { ADD_POST, DELETE_POST } from './types'; //import { newBook, saveBook, fetchBook, updateBook } //from '../actions/book-actions'; import axios from "axios"; //import {backendurl} from './index'; const url = '/books' const BASE_URL = "http://localhost:8090"; export function ...
import React from 'react'; import {Carousel} from "react-bootstrap"; import first from "../../assets/images/westbound-web-banner-1.jpg"; import second from "../../assets/images/harpoon-web-banner.jpg"; import third from "../../assets/images/Rider-hero-1-NEW-copy.jpg"; const CarouselHome = () => { return ( ...
import { createStore, applyMiddleware } from 'redux'; import { createLogger } from 'redux-logger'; import createSagaMiddleware from 'redux-saga'; import { composeWithDevTools } from 'redux-devtools-extension'; import rootReducer from 'src/rootReducer'; import { initSagas } from 'src/rootSagas'; const sagaMiddleware =...
angular.module('starter') .factory('Formulaire', ['storage', '$q','remoteStorage', 'storage', function(localStorage, $q, remoteStorage, storage) { var formsPromise = null; var formsProductsPromise = null; return { load: function () { //for debug formsProductsPromise = remot...
"use strict"; const mods = [ "shellfish/low", "shellfish/mid", "shellfish/high", "shell/ui", "shell/files" ]; require(mods, function (low, mid, high, ui, files) { function formatTime(seconds) { var t = seconds; var hsecs = Math.floor(t * 100) % 100; var secs = Math....
import React from 'react'; import Button from './Button.jsx'; import Store from '../stores/Store.jsx'; import uiConfig from '../utils/uiConfig.jsx'; import Actions from '../actions/Actions.jsx'; function getState() { return { header: Store.getHeader(), footer: Store.getFooter(), section: Store.getSecti...
/*Change LOG 10/10/16 - Added detection for certain UPS shipping methods and express = T for PTS orders. Auto-approve will be skipped. 3/2/17 - Added If Billto!=shipto and payment method != paypal auto approve 3/3/17 - Added if created from is estimate, then auto approve SO 5/19/17 - Added paymenteventresult !...
import React, { Component } from "react"; import SuspectDataService from "../../services/suspect.service"; import UserService from "../../services/user.service"; import Form from "react-validation/build/form"; import Input from "react-validation/build/input"; import TextArea from "react-validation/build/textarea"; impo...
import { deletePalette } from './deletePalette'; import { hasError, setMessage } from '../actions'; describe('deletePalette', () => { let mockPalette let mockDispatch let mockMessage beforeEach(() => { mockMessage = 'Deleted palette with id 68' mockPalette = { palette_name: "one", palette...
import React, { useState, Component, useEffect } from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { makeStyles } from '@material-ui/styles'; import { Card, CardHeader, CardContent, CardActions, Divider, Button, TextField } from '@material-ui/core'; import { ...
const MongoClient = require('mongodb').MongoClient; const url = 'mongodb://localhost:27017'; const dbName = 'mydb'; // Database name const colName = 'products'; const client = new MongoClient(url); // Define a sequence of db operations const docArray = [ { id: 1, name: "Thor T-Shirt", desc...
import Sequelize from 'sequelize' import db from '../connect' const Story = db.define( 'story', { id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, primaryKey: true }, title: { type: Sequelize.STRING, allowNull: false, defaultValue: '' }, descriptio...
var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); var color = "red" ctx.beginPath() ctx.strokeStyle=color ctx.lineWidth = 4 ctx.arc(300,200,40,0, 2*Math.PI) ctx.stroke() canvas.addEventListener("mousedown", my_mousedown) function my_mousedown (e) { mouse_x = e....
const seaspec = require("../objects/abilitys/seaspec"); function seaspecuse(aobjids, entities, creator) { if (entities[creator] != undefined) { if (!entities[creator].isdead) { entities[creator].usingability = true var objids = aobjids.giveid(true); var a = new ...
 (function Component (id) {// @lock // Add the code that needs to be shared between components here function constructor (id) { // @region beginComponentDeclaration// @startlock var $comp = this; this.name = 'Manufacturer'; // @endregion// @endlock this.load = function (data) {// @lock // @region namespaceD...
const express = require('express') const bodyParser = require('body-parser') const router = express.Router() module.exports = router const db = require('../db') var csrf = require('csurf') const MIN_DESCRIPTION_LENGTH = 1 const MIN_NAME_LENGTH = 1 var csrfProtection = csrf() function getValidationErrorsForProject(na...
version="prealpha 3.4 - 0.1" baseRessList = [ "Hide", "Ore", "Stone", "Wood", "Meat", ] hideList=[ "Bear", "Cat", ] oreList=[ "Gold", "Silver", "Tin", "Copper", ] stoneList=[ "Alpha", "Beta", "Gamma", ] woodList=[ "Oak", "Birch", "Spruce", "Ash", "Yew", ] meatList=[ "Apple", "Worm", ] functi...
import Types from "../actionTypes"; const loadProducerDetailsRequest = (payload) => ({ type: Types.LOAD_PRODUCER_DETAILS_REQUEST, payload, }); const loadProducerDetailsSuccess = (payload) => ({ type: Types.LOAD_PRODUCER_DETAILS_SUCCESS, payload, }); const loadProducerDetailsFailure = (payload) => ({ type: ...
/* UI build-up: main leftpanel leftpane panel panel-heading meterlist rightpanel panel panel-heading graphbody Data moves from 'main' into both panels and the state is maintained on 'main' Clicking a meter in the left panel will affect the data shown in the right panel. ...
var roleMissionary = { /** @param {Creep} creep **/ run: function(creep, village) { if (creep.spawning) { return; } if (creep.memory.getBoosted.length > 0) { if (creep.memory.lab) { let myLab = Game.getObjectById(creep.memory.lab); ...
import React, {Component} from 'react' import {ImagePickerIOS, TouchableOpacity, Image, Modal, View, Text, LayoutAnimation, ActionSheetIOS, Alert, ImageEditor} from 'react-native' import styles from './styles' import ImageCropModal from './ImageCropModal' // style= {styles.modal} class ProfileImage extends Component ...
export default { login: config => { let data = JSON.parse(config.body) let userList = {} if (data.userName === 'admin') { userList = { token: 'Admin', name: '管理员' } } else if (data.userName === 'user') { userList = {...
function componentApp() { //1) Standart h1 Elemt in React let title = React.createElement( "h1", { key: "headerApp", style: { color: "red", border: "1px solid black" }, id: "headApp" }, "App Header" ); //02) Inner Component let sub = React.createElement(componentSub, { key: ...
function updateInventory(arr1, arr2) { // Convert our arrays into objects to update and then convert back into array. let inventory = {}; for(let i = 0; i < arr1.length; i++) { if(!inventory.hasOwnProperty(arr1[i][1])) { inventory[arr1[i][1]] = arr1[i][0]; } } for(let i = 0; i < arr2.le...
// find // findIndex // indexOf // includes function linear_search(arr, val) { for (let i = 0; i < arr.length; i++) { const element = arr[i] if (element == val) return i } return -1 } console.log(linear_search([1, 2, 3, 4, 5, 6, 7, 8], 8))
const baseApi = (process.env.VUE_APP_API_SERVER || '') + '/rest/site/fe/user/notice' export default function create(tmsAxios) { return { uncloseList(siteId, missionId, batchArg) { const { page, size } = batchArg const params = { site: siteId, mission: missionId, page, size } return tmsAxios.g...
import React, { Component } from 'react'; import { fetchCampersData, sortData } from '../functions.js'; import shortid from 'shortid'; import Camper from './Camper'; export default class Leaderboard extends Component { constructor() { super(); this.state = {campers: [ {"username":"forkerino","img":"https://...
$(document).ready(function () { var $el = $('.ee-flip-card'); $el.click(function () { $(this).toggleClass('-flipped'); }).mouseover(function () { if (!hasTouch()) $(this).addClass('-hovered'); }).mouseleave(function () { $(this).removeClass('-hovered'); }); function hasTouch() { ...
setInterval((function() { const serverUrl = 'http://127.0.0.1:3000/directions'; $.get({ url: serverUrl, type: 'GET', success: (direction) => { //console.log(direction) SwimTeam.move(direction); }, error: (err) => console.log("There has been an error getting commands! ", err) ...
import React from 'react'; export default class Ticket extends React.Component { render() { return ( <React.Fragment> <div className="get-more"> <div className="get-more-header row"> <div className="col-6"> ...
import axios from 'axios' const catAPI = axios.create({ baseURL : process.env.API_BASE_URL }) catAPI.defaults.headers['x-api-key'] = process.env.API_KEY export default catAPI console.log(process.env.API_BASE_URL) console.log(process.env.API_KEY) catAPI.get('images/search').then(console.log).catch(console.error) // e...
import React, { useState } from 'react' import { Link as GatsbyLink } from 'gatsby' import { useStaticQuery, graphql } from 'gatsby' import { IoSearchOutline } from 'react-icons/io5' import SearchField from './SearchField' import { GiHamburgerMenu } from 'react-icons/gi' import { GrClose } from 'react-icons/gr' import...
import { Link } from 'react-router-dom'; import { useAuth } from './utilities/AuthContext.js'; import React, { useState } from 'react'; export default function Signup(props) { const [inputs, setInputs] = useState({}); const handleChange = e => setInputs(prevState => ({ ...prevState, [e.target.name]: e.target.v...
$(document).ready(function() { $('#release').click(function() { $('#release').fadeOut(4000); $('#seven').fadeIn(8000) }); });
import React from "react"; import corgiPuppy from "../images/corgi_puppy.jpg"; export function PetCard(props) { return ( <div> <div style={{ paddingBottom: "10px" }}> <b style={{ paddingLeft: "5px", fontSize: "18px" }}>{props.pet.name}</b> </div> <img src={corgiPuppy} className='ui large image' alt='pe...
import React from 'react'; import TermCreate from './TermCreate.jsx'; import { Router, Route, Link, hashHistory } from 'react-router'; import NotificationSystem from 'react-notification-system'; class TermsList extends React.Component { constructor(props) { super(props); this.state = { glossary:...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const blessed_1 = __importDefault(require("blessed")); const helper_1 = __importDefault(require("./helpe...
describe("readFile", function() { var readFile = require("../lib/readfile"); const _ = require("underscore"); it("should be a function", function() { expect(_.isFunction(readFile)).toBe(true); }); it("should convert a given Twine story HTML file into objects", function(done) { var ...
/* eslint-disable react-native/no-inline-styles */ import React from 'react'; import {View, Text} from 'react-native'; import ClickableButton from '../shared/components/ClickableButton'; import BrandLogo from '../shared/components/BrandLogo'; class HomeScreen extends React.Component { render() { const {navigati...
import firebase from "firebase"; import "firebase/database"; let config = { apiKey: "AIzaSyCPXfCHIXaAKBDGATNS2JzFrFnN4e7_cA4", authDomain: "master-d9449.firebaseapp.com", databaseURL: "https://master-d9449-default-rtdb.firebaseio.com", projectId: "master-d9449", storageBucket: "master-d9449.appspot...
/** * 继承6:复制原型继承 * */ function Parent() { this.x = 10; } function Child() { var obj = new Parent(); obj.y = 20; return obj; } var childObj = new Child(); console.log(childObj.x);
const NewsAPI = require('newsapi'); const newsapi = new NewsAPI(process.env.NEWS_API_KEY); module.exports = { topHeadlines(callback) { newsapi.v2.topHeadlines({ language: 'en', pageSize: 49 }) .then((stories) => { let articles = stories.articles; // fill in missing data for ...
if( isFileInURL( "contact" ) ) { displayContact(); } function displayContact() { //this ajax call will get the summary of my profile from LinkedIn, must use jsonp because it is cross domain $.ajax({ url: "https://api.linkedin.com//v1/people/~:(summary)", type: "GET", data...
const express = require("express"); const Router = express.Router(); const mysqlConnetion = require("../model/connection"); //Atılan adım kayıtları Router.post("/get",(req,res)=>{ let date_ob = new Date(); var dateString = date_ob.getFullYear()+"-"+date_ob.getMonth()+"-"+date_ob.getDate(); cons...
const bcrypt = require('bcrypt'); const ServerError = require('../types/ServerError'); const AccessTokens = require('../models').AccessToken; const Scope = require('./Scope').Scope; const User = require('../models').User; function destroyInvalidCookies(req, res, next) { if (req.session.cookies && !req.session.us...
'use strict'; angular.module('webappV2App') .config(function($routeProvider) { $routeProvider .when('/login', { template: '<login></login>' }); });
let div = document.createElement('div') document.body.appendChild(div); div.style.width = "300px"; div.style.height = "200px"; let parrafo = document.createElement('p'); div.appendChild(parrafo); level = 50 div.style.fontSize = level + "px" let texto = document.createTextNode('🎈'); parrafo.appendChild(texto); div....
/* 获取父节点 element.parentNode; 获取子节点: element.firstChild; element.firstElementChild; element.lastChild; element.lastElementChild; 获取兄弟节点 element.previousSibling element.previousElementSibling element.nextSibling eleme...
import React from 'react'; import {shallow, mount} from 'enzyme'; import AddForm from './add-form'; describe('<AddForm />', () => { //smoke test it('Renders without crashing', () => { shallow(<AddForm />); }); //the first test shows how you can make assertions about DOM elements //output by your compo...
jest.mock('../../../../../src/entities/user/createUser'); const { createUser } = require('../../../../../src/services/user'); const { createUser: createUserMock } = require('../../../../../src/entities/user'); const userFixture = { email: 'test@test.com', password: '123456', }; describe('User Service', () => { ...
import React, { Component } from 'react'; class Product extends Component { render() { return ( <div> <div className="col-xs-6 col-sm-6 col-md-6 col-lg-6"> <div className="thumbnail"> <img src="https://cdn.tgdd.vn/Products/Images/42/92962/iphone-6-32gb-gold-hh-600x600.jpg" alt="Ip...
// @depends(dna/prop/Prop) const df = { symbol: '$', productivity: .025, } class Factory extends dna.prop.Prop { constructor(st) { super( augment({}, df, st) ) } next() { // maybe spawn something? if (rnd() < this.productivity && !this._.isOccupied(this.x, this.y)) { ...
import React from 'react' import Icon from './Icon' const NodeCollapsedIcon = props => ( <Icon originalWidth={16} originalHeight={16} {...props}> <g> <rect x='1' y='1' rx='4' width='14' height='14' fill='#f0f0f0' stroke='#b5b5b5' strokeWidth='1' /> <line x1='2' y1='8' x2='14' y2='8' stroke='#b5b5b5' ...
class Pikeman { constructor() { this.hitPoints = 5; this.trainingHitpoints = 3; this.trainingCost = 10; this.upgradeCost = 30; } upgrade() { return new Archer(); } } class Archer { constructor() { this.hitPoints = 10; this.trainingHitpoints = 7...
 var DeliverableModel = function () { this.ID; this.DeliverableID; this.NaturalUnitID; this.NaturalUnitName; this.Assumptions; this.LowCount; this.MedCount; this.HighCount; this.IterationCount; this.UserID; this.PercentComplete; }
import React from 'react'; import Navbar from '../Navbar/Navbar'; import './About.css' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faHandPointRight } from '@fortawesome/free-solid-svg-icons'; const About = () => { return ( <section className="about" style={{ backgroundColor:'#...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var artefactSchema = new Schema({ title : String, creator : String, subject : String, description : String, publisher : String, contributor : String, date : Date, type : String, format : String, identifier : Stri...
export function borderBox() { return ` -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; `; } export function widthFlex(width) { return ` -ms-flex-preferred-size: ${width}; flex-basis: ${width}; max-width: ${width}; `; } export f...
import Vue from 'vue' import Router from 'vue-router' const home = r => require.ensure([], () => r(require('../components/home')), 'home') const shouye = r => require.ensure([], () => r(require('../components/shouye')), 'shouye') const gerenzhongxin = r => require.ensure([], () => r(require('../components/gerenzhongxin...
import ServerProtocol from '../libs/serverProtocol.js' import BattlesModel from '../models/battlesModel.js' import AgreementsModel from '../models/agreementsModel.js' import ChronosModel from '../models/chronosModel.js' import PersonsModel from '../models/personsModel.js' class BattlesProtocol extends ServerProtocol {...
define([ 'fmwk/core/BaseView', 'text!templates/home.html' ], function (root, homeTemplate) { root.app.HomeView = root.BaseView.extend({ el: '#home-view', template: _.template(homeTemplate), initialize: function () { this.$el.html(this.template()); this.video = document.getElementById("hom...
/** * === page === * * created at: Tue Jun 27 2017 18:27:29 GMT+0800 (CST) */ import { React, Page } from 'zola' // import ArticleMap from 'data/article' import AsyncComponent from 'modules/AsyncComponent' import ArticleRender from 'modules/ArticleRender' export default class Index extends Page { render () {...
var mongoose = require('mongoose'), Transaction = mongoose.model('Transaction'); exports.clear = function () { Transaction.remove({}, function (err) { if (err) { console.log(err); } else { console.log('Transaction collection dropped'); } return; }) } ...
var path = require('path'); var webpack = require('webpack'); var DedupePlugin = webpack.optimize.DedupePlugin; var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin; var isDev = process.env.COINS_ENV === 'development'; var clientEntry = path.join(__dirname, 'src', 'client', 'client.js'); var clientOutput = path.join(_...
var products; var productGroups; var currentProduct; ricoApp.config(function ($routeProvider) { $routeProvider. when('/overview', { templateUrl: 'MarketOverview.tpl.html', controller: 'MarketOverviewControll', resolve: { init: ['InitService', function(Init) { ...
export default { namespaced: true, state: { items: [ { name: 'products', title: 'Products' }, { name: 'cart', title: 'Cart' }, { name: 'order', title: 'Checkout' } ] }, getters: { items(state){ return state.items; } }, mutations: { }, actions: { } }
const https = require('https'); const fs = require('fs'); const _exec = require('child_process').exec; function MKVBait(msg){ try { msg.reply('Generating your bait...') const [file, rnum] = [msg.attachments.array()[0].url, Math.floor(Math.random() * 999)] https.get(file, function (response)...
export * from './Home' export * from './Error' export * from './About'
$(document).ready(function () { $('#nav_user').click(function () { $('.chat-sidebar').toggleClass('focus'); }); }); function LikeUnlikeSatus($id) { $.post('/post-like', {'id_article': $id}, function (data) { if(data === 'like'){ $('#status_'+$id +' .like-Unlike').attr('action',...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var positionSchema = new Schema ({ title: { type: String, required: true}, level: { type:Number, required: true}, skills: Array, competencies: Array, nextPositions: Array }); var Position = mongoose.model('Position', positionSchema); mod...
/* eslint new-parens: off */ /* eslint no-console: off */ /* eslint no-unused-vars: off */ const fs = require('fs') const documentClient = new (require('aws-sdk/clients/dynamodb')).DocumentClient({ region: process.argv[2] ? process.argv[2] : 'eu-west-1' }) const env = process.env.ENVIRONMENT || 'dev' const TableName ...
var ssSlides = ['/sierra-friends', "Sierra Friends Camp: more fun than, well, just about anything. Don't believe us? Click here!", '/sierra-friends/trips', "Ready to have the time of your life in some of the most beautiful places on earth? Click to learn about Sierra Friends Camp trips.", '/staff', "Our...