text
stringlengths
7
3.69M
////////////////////////////////////////////////////////////////////////////////////////////////////////// // test API Gateway endpoint ////////////////////////////////////////////////////////////////////////////////////////////////////////// function testAPI() { console.log('testAPI: starting'); fetch('https:/...
import { Switch, Route } from 'react-router-dom'; import Downloads from './Downloads'; import Upload from './Upload'; import Logs from './accessLogs' const Routes = (user) => { return ( <main> <Switch> <Route exact path="/upload" component={() => <Upload user={user} />}></Route> <...
const path = require('path'); const stream = require('stream'); const express = require('express') const multer = require('multer') const parse = require("csv-parse/lib/sync"); const stringify = require('csv-stringify/lib/sync'); const iconv = require('iconv-lite'); const app = express(); const port = process.env.PORT...
var day0 = [], day1 = [], day2 = [], day3 = [], day4 = [], day5 = [], day6 = []; var emp0 = [], emp1 = [], emp2 = [], emp3 = [], emp4 = [], emp5 = [], emp6 = []; var month_ar = []; var colors = ['#79c7fa', '#F6DE3D' ,'#A6F7B8', '#e3b8ff'], red = '#ff315c', green = '#00CC99'; function randomColor(){ ret...
var searchData= [ ['fromcstring_18',['fromCString',['../poem__sorter_8h.html#ac975ff6420860ee734d7c16349fba1b7',1,'poem_sorter.cpp']]] ];
//CRUD functionality for users account information const router = require("express").Router(); const user = require("../models/user-models"); const userInstance = new user(); // router.get("/", userInstance.getUser); router.put("/:id", userInstance.updateUser); router.delete("/:id", userInstance.deleteUser); module...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ document.addEventListener("deviceready",onDeviceReady,false); function onDeviceReady(){ } function btnCallFun(){ window.plugins.C...
import React from 'react' class Page1 extends React.Component { constructor(props) { super(props) this.state = { foo: '' } } render() { return ( <h1>Page 1</h1> ) } } export default Page1
require('./app/main') require('./app/today') function init() { } addEventListener('DOMContentLoaded', () => { init() })
const products = [ { id: Math.random(), name: "Electic Bulb", image: "img1.jpg", }, { id: Math.random(), name: "Electic Bulb", image: "img1.jpg", }, { id: Math.random(), name: "Electic Bulb", image: "img1.jpg", }, { id: Math.random(), name: "Electic Bulb", i...
import angular from 'angular' import uirouter from 'angular-ui-router' import routing from './appConfig' import home from './features/home' angular.module('app', [uirouter, home]) .config(routing)
"use strict"; var React = require('react'); var container_1 = require('../components/container'); ; function AboutPage(props) { return (<container_1["default"] size={4} center> <h2 className="caps">About Us</h2> <p> Rangle.io is a next-generation HTML5 design and development firm dedicat...
var classde_1_1telekom_1_1pde_1_1codelibrary_1_1ui_1_1activity_1_1_p_d_e_account_authenticator_activity = [ [ "onCreate", "classde_1_1telekom_1_1pde_1_1codelibrary_1_1ui_1_1activity_1_1_p_d_e_account_authenticator_activity.html#a7138d6d815e3ed6165f4010f61b699d5", null ] ];
/** * Created by Pradip on 5/11/2016. * Modified by Jake on 8/26/18 */ var BUILD = false; var DEV = false; var PROD = true; // Ends configuration setting if (BUILD && DEV) { throw "Cannot have different environment true at same time"; } var gulp = require('gulp'), sass = require('gulp-sass'), sassGlob...
import React from "react"; import { storiesOf } from "@storybook/react"; import { withKnobs } from "@storybook/addon-knobs"; import { getStoryName } from "storybook/storyTree"; import L10n from "@paprika/l10n"; import ShowcaseStory from "./examples/Showcase"; import { OverflowMenuStory } from "./OverflowMenu.stories.st...
import React, { Component } from "react"; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import axios from 'axios'; import { Platform, Image, View, StatusBar, Linking, TouchableHighlight, Text, ImageBackground, ScrollView, Switch, FlatList, TouchableOpacity } from "react-native"; imp...
/** * Created by Simon on 11-11-2014. */ $(function() { var jsonData = []; $.ajax({ crossDomain: true, type:"GET", contentType: "application/json; charset=utf-8", async:false, url: "js/groups.json", dataType: "json", success: function( data ) { ...
function html_encode(str) { var s = ""; if (str.length == 0) return ""; s = str.replace(/&/g, "&amp;"); s = s.replace(/</g, "&lt;"); s = s.replace(/>/g, "&gt;"); s = s.replace(/\'/g, "&#39;"); s = s.replace(/\"/g, "&quot;"); return s; } KE.lang['code'] = "插入程序代码或脚本"; KE.plugin['code'] = { clic...
/*global ODSA */ // Explain why sets top at position n-1. $(document).ready(function() { "use strict"; var av_name = "astackTopCON"; // Load the config object with interpreter and code created by odsaUtils.js var config = ODSA.UTILS.loadConfig({av_name: av_name}), interpret = config.interpreter; // ...
const reverseString = require("./reverse"); test("is the functions working", () => { expect(reverseString().toBeDefined()); });
/** * Created by yonixee on 15/11/2. */ $(function() { var formTmpl = '<div><div class="wonuo-panel line">' + '<h2>设置抢单时间</h2>' + '<em>(选定时间后, 等待时间到达会自动完成下单)</em><br /><br />' + '<input name="hour" type="number" class="input" min="0" max="23" value="22" />时' + '<input name="minute" type="numbe...
// Returns a function that calls the given method on the given instance. function callback(instance, method) { return function() { method.apply(instance, arguments); }; } // Adds the given CSS class name to the given element. function cssAddClass(element, className) { cssClassManipulate(element, className,...
'use strict'; const imdb = require('../src/imdb'); const actor = 'nm0000243'; //DENZEL_IMDB_ID require('../src/model'); var mongoose = require('mongoose'), Movie = mongoose.model('Movie'); //GET movies/populate exports.populate_the_db = async function(req, res){ const movies = await imdb(actor); console.lo...
/*获取服务器时间*/ function getServerTime(){ var xmlHttp = false; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlHttp = false; } } if (!xmlHttp && typeof XM...
let fields = { FirstName: 'Cris', LastName: 'Test', Email: '[email protected]', Phone: '1234567890', Title: 'Tester', Job_Role__c: 'Other', Company: 'Spiralyze', Country: 'Philippines', Main_Product_Interest__c: 'Digital, Social' }; let dropdowns = [ 'Job_Role__c', 'Countr...
'use strict' const path = require('path') const config = {} module.exports = function() { // Already initialized, don't change if ('rootdir' in config) return config // Store app root directory config.rootdir = __dirname // Load custom config.json try { const cfgJson = require('fs').readFileSync('...
// Given 2 array, find if each element of first array has squared value in other array. function isArraySame(arr1, arr2){ //[1,2,3] , [9,4,1] if(arr1.length > arr2.length) return false; let result = true; let frequencyCounter1 ={} ; frequencyCounter2 ={}; for(let val of arr1){ freque...
Tennisify.Views.NewUser = Backbone.ErrorView.extend({ template: JST['users/form'], events: { "click .create-user": "createUser" }, className: "user-form .col-md-6 .col-md-offset-3", tagName: "form", createUser: function (event) { event.preventDefault(); var attrs = $(event.delegateTarget).seri...
import React from 'react'; import FancyBorder from "./FancyBorder"; import ErrorBoundary from "./ErrorBoundary"; import Dialog from "./Dialog"; function WelcomeDialog() { throw "Error"; return ( <Dialog title="Welcome" description="Thank you for visiting our spacecraft!"/> ); } export default We...
import React, { Component } from 'react'; import { Card, Button } from 'reactstrap'; import { faThumbsDown, faThumbsUp, faTrashAlt } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { isEmpty } from "../../tools"; import 'react-quill/dist/quill.snow...
function date_time(id) { date = new Date; year = date.getFullYear(); month = date.getMonth(); months = new Array('Jan', 'Febr', 'Mar', 'Apr', 'May', 'June', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'); d = date.getDate(); day = date.getDay(); days = new Array('...
import React, { useState, useEffect } from "react"; import { Route, Switch } from "react-router-dom"; import { CurrentUserContext } from "../../contexts/CurrentUserContext"; import { NewsContext } from "../../contexts/NewsContext"; import Header from "../Header/Header"; import Main from "../Main/Main"; import Footer fr...
/* * @lc app=leetcode.cn id=685 lang=javascript * * [685] 冗余连接 II */ // @lc code=start /** * @param {number[][]} edges * @return {number[]} */ var findRedundantDirectedConnection = function (edges) { const n = edges.length; // 并查集 let vector = []; // 初始化 const init = () => { vector ...
import React from 'react' import { Spinner, Button, Container } from 'reactstrap' import { useCreatedPhrases, useCreatedSentiments } from 'hooks/useEvents' import { Phrase } from 'components/Phrase' import { Sentiment } from 'components/Sentiment' export default function Landing () { const createdPhrases = useCreat...
app.factory('roomCrudAdminServ',function(restServ){return restServ.getCrud('/room/:id','ru');}); app.factory('roomTypeCrudAdminServ',function(restServ){return restServ.getCrud( '/room/room_type', { getAll: {method: 'GET', isArray: true}, updateAll: {method: 'PUT', isArray: true} } );}); app.factory('room...
import React from 'react'; import './Popup.css'; export const Popup = ({ children, handleShowPopup }) => { return ( <div className="popup-wrapper"> <div className="popup-container"> <span className="close-icon" onClick={() => handleShowPopup(false)}> X </span> <div classNa...
var largestRectangleArea = function(heights) { if (heights == null || heights.length == 0) { return 0; } let stack = []; let max = 0; let arrayCounter = 0; while (arrayCounter < heights.length) { // push index to stack when the current height is larger than the previous one if ( stack.leng...
Ext.ux.customRecord = Ext.extend(Ext.data.Record,{ getRecord: function(type){ if (type == 'BRF' || type == 'BRFP') { return [ { name: "id" }, { name: "kode_brg" }, { name: "nama_brg" }, { name: "prj_kode" }, ...
function unk(){ console.log('unk') } unk();
import products from './products.json'; /** True = 65%, False = 35% */ const rejectByChance = () => { return Math.random() <= 0.35; }; /** Emulate get request */ export const getProducts = ({ commit }) => new Promise((resolve, reject) => { if (rejectByChance()) { return reject({ error : 'something went wrong'...
/*TMODJS:{"version":48,"md5":"78c4d2fef9a07acde72fc2265d97d414"}*/ define(function(require) { return require("../template")("rec/list", function($data, $id) { var $helpers = this, $each = $helpers.$each, data = $data.data, $value = $data.$value, $index = $data.$index, $escape = $helpers.$escape, $out = ""; ...
var app3 = new Vue({ delimiters: ['[[', ']]'], el: '#app-3', data: { message: jsonObject[0], beg: 0, end: 23, range: [0,1,2,3,4,5,6,7,8,9,10,11,12,13 ,14,15,16,17,18,19,20,21,22,23] }, methods: { getData: function (i) { this.message ...
function sortArray(array, order) { return order == 'asc' ? array.sort((a, b) => a - b) : array.sort((a, b) => b - a); } console.log(sortArray([14, 7, 17, 6, 8], 'asc')); console.log(sortArray([14, 7, 17, 6, 8], 'desc'));
self.__precacheManifest = (self.__precacheManifest || []).concat([ { "revision": "2c4526ed69bedd4b07581ba33a5ffb1b", "url": "/goit-react-hw-02-phonebook/index.html" }, { "revision": "38b4ee5f8fe2f881f155", "url": "/goit-react-hw-02-phonebook/static/css/2.764ccc25.chunk.css" }, { "revision"...
var navs = [{ "title": "业务管理", "icon": "fa-paper-plane-o", "spread": true, "children": [{ "title": "服务项目", "icon": "fa-navicon", "href": "yewumanage/serviceitems/index.html" }, { "title": "商家管理", "icon": "fa-plane", "href": "yewumanage/businessmanage/index.html" }, { "title": "工单管理", "icon": "&#x...
import React, { Component } from 'react' import './App.css' import Title from './components/Title' import Form from './components/Form' export class App extends Component { constructor(props) { super(props) this.state = { items: [ {name: "Acheter le pain"}, {name: "Appeler Gill...
describe('common.js', function(){ var onSuccess = function(res){ console.log('onSucess', res) } var onError = function(res){ console.log('onError', res) } it('$NC 객체 초기화', function(){ //console.log($NC) expect( typeof $NC ).toBe('object'); expect( $NC.G_USERINFO ).toBeNull(); //localStorage.setItem(...
var flickrApp = angular.module('flickrApp', []); flickrApp.controller('flickrCtrl', function ($scope, $http) { $scope.tag = "dogs"; $scope.newest = true; $scope.quantity = 10; $scope.page = 1; $scope.search = function () { $http.get('/Umbraco/Api/Images/GetJson?tag=' + $scope.tag).success(...
import React, { PureComponent } from 'react'; import utils from '../../utils/utils'; /* |-------------------------------------------------------------------------- | Header - PlayingBar |-------------------------------------------------------------------------- */ export default class TrackCover extends PureCompon...
var searchData= [ ['media_5froot',['MEDIA_ROOT',['../namespaceblogproj_1_1settings.html#a614b4b3b7f6280602a354734a9574444',1,'blogproj::settings']]], ['media_5furl',['MEDIA_URL',['../namespaceblogproj_1_1settings.html#abd9b885dfabb4265579418f19ccd4706',1,'blogproj::settings']]], ['middleware',['MIDDLEWARE',['../n...
(function() { return function(req) { return { "links": [ {source:0,target:1}, {source:1,target:2}, {source:2,target:3}, {source:3,target:4}, {source:4,target:5}, {source:5,target:6} ...
/* Write a function that takes an (unsigned) integer as input, and returns the number of bits that are equal to one in the binary representation of that number. Example: The binary representation of 1234 is 10011010010, so the function should return 5 in this case */ let countBits = function(n) { let ones = 0; ...
import React from 'react'; import './SearchBar.css'; class SearchBar extends React.Component{ constructor(props){ super(props) this.search=this.search.bind(this); this.handleTermChange=this.handleTermChange.bind(this); } handleTermChange(e){ this.setState({searchTerm: e.target.value}) console.log(e...
import React from 'react'; import unsplash from '../api/unsplash'; import SearchBar from './SearchBar'; import ImageList from './ImageList'; class App extends React.Component { state = { images: [] }; onSearchSubmit = async (term) => { const response = await unsplash.get('/search/photos', { params: { que...
P.common.traits.Mixin = function(Trait) { var original_init = this.prototype.initialize, events = this.prototype.events || {}; events = _.extend(events, Trait.events || {}); _.extend(this.prototype, Trait); this.prototype.events = events; if (_.isFunction(original_init) && _.isFunction(Trait.initialize)...
var content = { talkelgo: function () { if (this.newcutscene("mission1")) { state.done.knowwari = true } else { this.cutscene("healinfo") } }, talkwari: function () { if (this.newcutscene("mission2")) { state.jhang = 1 state.done.knowsemt = true state.you.maxhp += 1 } else { this.cutscen...
// - Создать произвольный елемент с id = text. Используя JavaScript, сделайте так, чтобы при клике на кнопку исчезал элемент с id="text". let textID=document.getElementById('text'); textID.onclick=()=>{ textID.style.display='none'; } // - Создайте кнопку, при клике на которую, она будет скрывать сама себя. let btn...
import { UPDATE_INIT_STATE } from "./actionTypes"; export const updateState = (state) => dispatch => { alert(); dispatch({ type: UPDATE_INIT_STATE, payload: state }); }
import React from 'react'; import './style.css'; import Logo from './logozaltron.svg'; import { Link } from 'react-router-dom'; import GmailLogo from './gmailLogo.png'; function Header(props){ return( <> <div className="navContainer"> <Link to="/"><img src={Logo} alt="Zaltrons logo" className="log...
import React from "react"; function LogoMain() { return <img className="logo-main" src="./image/prato.png" />; } export default LogoMain;
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ObjetSchema = new Schema( { typeObjetCd: { type: String, required: true, max: 100, }, libelle: { type: String, required: [true,'Le libelle est requis.'], max:[15,'La longeur maximum du libellé n...
// String, objetos, funções, números // const names = new Array('Eduardo', 'João', 'Maria'); /* const names = ['Eduardo', 'João', 'Maria']; const newName = [...names]; newName.pop(); console.log(names); console.log(newName); */ /* names.unshift('Carlos') names.unshift('Wallace') names.shift names.pop() names.pus...
const db = require('./db'); class Message { async setup() { try { await db.query( 'CREATE TABLE message (id SERIAL PRIMARY KEY, text VARCHAR(1023) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP);', [], ); return null; } catch (err) { return err; } } ...
// Challenge 1 solution export default function tobiesFriends(n, scores) { //it doesnt say that i can't sort the array of scores so... const scoresInOrder = [...scores].sort((a, b) => b - a); let numberOfCalls = 0; for(let i=0; i<= n ; i++) { console.log(`Called ${scoresInOrder[i]}`) scoresInOrder[i] =...
let twelve = "12.956px"; console.log(parseInt(twelve)); //получаем целое число, остальное откидываем console.log(parseFloat(twelve)); //получаем десятичное число, остальное откидываем
let api = {}; let contador = 2; let clientes = [{ "_id": 1, "nome": "Raul", "sobrenome": "De melo", "apelido": "Heuhe", "telefone": "", "celular": "16 9999-9999", "email": "[email protected]" }]; api.lista = function (req, res) { res.json(clientes); console.log("lista"); }; api.buscaPorId = function (req, res)...
import React, { Component } from 'react'; import logo from './wolf.jpg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <header className="App-header"> <img src={wolf} className="App-wolf" alt="wolf" /> <p> Edit <code>src/...
import React from 'react'; import carouselImg1 from '../../../images/ship1.png'; import carouselImg2 from '../../../images/ship2.jpg'; import carouselImg3 from '../../../images/ship3.jpg'; import CarouselItem from '../CarouselItem/CarouselItem'; const carouselData = [ { id: 1, img: carouselImg1, ...
import React, { useEffect, useState } from 'react'; import Book from '../Book/Book'; import Header from '../Header/Header'; import './Home.css' const Home = () => { const [books, setBooks] = useState([]); const [loading, setLoading] = useState(true); useEffect((loading) => { fetch('https://banana-t...
/** * Created by Matas on 2017.08.08. */ // result button click event // marks the selected result with a className 'y' $('ol').click(function (e) { if (e.target.tagName === 'BUTTON') { var resultString; const button = e.target; const li = button.parentNode.parentNode; const actio...
import React from 'react'; import {Link,Route} from 'react-router-dom' import Axios from 'axios'; let style = { linkStyle:{ textDecoration:"none", display: "inline-block", marginRight: "10px", height: "50px", lineHeight: "50px", } } export default class Header extends Re...
import React from 'react' class User extends React.Component { render() { console.log(this.props.match) return <h1>Users Users Users Users Users Users Users Users Users Users Users Users</h1> } } export default User
import React, {Component, Fragment} from 'react'; import {Layout, Row, Col, Carousel, List, Breadcrumb, BackTop, } from 'antd'; import {Link} from "react-router-dom"; import {Style} from './style'; const { Footer, Content } = Layout; const data1 = [ '列表法', '作图法', '逐差法', '回归法', '最小二乘法', //...
var DeleteFolderView = Backbone.View.extend({ initialize: function (options) { _.bindAll(this, "render"); this.applicationState = options.applicationState; }, className: "delete-folder-modal", template: Handlebars.compile($("#delete-folder-template").html()), events: { "...
import React from "react"; import styled from "styled-components"; import Grid from "../components/Grid"; import Headline from "../components/Headline"; import MenuCard from "../components/MenuCard"; import HeaderData from "../components/ShowDataHeader"; const Main = styled.div` display: flex; flex-direction: ...
var HOME = BASE_URL + 'user_pwd/'; var pwd_error = 1; var cpwd_error = 1; function changePassword() { var uid = $('#uid').val(); var user_id = $('#user_id').val(); var cpwd = $('#cpwd').val(); //--- current pwd var pwd = $('#pwd').val(); //--- new pwd var cfpwd = $('#cfpwd').val(); if(cpwd.length === 0) ...
import React from 'react'; import "./Hitachivantara.css"; import NavigationBar from './NavigationBar'; class IBMS extends React.Component { render() { return ( <div class="myclasssearch"> <NavigationBar/> <div class="accordion" id="accordionExample"> <div class="card"> <div cla...
/** * Created by conroyp on 4/5/14. */ /** basic barchart module utilizes d3.js to dynamically create a svg barchart from object data. * target element is specified in options, and chart is created there. data array can use whatever * field names you choose but they must be specifed in options. * requires you supp...
import "../styles.css"; import React from "react"; import { PlayerList } from "../components/PlayerList"; import { Layout } from "antd"; const { Content, Sider } = Layout; const GamePage = ({ players }) => { const playersSortedByScore = players.sort((first, second) => first.score <= second.score ? 1 ...
import React, { Component } from "react"; import logo from "./logo.svg"; import "./App.css"; class App extends Component { state = { response: "", username: "", password: "" }; login = async () => { const { username, password } = this.state; const response = await fetch("/login", { me...
const postcss = require('postcss'); module.exports = postcss.plugin('postcss-interim', (opts) => { return (root, result) => { if (!process.argv[2] || process.argv[2].trim() != "--production") { return; } root.walkRules( (rule) => { if (rule.selector.trim() === ".interim &") { ...
import React from "react"; const Trend = ({ trend }) => { return ( <div className="text-blue-500 text-sm w-full md:w-1/3 lg:w-full"> <a href={`${trend.url}`} rel="noopener noreferrer" target="_blank"> {" "} {`${trend.name}`} <span className="text-gray-600"> {trend.tweet_volume} Twee...
'use strict' import React from 'react' import ReactDOM from 'react-dom' import MainWindow from './' import {ipcRenderer} from 'electron' import store from 'Redux/store' import * as actions from 'Redux/actions' require('../../styles/global.scss') ipcRenderer.on('action', (evt, action) => { if ($('.Modal').length &&...
import { renderString } from '../../src/index'; describe(`Returns topic cluster associated with a piece of content.`, () => { it(`unnamed case 0`, () => { const html = renderString(`{{ topic_cluster_by_content_id(123) }}`); }); });
import Header from "../components/Header./Header" function Home() { return ( <div className="App"> <Header /> </div> ) } export default Home;
import {emit} from "../../../utilities/tools"; import {template, createElement} from "../../../utilities/travrs"; // ------------------------------------------------ // ---- CONTENT CORE ---------------- // ------------------------ export default (function Content () { // Create UI element. const element = creat...
const path = require('path') module.exports = { LOG_LEVEL: process.env.LOG_LEVEL || 'debug', // Winston log level LOG_FILE: path.join(__dirname, '../app.log'), // File to write logs to INFORMIX: { // Informix connection options host: process.env.INFORMIX_HOST || 'localhost', port: parseInt(process.env.IN...
/// <reference path="site.js" /> /// <reference path="clean-blog.js" /> /// <reference path="clean-blog.js" /> /// <reference path="https://code.jquery.com/jquery-3.2.1.min.js" /> /// <reference path="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"/>
import { Box, Grid, makeStyles } from "@material-ui/core"; import React from "react"; import { Cards } from "../cards"; const usestyles = makeStyles({ bgClr: { backgroundColor: "#FFF9F4", padding: 40, }, heading: { fontWeight: 700, fontSize: 45, lineHeight: "1.2em", color: "#000000", f...
import React from 'react' import {Parallax} from 'react-parallax'; import Img from 'gatsby-image'; import {graphql} from 'gatsby'; class Header extends React.Component { render() { const imgUrl = this.props.src; const children = this.props.children; const image = this.props.data.img.childIm...
import Vue from 'vue' import vuex from 'vuex' import Supplier from '../../models/BusinessAssociate' import axios from 'axios' import Constants from '../../Utility/constants' const BASE_URL=Constants.BASE_URL const MODEL_URL='suppliers/' const URL=BASE_URL+MODEL_URL Vue.use(vuex) export default{ state:{ sup...
import React from 'react'; import PropTypes from 'prop-types'; import Svg, { Rect, Path } from 'react-native-svg'; type InputType = { size: number, color: string, }; const CreditCardIcon = ({ size, color }: InputType) => ( <Svg version="1.1" xmlnsXlink="http://www.w3.org/1999/xlink" x="0px" y="0...
import React from 'react'; import { ActivityIndicator } from 'react-native'; import { Container } from 'native-base'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import SplashScreen from 'react-native-splash-screen'; class StageScreen extends React.Component { constructor(props) { ...
/** * Created by Wwei on 2016/9/1. */ Ext.define('Admin.view.users.UserController', { extend: 'Admin.view.BaseViewController', alias: 'controller.user', requires: [ 'Admin.view.users.UserForm' ], search: function () { var me = this, grid = me.lookupReference('grid'), ...
jQuery(function($) {'use strict', //copyrights year today=new Date(); year=today.getFullYear(); var start=2019; if(year>start){ $('#c_year').text(start+' - '+year); }else{ $('#c_year').text(start); } if(year<start){ $('#c_year').text(start); } }); //#main-slider ...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const tribeSchema = new Schema({ name: String, members: [ { type: Schema.Types.ObjectId, ref: 'User' } ] }); const Tribe = mongoose.model('Tribe', tribeSchema); module.exports = Tribe;
import { intervalToDuration, parseISO } from 'date-fns'; function register(env) { env.addFilter("between_times", handler); } // TODO: implement unit function handler(input, end, unit) { const res = intervalToDuration({ start: input, end: end}, unit); if (!res[unit]) { throw Error("Unit not implemented yet...
/** * Copyright 2014 Pacific Controls Software Services LLC (PCSS). All Rights Reserved. * * This software is the property of Pacific Controls Software Services LLC and its * suppliers. The intellectual and technical concepts contained herein are proprietary * to PCSS. Dissemination of this information or re...
import React from "react"; import PropTypes from "prop-types"; import styles from "./input.css"; const Input = ({ label, id, type, value, ...attr }) => ( <input aria-label={label} type={type} className={styles.inputField} id={id} value={value} required {...attr} /> ); Input.propTypes =...
import React from 'react' const Calculator = React.createClass({ getInitialState(){ return {numberOne: 0, numberTwo: 0} }, sum(){ var numberOne = this.refs.numberOne; var numberTwo = this.refs.numberTwo; if(numberOne.value && numberTwo.value){ alert('Somaaaaaaaaaaaa de ' + numberOne.value ...