text
stringlengths
7
3.69M
angular.module('cashApp', ['ui.router', 'ngResource', 'ngCookies', 'ui.mask']) .config(['$httpProvider', '$interpolateProvider',function($httpProvider, $interpolateProvider) { $interpolateProvider.startSymbol('{['); $interpolateProvider.endSymbol(']}'); $httpProvider.defaults.xsrfCookieName ...
import { connect } from 'react-redux'; import { createSlice, createSelector } from '@reduxjs/toolkit'; import { VISIBILITY, selectVisibility } from '../visibility/visibilitySlice'; import TodoList from './todoList'; let todoId = 0; const generateId = () => { todoId = todoId + 1; return todoId; }; const todosSli...
import React, {useState, useContext, useEffect, useRef, memo} from 'react'; import { View, StyleSheet, Text, Image, ScrollView, RefreshControl, TouchableNativeFeedback, FlatList, } from 'react-native'; import Layout from '../Layout'; import ThemeContext from '../Context/ThemeContext'; import moment from...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import StarRatings from 'react-star-ratings'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Dimmer, Loader, Segment, Button, Modal, } from 'semantic-ui-react'; import { addRating, fetchRating,...
//pyramid printing for(var i=0;i<=5;i++){ var x=""; for(var j=0;j<=i;j++){ x+="*" } console.log(x) } //inverse pyramid for(var i=5;i>=0;i--){ var x=""; for(var j=0;j<=i;j++){ x+="*" } console.log(x) } //pyramid starting from middle var n=5; var m =...
import React, { Component } from 'react'; import NavBar from './components/appbar'; import Dashboard from './components/dashboard'; import SingleGif from './components/SingleGif'; import About from './components/about'; import {Container} from '@material-ui/core'; import { BrowserRouter as Router, Switch, Route } from ...
const express = require('express'); const app = express(); const router = express.Router(); // Import the location route router.use("/location", require("./location/check_in")); // Import the admin activity route router.use("/admin", require("./admin/index")); // Require user rou...
import React, { useEffect, useState } from 'react'; export default function ChatInfoMsgs({ setElChat, chatsDivideByDates, searchMsgText, setElSearchedMsgs, elSearchedMsgs }) { function checkIsTailed(idx, msgsInfo) { if (idx === 0) return true; return msgsInfo[idx - 1].isYourMes...
/*global JSAV, document */ // Written by Yuhui Lyu and Cliff Shaffer $(document).ready(function() { "use strict"; var av_name = "BinomialTreeCON"; var av = new JSAV(av_name); var xoffset = 300; var yoffset = 15; var circRadius = 10; var c1 = av.g.circle(xoffset + 50, yoffset, circRadius, {"stroke-width": ...
import React from 'react'; import './App.css'; import { Route } from 'react-router-dom' import axios from 'axios' import Players from './components/Players' import Profile from './components/Profile' import Header from './components/Header' import Footer from './components/Footer' import Teams from './components/Teams'...
const books = [ { id: 1, title: 'Детское море', author: 'Николай Варухин', genres: ['Наука', 'Педагогика и воспитания', 'Спорт'], }, { id: 2, title: 'Владычица Озера', author: 'Анджей Сапковский', genres: ['Фэнтези'], }, { id: 3, title: 'Ловец человеков', author: 'Надежда Попова', genres: ['Детект...
import { connect } from 'react-redux' import { push } from 'react-router-redux' import ProjectsListView from './view.js' const mapStateToProps = state => { return { } } const mapDispatchToProps = (dispatch, ownProps) => { return { onProjectClick: (id) => { dispatch(push(`/project/${id}`)) } } } ...
import patchString from "./string" import patchConstructor from "./constructor" const origSource = new WeakMap const origFlags = new WeakMap const applyPatches = () => { patch(global, {RegExp}) } export const addSyntax = fn => { rules.push(fn) patchString() } export const addFlag = fn => { patchFlags() }
import React, { useState } from 'react'; import COUNTER_CONTEXT from './COUNTER_CONTEXT'; import Parent from './PARENT' // import logo from './logo.svg'; // import './App.css'; function GrandParent() { let counter = useState(0); return ( <COUNTER_CONTEXT.Provider value={counter} > <div> <Parent /...
let listaProdutos = []; let camiseta = { tamanho: "unico", cor: "preta", Modelo: "babylook", descricao: "camiseta reprograma estilo diva function", preco: 35, // template string abaixo // descrevaMe: function(){alert(`${this.descricao} - Preço R$ ${this.preco}` )}, } console.log (camiseta.descricao) let caneca = { ...
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import Cookies from 'universal-cookie'; import { parse } from 'query-string'; import axios from 'axios'; var jwt = require('jsonwebtoken'); import App from './components/common/App'; // import DepotsPage from './components/depot/DepotsPage'; c...
import { plugins } from '@citation-js/core' // Loads plugin definitions import output from './output' // Define plugin name (this is how it is referenced in the code) const ref = '@quickstatements' // Registers the plugin // docs: https://citation.js.org/api/tutorial-plugins.html plugins.add(ref, { output })
var gulp = require('gulp'), wiredep = require('wiredep').stream, useref = require('gulp-useref'), gulpif = require('gulp-if'), uglify = require('gulp-uglify'), minifyCss = require('gulp-minify-css'), less = require('gulp-less'), path = require('path'), clean = require('gulp-clean'), ...
/* * Copyright © 2016 Magestore. All rights reserved. * See COPYING.txt for license details. * */ define( [ 'jquery', 'ko', 'mage/translate', 'Magestore_Webpos/js/helper/alert', 'Magestore_Webpos/js/helper/price', 'Magestore_Webpos/js/helper/general', '...
import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import MuiDialogTitle from '@material-ui/core/DialogTitle'; import DialogContent from '@material-ui/core/DialogContent'; import Dialog from '@material-ui/core/Dialog'; import Grid from '@material-ui/cor...
const Cancion = require('../modelo/Cancion'); const fs = require('fs'); const path = require('path'); function AgregarAlbum(req,res){ var cancion = new Cancion(); var parametros = req.body; cancion.caratula = parametros.caratula; cancion.album = parametros.album; cancion.artista = parametros.a...
import React from 'react' import Heading from '../Reuseable/Heading' export default function Contact() { return ( <section className = "py-3"> <Heading title ="Contact Us" /> <div className="col-10 col-sm-8 mx-auto"> <form action="" method ="POST"> <div className="f...
const { Router } = require("express"); const routes = Router(); const categories = require("./categories"); const products = require("./products"); routes.use("/categories", categories); routes.use("/products", products); module.exports = routes;
import React from 'react'; import { Layout } from 'antd'; import { Link } from 'react-router-dom'; import { renderToString } from "react-dom/server"; import decodeHtml from 'decode-html'; import PostApi from "../../services/PostApi"; import ShareButton from '../ShareButton'; import FBComment from '../FBComment'; impor...
var class_label_face_camera_on_y_axis = [ [ "labelGO", "class_label_face_camera_on_y_axis.html#af50f5c5422c9057e75cee8f5917d9d83", null ] ];
import React from "react"; import "./ExpandedImage.css"; const ExpandedImage = ({ title, image, setImage }) => { return ( <div className={"expanded-image"}> <div className={"black-bar expanded-image-header"}> <span data-testid={"expanded-image-title"} className={"expanded-image-...
function initDoomWadThing(context) { /** * Constructor */ var Thing = context.DoomWad.Thing = function(info, thingInfo) { var self = this; self._engine = info.engine(); if (self._engine == "Hexen") { self._size = 20; } else { self._size = 10; } self._x = thingIn...
const xmlns = "http://www.w3.org/2000/svg"; const outlineSVGAttributes = { fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", }; const outlinePathAttributes = { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", }; const solidSVGAttributes = { fill: "currentColor", v...
ko.bindingHandlers.semanticDropdown = { init: function (element, valueAccessor, allBindings, viewModel, bindingContext) { var data = valueAccessor(); if (!data) { data = {}; } data['clearble'] = true; data['placeholder'] = 'Choose...'; $(element).dropdow...
/** * Copyright (c) 2013 Oculus Info Inc. * http://www.oculusinfo.com/ * * Released under the MIT License. * * 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 restrictio...
'use strict'; const math = require('mathjs'); const pkg = require('../package.json'); const request = require('request'); const whilst = require('async/whilst'); const Commerce = require('./commerce').Commerce; const logger = require('./logging').logger; const getTokenFromBody = (body) => { const tokenRegex = /^TOK...
const List = require('../models/list'); // // Create // module.exports.create = async (req, res) => { const list = req.body; const listCreated = new List({ name: list.name, user_id: list.userId }); listCreated.save(function (err) { if (err) return console.log(err); // saved! }) return res...
import classNames from "classnames"; import React from "react"; const Language = ({item, className }) => { const { title, point } = item; return ( <div className="mb-3"> <span>{title}</span> <div className="my-1"> <div className="progress"> <d...
function doDeviceIdentification(event, callback) { var identifiedDeviceEvent = { brand: "google", model: "chrome" }; callback(null, identifiedDeviceEvent); } module.exports = doDeviceIdentification;
$(document).ready(function(){ $(".titleError").hide(); $(".descError").hide(); var newRows = 0; /* // Functionality for the "Show More/Less" button $(".hid").hide(); $("#showToggle").click(function(){ if($(".hid").is(":hidden")) { $(".hid").show(); $(this).html('<button type="...
import React from "react"; import { Paper, LinearProgress, Avatar, Grid } from "@material-ui/core"; import design from "../../assets/Icons/dashboardIcon/design.svg"; import person from "../../assets/Icons/dashboardIcon/person.svg"; import date from "../../assets/Icons/dashboardIcon/date.svg"; import task from "../../as...
define('LobbyClientListener', [ 'createjs', 'Lobby' ], function(createjs, Lobby) { var Listener = function() {}; createjs.EventDispatcher.initialize(Listener.prototype); Listener.prototype.initialize = function (callback) { Lobby.prototype.addEventListener('lobby.enter', function(event) { callback('lobby'...
import React, { Fragment } from 'react'; import { Form } from 'react-bootstrap'; function MainHeader() { return( <Fragment> <div className="blog_main_header"> <div className="blog_tranding_slider"> <div className="swiper-container"> ...
window.addEventListener('load', function(){ var isPC = false; var classname = document.body.className; //ユーザーエージェント振り分けてclass追加 var ua = navigator.userAgent.toLowerCase(); if(ua.indexOf('iphone') != -1 || (ua.indexOf('android') != -1 && ua.indexOf('mobile') != -1)){ //iPhone, Android SPN document.body.className...
export const DB_URL = 'mongodb://localhost/pm102-lecture-9'
/** * */ $(document).ready(function() {menu.getMenu(9); menu.getListBody();}); var font = "用户反馈"; var valids = ["标题", "内容", "状态", "最后修改时间", "最后修改人"]; var sizes = [100, 100, 100, 100, 100]; var contents = ["标题", "内容", "状态", "最后修改时间", "最后修改人"]; var keys = ["title", "content", "status", "last_update_time", ...
'use strict'; /** * We create the object ball * @type {Object} */ var Ball = function (radius, position) { this.radius = radius; this.position = position; this.speed = 0.1; this.changeRightY = false; this.changeLeftY = false; //Direction defines if we need to increment or decrement the move this.direc...
// Generated by CoffeeScript 1.8.0 (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ct...
../../../../../shared/ssr/lib/requests/fetchResponseExtractor.js
export default (row = { original: {} }, column) => { let classes = 'row-cell '; switch (column.Header) { case 'Symbol': classes += 'fixed'; break; case 'Pattern': classes += 'pattern'; break; case 'WaveLength': classes += row.original.WLColor || ''; break; case 'B...
(function(scope, Class, Symbol, InternalSlot, Object) { "use strict"; var EventProperties = InternalSlot("EventProperties"), DefineProperty = Object.defineProperty, Create = Object.create, Prototype = Object.prototype, ToStringTag = Symbol.toStringTag, HasOwnProperty = (function() { var Ha...
import React from "react"; import RatingFilter from "./RatingFilter"; import { connect } from "react-redux"; import { setRating } from "../../../../actions/filters"; import Container from "../PriceFilter/Container"; class RatingFilterContainer extends React.Component { state = { value: undefined, na...
// Dom Elements const items = document.querySelectorAll('.gooey__item'); const rectangle = document.querySelector('.gooey__rectangle'); const container = document.querySelector('.gooey'); const active = document.querySelector('.active'); const itemsArray = Array.from(items); // Co-ords let rectCoords = active.getBound...
var express = require('express') var NodeTTL = require('node-ttl') var os = require('os') var app = express() var ttl = new NodeTTL() // Initializing the arrays var items = []; app.get('/', function (req, res) { res.status(200).send('ok') }); app.get('/stack/add/:item', (req, res) => { // Set value to the item...
const pool = require("../../config/database"); module.exports = { create: (data, callBack) => { pool.query( "insert into coquan(tencq, diachi, dienthoai, fax, email) value(?,?,?,?,?)", [data.tencq, data.diachi, data.dienthoai, data.fax, data.email], (error, results, fields) => { if (err...
/** * Created by Wwei on 2016/9/9. */ Ext.define('Admin.view.resources.Resource', { extend: 'Ext.container.Container', xtype: 'resource', requires: [ 'Ext.form.Panel', 'Ext.layout.container.HBox', 'Ext.tree.Panel', 'Admin.view.resources.ResourceController' ], con...
import ReactDOM from 'react-dom'; import React, { Component } from 'react'; import {createStore} from 'redux'; import {Provider, connect} from 'react-redux'; const reducer = (state = 0, action) => { if (action.type === 'SET_COUNTER') { return action.value; } if (action.type === 'INCREMENT') { ...
import React, { useContext } from "react"; import { Link } from "@reach/router"; import styled from "styled-components"; import { ThemeContext } from "../contexts/ThemeContext"; const Wrapper = styled.div` width: 100%; background: ${({ theme }) => theme.bg}; display: flex; align-items: center; justify-conten...
var searchData= [ ['node_2ejava',['Node.java',['../Node_8java.html',1,'']]] ];
function createNewArticle() { let auth = document.getElementById('author').value; let titl = document.getElementById('title').value; let txt = document.getElementById('text').value; const date = new Date(); let dat = '' + validDate(date.getDate()) + '.' + validDate(date.getMonth() + 1) + '.' + date....
/* * This module will control the overall functionality of google authentication process flow */ const passport = require('passport'); const users = require('../users/users.entity'); const jwt = require('jsonwebtoken'); const jwtDecode = require('jwt-decode'); const superSecret = require('../../config/config.js'); ...
module.exports = { siteMetadata: { title: `Toolshed SoundLab`, description: `Toolshed SoundLab Recording Studio - I offer music production &amp;amp; recording services at a comfortable studio in the heart of Port Townsend, near Seattle Washington`, keywords: `port townsend,recording studio,washington,jeff...
// 计数排序 // 时间复杂度 O(n+k) function findMax(arr) { let max = arr[0], i = arr.length - 1 while(i > 0) { let item = arr[i] item > max && (max = item) i-- } return max } // 计数排序 function countSrot(arr) { const max = findMax(arr) const countArr = new Array(max + 1) let i = arr.length - 1 while(i...
const express = require("express"); require("./config/config").config; const app = express(); const port = process.env.PORT; const userRoute = require("./routes/user.route"); app.use(express.json()); // for parsing application/json app.use(express.urlencoded({ extended: true })); // for parsing application/x-www-fo...
var ajax = webix.ajax().headers({ 'Content-type': 'application/json' }) webix.ready(function () { webix.ui({ id: "editFormAndTable", container: "date", view: "form", css: "webix_primary", align: "center", type: "wide", borderless: true, rows: [ ...
var randomNumber1= Math.floor((Math.random()*6)+1); var randomNumber2= Math.floor((Math.random()*6)+1); var image1 = "images/dice" + randomNumber1+ ".png" var image2 = "images/dice" + randomNumber2+ ".png" document.querySelector("img.img1").setAttribute("src",image1); document.querySelector("img.img2").s...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.setCartFromFirebase = exports.checkOutSuccess = exports.UpdateCartInFirebase = exports.clea...
"use strict"; var ActionMethods = {}; ActionMethods.initializeStore = function(){ HIPI.framework.AppState.dispatchAction( HIPI.state.ActionObjects.initializeStore() ); }; ActionMethods.changeDomainName = function(domainName){ HIPI.framework.AppState.dispatchAction( HIPI.state.ActionObjects.changeDomainName(domai...
var detik = 0; var menit = 0; var jam = 0; //timer 15 menit var timer_detik = 00; var timer_menit = 15; var timer_jam = 00; function timer() { //timer countdown => 5 4 3 2 1 if (timer_jam == 0 && timer_menit == 0 && timer_detik == 0) { // jam menit detik 00:00:00 window.alert("Waktu mengerjakan telah habis. Teka...
/** * Creation of an image element that can be placed on the mood board */ /*global define */ define( ['entities/base', 'models/dom', 'controllers/input', 'controllers/layering'], function (BaseEntity, dom, input) { 'use strict'; var _strokePadding = 5; var DEBUG = false; va...
import Vue from 'vue' import Filterbar from '../../../src/components/shared/layout/Filterbar' const updateSearch = jest.fn() const Constructor = Vue.extend({ data() { return { showDefault: false, showAdvancedFilters: false, } }, render(h) { return h(Filterba...
// // ////////////////////////// BASIC JS/react EXAMPLES // // ////////////////////////////////rest parametr////////////////////////////// // const rest = (a, b, ...num) => { // console.log(num, a, b); // }; // rest(1, 2, 3, 4); // // ////////////////////////////////array spread operator////////////////////////////...
import './aside.scss'; import template from './aside.html'; export default (appModule)=>{ appModule.config($stateProvider =>{ $stateProvider .state('aside', { url: '', abstract: true, template }); }); };
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { linkTo } from '@storybook/addon-links'; import { default as TokenView } from '../ui/components/token'; storiesOf('UI Components|Token View', module) .add('View', () => ( <T...
angular.module('Todo').controller('TodoController', function($scope){ // Constant name $scope.appName= "Todos App"; $scope.btnSave = "Save"; $scope.btnDelete = "Delete Completed"; $scope.btnInProgress = "In Progress"; $scope.btnDone = "Done"; $scope.btnAll = "All"; //todos list ...
({ updateContacts : function(component, event, helper) { component.set('v.contactsList', []); component.set('v.isLoading', true); if(!event.getParam('accountId')) return; // Prepare the action to load account record var action = component.get("c.getContactsByAccount"); ...
import react from 'react' import $ from 'jquery' const UploadFile = () => { const varifyBeforeLoad = () => { if(format.includes(finalName.toLowerCase())){ if(size<5242880){ var array = []; if(queueMsgService.selectedGroup.type ==3){ var roomId = queueMsgService.s...
console.log('Find what you\'re looking for?'); document.addEventListener('DOMContentLoaded', () => { 'use strict'; let buffer = []; document.addEventListener('keydown', event => { const inputs = ['arrowup', 'arrowright', 'arrowdown', 'arrowleft', 'b', 'a', 'enter'] const konami_code = ['...
import React from 'react'; import styled from 'styled-components'; import spinner from '../../static/img/spinner.svg'; const Img = styled.img` animation: ${props => props.theme.rotate360} infinite 2s linear; border-radius: 50%; display: block; height: 100px; margin: 20px auto; width: 100px; `; const Load...
const express = require('express'); const router = express.Router(); const Products = require('../models/products.js'); //Get all products router.get('/products', function(req, res, next){ Products.find(function(err, prods){ res.json(prods) }); }); //Get a product by id router.get('/products/:id',...
'use strict'; module.exports.emptytestnodejs = (event, context, callback) => { // just an empty function callback(null, { "message": "Empty NodeJS test Function Completed."}); };
(function(cookies) { if (cookies.hasInitialised) return; var util = { escapeRegExp: function(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); }, hasClass: function(element, selector) { var s = ' '; return element.nodeType === 1 && (s + element.className + s).replace(/[\n\...
function Question(questionData) { this.question = questionData.question; this.answer = questionData.answer; this.choices = questionData.choices; this.id = questionData.id; this.attempts = questionData.attempts; this.timesCorrect = questionData.timesCorrect; }
/* * Copyright 2011-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
const fs=require('fs'); const bencode=require('bencode'); const bignum=require('bignum'); //torrent-parser.open module.exports.open=filepath=>{ return bencode.decode(fs.readFileSync(filepath)); } //torrent-parser.size module.exports.size=torrent=>{ const size=torrent.info.files ? tor...
import bodyParser from 'body-parser'; import express from 'express'; import cors from 'cors'; import mongoose from 'mongoose'; import config from 'config'; import fakeData from './config/fakeData'; require('mongoose-schema-jsonschema')(mongoose); const app = express(); app.use(cors()); app.use(bodyParser.json({limit:...
import React, { Component } from 'react' import {Link} from 'react-router-dom'; import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink, UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem, NavbarText } from 'reactstrap'; class AppN...
const express = require('express'); const router = express.Router(); const catchAsync = require('../utils/catchAsync'); const ExpressError = require('../utils/ExpressError'); const Campground = require('../models/campground'); const campgrounds = require('../controllers/campgrounds'); const multer = require('multer')...
import React from 'react'; import {Platform, Alert, StyleSheet, AsyncStorage, View, ScrollView, FlatList, Text, TextInput, TouchableOpacity, StatusBar} from 'react-native'; import Icon from 'react-native-vector-icons/Feather'; import _ from 'lodash'; import MemoryListItem from '../components/memory-list-item'; import M...
import axios from 'axios'; import { GET_EVENTS, ADD_EVENT, DELETE_EVENT, SET_VISIBLE_FALSE } from './types'; import moment from "moment-timezone"; export const getEvents = (token) => { try { return async dispatch => { const response = await axios.get('https://exchangestudentsapp-fardel.herokuap...
import React from 'react' const Junemasterclass = () => { return ( <div> <div className="news-updates"> <div className="container"> <div className="row"> <div className="col-lg-12"> <div className="section-heading"> <h3 className="discove...
var config = require("config") const fetch = require("node-fetch"); const Discord = require('discord.js'); import Helpers from '../../helpers/helpers' module.exports = class ban { constructor() { this.name = 'ban', this.alias = ['bankiller'], this.usage = `${process.env.DISCORD_COMM...
import { useQuery, useLazyQuery, useMutation } from '@apollo/react-hooks'; import { GET_PORTFOLIOS, GET_PORTFOLIO, GET_USER_PORTFOLIOS, CREATE_PORTFOLIO, UPDATE_PORTFOLIO, DELETE_PORTFOLIO, SIGN_IN, SIGN_OUT, GET_USER, } from '@/apollo/queries'; export const useGetPortfolios = () => useQuery(GET_PO...
import React from 'react'; import { shallow } from 'enzyme'; import renderer from 'react-test-renderer'; import ReposPage from './ReposPage'; describe('ReposPage suite', () => { it('renders RepoPage', () => { const comp = <ReposPage isLoading username="gabrielseco" />; const component = shallow(comp); c...
/** * Created by iyobo on 2016-04-24. * * For Common Nunjuck filters * @param nunjucksEnv */ module.exports = function(nunjucksEnv){ //Renders a textfield nunjucksEnv.addFilter('textfield', function(field, kwargs) { kwargs = kwargs || {} if(!field) return "" var required = field.isRequired(); var output...
'use strict'; const API = 'http://' + window.location.host + '/api/v1'; let versos; const poem = document.getElementById('content_poem'); const getPoem = function (){ $.ajax({ method: 'GET', url: `${API}/poems/page` }).done(function(res){ if(res.success){ versos = res.books.slice(-5,); d...
'use strict'; App. controller('DeclarationDetailCtrl', ['$scope','$http','$location','$routeParams', function($scope, $http,$location,$routeParams) { var declarationRecus = 'http://localhost:8080/message/declarationRecus/'; var loadDec = 'http://localhost:8080/message/declaration/'; var self =t...
import React from "react"; import Button from 'react-bootstrap/Button'; function FilterButton(props) { return ( <Button className="toggle-btn" variant="info" aria-pressed={props.isPressed} onClick={() => props.setFilter(props.name)} > <span>{props.name}</span> </Button> );...
/** * */ goog.provide('SB.PhysicsSystem'); /** * Interface for a PhysicsSystem. * * Allows multiple different backends for physics. * @interface */ SB.PhysicsSystem = function() {}; //--------------------------------------------------------------------- // Initialization/Termination //----------...
var express = require('express'); var router = express.Router(); const yelp = require('yelp-fusion'); router.get('/', function (req, res) { var YELP_ID = "CMtBgncyN7TNiZowQ-Lun5bL7_SpWyI7uwtFz_jz7WfKlTNS_hhp-L91vkKhk7uN8kcSzXiB9RG57PZHqYLW2Xgy7jeowqoc-hlJsnl-BfkYO2fNmozYwxlZ8DmwWnYx"; const client = yelp.clie...
Template.AddToMenu.events({ 'submit #new-day-form': function(event, template) { event.preventDefault(); Meteor.call('addDayToMenu', Session.get('choosenRecipes')); Session.set('choosenRecipes', []); }, 'keyup [name="recipeAmount"]': function(event, template) { var holdingName = template.data.handling; if(h...
module.exports = { siteMetadata: { title: `Khaled Maher | Software Engineer`, description: `The Realm you want to know more about...`, author: `@maxios`, }, plugins: [ "gatsby-plugin-react-helmet", "gatsby-transformer-sharp", "gatsby-plugin-sharp", "gatsby-plugin-manifest", "gatsby...
Content.makeFrontInterface(568, 320); //sampler const var sampleList = Sampler.getSampleMapList(); const var sampler1 = Synth.getSampler("Sampler1"); sampler1.loadSampleMap("tongali");function onNoteOn() { } function onNoteOff() { } function onController() { } function onTimer() { } fu...
/*弹出层tab页切换*/ $('#settingTabs a').click(function (e) { e.preventDefault() $(this).tab('show') }); /*拖拽*/ var $win = $(window); var lyt = { init:function(ele1,ele2,direction){ this.$ele1 = ele1; this.$ele2 = ele2; this.$direction = direction; //初始化事件 this.initEvts()...
/* 所有在Promotions中使用到的Model以及Store 添加順序為Model-Store 一一對應 添加的時候注意命名規範,還有所有store都必須設置成autoload:false */ //會員群組Model Ext.define("gigade.VipGroup", { extend: 'Ext.data.Model', fields: [ { name: "group_id", type: "string" }, { name: "group_name", type: "string" }] }); //會員群組store var VipGroupS...