text
stringlengths
7
3.69M
var express = require('express'), path = require('path'), http = require('http'); // Initialize application var app = express(); // Configure application app.configure(function () { app.use(express.logger('dev')); /* 'default', 'short', 'tiny', 'dev' */ app.use(express.responseTime()), app.use(ex...
import React, { useState } from 'react'; import { Formik, Form, Field, ErrorMessage } from 'formik'; import { useHistory } from 'react-router-dom'; import './Register.scss'; import { registerSchema } from './register.schema'; import { UserService } from '../services/user.service'; function Register() { const histor...
const express = require('express'); const router = express.Router(); const tarjetaController = require('../controllers/tarjetaController'); router.get('/formularioTarjeta', tarjetaController.tarjeta); /*agregar ruta por post */ module.exports = router;
const express = require('express'); const app = express.Router(); const appDB = require("../model/productDB") // post data in frist tbl app.post("/api",(req,res)=>{ data = { product_name : req.body.product_name, imported : req.body.imported, category : req.body.category, price : re...
import React from 'react' // import emojiKeywords from 'emojis-keywords' // import emojiList from 'emojis-list' import SuggestionsPlugin from './slate-suggestions/index' import { Box, Avatar, Text } from 'rebass' import { blocks } from './elements/index' function getInput(value, regex = /([\w]*)/) { if (!val...
import { LOGIN, LOGIN_FAIL, LOGIN_SUCCESS, LOGOUT, INCRCOUNTER, DECRCOUNTER, ADDTOCART, ITEMSINCART, SETCART, ITEMSREMOVED, REMOVESINGLEITEM, CUSTOMERINFO } from './actionType' import { BASE_URL } from '../static_data/constants' import axios from 'axios' // Async task export const loginUserAPI = ({email, passwor...
'use strict' const fs = require('fs') const path = require('path') module.exports = function(fixturesDir, expectationsDir, inline, run) { const files = fs.readdirSync(fixturesDir) for (const htmlFile of files) { const baseName = path.basename(htmlFile) if (!baseName.endsWith('.html') || baseName.startsWith('.')...
//Global Javascript functions function updateFormTabs(currentStep, maxStep) { currentStep -= 1; maxStep -= 1; $j("#formTabs ul li").each(function(index) { if(index == currentStep) { $j(this).addClass("active"); } else if(index > maxStep) { $j(this).addClass("disabled"); } }); } function fillPermanen...
import Vue from 'vue'; import Vuex from 'vuex'; // 引入模块 import student from './modules/student.js'; import drinks from './modules/drinks.js'; // 启用 Vuex 插件 Vue.use(Vuex); // store 对象还是可以正常配置 state / mutations / actions/ getters export default new Vuex.Store({ state:{ fruits: ['苹果', '香蕉', '橘子'] }, mutations:{ a...
import * as Action from './actions'; export const OrganizationReducer = (state, action) => { switch (action.type) { case Action.GET_ORGANIZATIONS: return { ...state, isLoading: true, isError: false, organizations: null }; case Action.GET_ORGANIZATIONS_SUCCESS: ...
import {compose, createStore, applyMiddleware} from 'redux'; import thunk from 'redux-thunk'; import {createLogger} from 'redux-logger'; import {composeWithDevTools} from 'redux-devtools-extension'; import reducers from './src/modules'; const logger = createLogger({ collapsed: true, }); const enhancer = compose( ap...
import React, { useEffect, useState } from 'react'; import Loader from 'react-loader-spinner'; import Details from './components/Details'; import List from './components/List'; import 'react-loader-spinner/dist/loader/css/react-spinner-loader.css'; import './App.css'; const { REACT_APP_USERS_URL } = process.env; fu...
document.getElementById("btnLuong").onclick = function () { var luongMotNgay = 100000; var soNgayLam = document.getElementById("soNgayLam").value; var tongLuong = luongMotNgay*soNgayLam; var currentFormat = new Intl.NumberFormat("vn-VN"); var tongLuongFormat = currentFormat.format(tongLuong); d...
import React from 'react' import { StyleSheet } from 'quantum' import { connect, hover as hoverState } from 'bypass/ui/state' import { Condition } from 'bypass/ui/condition' import { Tooltip } from 'bypass/ui/tooltip' import Column from './Column' const styles = StyleSheet.create({ self: { width: '100%', dis...
const language = { // 中文 cn: { add_btn: '添加按钮', add_title: '添加区域', del_btn: '删除按钮', del_title: '删除区域', next: '下一页', next_title: '下 page_size (→)', prev: '上一页', prev_title: '上 page_size (←)', first_title: '首页 (Shift + ←)', last_title...
"use strict"; const SINE = "sine"; const SQUARE = "square"; const SAWTOOTH = "sawtooth"; const TRIANGLE = "triangle"; const CUSTOM = "custom"; const values = [ SINE, SQUARE, SAWTOOTH, TRIANGLE ]; const OscillatorType = { SINE, SQUARE, SAWTOOTH, TRIANGLE, CUSTOM, [Symbol.hasInstance](value) { return ...
const VERSION = 'v1' const BASE_URL = `https://mixd-server.herokuapp.com/api/${VERSION}` //const BASE_URL = `http://localhost:3000/api/${VERSION}` import { AsyncStorage } from 'react-native' const COCKTAIL_URL = BASE_URL + '/cocktails' const INGREDIENT_URL = BASE_URL + '/ingredients' const GARNISH_URL = BASE_URL + '/g...
const logger = { log: function (e) { console.log('[', new Date(), ']:', e); } } module.exports = logger;
import React from 'react'; import PropTypes from 'prop-types'; import { Segment, Icon } from 'semantic-ui-react'; const Layout = ({ component: Component, props, user, logout }) => ( <div className="full-height container"> <div className="top-menu"> <span className="top-menu-company"> Askimovie </span> ...
import React from 'react'; import { Text, View, StyleSheet, ViewPropTypes } from 'react-native'; import PropTypes from 'prop-types'; import { InputItem } from '@ant-design/react-native'; import CommonStyles from '@/commonStyles'; import BaseComponent from '@/components/common/baseComponent'; /** * 标签输入框 * ...
/* function getContentAndReplace(){ $.get("/stockdata/bidu",function(data,status){ $(".starter-template").append(data); var myData = JSON.parse(data); alert(myData[0].Date); }); } */ function switcher(txt){ $(".nav.navbar-nav").children(".active").removeClass("active"); $(".nav.navbar-nav").children(":contains("+tx...
class Filter { constructor() { this.size = 3; this.step = 1; this.filter = [1, 0, 1, 0, 1, 0, 1, 0, 1]; } run(input){ let result = 0; input.forEach((value, index)=>{ result += value * this.filter[index]; }); //console.log('Filtered input [' +...
import React from 'react'; import Withdrawal from '../../components/setting/Withdrawal'; import Header from '../../components/main/Header'; const withdrawal = () => { return ( <> <Header type="white" backButton={true} title="회원탈퇴" /> <Withdrawal /> </> ); }; export default withdrawal;
import { addDecorator } from '@storybook/vue'; import vuetify from "../src/plugins/vuetify-manual"; addDecorator(() => ({ vuetify, template: '<v-app><v-content><story/></v-content></v-app>', })); //Gql Mock import mockGqlClient from '../gqlc-mock/gqlc-mock-data' //MOCK GQLC PROVIDERS import authProvider fro...
module.exports = function(){ var express = require('express'); var router = express.Router(); router.get('/', function(req, res, next) { res.render('addroom', { title: 'Jing\'s Pets' }); }); router.post("/", function(req, res){ console.log("ADDING Room"); console.log(req.bo...
/* Copyright (c) 2010 Mike Desjardins 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 restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
var s = null; /// when a clients video is ready to start easyrtc.setStreamAcceptor( function(callerEasyrtcid, stream) { var video = document.getElementById('caller'); easyrtc.setVideoObjectSrc(video, stream); console.log("accepted"); }); // when a client closes video easyrtc.setOnStreamClosed( function (c...
var fs = require('fs'); var path = require('path'); var express = require('express'); const router = express.Router(); const controllerSuffix = "-controller.js"; var applyAPIDirectory = function(app, prefix, rootDir){ var files = fs.readdirSync(path.join(__dirname, "../"+rootDir) ); if (files == null){ retur...
import {LOCATION_CHANGE} from 'react-router-redux'; import {del} from '../../../utils/http'; import {REDUCERS_GROUP_PREFIX, ENDPOINT_ACCOUNT} from './constants'; import {addInfoToast} from '../../../utils/notifications'; import {LOGOUT} from '../auth/session'; const REDUCER_NAME = `${REDUCERS_GROUP_PREFIX}/delete`; ...
const express = require('express'); const logger = require('morgan'); const stocks = require('./routes/stocks') ; const users = require('./routes/users'); const bodyParser = require('body-parser'); const mongoose = require('./app/configurations/database'); //database configuration var jwt = require('jsonwebtoken'); var...
import mutations from "../../../src/store/mutations"; describe("store mutations", () => { it("should be able to add food items to state", () => { const state = { foodItems: [], }; const foodItems = [ { hints: [ { foodId: "food_amqspy5ap567v6bun60usbgsaor7", ...
import React from 'react'; import { bindActionCreators } from 'redux'; import {Link} from 'react-router'; import { connect } from 'react-redux'; // Action creators import actionCreators from '../actions/actionCreators' // Components import Head from '../components/Head'; const Main = React.createClass({ handleClic...
var app = angular.module('myApp.services', []); app.factory('UserService', ['$http', function($http){ var toReturn = {}; //does a GET request toReturn.get = function(){ return $http.get('/api/users'); } //does a POST request toReturn.create = function(data){ return $http.post('/api/users', data); ...
import { createAction, handleActions } from 'redux-actions'; import { Map, List } from 'immutable'; import iassign from 'immutable-assign'; const TEXT_WRITE = 'editor/TEXT_WRITE'; const INSERT_COMPONENT = 'editor/INSERT_COMPONENT'; const CHANGE_CURRENT = 'editor/CHANGE_CURRENT'; const CHANGE_STYLE = 'editor/CHANGE_STY...
import { makeActionCreator } from '../../../utils/helpers/redux'; export const USER_RATE_REQUEST = 'rate/USER_RATE_REQUEST'; export const SET_USER_REQUEST = 'rate/SET_USER_REQUEST'; export const USER_RATE_SUCCESS = 'rate/USER_RATE_SUCCESS'; export const SET_USER_SUCCESS = 'rate/SET_USER_SUCCESS'; export const CLEAR_ST...
let url = { get: function (key) { return getUrlValueByKey(key); }, add: function (param) { return addUrlParam(param); }, delete: function (params) { return deleteUrlParams(params); } }; /** * 根据参数名获取参数值 * @param key * @returns */ function getUrlValueByKey(key) { ...
/*global define, App*/ define([ 'jquery', 'backbone', 'views/home/index', 'views/home/newsList', 'views/home/newsItem', 'views/home/eventsList', 'views/home/eventsItem', 'views/home/publicationsList', 'views/home/publicationsItem', 'collections/news', 'collections/events', 'collections/seminars', 'collecti...
'use strict' const express = require('express') const product = require('../controllers/productController') const api = express.Router() api.get('/products', product.listAll) api.get('/products/:productId', product.getByID) api.post('/products', product.addProduct) api.put('/products/:productId', product.updateProduc...
import {combineReducers} from "redux" import list from './list' let reducer =combineReducers({ list }); export default reducer;
import Component from '@glimmer/component'; import debugLogger from 'ember-debug-logger'; import { action } from '@ember/object'; import { inject as service } from '@ember/service'; import { isBlank } from '@ember/utils'; export default class TwyrSidenavInnerComponent extends Component { // #region Services @servic...
import { RECEIVE_TRANSACTIONS } from '../actions/transactions'; export default (state = { transactions: [], error: null }, action) => { switch (action.type) { case RECEIVE_TRANSACTIONS: const isError = action.error; if (isError) { return { ...state, error: action.payl...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import styles from './Signup.less'; import { signup } from '../redux/actions'; class Signup extends Component { constructor(props) { super(props); this.state = { email: '', passw...
// import something here import { JSONView } from 'vue-json-component' // "async" is optional export default async ({ Vue }) => { // something to do Vue.use(JSONView) }
// eslint-disable-next-line import/no-cycle import dataProvider from './dataProvider'; import { fetchJson } from './fetch'; import storage from '../utils/storage'; const httpClient = (url, options = {}) => { const token = storage.getToken(); const user = {}; if (token) { user.token = token; } return fe...
module.exports = { testRunner: 'jest', runnerConfig: 'e2e/config.json', specs: 'e2e', behavior: { init: { exposeGlobals: true, }, }, configurations: { 'ios.sim.release': { type: 'ios.simulator', build: 'xcodebuild -workspace ios/SpaceSeek.xcworkspace -scheme SpaceSeek -...
module.exports = function(app) { Ember.TEMPLATES['components/social-shareTw'] = require('./template.hbs'); const Share = require('../../../../lib/social-share.js'); app.SocialShareTwComponent = Ember.Component.extend({ classNames: ['social-shareTw', 'social-share'], size: 32, img: ...
import React from 'react'; import { buildImageObj } from '../../lib/helpers'; import imageUrlFor from '../../lib/image-url'; const BlockContent = require('@sanity/block-content-to-react'); const Feature = ({ feature }) => { return ( <div className="feature-module__feature"> {feature.icon && feature.icon.a...
// Load dependencies (for their side effects) import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap-vue/dist/bootstrap-vue.css'; import '@fortawesome/fontawesome-free/css/all.css'; import * as Sentry from '@sentry/browser'; import * as Integrations from '@sentry/integrations'; import Vue from 'vue'; import { Bo...
import React from "react"; import Practitioner from "./Practitioner"; import ErrorBoundary from "./ErrorBoundary"; function PractitionerCaught(){ return( <ErrorBoundary> <Practitioner /> </ErrorBoundary> ) } export default PractitionerCaught
// (function() { var email = document.getElementById('email'); var password = document.getElementById('password'); var submitButton = document.getElementById('submit'); submitButton.onclick = function() { console.log(email.value); firebase.auth().signInWithEmailAndPassword(email.value, password.value)....
/* * Wraps the matrix-js-sdk to provide Extended CS API functionality as outlined * in http://matrix.org/docs/spec/#client-server-v2-api-extensions */ "use strict"; var extend = require("extend"); var request = require("request"); var matrixSdk = require("matrix-js-sdk"); var modelRequests = require("../models/req...
export const frontendContent = { description: "Frontend development is the part of coding that the user interacts with. This type of coding results in a UI (User Interface). For instance: Developing the code for this purple element, which you are looking at right now is part of the frontend", stack: `The basic ...
import React from 'react'; import renderer from 'react-test-renderer'; import configureStore from 'redux-mock-store'; import notificationLogsReducer from '../../store/notificationLogs/notificationLogs.reducers'; const middlewares = []; const mockStore = configureStore(middlewares); const fetchNotificationLogsSuccess ...
<script type="text/javascript"> function changeFrete(){ vtexjs.checkout.getOrderForm().done(function(orderForm) { var email = orderForm.clientProfileData.email; var state = orderForm.shippingData.address.state; var products_total = parseFloat((orderForm.totalizers[0].value)/100).toFixed(2); v...
/* класс, описывающий студента */ class Student{ name; surname; lastName; faculty; speciality; listDisciplines; /*список дисциплин*/ constructor(name, surname, lastName, faculty, speciality) { this.name = name; this.surname = surname; this.lastName = lastName; ...
/* eslint-disable no-unused-vars */ /* eslint-disable import/no-unresolved */ import Vue from 'vue'; import VueSweetalert2 from 'vue-sweetalert2'; import { ValidationObserver, ValidationProvider, extend, localize, configure, } from 'vee-validate'; import TW from 'vee-validate/dist/locale/zh_TW.json'; import *...
/** * 教师的个人档案 */ $(function(){ var roleId=GetQueryString("roleId"); var id=GetQueryString("id"); $.ajax({ url:"../../gettecherListById.do", type:"post", dataType:"json", data:"id="+id, success:function(data){ if(data.teacher.accountStatus==1){ data.teacher.accountStatus="正常"; }else{ data.te...
import ProjectCard from "./ProjectCard"; export default function Projects({ projects }) { return ( <section className="pb-10"> <h1 className="mb-6 text-lg font-bold">My Projects</h1> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> {projects.map((p) => { return...
/* The ParkingMap object handles all the work of parsing the parking data and rendering the map */ function ParkingMap() { var _mapDivId = ""; // set in calling template, tells ParkingMap target div var _parkingData = null; // hold parking garage array from api var _map; // holds google map reference } /* "P...
Slingshot.fileRestrictions("myFileUploads", { allowedFileTypes: ["audio/wav", "video/webm", "image/png"], maxSize: 20 * 1024 * 1024 // 20 MB (use null for unlimited). });
"use strict"; var util = require( "util" ), path = require( "path" ), yeoman = require( "yeoman-generator" ), yosay = require( "yosay" ), chalk = require( "chalk" ); // TODO : generate jenez files (cf. http://yeoman.io/generators.html#writing-your-first-generator) var KrknJenezGenerator = yeoman.gener...
// Create a module that exports a function that takes a number // as a parameter and stores it in a list. The list should not be accessible // from outside the module. // Export another function that returns a version of the data list that // is sorted in ascending order. The function you use to sort the data corre...
const UserService = require("../services/user.service"); const getById = async (req, res) => { try { const id = req.params.id; const user = await UserService.getUserByIdFull(id); res.json({ user }); } catch (e) { console.log(e); res.status(500).json({ message: "Error on get user by id" }); ...
import React, { useState } from "react"; import { Link, useHistory } from "react-router-dom"; import axios from "axios"; import { TextField, Button } from "@material-ui/core"; import appLogo from '../../../assets/branding/logo.png'; import PasswordTextField from "../../../Components/PasswordTextField/PasswordTextField"...
var fs = require("fs"); module.exports = function(app) { //========read db.json file and return all notes as json =========================== app.get("/api/notes", function (req, res) { fs.readFile("db/db.json", function(err, data) { if (err) throw err; // console.log(JSON.par...
/** * Created by user on 04.03.15. */ 'use strict'; angular.module('dotted-linechart-directive', []) .directive('crmDottedLinechart', function ($compile, $timeout, ChartInit) { return { scope: { options: '=' }, templateUrl: 'components/directives/COMMON/dottedLineChart/dottedLineChartT...
import React, {Component} from "react"; import FontAwesome from "react-fontawesome" class Task extends Component { render() { return( <div> <div className="container"> <div className="row"> <div className="col-xs-6"> ...
export default { SET_ADDRESS: 'SELECTED/SET_ADDRESS', SET_CONTACT: 'SELECTED/SET_CONTACT', SET_WALLET: 'SELECTED/SET_WALLET', };
/*global define*/ define([ 'jquery', 'underscore', 'backbone', 'templates', 'views/members/memberPublication', 'collectionview' ], function ($, _, Backbone, JST, MemberPublicationView) { 'use strict'; var MembersPublicationsView = Backbone.CollectionView.extend({ template: JST[...
import Link from "next/link"; import { Container, makeStyles, Typography, List, ListItem, Box, Button, } from "@material-ui/core"; import { Alert, AlertTitle } from "@material-ui/lab"; import { Formik, Form } from "formik"; import * as Yup from "yup"; import TextInput from "../../Component/Form/TextInput"; impo...
//First solution function greet(name){ if(name === "Johnny") return "Hello, my love!"; else return "Hello, " + name + "!"; } //Second solution function greet(name){ const greeting = (name === "Johnny") ? `Hello, my love!` : `Hello, ${name}!`; return greeting; } //Third solution function greet(name){...
const express = require('express') const write = require('./write') const getFullURL = require('./get-full-url') const delay = require('./delay') const utils = require('../utils') module.exports = (db, name, opts) => { const router = express.Router() router.use(delay) function show(req, res, next) { let cha...
const Database = require('better-sqlite3') const DEBUG = process.env.DEBUG || false const db = new Database(':memory:', { memory: true, verbose: DEBUG ? console.log : null, }) const userTableQuery = db.prepare(` CREATE TABLE IF NOT EXISTS users ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT ) ...
import React from "react"; import App from "next/app"; import { ThemeProvider } from "@material-ui/styles"; import theme from "../src/theme"; import Callback from "../components/Callback"; import { DefaultSeo } from "next-seo"; import "react-multi-carousel/lib/styles.css"; import "@fortawesome/fontawesome-svg-core/styl...
const fs = require('fs'); // From the node standard library // Simple cat // try { // // Dangerous code // const data = fs.readFileSync('flintstones.txxxt', 'utf-8'); // Blocking // console.log( data ); // } catch (err) { // console.log('there was an error'); // console.log( err ); // console.log('Exiting ...
'use strict'; var zmq = require('zmq'); var _ = require('lodash'); var debug = require('debug')('martinet:worker'); function Worker(port, options) { if (!(this instanceof Worker)) { return new Worker(port, options); } this.pushSocket = zmq.socket('push'); this.pullSocket = zmq.socket('pull');...
import React, { useReducer } from "react"; export const Expenses = React.createContext(); const initialState = { expenses: JSON.parse(localStorage.getItem("expenses")) || [], }; function reducer(state, { type, payload, index }) { const { expenses } = state; console.log("reducer"); switch (type) { case "UPDATE_...
/** * DataTable */ (function () { /** * * @type {DataTable|{}} */ var events = {}; var default_field_options = { name: '', title: '', defaultContent: '' }; function DataTable(name) { Component.call(this); this.name = name; this.option...
import 'intl' import * as React from 'react' import {render as rtlRender, screen} from '@testing-library/react' import {IntlProvider, FormattedDate} from 'react-intl' const FormatDateView = () => { return ( <div data-testid="date-display"> <FormattedDate value="2019-03-11" timeZone="utc" ...
export const LOGIN_USER = 'LOGIN_USER'; export const LOGOUT_USER = 'LOGOUT_USER'; export const FETCH_ME = 'FETCH_ME'; export const FETCH_USER = 'FETCH_USER'; export const CHANGE_STATUS = 'CHANGE_STATUS'; export const FETCH_BIRTHDAY_USERS = 'FETCH_BIRTHDAY_USERS'; export const SEARCH_USER_BY_FULL_NAME = 'SEARCH_USER_BY_...
import React, {Component} from 'react'; import {Tabs, Tab, Grid, Cell} from 'react-mdl'; import {Content} from 'react-mdl'; import {projectListData} from '../../Utilities/projectListData'; import ProjectList from './projectList'; class Projects extends Component{ constructor(props){ super(props); this.state={acti...
var LayoutSlot = function (top, left, width, height) { this.top = 0, this.left = 0, this.width = 0, this.height = 0, "undefined" != typeof top && (this.top = top), "undefined" != typeof left && (this.left = left), "undefined" != typeof width && (this.width = width), "undefined" != typeof height && (t...
export const cities = [ { id: 1, city: 'Swampscott', humidity: 0.50 }, { id: 2, city: 'Marblehead', humidity: 0.55 }, { id: 3, city: 'Boston', humidity: 1.0 }, { id: 4, city: 'Woburn', humidity: 0.25 } ]
const sql = require('../db') const errorHandler = require('./helper') const Task = function (task) { this.id = task.id || null; this.name = task.name; this.description = task.description; this.workerId = task.workerId; this.groupId = task.groupId; } Task.create = (task, callback) => { sql.quer...
import { GraphQLNonNull, GraphQLInt, GraphQLError } from 'graphql' import DeleteUserType from './types' import {connect} from '../../connection' export default{ type:DeleteUserType, args:{ id:{ type:GraphQLNonNull(GraphQLInt) } }, async resolve(parentValue,args)...
import React from "react"; import { Link } from "react-router-dom"; import logo from "./logo.png"; import DrawerToggleButton from "../sideDrawer/drawerToggleButton"; const Header = props => ( <header className="toolbar_wrapper"> <div className="toolbar"> <nav className="toolbar_navigation"> <div className=...
var express = require('express'); var mongoose = require('mongoose'); var config = require('config'); var path = require('path'); var passport = require('passport'); var BasicStrategy = require('passport-http').BasicStrategy; var bodyParser = require('body-parser'); var User = require('./models/user'); var app = expre...
/** * Created at 17/6/22. * @Author Thunder King Star. * @Email 332793511@qq.com */ import { combineReducers } from 'redux' import counter from './counter' export default combineReducers({ counter })
document.addEventListener("DOMContentLoaded", () => { //prevent "Confirm Form Resubmission" dialog boxes if (window.history.replaceState) { window.history.replaceState(null, null, window.location.href); } //search-bar // TODO ajax const searchForm = document.querySelector("#search-form"...
$(document).ready(function(){ $(document).foundation('equalizer', 'reflow'); $(document).foundation({ equalizer : { // Specify if Equalizer should make elements equal height once they become stacked. equalize_on_stack: true, // Allow equalizer to resize hidden elements act_on_hidden_el: f...
import React, {Component} from 'react'; import {View, Text, TouchableOpacity} from 'react-native'; export default class Header extends Component{ render(){ return( <View style={{ flexDirection: 'row' }}> <TouchableOpacity style={{marginRight:310, marginLeft:10}} onPress={this.toggleDrawer.bind(this)...
import Vue from 'vue' import iView from 'iview' //引入iview库 import 'iview/dist/styles/iview.css' //使用css Vue.use(iView)
import { ADD_MESSAGE, CLEAR_MESSAGES, DELETE_MESSAGE, } from "../constants/index"; const intialState = []; function messageReducers(state = intialState, action) { switch (action.type) { case ADD_MESSAGE: return [...state.slice(), action.payload]; case CLEAR_MESSAGES: return []; case DE...
import { Well, Table, Panel, Col, Row } from 'react-bootstrap'; import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { getAllUsers } from '../actions/usersActions'; import { updateOneTick } from '../actions/graphActions'; import UserGenerateButton fr...
({ loadContactList: function(component, event, helper) { // By Default make sort field is 'FirstName' of contact object // call the helper function with pass sortField Name debugger; helper.onLoad(component, event, 'FirstName'); }, openPrimaryFromNavigationAPI: function(componen...
/** * Cluster-based worker queue. * * @package rij * @author Andrew Sliwinski <andrew@diy.org> */ /** * Dependencies */ var cluster = require('cluster'), events = require('events'), util = require('util'); var Redis = require('./redis'); /** * Constructor */ function Cluster (c...
// Copyright (c) 2016-2018, BuckyCloud, Inc. and other BDT contributors. // The BDT project is supported by the GeekChain Foundation. // All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Red...
/** * Created by gautam on 12/12/16. */ import React from 'react'; import BookedMenu from './BookedMenu'; import ajaxObj from '../../data/ajax.json'; import $ from 'jquery'; import Base from './base/Base'; import Coupons from './common/Coupons'; import {couponApplied} from '../actions'; import {connect} from 'react-r...
import React, {useState} from 'react'; import { Table, Button, Row, Col, Input, Form } from 'antd'; import axios from 'axios'; import infosubvenciones_columns from '../table_columnas/infosubvenciones'; import { DOMAIN } from '../utils'; const layout = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, ...
var pool = ( function () { 'use strict'; var urls = []; var callback = null; var results = null; var inLoading = false; pool = { getResult : function(){ return results; }, load: function( Urls, Callback ){ if ( typeof Urls == 'string' || Ur...