text
stringlengths
7
3.69M
const Router = require('express').Router; const userController = require('../controllers/userController')(); module.exports = Router({mergeParams: true}) .post("/company/user/", async (req, res ,next) => userController.addUser(req, res, next)) .get("/company/:id/users/", async (req, res, next) => userController.getUs...
/** * Created by M. Yegorov on 2015-01-23. */ tinng.class.Router = function(){ tinng.funcs.bind(this); var that = this; this.params = {}; if (location.hash) { var pairs = location.hash.replace('#', '').split('&'); _(pairs).each(function(pair){ var keyval = pair.split('='); that.params[keyval[0]] = k...
import React from "react"; import {Link} from 'react-router-dom' export const LeagueLayout = ({ id, title, image }) => { return ( <div className="row"> <div className="offset-lg-3 col-lg-6 mt-2 mb-2"> <div className="card"> <div className="card-header h3">{title}</div> <div clas...
var Faker = function(bar) { this._foo = bar; };
// Get the HTML Elements let carSelectBox = document.querySelector('#car-select'); let modelSelectBox = document.querySelector('#model-select'); let cars=[{id:1,name:'Maruthi Suzuki'}, {id:2,name:'Suzuki NEXA'}, {id:3,name:'Hyundai Motors'}]; let models=[{id: 1,car_id:1,name:'Swift'},{id:2,car_id:1,...
import { createSlice } from '@reduxjs/toolkit'; const setStoreVariable = (key) => (state, action) => { state[key] = action.payload; }; const mainSlice = createSlice({ name: 'main', initialState: { tracks: null, loading: false, accessToken: null, audioProperties: { valence: 0.5, energ...
// Chess + Engine // Samein Dorazahi // 26/07/21 let pieces = []; let rows = 8; let cols = 8; let grid, cellWidth, cellHeight, backGrid, pnum, pnumr, my, mx, myr, mxr; function setup() { createCanvas(windowWidth, windowHeight); backGrid = createEmptyGrid(cols, rows); grid = createEmptyGrid(cols, rows); cel...
angular.module('gApp.ic', [ 'ui.router' ]) .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { $stateProvider .state('ic', { url: '/ic', views:{ 'mainContainer':{ templateUrl: 'templates/ic/ic.html', con...
import React, { Component } from 'react'; import { StyleSheet, css } from 'aphrodite'; import Button from '@material-ui/core/Button'; import { getHighScore } from '../config/SaveScore'; const styles = StyleSheet.create({ container: { display: 'flex', flex: 1, flexDirection: 'column', ...
import React from 'react'; function Titolo({ text, size }) { return ( <h1 style={{ fontWeight: "bolder", fontSize: size || "2rem", fontFamily: "'Raleway', sans-serif" }} > { text } </h1> ) } export default Titolo;
//阻止时间传递 function stopPropagation(e){ if(e.stopPropagation){ e.stopPropagation(); }else{ e.cancelBuddle=true; } }
// mucko-ui test_waveform_control.js var mucko = require("mucko") var Test = mucko.Test var Base = mucko.Base function inbrowser_waveform(UI) { function getJSONFakeData(n) { return { "length": n, "bits": 8, "sample_rate": 48000, "samples_per_pixel": 512, ...
import Vue from 'vue' import Router from 'vue-router' import msite from '@/pages/msite/msite' import login from '@/pages/login/login' import order from '@/pages/order/order' import shopStroe from '@/pages/shop/shop' import foodType from '@/pages/foodType/foodType' import shopDetail from '@/pages/shopDetail/shopDetail...
function VehicleConstructor(name, wheelNumber, passNumber){ // private variables var name = name; var wheelNumber = wheelNumber; var passNumber = passNumber; var vehicle = {}; // public properties vehicle._name = name; vehicle._wheelNumber = wheelNumber; vehicle.passNumber = passNumb...
var interface_c1_connector_get_service_session_options = [ [ "isActivity", "interface_c1_connector_get_service_session_options.html#afcf55fb3c432c60db1643332bee9560f", null ] ];
ItemList = React.createClass({ mixins: [ReactMeteorData, React.addons.LinkedStateMixin], getInitialState: function () { return { }; }, getMeteorData() { return { items: this.props.module.collection.find({}, {sort: {createdAt: -1}}).fetch() }; }, newItem() { if (this.props.module...
import React, {Component} from 'react' export class Buscador extends Component{ render(){ return( <div className="buscador"> <input placeholder="Buscar un producto..." className="buscador-position"> </input> </div> ) } }
var mutt_2slist_8c = [ [ "slist_new", "mutt_2slist_8c.html#af779a2c5318dd880bb34fc2632fd0997", null ], [ "slist_add_list", "mutt_2slist_8c.html#a52e930a7c9662bda29b33e33b3768a1c", null ], [ "slist_add_string", "mutt_2slist_8c.html#a56a8eca5b8c63f928ae9944661a208bd", null ], [ "slist_compare", "mutt_2sli...
var customShinyInputBinding = new Shiny.InputBinding(); $.extend(customShinyInputBinding, { // This initialize input element. It extracts data-value attribute and use that as value. initialize: function(el) { var val = $(el).attr('data-value'); $(el).val(val); }, // This returns a jQuery object with ...
self.__precacheManifest = [ { "revision": "42ac5946195a7306e2a5", "url": "/static/js/runtime~main.a8a9905a.js" }, { "revision": "5181a65923def710a6da", "url": "/static/js/main.cbb6456b.chunk.js" }, { "revision": "4b53cda33f940ebe9eaf", "url": "/static/js/2.8dcc74a1.chunk.js" }, { ...
export default [ { title: "Home", text: "Home", icon: "fa-home" }, { title: "Signout", text: "Signout", icon: "fa-sign-out-alt" }, { title: "Productlist", text: "My Products", icon: "fa-cart-arrow-down" }, { title: "Search", text: "Search", icon: "fa-search" } ];
$(function(){ var banner=$("#banner"); var pic=$(".banner-Pic");//背景图 var imgs=$(".banner-pic");//banner图 var bannerBox=$(".banner-box")[0]; var list=$(".list"); var bannerLeft=$(".bannerleft")[0]; var bannerRight=$(".bannerright")[0]; var n=0; var t=setInterval(move,2000); function move(){ n++; if(n>=img...
//HEADER SECTION - again abandoning const express = require('express'); var cors = require('express-cors'); const MongoClient = require('mongodb').MongoClient; var mongoose = require('mongoose'); var Schema = mongoose.Schema, ObjectId = Schema.ObjectId; // Connection URL var url = 'mongodb://127.0.0.1:27017/stockS...
import React, { Component } from 'react' import { connect } from 'react-redux' import styles from './ChannelList.scss' import { listChannels, joinChannel } from '../../redux/actions/channels' @connect( state => ({ channels: state.channels }), dispatch => ({ listChannels: () => dispatch(listChannels()), ...
let weather; let a = 0.0; let s = 0.0; let a2 = 0.0; let s2 = 0.0; let osc; const proxy = ""; let sound; let url = "https://cors-anywhere.herokuapp.com/http://api.openweathermap.org/data/2.5/weather?q=Stockholm&units=metric&appid=b48c7729bd6c5816e8c6fb60c20264a6"; function setup() { createCanvas(windowWidth, wind...
/* * Copyright (C) 2021 Radix IoT LLC. All rights reserved. */ SystemPermissionFactory.$inject = ['$http', 'maRqlBuilder']; function SystemPermissionFactory($http, maRqlBuilder) { const permissionsUrl = '/rest/latest/system-permissions'; class SystemPermission { constructor(options) { ...
import React, { PropTypes, Component } from 'react'; import styles from './ScheduleList.module.scss'; import cssModules from 'react-css-modules'; import { ScheduleTable } from 'components'; const parseOfflineData = (data) => ({ departureTime: data.aimed_departure_time, arrivalTime: data.aimed_arrival_time, durat...
// Project an array of videos into an array of {id,title} pairs using forEach() var newReleasesMov = [ { "id": 1, "title": "Hard", "boxart": "Hard.jpg", "uri": "http://vikask/movies/1", "rating": [4.0], "bookmark": [] }, { "id": 2, "title": "B...
(function($){ $.whenAll = function(deferreds){ var defs = deferreds.map(function(def) { var deferred = $.Deferred(); $.when(def).always(deferred.resolve); return deferred; }); return $.when.apply($, defs); }; })(jQuery);
import React,{ Component } from 'react'; import { makeStyles, withStyles } from "@material-ui/core/styles"; import TextField from '@material-ui/core/TextField'; import PropTypes from 'prop-types'; import Grid from '@material-ui/core/Grid'; import Fab from '@material-ui/core/Fab'; import AddIcon from '@material-ui/ico...
import React from 'react' import './RuneStar.scss' class RuneStar extends React.Component { constructor(props) { super(props) this.state = { 1: false, 2: false, 3: false, 4: false, 5: false, 6: false } this.o...
import { Template } from 'meteor/templating' import { addBootstrap4Class } from './utils/addBootstrap4Class' /* * Template helpers for "bootstrap4" templates */ Template.registerHelper('attsPlusFormControlClass', function attsPlusFormControlClass () { return addBootstrap4Class(this.atts, 'form-control') }) Templ...
import React from "react" import Insta1 from "./insta1" import Insta2 from "./insta2" import Insta3 from "./insta3" import Insta4 from "./insta4" import Insta5 from "./insta5" import InstaIcon from "./instagram-icon.inline.svg"; import "./instagram.scss" const Instagram = () => ( <div className="instagram-block"> ...
// view, itemEditView.js define([ 'underscore', 'jquery', 'backbone', 'collections/items', 'text!templates/itemEditViewTemplate.html', 'text!templates/itemEditViewTemplate--attr.html'], function(_,$,Backbone,stokItems,itemEdit,itemAttrEdit) { var itemEditView = Backbone.View.extend({ ...
(function (routeConfig) { 'use strict'; routeConfig.init = function (app) { // *** routes *** // const routes = require('../routes/index'); const events = require('../routes/events'); const attendees = require('../routes/attendees'); const venues = require('../routes/venues'); // *** reg...
/*global alert: false, confirm: false, console: true, Debug: false, opera: false, prompt: false, WSH: false */ /*jslint plusplus: true */ var jQuery, $ = jQuery; (function ($) { "use strict"; var toggleClass = $(".toggle"); // ============================================== // DROPDOWN an...
(function () { 'use strict'; var stats = { 'el': document.getElementById('stats') }; stats.controller = function () { var ctrl = this; ctrl.data = {}; stats.el.addEventListener('stats', function (event) { ctrl.data = event.detail; m.render(stats.el, stats.view(ctrl)); }); }; ...
import React from 'react'; import SignUpForm from './signUpForm'; import './styles/banner.css'; export default class Banner extends React.Component { toggleBanner(event) { event.preventDefault(); if(this.props.toggleBanner) { this.props.toggleBanner(); } } render() { return( <article className="ban...
const x = -0.2; const y = -0.5; const a11 = -1 +(Math.sin(y)/ (Math.cos(x)*Math.sin(y) - 2))*Math.cos(x); const a12 = -Math.sin(y)/ (Math.cos(x)*Math.sin(y) - 2); const a21 = (1 / (Math.cos(x)*Math.sin(y)-2)) *Math.cos(x); const a22 = -1 / (Math.cos(x)*Math.sin(y)-2); const f1= (x, y)=> Math.cos(y+0.5)+x-0.8; con...
import React, { Component } from 'react'; import { View, Text, StyleSheet, TouchableOpacity, Keyboard} from 'react-native'; import { FontAwesome, MaterialCommunityIcons, MaterialIcons, SimpleLineIcons, Entypo, Fontisto, Feather, Ionicons } from '@expo/vector-icons'; import { connect } from 'react-redux'; import { selec...
import styled from "styled-components"; export const BoxCenter = styled.div` position: relative; display: flex; justify-content: space-evenly; flex-wrap: wrap; margin: 0 auto; margin-top: ${(props) => props.marginTop}; text-align: center; a { text-decoration: none; color: red; } @media (max...
let Totalprice = 0; let quantity = []; let countOfitem = []; let cart; function OpenTheCart() { quantity = JSON.parse(localStorage.getItem('quantityArray')); Totalprice = JSON.parse(localStorage.getItem('totalprice')); countOfitem = JSON.parse(localStorage.getItem('countOfitem')); let key = ''; let list = ...
import React from 'react'; import { Container } from './style'; export default function Divisor() { return ( <Container> <div></div> <div></div> </Container> ) }
'use strict'; module.exports = { name: 'ember-uuid' };
import type from '../type'; import { fetchData, } from '../../util/FetchUtil'; import UserService from '../../api/service/UserService'; import NavigationUtil from '../../util/NavigationUtil'; import { AsyncStorage, } from 'react-native'; import Constants from '../../Constants'; /** |-----------------------------------...
import express from 'express'; import Product from '../controller/product'; import Buy from '../controller/buy'; import Sort from '../controller/sort' const router = express.Router(); router.post('/release', Product.publicProduct); router.get('/getProducts', Product.getProducts); router.get('/getAllProducts', Produc...
import { createGlobalStyle } from "styled-components"; export default createGlobalStyle ` *{ margin:0; padding: 0; box-sizing:border-box; color: var(--white); } html, border-style, #root { max-height:100vh; max-width:100vw; width:100%; height:1...
// Private Ansible playbook // // Copyright (C) 2018 T. Himmelstoss // // This software may be freely distributed under the MIT license. You should // have received a copy of the MIT License along with this program. // Restore the last session user_pref("browser.startup.page", 3); // Always ask for download directory...
/*global describe: true, expect: true, it: true */ describe("path", function() { // TODO: more tests var path = require('path'); var pathChunks = [ "foo", "bar", "baz", "qux.html" ]; var joinedPath = path.join.apply(this, pathChunks); describe("basename", functi...
import * as types from '../constants/actionTypes'; import { call, put, take, select, fork, } from 'redux-saga/effects'; import { takeLatest } from 'redux-saga'; import { postReq } from '../utils/request' import NavigationService from '../utils/navigationService' import { storeData } from '../utils/storage' function *l...
var convert = new Interface('../pdfinfo-worker.js'); var output = "" convert.on_stdout = function(txt) { output += txt; }; convert.on_stderr = function(txt) { console.log(txt); }; var test_result = function(contents) { var expected_output = "Title: freiesMagazin 03/2013\n" + "Subject: Magazin run...
// import actions import { GET_SMURF_DATA, POST_SMURF, REMOVE_SMURF, ADD_NUMBER } from "../actions" // initial const initialState = { smurfs: [ { name: "", height: "", age: "", id: null } ] } const reducer = (state = initialState, action) => { ...
// @flow /* ********************************************************** * File: tests/factories/factories.js * * Brief: Factory definitions for tests. * Author: Craig Cheney * * 2017.09.23 CC - Moved action creators to actionFactories.js * 2017.09.22 CC - Document Created * *********************************************...
'use strict' const operators = { "+": (a, b) => a + b, "-": (a, b) => a - b, "*": (a, b) => a * b, "/": (a, b) => a / b }; const doOp = (left, ope, right, callback) => { if (operators[ope] == undefined) { callback(`Error: ${ope} : unknow operator`); return; } else if (ope == "...
import React from 'react' function Header() { const date = new Date(); const hours = date.getHours(); let timeOfDay; let colorOfDay; if (hours<12) { timeOfDay = "morning"; colorOfDay = "white"; } else if (hours < 17) { timeOfDay = "afternoon"; colorOfDay...
import React, { useRef } from "react"; import { isEmpty } from "underscore"; import d3 from "d3"; // css styles import "assets/css/d3/timeseries.css"; const DEFAULT_WIDTH = 700; const DEFAULT_HEIGHT = 500; const DEFAULT_MARGIN = { top: 20, right: 30, bottom: 65, left: 90 }; const TimeSeriesChart = ({ width, height, ...
import { Alert, Checkbox, Form, Input, Button, Icon, message } from 'antd'; import React, { useState } from 'react'; import { router } from 'umi'; import { connect } from 'dva'; import styles from './style.less'; import { login } from '../../../services/login'; import { getPageQuery } from '@/utils/utils'; const Login...
(function () { "use strict"; angular.module("vcas").controller("AddEntitlementModalCtrl", AddEntitlementModalCtrl); /* @ngInject */ function AddEntitlementModalCtrl($modalInstance, ContentsService, EntitlementsService, chosenEntity, AlertsService, ResultsHandlerService) { ...
import {ErrorMessagedException} from 'nt-portal-framework/src/utils/exceptions'; async function accountRecharge(param, ctx) { if (param===1) { //正常返回 return { statusCode: '2000000', data: { hello: 'world' } }; } else if(param===-1) { //返回,未...
// A generic function for checking to see if an input element has // had information entered into it function checkRequired(elem) { if (elem.type == "checkbox" || elem.type == "radio") return getInputsByName(elem.name).numChecked; else return elem.value.length > 0 && elem.value != elem.d...
exports.up = async function(knex, Promise) { await knex.schema.hasTable("admin") return await knex.schema.createTable('admin', tbl=>{ tbl.increments('adminId'); tbl.string('admin_username'); tbl.string('admin_password'); }) }; exports.down = function(knex, Promise) { return knex.schema.drop...
define(['SocialNetView', 'text!templates/profession/listprofession.html'], function(SocialNetView, ProfessionTemplate, ProfessionView) { var professionView = SocialNetView.extend({ myTarget : '', isDraggable:false, tagName : 'li', className : '', initialize: function(options) { this.mod...
/** * @file san-xui/x/forms/builtins/Switch.js * @author leeight */ import Switch from '../../components/Switch'; const tagName = 'ui-form-switch'; export default { type: 'switch', tagName, Component: Switch, builder(item, prefix) { return ` <${tagName} s-if="!preview" checked="...
//数组的解构 let [a, a1, a2] = [1, 2, 3]; console.log('a, a1, a2= ', a, a1, a2); let [b, [b1, b2], b3] = [1, [2.1, 2.2], 3]; console.log('b, b1, b2, b3= ', b, b1, b2, b3); let [c, c1 = 'c1'] = ['c']; //赋值g的默认值为'g' console.log('c, c1= ', c, c1); let [d, d1 = 'd1', d2 = 'd2', d3 = 'd3'] = ['d', undefined, null,]; //...
import axios from '../../components/interceptor' export default { roleList: async(pid) => { const rest = await axios.get(`/api/organizations/actions/query/${pid}`) return rest.data }, sections: async() => { const rest = await axios.get(`/api/organizations/actions/queryAll`) return rest.data },...
import colors from './colors'; export default { primary: { main: colors.teal, }, secondary: { main: colors.lightBlue, }, error: { main: colors.red, }, success: { main: colors.green, }, background: { default: colors.backgroundGray, header: colors.white, }, divider: colors.d...
/* Bu problemde bize bir array veriliyor bu array'de birisi hariç her elemandan iki tane oluyor ve bizden tek olanı bulmamız isteniyor. Example 2: Input: [4,1,2,1,2] Output: 4 */ var singleNumber = function(nums) { let x = {}; for(let i = 0; i < nums.length; i++) { x[nums[i]] = x[nums[i]] ? false : t...
const path = require('path'); const fs = require('fs'); const koaCompose = require('koa-compose'); const Router = require('koa-router'); const views = require('koa-views'); const bodyParser = require('koa-bodyparser'); const middlewares = require('../../server/middleware/index'); const main = (app) => { // 中间件 ap...
import React, { useContext } from 'react'; import NotesContext from '../context/notes'; import useMousePosition from '../hooks/useMousePosition'; const Note = ({ note }) => { // Return the notesDispatch action from the current context value // https://reactjs.org/docs/hooks-reference.html#usecontext const { note...
const mongoose = require("mongoose"); const Schema = mongoose.Schema; const ProductRequestSchema = new Schema({ id: String, emp_id: String, quantity: Number, request_type:String }); module.exports = mongoose.model("product_request", ProductRequestSchema);
import React from 'react'; import { Box } from '@sparkpost/matchbox'; function InlineCode(props) { return ( <Box as="code" display="inline-block" fontFamily="monospace" lineHeight="100" fontSize="0.65em" px="100" py="100" bg="gray.200" borderRadius="200" ...
export function camelCaseToDashCase(str) { return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); } export function dashCaseToCamelCase(str) { return str.replace(/\W+(.)/g, (x, chr) => chr.toUpperCase()); }
import React from 'react'; import { useParams } from 'react-router'; const RegisterEvent = () => { const {idRegister} = useParams() return ( <div> <h2>This is Deatail Register Event</h2> <h4>{idRegister}</h4> </div> ); }; export default RegisterEvent;
import React from 'react'; import { connect } from 'react-redux'; import { Redirect } from 'react-router-dom'; function mapStateToProps(state) { return { authenticated: state.auth.token !== null }; } const Auth = (props) => { if (props.authenticated !== null) { return props.children; } return ( ...
/* * favorItemDescriptionComponent.js * * Copyright (c) 2019 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. */ 'use strict'; /** * Component to support the page that allows users to show product description. * * @author vn70529 * @since 2.31....
var inquirer = require('inquirer') inquirer.registerPrompt('multiDir', require('../src/inquirer-extensions').multiDir) inquirer.prompt([{ type: 'multiDir', name: 'multiDir', message: 'Which directories do you want to include', basePath: './' }], function (answers) { console.log(JSON.stringify(answers, null, ...
var ac, accordions = { settings: { accItem: $('.acc-item'), accContent: $('.acc-item .acc-content'), title: $('.acc-item .title') }, init: function() { ac = this.settings; this.bindUIActions(); // Optional - Expose scoped vars to global $. Use in console with $.expose $.expose.ac = ac; $.expose.acco...
var mongoose = require('mongoose'); // configure mongoose's promise promise we know mongoose.Promise = global.Promise; mongoose.connect('mongodb://localhost:27017/TodoApp'); // ES6 syntax mongoose.exports = {mongoose}; // old syntax // mongoose.exports = { // mongoose : mongoose // };
/** * CartController * * @description :: Server-side actions for handling incoming requests. * @help :: See https://sailsjs.com/docs/concepts/actions */ module.exports = { checkcart : function(req,res,next){ Cart.findOne({user_id : req.param('user_id')}).where({id_game : req.param('id_game')}).exec(fun...
var FacebookTokenStrategy = require("passport-facebook-token"); var UserRecord = require("../models/userRecord"); var User = require("../models/user"); var configAuth = require("./auth"); module.exports = function(passport){ passport.use(new FacebookTokenStrategy({ clientID: configAuth.facebookAuth.clientID,...
const mongoose = require('mongoose'); const {Schema} = mongoose; const PurchaseSchema = new Schema({ proveedor: String, ruc: String, numero: String, productos: [{type: Schema.ObjectId, ref: 'Product'}, { cantidad: Number, precio: Number }], fecha: Date }); module.exports = mongoose...
import { ROL_ADMIN, ROL_PACIENTE, ROL_PROFESIONAL } from "../constants.js"; import { getPacientebyUserId } from "../services/pacienteService.js"; import { getProfesionalbyUserId } from "../services/profesionalService.js"; export const session = localStorage.getItem("session") ? JSON.parse(localStorage.getItem("sessi...
/** * Booking Info Widget */ import React, { Component } from 'react'; import { Card, CardTitle } from 'reactstrap'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import Button from '@material-ui/core/Button'; // intl messages import IntlMessages from 'Util/IntlMessage...
import axios from "axios"; import { baseURL } from "../utils"; import { PRODUCT_FILTERS_RESPONSE, PRODUCT_LIST_FAIL, PRODUCT_LIST_REQUEST, PRODUCT_LIST_SUCCESS, PRODUCT_PAGINATION_COUNT, PRODUCT_PAGINATION_PAGE, PRODUCT_PAGINATION_PAGES, } from "../constants/productConstants"; export const listProducts =...
export { default as Header } from './Header'; export {default as UserPosts} from './UserPosts'; export {default as UserTodos} from './UserTodos';
import { PieceFactory } from './modules/factory'; import { searchNextMoves } from './modules/searchMoves' import { checkDir, getPieceColor, getPieceName, getEnemyColor, handlePinLine, handleStalemate } from './modules/helpers' import { searchNextMovesForBishop, searchNextMovesForRook } from './modules/searchMoves'; let...
"use strict" var singleGamesStarted = 0; var ga = ga || function () {}; var duoGamesStarted = 0; var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); ctx.fillStyle = 'rgb(0, 0, 0)'; ctx.fillRect(0, 0, 800, 400); function Pong (ctx) { var lastUpdate = Date.now(), bol, bol2, player1, p...
$.ajax({ type:"post", url:"http://localhost/api_demo/session.php", data:{ action: 'get_session' }, dataType:"json", success:function(response){ console.log(response); $("#post_form").submit(function(e){ ...
import React from 'react' import base64 from 'base-64' import { Row, Col, Input, Button } from 'reactstrap' import Axios from 'axios' class Edit extends React.Component { constructor(props) { super(props) this.state = { status: "In", productName: "", product: {}...
$(document).ready(function(){ //document.addEventListener('deviceready', function(){ $(document).on("click", ".menu, .menu_principal_bg", function(){ $(".menu").toggleClass("menu_ativo"); $(".menu_principal").toggleClass("menu_principal_ativo"); $(".menu_principal_bg").toggleClass("menu_principal_bg_ativo")...
import './index.css'; function FBPost (props) { const likeImg = 'https://cdn.iconscout.com/icon/premium/png-256-thumb/like-1614278-1368980.png'; const commentImg = 'https://www.freeiconspng.com/thumbs/comment-png/comment-png-17.png'; const shareImg = 'https://www.shareicon.net/data/512x512/2017/02/09/87862...
import React from 'react'; import Dialog from '@material-ui/core/Dialog'; import { Row, Col, Image } from 'react-bootstrap'; import moment from 'moment'; import ShareIcon from '@material-ui/icons/Share'; import htmlToImage from 'html-to-image'; const ShareVirtualTrade = ({ data, id, showDialog, setDialog }) => { con...
import { Typography } from '@material-ui/core'; import React from 'react'; export function ConfirmDescription() { return ( <Typography color={'primary'}> Congratulations! Your <strong>MobX-infused</strong> order is on its way. </Typography> ); }
/**======================================================== * Module: clearicon.js * Created by wjwong on 9/8/15. =========================================================*/ angular.module('angle').directive('clearIcon', ['$compile', function($compile) { return { restrict : 'A', link : function(scope, elem...
function queryGroup() { $('#encourageTable').hide(); $("#hintinfo").html(""); var regular = /^0?1[3|4|5|7|8][0-9]\d{8}$/; var phone = $("#phonenumber").val(); if(!regular.test(phone)){ $("#hintinfo").html("<font color='red'>请输入一个正确的手机号</font>"); return ; } queryMyData(phone, 1); show...
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModu...
function ProductosService(){ } ProductosService.prototype.getProductos = function(callback){ $.ajax({ type: "GET", url: "http://localhost:8080/inventarios/Products/", success: function(data){ callback(data); }, error: function(){ alert("Ocurrió un error al intentar obtener los productos."); } });...
import { useQuery } from '@apollo/client'; import PropTypes from 'prop-types'; import { GET_OPERATOR_STATUS } from './requests'; const DataOperatorStatus = ({ id, children }) => { const { data, loading, error } = useQuery(GET_OPERATOR_STATUS, { variables: { id } }); return children(loading || error ? null : data...
import React, { Component } from "react"; import axios from "axios"; export const Context = React.createContext(); export class Provider extends Component { state = { poster_list: [], currentQuery: "", limit: 6, offset: 0 }; getPostersList = async ( query, limit = this.state.limit, o...
/** * @mixin */ let Form = (superclass) => class Form extends superclass { get form() { } get formAction() { } get formEnctype() { } get formMethod() { } get formNoValidate() { } get formTarget() { } } export default Form;