text stringlengths 7 3.69M |
|---|
import { connectToDatabase } from '../../../utils/mongodb'
export default async (req, res) => {
const { db } = await connectToDatabase()
res.setHeader('Cache-Control', 's-maxage=10, stale-while-revalidate')
const tasks = await db.collection(process.env.MONGODB_DB).find({}).toArray()
res.json(tasks)
}
|
/* eslint-disable max-len */
/* eslint-disable no-unused-vars */
export async function getCharacter(_id) {
const res = await fetch(`https://hey-arnold-api.herokuapp.com/api/v1/characters/${_id}`);
const json = await res.json();
return json;
}
|
// require the mysql and inquirer modules:
var mysql = require("mysql");
var inquirer = require("inquirer");
// create the connection information for the sql database
var connection = mysql.createConnection({
host: "localhost",
// Your port
port: 3306,
// Your username
user: "root",
// Your password
pa... |
const io = require('socket.io');
const server = io();
const USERS = {};
server.on('connection', (client) => {
console.log(`Client with id: ${client.id}, connected!`);
client.on('message', (msg) => {
console.log(msg);
client.broadcast.emit('message', msg);
});
client.on('register', (userObject) => {
if (USER... |
// app.truthFilter.js
(function() {
"use strict";
angular.module("myApp")
.filter("truth", TruthFilter);
function TruthFilter() {
return function(input, target, replace) {
input = input || "";
let output = input.replace(target, replace);
return output;
};
}
})();
|
/******************************************************
# RIIPPUVUUDET
******************************************************/
var gulp = require('gulp'),
less = require('gulp-less'),
rename = require('gulp-rename'),
plumber = require('gulp-plumber'),
livereload = require('gulp-livereload'),
path = ... |
import express from 'express'
import path from 'path'
import marked from 'marked'
import open from 'open'
import ejs from 'ejs'
import errorhandler from 'errorhandler'
import fsp from 'fs-promise'
import fse from 'fs-extra'
import fs from 'fs'
import * as helper from './helper'
export default (dir = './') => {
cons... |
const mongoose = require("mongoose");
const { ObjectId } = mongoose.Schema;
const playerSchema = new mongoose.Schema(
{
user: {
type: ObjectId,
ref: "User",
required: true,
},
name: {
type: String,
trim: true,
required:... |
const path = require('path');
const {ModuleFederationPlugin} = require("webpack").container;
module.exports = {
// mode: 'none',
mode: 'development',
// mode: 'production',
plugins: [
new ModuleFederationPlugin({
name: "react_app",
filename: 'remoteEntry.js',
exposes: {
'./Counter... |
import React from 'react';
import { Link } from 'react-router-dom';
import './Sidebar.css';
export default class SidebarItem extends React.Component {
constructor(props) {
super(props);
this.state = '';
}
render() {
const route = this.props.address;
const index = this.prop... |
const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const app = express();
let guide = [];
app.use(bodyParser.json());
app.use(cors());
app.post('/guide', function(req, res) {
guide.push(req.body);
const id = guide.length-1
res.send(id.toString())... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/category',
name: 'category',
component: () => import(/* webpackChunkName: "new" */ '../views/Catego... |
const express = require("express");
const app = express();
const bodyParser = require("body-parser");
const db = require("./src/Helpers/db");
const router = require("./src/Routes");
const { login } = require("./src/Controllers/Auth");
//midleware
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.j... |
$(function () {
//window.location.href = "test.html";
$(".mainButtons").on('click', function () {
adresa = $(this).val();
console.log(adresa)
window.location.href = adresa;
})
$('#findbut').click(function() {
var ix = $("#trans").prop("selectedIndex");
console.lo... |
var variables________________________________6________________8js________8js____8js__8js_8js =
[
[ "variables________________6________8js____8js__8js_8js", "variables________________________________6________________8js________8js____8js__8js_8js.html#a7fd3606b4ef9cfe600babf5cabe2a3f7", null ]
]; |
export const apiEndPoint = "https://ukr4mpn8t3.execute-api.us-east-2.amazonaws.com/dev/";
export const apiEndPoint1 = "https://57e71b044cd5.ngrok.io/dev/";
export const apiEndPoint2 = "http://ec2-18-217-2-108.us-east-2.compute.amazonaws.com/api/";
export const apiEndPoint3 = "https://locatorservices.ngintec.com/api/"
... |
import React from 'react';
import styled from 'styled-components';
import Button from '@ctkit/button';
import isEmpty from 'lodash.isempty';
import isString from 'lodash.isstring';
import classnames from 'classnames';
export default (function (_ref) {
var data = _ref.data,
action = _ref.action,
onClick = ... |
`use strict`;
const soundBtns = Array.from(document.getElementsByClassName('drum-kit__drum'));
const sounds = Array.from(document.getElementsByTagName('audio'));
for(let i = 0; i < sounds.length; i++) {
soundBtns[i].onclick = function() {
sounds[i].play();
}
}
|
import React, { useCallback, useState, useEffect } from "react";
import { useSelector, useDispatch } from "react-redux";
import { useLocation, useParams, useHistory } from "react-router-dom";
import {
Form,
Input,
Button,
Message,
GridColumn,
Grid,
Divider,
Header,
Segment,
} from "semantic-ui-react";... |
var tasks = []; // global task objects array
var index = 1;
// create application
App = Ember.Application.create({});
App.Router.map( function() {
this.resource( 'login');
});
//default route. just add a simple task to the list.
App.IndexRoute = Ember.Route.extend({
model: function() {
//return App.MariMedia.add... |
const progressiveTargets = {
"chrome": "79",
"edge": "76",
"safari": "13",
"firefox": "70",
"node": 'current',
};
module.exports = function(api) {
api.cache(true);
return {
presets: [['@babel/preset-env', {
"modules": false,
"useBuiltIns": "entry",
... |
var styles = ""
var head = "<!DOCTYPE html><html><head><title>Vokabelliste</title><meta charset=\"utf-8\"<styles>" + styles + "</styles></head><body>"
var footer = "</body></html>"
var vokListToHtml = function (vokList) {
var rows = vokList.map(function(vok) {
return "<tr><td>" + vok.Vokabel + "</td><td>" +... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsMenuOpen = {
name: 'menu_open',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 18h13v-2H3v2zm0-5h10v-2H3v2zm0-7v2h13V6H3zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5L21 15.59z"/></svg>`
};
|
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var cors = require('cors');
var fileUpload = require('express-fileupload');
var users = require('./... |
import * as THREE from 'three';
function roundRect(ctx, x, y, w, h, r)
{
ctx.beginPath();
ctx.moveTo(x+r, y);
ctx.lineTo(x+w-r, y);
ctx.quadraticCurveTo(x+w, y, x+w, y+r);
ctx.lineTo(x+w, y+h-r);
ctx.quadraticCurveTo(x+w, y+h, x+w-r, y+h);
ctx.lineTo(x+r, y+h);
ctx.quadraticCurveTo(x, ... |
import api from './index'
import Vue from '@/plugin/axios'
const axios = Vue.axios
export function addIssue (parameter) {
return axios({
url: api.addIssue,
method: 'post',
data: parameter
})
}
export function updateIssue (parameter) {
return axios({
url: api.updateIssue + parameter.articleId,
... |
const mongoose = require('mongoose');
var Reserve = mongoose.model('Reserve',{
registrationNo: {type: String},
username: {type: String},
email: {type: String},
isbn: {type: String},
title: {type: String},
author: {type: String},
reserveDate: {type: Date},
dueDate: {type: Date},
fineAmoun... |
function getCookie(name)
{
if(!document) return null;
var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,'\\$1') + "=([^;]*)"));
return matches? decodeURIComponent(matches[1]):null;
}
if(document)
{
var theme = getCookie("theme");
if(theme)
document.body.clas... |
$(document).ready(function()
{
var $count = 0;
$('#tab td').click(function()
{
$count+=1;
if($count%2==0){
$(this).text('O');
} else{
$(this).text('X');
}
});
}); |
var customMarks = new function () {
// custom marks
var markTypeId = 0;
var customMarksTable;
var selectCustomMarkTable;
var customMarksParams;
var multiMarkCounter;
var multiMarkCounterIntial;
var dropdownFilter = null;
var markTypeDropdownFilter = null;
var markName = "";
var previousMarks =... |
$( document ).ready(function() {
console.log("***********")
$(":input[type='password']").keyup(function(event){
if ($(this).next('[type="password"]').length > 0){
$(this).next('[type="password"]')[0].focus();
}else{
if ($(this).parent().next().find('[type="password"]').len... |
#!/usr/bin/env node
require.paths.unshift(require('path').join(__dirname, '..', 'vendor'));
var path = require('path'),
colors = require('colors'),
static = require('../vendor/node-static/lib/node-static'),
http = require('http'),
argv = require('optimist').argv;
var help = [
"usage: http-server ... |
/*
* @lc app=leetcode.cn id=547 lang=javascript
*
* [547] 省份数量
*/
// @lc code=start
/**
* @param {number[][]} isConnected
* @return {number}
*/
var findCircleNum = function(isConnected) {
const n = isConnected.length, m = isConnected[0].length;
// 初始化
const parent = new Array(n).fill(0).map((item, ... |
export const robots = [{
id: 1,
name: 'Narendra Bagul',
username: 'crypton',
email: '[email protected]'
},
{
id: 2,
name: 'Kirtiraj ',
username: 'Kirti',
email: '[email protected]'
},
{
id: 3,
name: 'Shuhbam Wange',
... |
//
// # SimpleServer
//
// A simple chat server using Socket.IO, Express, and Async.
//
var http = require('http');
var path = require('path');
var ejs = require('ejs');
var async = require('async');
var socketio = require('socket.io');
var express = require('express');
var router = express();
// EJS:
ejs.open = '{{'... |
const express = require('express');
var mongoose = require('mongoose');
const router = express.Router();
const Volunteer = require('../models/volunteer');
const { FollowUpMeeting } = require('../models');
const createMeeting = (req, res) => {
console.log('POST /meetings');
const {
volunteerId,
beneficiaryId,
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va... |
var InputStrategy = function(){
var strategy = {
//是否为空
notNull: function(value){
return /\s+/.test(value)?'请输入内容':'';
},
//是否是数字
isNumber: function(value){
return /^[0-9]+(\.[0-9]+)?$/.test(value)?'':'请输入数字';
},
//是否是本地电话
isPhone: function(value){
return /^\d{3}\-\d{... |
/* =Builder= */
export const ADD_INGREDIENT = 'ADD_INGREDIENT';
export const REMOVE_INGREDIENT = 'REMOVE_INGREDIENT';
export const SET_INGREDIENTS = 'SET_INGREDIENTS';
/* =Orders= */
export const PURCHASE_INIT = 'PURCHASE_INIT';
export const PURCHASE_FIN = 'PURCHASE_FIN';
export const FETCH_ORDERS_START = 'FETCH_ORDE... |
///هذا البوت الاصدار الثاني من بوت السيستم تحت ادارة اسامة خالد :
///رابط المقطع: https://youtu.be/6B9nrQp02Rk
//// البوت تجميع ، وليس عمل من الصفر والغاية بالاخير افادة الناس وجميع الحقوق محفوظة وموجودة
///اخر تحديث 11\5\2020
require("events").EventEmitter.defaultMaxListeners = 200;
const http = require("http");
const... |
process.env.NODE_ENV = 'test';
const chai = require('chai');
const chaiHttp = require('chai-http');
const server = require('../app');
const should = chai.should();
const mongoose = require('mongoose');
const User = require('../models/User');
chai.use(chaiHttp);
/*
REGISTER ROUTE TESTING
*/
const testUser = {
... |
import React, { Component } from 'react';
require('../style/style.scss');
class App extends Component {
render() {
return (
<div>
<h1 className="hello">My React App</h1>
<p>Make a another change</p>
</div>
)
}
}
export default App; |
import React, { Component } from "react";
import { StyleSheet, View, Button, Touchable, Text, } from "react-native";
import * as Google from "expo-google-app-auth";
import firebase from "firebase";
import AppLoading from "expo-app-loading";
import * as Font from "expo-font";
import { TouchableOpacity } from "react-na... |
angular.module('App',[]).controller("myCtr",function($scope){
$scope.arry=[
'China','Japan','American'
];
$scope.change=function(val){
$scope.country=value;
}
}) |
import React, {Component} from 'react';
import Container from './Container'
import Panel from './Panel'
import Label from './Label'
class Location extends Component {
giveFocus = () => {
this.props.focus(this.props.id)
}
render() {
return(
<div>
{!this.props.info... |
const users = [{
id: 1,
username: 'admin1',
password: '123456',
email: '[email protected]',
name: '123'
},
{
id: 2,
username: 'admin2',
password: '654321',
email: '[email protected]',
name: '1bc'
}
]
export {
users
}
|
import React, { Component } from 'react';
import { BrowserRouter, Route, Switch } from "react-router-dom";
import Budjet from './budjet';
import Budjet2 from './budjet2';
import HomeBudjet from './hoomeBudjet';
import SignUp from './signUpSplit';
import Dashboard from './dashBoard';
import Account from './account';
im... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import {onAddToCart} from '../actions/index';
class ProductItem extends Component {
addToCart = (product) => {
this.props.onAddToCart(product);
};
render() {
var {product} = this.props;
return (
... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import Header from './Header';
import WineImg from './wine-placeholder.png';
import StarRating from './StarRating';
import * as actionCreators from './wineActions'... |
import { expect } from 'chai'
import { fileURLToPath } from 'url'
import { readFile } from 'fs/promises'
import {
dirname as getDirname,
join as joinPath,
} from 'path'
const __filename = fileURLToPath(import.meta.url)
const __dirname = getDirname(__filename)
const currentYear = new Date().getFullY... |
/**
* @author v.lugovsky
* created on 16.12.2015
*/
(function () {
'use strict';
angular.module('BlurAdmin.pages.app.warehouse.stockcounting')
.controller('StockCountingCtrl', StockCountingCtrl) ;
/** @ngInject */
function StockCountingCtrl($scope, iAPI, iXLSX, $timeout, $filter, toastr, $uibModal,$log... |
var AWS = require("aws-sdk");
var iotdata = new AWS.IotData({
endpoint: 'a3uqiy2b4yzpan.iot.us-east-1.amazonaws.com',
apiVersion: '2015-05-28'
});
var MQTT_TOPIC = "car_controller";
exports.handler = (event, context, callback) => {
console.log(event);
var request;
var error = {
Error: "An erro... |
const { decode } = require('../router/data.js');
const page = Page;
/**
* 观察小程序的页面参数,记录每次页面跳转携带的参数
*/
module.exports = (options = {}) => {
const { onLoad } = options;
const patchOptions = {
onLoad(...res) {
const opts = res[0];
const { encodedData } = opts;
const optData = encodedData ? de... |
class slideList {
constructor(opts) {
this.init(opts)
opts.data()
}
init(opts) {
let clearI = setInterval(() => {
opts.list.style.marginTop = --opts.startPos + 'px';
Math.abs(opts.startPos) >= opts.list.offsetHeight - opts.container.offsetHeight && (opts.list.... |
import Redux from 'redux';
var currentVideoReducer = (state = null, action) => {
//TODO: define a reducer for the currentVideo field of our state.
if (action.type === "CHANGE_VIDEO") {
return action.video;
//state = newVideo
//reducer should not mutate existing state (make new state variable and retur... |
import instance from '../../../axios';
import React, { useState, useEffect } from 'react'
import './Banner.css'
import requests from '../../../Request'
export default function Banner() {
const [movie, setMovie] = useState([]);
useEffect(() => {
async function fetchData(){
const request =... |
var inOrder = function(tree, callback) {
if (tree.left) {
inOrder(tree.left);
}
callback(tree.val);
if (tree.right) {
inOrder(tree.right);
}
}
var preOrder = function(tree, callback) {
callback(tree.val);
if (tree.left) {
preOrder(tree.left);
}
if (tree.right) {
preOrder(tree.right)... |
import React from "react";
import LayOut from "./LayOut";
import BackHeadWithUsername from "../middleComponents/BackHeadWithUsername";
import MakeSettingPanel from "./MakeSettingPanel";
const data = {
title: "允许我认识的人找到我和联系人",
list: [
{
key: 1,
title: "允许我认识的人找到我",
list: [
{ key: 1, ty... |
/* eslint-disable @next/next/no-img-element */
import React from "react";
import styles from "../../../styles/Navbar.module.css";
import Link from "next/link";
import { useSelector } from "react-redux";
const Navbar = () => {
const cartCount = useSelector((state) => state.cart.cartCount);
return (
<div classNa... |
class Entity extends PIXI.Sprite {
constructor(texture){
super(texture);
}
onUpdate(){
}
onCollision(self, otherEntity){
}
}
|
export const GET_POSTS = 'GET_POSTS';
export const ERROR_POST = 'ERROR_POST';
export const GET_USERS = 'GET_USERS';
export const ERROR_USER = 'ERROR_USER';
export const GET_REPOS = 'GET_REPOS';
export const ERROR_REPOS = 'ERROR_REPOS'; |
{
"welcome.index.title": "welcome.index.title",
"welcome.index.meta.description": "welcome.index.meta.description",
"welcome.index.social_description": "welcome.index.social_description",
"welcome.index.twitter_description": "welcome.index.twitter_description"
} |
'use strict';
describe('Service: mergedPosition', function () {
// load the service's module
beforeEach(module('happoshuApp'));
// instantiate service
var mergedPosition;
beforeEach(inject(function (_mergedPosition_) {
mergedPosition = _mergedPosition_;
}));
it('should do somethi... |
exports.app = [
'src/init.js',
'src/app.js',
'src/common/init.js',
'src/common/traits/init.js',
'src/common/traits/Mixin.js',
'src/common/Router.js',
'src/common/Sync.js',
'src/common/PubSub.js',
'src/common/filters.js',
'src/common/forms/init.js',
'src/common/forms/Button.js',
'src/common/forms... |
loaded.then(() => {
$('#sidebar-button').click(() => $(document.body).toggleClass('sidebar-open sidebar-closed'));
$(document.body).on('click', '.close-sidebar', () => {
$(document.body).addClass('sidebar-closed').removeClass('sidebar-open');
return false;
});
});
|
module.exports = {
url: 'mongodb://127.0.0.1:27017/arcobaleno'
// Exporta o url do banco de dados MongoDB.
// URL estruturado como: mongodb://USUARIO:SENHA@servidor(LOCALHOST)/BANCODEDADOS
// Usando localhost ao invés de 127.0.0.1 pode funcionar, mas gera erros na maioria dos casos
} |
module.exports = {
devServer: {
port: '8080', // 代理端口
open: false, // 项目启动时是否自动打开浏览器,我这里设置为false,不打开,true表示打开
proxy: {
'/api': { // 代理api
target: 'http://localhost:4000', // 服务器api地址
changeOrigin: true, // 是否跨域
ws: true, // proxy websockets 持久连接
pathRewrite: { // 重写路径... |
/**
* Created by Lucifer on 2016/12/11.
*/
$(function(){
var address=$('#as');
var names = $('#address').value();
var flag = false ;//标记判断是否选中一个
for(var i=0;i<names.length;i++) {
if (names[i].checked) {
flag = true;
address.value('names[i]');
break;
... |
#!/usr/bin/env node
const fs = require("fs");
const logtimer = require("./index");
const program = require("commander");
const pkg = require("../package.json");
const cosmiconfig = require("cosmiconfig");
const explorer = cosmiconfig(pkg.name.split("/")[1]);
program
.version(pkg.version)
.option("-d, --defaults", ... |
define(["knockout", "components"], function(ko, c) {
function Viewmodel(params) {
var self = this;
this.name = ko.observable("");
this.activeRoom = params.activeRoom || ko.observable();
c.feathers.service("room").on("created", function () {
console.log(arguments);... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "3e3da417ed92c43949bc33387d64b4a4",
"url": "/clicky-game/index.html"
},
{
"revision": "fc5871e2a2b9b7f0add6",
"url": "/clicky-game/static/css/main.ecbe80da.chunk.css"
},
{
"revision": "4dbc779420a3e2162ebe",
... |
import axios from "axios";
const jsPostDelete = document.getElementById("jsPostDelete");
const handleDelete = async (event) => {
console.log("clicked");
const boardId = window.location.href.split("/board/")[1];
const response = await axios({
url : `/board/${boardId}/delete`,
method: "POST"... |
// package: api
// file: api.proto
|
module.exports = {
env: {
// 根据环境判断全局变量是否可用
browser: true,
es2021: true,
},
extends: [
// 共享配置
"standard",
],
parserOptions: {
// 控制 es 的语法版本
ecmaVersion: 12,
},
rules: {
// 定义规则查看官网 值: off warn error
"no-alert": "warn", // 不允许用 alert,否则报警告
},
globals: {
// 配置... |
$.extend({
getUrlVars: function () {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[has... |
import {FETCH_BETS_START} from "../../const/actionTypes";
const fetchBetsStart = () => {
return {
type: FETCH_BETS_START
}
}
export default fetchBetsStart; |
//console.log("server.js loaded");
/*
var express = require("express");
var app_express = express();
app_express.get('/', function (req, res) {
res.send('Hello World!');
});
app_express.get('/api/create_account', function (req, res) {
res.send('Creating account');
});
var app_server = app_express.listen(3000,... |
/*
*description:注册登录公用模块
*author:fanwei
*date:2013/12/01
*/
define(function(require, exports, module){
var placeholder = require('../../lib/plugin/ui/placeholder');
var formBeauty = require('../../lib/plugin/form/formbeauty');
var formcheck = require('../../lib/plugin/form/formCheck');
var autoCompl... |
define("/WEB-UED/fancy/dist/p/login/index-debug.css", [], function(require, exports, module) {
seajs.importStyle(".button{height:2rem}.button.button-fill{line-height:2rem}.list-block .item-title.label{width:25%}.list-block .item-input{position:relative}")
}); |
import React from 'react';
import { Pagination, PaginationItem, PaginationLink } from 'reactstrap';
/* component pagination is navigation page for change pages */
export default class Example extends React.Component {
constructor(props){
super(props);
this.state = {
currentPage: 1,
... |
import React, { useState } from "react"
import { Alert } from "reactstrap"
import { contactForm } from '../../actions/form'
const ContactForm = ({ authorEmail }) => {
const [Values, setValues] = useState({
message: '',
name: '',
email: '',
sent: false,
buttonText: 'Send Mess... |
const mongoose = require('mongoose');
const Transport = require('./transport')
exports.create_transportation = (req, res, next) => {
console.log(Transport);
const transport = new Transport({
_id: mongoose.Types.ObjectId(),
journeyInstance: req.body.journeyInstance,
TransactionDate: ... |
const check = require('check-types')
const execa = require('execa')
const ora = require('ora')
const spacer = (count = 50) => '-'.repeat(count)
const invalidParam = (type, name) =>
`parameter \`${name}\` expected \`${type}\``
const validateParam = (
type,
name,
value,
required = true,
prototype = Object.... |
var searchData=
[
['v_5fmacros_2eh',['v_macros.h',['../v__macros_8h.html',1,'']]],
['video_2ec',['video.c',['../video_8c.html',1,'']]],
['video_2eh',['video.h',['../video_8h.html',1,'']]]
];
|
// FINCAD
// React Assignment - Janurary 28, 2017
// Chedwick Montoril
// License MIT
// React dependency.
import React from 'react';
import Helmet from 'react-helmet';
import {FormattedMessage} from 'react-intl';
// Redux dependency.
import {connect} from 'react-redux';
// Reselect software.
import {createStructure... |
const formidable = require("formidable")
const fs = require("fs")
/*
* 上传图片的封装
* 将上传的结构返回出去
* cb({
* ok : 1 1 成功 2 上传异常 3 未上传图片
* })
* */
module.exports.uppic = function (req, picName, cb) {
var form = new formidable.IncomingForm()
form.uploadDir = "./upload"
form.encoding = "utf-8"
form.ke... |
import express from 'express';
import { list, create , productById , read} from '../controller/product';
const router = express.Router();
router.post('/products', create);
router.get('/products', list);
router.get('/product/:productId', read);
router.param('productId',productById)
module.exports = router; |
// Initialize and add the map
function initMap() {
// The location of Uluru
const uluru = { lat: 43.7733689, lng: -79.3359707 };
// The map, centered at Uluru
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 15,
center: uluru,
});
// The marker, positioned at Ul... |
import React from "react";
import {
Grid,
AppBar,
Typography,
Button,
IconButton,
Toolbar,
Avatar,
Paper,
} from "@material-ui/core";
import Education from "./education";
import useStyles from "./styles";
import EditIcon from "@material-ui/icons/Edit";
import Call from "@material-ui/icons/Call";
import ... |
var searchData=
[
['registerform',['RegisterForm',['../classindex_1_1forms_1_1RegisterForm.html',1,'index::forms']]]
];
|
import React, { Component } from "react";
import "./App.css";
import Home from "./component/Home/Home";
import { useSelector } from "react-redux";
import PrivateNotification from "./component/Private/PrivateNotification";
import Offers from "./component/Private/Offers";
import OffersAccepted from "./component/Private/O... |
const defaultStream = require('../../../default-stream');
const eventStream = require('../../../event-stream');
const f = require('flyd');
const R = require('ramda');
f.dropRepeats = require('flyd/module/dropRepeats').dropRepeatsWith(R.equals);
f.obj = require('flyd/module/obj');
const mapIndexed = R.addIndex(R.map);
... |
import {browserHistory} from 'react-router';
import Backbone from 'backbone';
import $ from 'jquery';
import config from '../config';
import store from '../store';
export default Backbone.Model.extend({
url: 'https://api.backendless.com/v1/data/FolderFiles',
idAttribute: 'objectId',
defaults: {
name:... |
function overlap(dateRanges){
var sortedRanges = dateRanges.sort((previous, current) => {
// get the start date from previous and current
var previousTime = previous.start.getTime();
var currentTime = current.start.getTime();
// if the previous is earlier than the current
if (p... |
/*
* ProGade API
* Copyright 2012, Hans-Peter Wandura (ProGade)
* Last changes of this file: Aug 22 2012
*/
/*
@start class
@param extends classPG_ClassBasics
*/
function classPG_Api()
{
// Declarations...
this.axContext = null;
this.axRegister = new Object();
// Construct...
// Methods...
/*... |
/*
* @file env info
* @author nighca <[email protected]>
*/
const env = process.env.NODE_ENV || 'development'
module.exports = env
|
const { Schema, model } = require('mongoose')
const Pet = new Schema({
name: String,
ownerId: {
type: String,
required: true
},
species: {
type: String,
required: true
},
age: {
type: Number,
required: true
},
race: String
})
module.expor... |
// 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 App from './App'
import router from './router'
import iView from 'iview'
import store from './store'
import echarts from 'echarts'
import liquidfill fr... |
/* —------------------------------------------------------------------------ */
/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may ... |
var React = require('react');
module.exports = React.createClass({
render: function () {
return (
<div className="listSuccess">
<h3>Great success!</h3>
<p>
Your item is now listed on the TakeMyThings! website. <br/>
You should receive an email within the next few minutes that allows
you to d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.