text
stringlengths
7
3.69M
(function () { App.Collections.Books = Parse.Collection.extend({ model: App.Models.Book }); }());
export default /* glsl */` void getReflDir(vec3 worldNormal, vec3 viewDir, float gloss, mat3 tbn) { dReflDirW = normalize(-reflect(viewDir, worldNormal)); } `;
// this class is not really related to a sampleToc but can be used for any TOC import API from 'src/util/api'; import Versioning from 'src/util/versioning'; let defaultOptions = { group: 'all', varName: 'sampleToc', viewName: 'sample_toc', filter: (entry) => !entry.value.hidden, sort: (a, b) => { if (a....
var readline = require('readline'); // Module démo à supprimer var moduleDemo = require('./module-demo'); // pour faciliter l'écriture des logs et la répétition des "console.log" var lg = console.log; // liste des modules // si vous créer un nouveau module, n'oubliez pas de mettre à jour cette liste var listeModules...
let user_dao = require('../models/user_dao'); module.exports = { // 获取用户 async getUserByN_P(u_name,u_password) { let users = await user_dao.getUserByN_P(u_name, u_password); if(users.length === 0){ return { success:false, message:'用户名或密码错误' ...
"use strict"; var Web3 = require('web3'); var web3 = new Web3(); web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545')); var app = angular.module("petshopDapp", ['ionic']); app.config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('app', { url: '/app', ab...
import React, { Component, } from 'react'; import { View, Text, StyleSheet, Image, TouchableOpacity, } from 'react-native'; import PropTypes from 'prop-types'; import { connect, } from 'react-redux'; import ThemeFactory, { ColorFlags, DimenFlags, } from '../../res/style/ThemeFactory'; import { WhiteSpace, WingBlank, Bu...
import React from 'react'; import ReactDOM from 'react-dom'; import { shallow } from 'enzyme'; import App from './App'; describe('App', () => { let wrapper; let mockState; beforeEach(() => { wrapper = shallow(<App />); mockState = { range: [0, 85], channelSet: '', originalRange: [0, 86...
function addEvent(obj, evType, fn) { if (obj.addEventListener) { obj.addEventListener(evType, fn, false); return true; } else if (obj.attachEvent) { var r = obj.attachEvent('on'+evType, fn); return r; } else { alert('Handler could not be attached')...
var Config = { // ray-tracing constants MaxRecursionDepth: 3, MaxRayDepth: 1000, HitpointOffset: 0.0001, FiniteLightsourceSamples: 100, AirRefractionIndex: 1.0, ShowLightsources: true, // canvas constants CanvasWidth: 640, CanvasHeight: 480, CanvasId: 'canvas', ShowProgr...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const THREE = SupEngine.THREE; const CameraUpdater_1 = require("./CameraUpdater"); class CameraMarker extends SupEngine.ActorComponent { constructor(actor) { super(actor, "Marker"); this.viewport = { x: 0, y: 0, width: 1, h...
'use strict'; const expect = require('chai').expect; const compression = require('../../src/util/compression'); describe('compression', () => { it('should compress primitive values', () => { expect(compression(42, 43)).to.deep.equal(43); expect(compression(true, false)).to.deep.equal(false); }); it('sh...
import React from 'react'; import { SafeAreaView, StyleSheet, ScrollView, TouchableOpacity, TextInput, View, Text, StatusBar, ImageBackground, TouchableHighlight, Modal, } from 'react-native'; import { SearchBar } from 'react-native-elements'; import { Image } from 'react-...
import React, {Component} from 'react' import {fetchFinding} from '../../Actions/FindingActions' import {connect} from 'react-redux' import {formtTime} from '../Common' class ScanSummary extends Component { renderSummary(scanSummary) { return ( <div class="row"> <div class='col-sm-3'> <di...
function salir() { }
var _loginVue = new Vue({ el:"#login", data:{ loginname : "", password : "", }, created : function(){ }, methods:{ cleanFormRegister : function(){ this.loginname = ""; this.password = ""; }, showMessage:function(ppMessage){ var _this = this; $("#message").html(ppMessage); setTimeout...
const animalQueries = require("../db/queries.animals.js"); var multer = require("multer"); var cors = require("cors"); module.exports = { index(req, res, next) { animalQueries.getAllAnimals((err, animals) => { if (err) { console.log(err); } else { res.json(animals); } }); ...
import createDataContext from './createDataContext' import api from '../api/api' import { navigate, clearNav } from '../navigateRef' import { AsyncStorage } from 'react-native' const authReducer = (state, action) => { switch(action.type) { case 'signin': return { errorMessage: '', token: action...
export default class Button { constructor(number, listener) { this.number = number; this.listener = listener; } setButton() { const btn = document.createElement("button"); const innerText = document.createTextNode(" " + this.number + " "); btn.appendChild(innerText); btn.setAttrib...
import { createStore, combineReducers, compose, applyMiddleware } from 'redux' import thunk from 'redux-thunk' import reducers from './ducks' const rootReducer = combineReducers(reducers) export default createStore( rootReducer, compose( applyMiddleware(thunk), window.__REDUX_DEVTOOLS_EXTENSION__ && windo...
import React from 'react' import IntlMessageFormat from 'intl-messageformat' import load from 'load-script' import { defaultFormats, DEFAULT_LOCALE, DEFAULT_LOCALE_PARAM_NAME } from './constants' import { warn } from './polyfill' import { getDescendantProp, determineLocale, xss, getCurrentLocale } from './helper' cons...
export default { metadata: { name: 'Box - Slide Out', duration: 1000, }, box: { styles: { transform: [ 0, inputs => t => `translate3d(${inputs.offset * (t * t)}px, 0, 0) scale(${1 - t})`, ], opacity: [ 0, 1, 1000, 0, ], }, }, };
var global = this; if(typeof global._i18n_lang == 'undefined') global._i18n_lang = {}; global._i18n_lang.ru = { desc: { fullname: "Русский", shortname: "ru" }, data: { "hello world" : [ "привет, мир" ], "nonexistent_test.gif" : ["nonexistent_test_ru.gif"], "registar" : [ "регистратор", "регист...
import React from 'react'; // import os from 'os'; require('es6-promise').polyfill(); require('isomorphic-fetch'); export const post = { users: { user: function (id, data, date) { fetch(`http://localhost:5000/share-we-go-project/us-central1/api/users/${id}/user`, { mode: 'no-c...
var myNum = parseInt(prompt("Enter a number")); switch (myNum) { case 1: console.log(1); break; case 2: console.log(2); break; case 3: console.log(3); break; case 4: console.log(4); break; case 5: console.log(5); break;...
$(document).on("submit", "form", function (event) { // kada je submitovana forma za kreiranje novog zaposlenog event.preventDefault(); var namee = $("#namee").val(); var lastName = $("#lastName").val(); var password = $("#password").val(); var adress = $("#adress").val(); var email = ...
function LoginController() { // bind event listeners to button clicks // $('#retrieve-password-submit').click(function(){ $('#get-credentials-form').submit();}); $('#login #forgot-password').click(function(){ $('#cancel').html('Cancel'); $('#retrieve-password-submit').show(); $('#get-credentials').modal('show...
import React from 'react' import { Scene, Router } from 'react-native-router-flux' import LoginForm from './components/LoginForm' import MovieList from './components/MovieList' import Movie from './components/Movie' const RouterComponent = () => ( <Router sceneStyle={{ paddingTop: 65 }}> <Scene key='auth'> ...
var filenamify = require('filenamify'); var exportPath = process.env.GATHERBASE_EXPORT_PATH || __dirname + '/../devopsbase/gathered'; // '/_crawled' module.exports = { port: 3000, parallelDiscoverJobs: 2, parallelRetrieveJobs: 3, parallelHandleJobs: 6, jobAttempts: 3, removeCompletedJobs: true, removalD...
import React, { useEffect } from 'react' import Link from 'next/link' import styled from 'styled-components' import { ReactSVG } from 'react-svg' import { useRouter } from 'next/router' import Images from '../../theme/Images' import { useAuth } from '../../context/useAuth' import { Menu, Layout, Dropdown, Avatar } from...
function multiplyNumeric(obj){ for (let prop in obj){ if(typeof obj[prop] == "number"){ obj[prop] = obj[prop] * 2; } } } // before the call let menu = { width: 200, height: 300, title: "My menu" }; multiplyNumeric(menu); // after the call menu = { w...
import React from 'react'; import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { routerActions } from 'react-router-redux' import PropTypes from 'prop-types'; import classNames from 'classnames'; import { withStyles } from 'material-ui/styles'; import { bknActions } from '../modules/...
"use strict"; const Car = require('../models').Car; exports.list = function (req, res) { Car.findAll().then(Car => { res.jsonp(Car); }); }; exports.create = function (req, res) { res.jsonp(Car.create(req.body)); }; exports.findById = function (req, res) { let id = req.params.id; Car.findById(id).then(...
/* ********************************************************** * File: test/components/App.spec.js * * Brief: Test for the app component * * Authors: George Whitfield, Craig Cheney * * 2017.10.12 CC - Refactored for App container * 2017.07.28 GW - Document Created * ******************************************************...
import configureContainer from '../../container'; function makeDeliveryLambdaGetJobKeyByGuid({ getJobKeyByGuid, getLogger }) { return async function delivery(input) { const { jobGuid } = input; const logger = getLogger(); logger.addContext('guid', jobGuid); logger.addContext('input', input); log...
import React from 'react' import PropTypes from 'prop-types' import {translateError} from '../../../locales/translate' export const FieldError = (props) => { const { locale, isWarning, error } = props if (!error) { return null } return <div className={isWarning ? 'warning' : 'error'}>{translateError(error,...
import ChordParser from './parser'; import InputOutput from './io'; import _ from 'lodash'; class ChordSage { constructor() { this.config = { freeStrings: ['E', 'A', 'D', 'G', 'B', 'E'], fretSpread: 4, fretPosition: 1, chordInput: 'Dmaj7/F#' }; this.parser = new ChordParser(this.c...
var app = new Vue({ el: '#app', data: { list: ['apple', 'banna', 'strovery'], } });
import Container from './styles' import {FontAwesomeIcon as Icon} from '@fortawesome/react-fontawesome' import search from '@fortawesome/fontawesome-free-solid/faSearch' export default ({onChange}) => ( <Container> <input type="text" placeholder="Search" onChange={onChange} /> <Icon icon={search} /> </Cont...
import React, { Component } from "react"; import _ from "lodash"; import { Control, Field, Input, Label, Textarea, Select, Option } from "react-bulma-components/lib/components/form"; import { withRouter } from "react-router-dom"; import Loader from "../Loader/index"; import generateUUID from "../../utils/...
'use strict'; const {packRes, packError } = require("../libs/utils"); const hello = async (event) => { try { const obj = [{ message: 'Go Serverless v1.1! Your function executed successfully!', input: event }]; return packRes(...obj); } catch (err) { packError(err, "helloError"); } }; module.exports ...
const request = require('request-promise-native'); const { INTEGRATION_TESTS } = require('../../resources/envs/local'); class HTTPService { constructor() { /** * Generates an option object used by the request package * @param {*} app the targeted app object */ const generateOption = (app) => ...
var _ = { chunk(arr, quantity = 1) { var outputArrays, arrLength = arr.length, inc = function() { var counter = quantity; if (quantity === arrLength) { counter = 1; } else if (quantity === 0 || quantity === 1) { ...
//deployed version under Grozeries private credentials here: //export const baseUrl = 'https://grozeries.herokuapp.com' //mind that this DB is currently empty. //see login credentials sheet for heroku creds. export const baseUrl = 'https://grozeries3.herokuapp.com' //export const baseUrl = 'http://localhost:4000' ex...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. // import Vue from 'vue' // import Vue from 'https://unpkg.com/vue' // import App from './App' var $ = require('jquery') window.jQuery = $ var jQuery = $ // eslint-disable-line imp...
const Promise = require('bluebird'); const models = require('../../models'); // const obtainInformation = require('./obtainInformation'); const Sequelize = require('sequelize'); var { sequelize } = models; const eventMethods = {}; const Op = Sequelize.Op; eventMethods.setPreference = function(){ return new Prom...
/** * Created by elie. */ /** * Create one stacked histogram, with zoom, resize, transition and popup features. * @param div {Object} D3 encapsulated parent div element. * @param svg {Object} D3 encapsulated parent svg element, direct child of div parameter. * @param mydiv {String} Div identifier. * @param url...
import React, { useMemo } from "react"; import styled from "styled-components"; import InternalRouting from "./InternalRouting"; import Service from "./Service"; import Database from "./Database"; import PlacedLink from "./PlacedLink"; import Cloud from "./Cloud"; import { ComponentTypes } from "../constants"; const W...
import React from 'react'; import Bg from 'images/crayons.jpeg' const styles={ background:{ background: `url(${Bg})`, height: "100vh", backgroundSize: "cover", position: "fixed", textAlign:"center", padding:10 }, title:{ paddingTop:30, fontSiz...
angular.module('starter.eventosControl', []) .controller('eventosControl', function($scope,$http, eventosFactoria ) { $scope.eventos; //$scope.sesion = sesionFactoria.get(); //alert( $scope.sesion ); consultarEventos($http,$scope); ...
let express = require('express'); // var router = express.Router(); let app = express(); let categoryC=require('../Controller/CategoryC'); //the view engine //define your router here app.get('/',async (req,res)=>{ categoryC .getAll() .then(data => { res.locals.categoryC=...
/** * Handle record selected. * * @param {JSEvent} event the event that triggered the action * * @private * * @properties={typeid:24,uuid:"5CD69DCB-C52C-40A0-83C2-DECDFD81ABF7"} * @AllowToRunInFind */ function onRecordSelection(event) { var frm = forms.agd_cl_dettaglio_esterni_tbl; var fs = frm.foundset; ...
import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) export default new Router({ routes: [ { path:'/', redirect:'/recommend' }, { path:'/recommend', name:'recommend', component: () => import('pages/recommend/recommend'), children: [ { ...
import React, {Component, Fragment} from 'react'; import {Link} from 'react-router-dom'; import {Button, message, Popconfirm, Divider, BackTop, Icon, Input, Table} from 'antd'; import ProveedorForm from './ProveedorForm'; import * as proveedoresActions from '../../redux/actions/administracion/proveedoresActions'; impor...
import Image from 'next/image'; import styled from 'styled-components'; import Button from './Button'; const Img = styled(Image)` object-fit: cover; `; const Container = styled.div` height: 450px; margin: 8px; cursor: pointer; &:hover { box-shadow: rgb(92 84 122 / 14%) 0px 4px 18px; transition: all...
'use strict'; const dialogflow = require('dialogflow'); const config = require('../config/keys'); const structjson = require('structjson'); const projectID = config.googleProjectId; const credentials = { client_email:config.googleClientEmail, private_key:config.googlePrivateKey } const sessionClient = new di...
function LoadWeaponData() { var Weapons = { 'Link': { 0: { ClassName: { EN: 'Hylian Sword', DE: 'Einhänder', FR: 'Épée à une main', ES: 'Espadas' }, Weapons: { 0: { Name: { EN: 'Knight\'s Sword', DE: 'Ritterschwert', FR: 'Épée de chevalier', E...
const isValidString = param => typeof param === 'string' && param.length > 0 const startsWith = (string, start) => string[0] === start const isSelector = param => isValidString(param) && (startsWith(param, '.') || startsWith(param, '#')) const TAGS = { badge: 'div.material-icons.mdl-badge', fab...
import React, { Component } from "react"; import "bootstrap/dist/css/bootstrap.min.css"; import "././navbar.css"; class Navbar extends Component { state = {}; render() { return ( <React.Fragment> <header> <div className="container-fluid sticky" style={{ backgroun...
class PerkingArea { constructor() { this.name = 'Stasiun Manggarai'; this.MAX_AREA = 50; this.availableArea = this.MAX_AREA; this.CAR_PARKING_FEE = 5000; this.MOTOR_PARKING_FEE = 2000; this._cash = 0; this.parkedList = []; } set cash(value) { ...
import React from 'react'; import Textarea from 'react-textarea-autosize'; import { connect } from 'react-redux'; import { getViewValue } from '../../Store/View'; import { changeView } from '../../Store/Store'; const style = { base: { boxSizing: 'border-box', width: '100%', border: 'none', borderBot...
import React from 'react' import { Link } from 'react-router-dom' const TodolistIndexTile = (props) => { return( <div> <Link to={`/${props.id}`}>{props.title}</Link> <br/> </div> ) } export default TodolistIndexTile
import tw from 'tailwind-styled-components' const SVGWrapper = tw.div` absolute top-0 h-full w-8 flex justify-center items-center ` const SearchSVG = tw.svg` w-4 h-4 text-gray-400 ` export const StyledSearchInputSVG = () => { return <SVGWrapper> <SearchSVG ...
import request from '@/utils/request' import { urlCrowd } from '@/api/commUrl' // 线上地址 const url = urlCrowd + 'crowdInfo/' // 群升级圈页面-查询、单个通过拒绝、批量通过拒绝---线上 const getToCircleUrl = urlCrowd + 'crowdToCircleApply/getCrowdToCircleApplyList' const singleArUrl = urlCrowd + 'crowdToCircleApply/saveAuditInfo' const batchArUrl =...
import React, { Component } from 'react'; import ChildLifecycle from './ChildLifecycle'; class ParentLifecycle extends Component { constructor(props) { super(props) this.state = { name: 'Chinmay' } console.log('Parent lifecycle constructor'); } stati...
export { default } from "./ClosetPanel";
import React from "react"; import { List, ListItem, CardHeader, CardContent, CardFooter, Card, Button, Link } from 'framework7-react'; import crypto from 'crypto-js'; import { dict } from "../../Dict"; const TimeSheetList = (props) => { if (props.time_sheets) { return ( <Card> <CardHeader> ...
/** * This is the actions file * * Actions here can call an api, and return the response body to reducers */ import request from 'superagent'; export const TOGGLE_EXPAND = 'TOGGLE_EXPAND'; export function deployTag(tag_id) { return { fired: true, tag_id }; } export function expandRepo(repoId) { return { ...
'use strict'; module.exports = [ './node_modules/jquery/dist/jquery.min.js', './node_modules/jquery.maskedinput/src/jquery.maskedinput.js', './node_modules/slick-carousel/slick/slick.min.js', './node_modules/lightslider/dist/js/lightslider.min.js', './node_modules/lightgallery/dist/js/lightgallery.min.js', ...
import React, { Component } from 'react'; import { Container, Table } from 'react-bootstrap'; import axios from 'axios'; const endpoint = '/get_chain' class Transactions extends Component { constructor(props){ super(props); this.state = { transactions: [], } } componentDidMount() { axios.ge...
import React from 'react'; import './GirlsHomepage.css'; import LillyBeyond from '../../../assets/girlswhoproduct-homepage/lilly_beyond.jpg'; export default function GirlsHomepage() { return ( <div className="girl-main-container"> <div className="girl-title-content"> <h6 className="section-subtitle...
var assert = require('assert'); var test = require('../../src/eps'); var testCases = [ {i: {src: {x: 1, y: 2}, dst: {x: 3, y: 4}, stroke: {r: 255, g: 255, b: 0}, strokeWidth: 1}, o: "gsave newpath 1 1 0 setrgbcolor 1 setlinewidth 1 2 moveto 3 4 lineto stroke grestore\n"} ]; describe('eps', function() { de...
'use strict'; /** * @ngdoc service * @name seedApp.allBrandsService * @description * # allBrandsService * Service in the seedApp. */ angular.module('seedApp') .service('allBrandsService', function ($http) { var url = 'https://places.leadinglocally.com/api/brands'; this.get = function() { ret...
import React, { Component } from 'react' import PropTypes from 'prop-types'; import styles from './Styles/CounterStyle' import { TouchableOpacity, Text, View } from 'react-native' import RoundedButton from './RoundedButton' const BlueButton = (props) => ( <TouchableOpacity style={styles.increaseButton}> <T...
import { Environment, Network, Store, RecordSource } from 'relay-runtime'; import { createFetch } from 'relay-local-schema'; import schema from './schema'; /** * This will execute queries against the specified schema locally, * rather than against a separate GraphQL server. */ const environment = new Environment...
console.log("You are at " + window.location); console.log(DATA);
import React from 'react'; import PropTypes from 'prop-types'; import Average from '../../components/Average/Average'; import './AveragesView.css'; const AveragesView = ({ dataHelper }) => ( <section className="averages-view"> <h2>Averages</h2> <Average dataHelper={dataHelper} channelSet="power" /> ...
import React from 'react'; import {Mana, Health, Damage} from '../pieces'; import styles from './grid.scss'; const getPiece = (type, idx) => { const pieces = { 1: <Mana level="low" />, 2: <Mana level="mid" />, 3: <Mana level="high" />, 4: <Health />, 5: <Damage />, }; return ( <div key={...
var app = app || {}; (function() { app.DayView = Backbone.View .extend({ el : '#day', events : { //'keypress #day-food-input' : 'createOnEnter', //'keypress #day-food-input' : 'searchAutocomplete' }, initialize : function() { console.log('initiali...
import Vue from 'vue' import Toolbar from 'src/components/Toolbar' describe('Toolbar.vue', () => { it('exists and visible', () => { const vm = new Vue({ template: '<hi-toolbar title="Hello World!"></hi-toolbar>', components: { 'hi-toolbar': Toolbar }, replace: false }).$mount() vm.$el.q...
const itemService = require('../services/item.service'); const chatService = require('../services/chat.service'); const { to, ReE, ReS } = require('../services/util.service'); const get_items = async function(req, res){ let err, items; [err, items] = await to(itemService.get_items(req)); if(e...
describe('Los estudiantes login', function() { it('Visits los estudiantes and fails at login', function() { cy.visit('https://losestudiantes.co') cy.contains('Cerrar').click() cy.contains('Ingresar').click() cy.get('.cajaLogIn').find('input[name="correo"]').click().type("wro...
var hook_8h = [ [ "MUTT_HOOK_NO_FLAGS", "hook_8h.html#af90ba352be78a79717b1efeb2cfc867a", null ], [ "MUTT_FOLDER_HOOK", "hook_8h.html#a2fde17cbd1c23f84f7f005010971f9a1", null ], [ "MUTT_MBOX_HOOK", "hook_8h.html#ab53cdfc68467d6ca2071ed11ab4a7f0d", null ], [ "MUTT_SEND_HOOK", "hook_8h.html#a365ef87efead3...
import React from 'react'; import barracuda from '../SliderImages/barracuda-school-dreamstime_s_30848576-sm350.jpg'; import './singleImg.css'; const slide3 = () => { return ( <div className='slides'> <div> <img src={barracuda} alt="barracuda"/> </div> </div> ...
var SongsView = Backbone.View.extend({ render: function () { this.$el.html('SONGS VIEW'); return this } }); var SingleSongView = Backbone.View.extend({ initialize: function(data){ this.songId = data.songId; }, render: function () { this.$el.html('SINGLE SONG VIEW -> '+...
// 定义一个函数:rand // 参数:最小整数,最大整数 // 返回:两个整数之间的一个随机整数 function rand(min,max){ return parseInt(Math.random()*(max-min+1))+min; } // 返回一个随机的颜色16进制 function color(){ var str = "#"; for(var i=0;i<6;i++){ str += rand(0,15).toString(16); } return str; } // 返回指定dom节点的attr样式值 function getStyle(dom,at...
import { get, pick, reduce, toString } from 'lodash' import { airports } from '../../data' const SourceApiCreator = (mappings) => class SourceApi { static mapEndpoint (code) { const codeLower = code.toLowerCase() const airport = get(mappings, `airports.${codeLower}`) if (airport) { return { name...
const invoices = [ { date: '2018-10-31', items: [ { code: '2143', amount: 222 }, { code: '2111', amount: 500 } ] }, { date: '2018-07-12', items: [ { code: '2222', amount: 231 }, { code: '2143', amount: 333 } ] ...
import React from 'react'; import { connect } from 'react-redux'; import SampleHeading from './components/SampleHeading.jsx'; import SampleComponent1 from './components/SampleComponent1.jsx'; import IdiotCounter from './components/IdiotCounter'; import Action from './actions'; import ReduxCounter from './components/R...
const router = require("express").Router(); const Controller = require("../controllers/userController"); const { multerMiddleware } = require("../middlewares/multer"); const { postImage } = require("../middlewares/uploadImage"); router.post("/user/reset-password", Controller.generateLinkReset); router.post("/login", C...
"use strict"; $(document).ready(function() { $(".new-tweet form textarea").bind("keyup", function(event) { let counter = 140 - this.value.length let counterObj = $(this).parent().children(".counter") counterObj.prepend() counterObj.text(counter) if (counter < 0) { counterObj.css("color","...
var express = require("express"); var path = require("path"); var favicon = require("serve-favicon"); var logger = require("morgan"); var bodyParser = require("body-parser"); var itemRouter = require("./routes/item"); var auth = require("./routes/auth"); var app = express(); var helmet = require("helmet"); var app = ...
// 'use strict' // module.exports.fb = { // clientId: process.env.fbClientId || fbConstants.clientId, // redirectUri: process.env.fbRedirectUri || fbConstants.redirectUri, // clientSecret: process.env.fbClientSecret || fbConstants.clientSecret, // tokenUrl: process.env.tokenUrl || fbConstants.tokenUrl // }; // mo...
const express = require('express'); const router = express.Router(); const getYelp = require('../api/api.js'); const mockData = require('../api/mockData/mockData.json'); const filterRestaurants = require('../util/filterRestaurants'); router.get('/:latitude/:longitude/:category', async (req, res) => { const params = (...
function setFuckingText(index) { var fucking_text = new Array(); fucking_text[0] = "Get the fuck up and exercise!"; fucking_text[1] = "Fuck the Seahawks"; fucking_text[2] = "Make every fucking day count"; fucking_text[3] = "Stop fucking comb-overs"; fucking_text[4] = "No one gives a fuck, so stop thinking they ...
const talents = [ "private tutoring", "removal", "gardening", "household / housekeeping", "office tasks", "administration help", "regulatory documents help", "shopping aid", "repair (electr.)", "repair (mech.)", "computer (hardware/software)", "sewing", "household cleaning", "car cleaning",...
#!/usr/bin/env node /** * `grunt test_bin` selects this file for the `conjure --server` option. */ var express = require('express'); var app = express(); var pid = '/tmp/parapsyc-test-server.pid'; var port = 8174; app.use(express.static(__dirname + '/../test/fixture/express-static')); app.listen(port);
import React, {useState, useEffect, useRef} from 'react' const Assets = () => { // let intervalID = ''; // const [data, setData] = useState(0); // const getData = () => { // fetch('https://pro.tomya.com/api/providers/trading/trades?asset=BTCUSDT') // .then(response => response.json()) ...
export default function application(state = { excitement: 0, todos: [], events: {}, roles: {1: { id: '1', name: 'City Planning' }, 2: { id: '2', name: 'Law Enforcement' } } }, action) { let newState; switch (action.type) { case 'GET_EXCITED': { newState = Object.assign({}, state, { excitement: state.exc...
import React from 'react' import { Column, FlexContainer, RightAlign } from '../../../../components/layout' import { Button, Input } from '../../../../components/reusable' import { CharacterDetailsWrapper } from './styles' const CharacterDetails = (props) => { const { editMode, character, s...