text stringlengths 7 3.69M |
|---|
const express = require('express');
const {
getArchives,
getArchive,
createArchive,
updateArchive,
deleteArchive} = require('../controllers/archives');
const router = express.Router();
const { protect, authorize } = require('../middleware/auth');
router
.route('/')
.get(getArchives)
.post(protect,a... |
(function () {
"use strict";
angular.module("vcas").controller("RemoveAllDevicePairsModalCtrl", RemoveAllDevicePairsModalCtrl);
/* @ngInject */
function RemoveAllDevicePairsModalCtrl(device, $modalInstance, DeviceMgmtService, AlertsService) {
var vm = this, action, verify, prop, type;
vm.dismissModal... |
import React, { Component } from 'react';
import Layout from '../../components/Layout';
import axios from 'axios';
class TradeInfo extends Component {
constructor(props) {
super(props);
this.state = {
cardTradeInfo: []
}
}
async componentDidMount() {
const { ha... |
import {DECREMENT, INCREMENT} from "./mutations_types";
export default {
[INCREMENT](state){
state.counter++
},
[DECREMENT](state){
state.counter--
},
updateInfo(state,age) {
state.vitamin.age=age;
}
}
|
const express = require('express');
const User = require('../../models/user');
const router = express.Router();
/**
* @swagger
* /loginUser:
* post:
* tags:
* - Users
* name: Login
* summary: Logs in a user
* consumes:
* - application/json
* parameters:
* - name: body
* ... |
import * as Count from '../constants';
import { createSelector } from 'reselect';
/*
********************************************************************
********************************************************************
*** reducers ***
**************... |
/**
* 平台
* 比如詹密团
*/
module.exports = function (Schema) {
const GroupSchema = new Schema({
originId: {
type: String,
comment: '原始id'
},
name: {
type: String,
comment: '小程序名字'
},
qrcode: {
type: String,
comment: '小程序二维码'
},
logo: {
type: String,
... |
const Bank = function(){
this.accounts = [250, 250, 500, 500, 500;
this.total 0;
}
var Bank = function () {
this.accounts = [250, 250, 500, 500, 500];
this.total = 0;
}
}
|
import React, { Component } from 'react'
import { Table } from 'react-bootstrap'
import SweetAlert from 'sweetalert2-react';
import './style.css'
class StarwarsMember extends Component {
constructor(props) {
super(props);
this.state = {
show: false,
key: 0
};
}
... |
import styled from 'styled-components'
export const TextboxOpaque = styled.div`
max-width: 70%;
text-align: center;
line-height: 1.125;
background-color: ${(props) => props.theme.colors.textboxOpaque.background};
color: ${(props) => props.theme.colors.light};
margin: ${(props) => props.theme.spacings.medi... |
// xTestRoom1/events.js
//$ PackConfig
{
"sprites" : [
"textures/star.png",
"textures/waterdroplet.png",
"textures/waterdroplets.png",
"textures/smoke.png"
]
}
//$!
var Event = require("tpp-event");
var Sign = require("tpp-sign");
var Warp = require("tpp-warp");
var CameraTrigger = require("tpp-cameratrigg... |
import React from "react";
import NotificationAlert from "react-notification-alert";
export default class Alertas extends React.Component {
//Metodo constructor
constructor(props) {
super(props);
this.state = {
visible: true
};
}
notificationAlert = React.createRef(... |
import React from 'react';
import {Image} from 'react-native';
import globalStyles from '../../assets/styles/styles';
import styles from './styles';
import {useQuery} from '@apollo/react-hooks';
import {gql} from 'apollo-boost';
import Conduct from '../../components/Conduct';
import Paragraph from '../../components/Par... |
export * from './base'
export * from './utils'
export * from './decorators'
|
import React from 'react';
import './Consultancy.css';
function Consultancy() {
return (
<div className="consultancy-div">
<div className="title-div">
<h2 className="consultancy-title">Consultancy</h2>
</div>
<div className="rows-setup">
<img
className="consultancy-car... |
'use strict';
/**
* logic
* @param {} []
* @return {} []
*/
export default class extends think.logic.base {
/**
* 权限验证
*/
async checkAuth() {
let value = await this.session('userInfo');
return think.isEmpty(value);
}
/**
* 登录
*/
loginAction(){
this.allowMethods = 'post';
}... |
Server = {
allow: {
owner: {
insert: (userId, doc) => (userId && doc.owner === userId) || (Meteor.user() && Meteor.user().isAdmin),
update: (userId, doc) => doc.owner === userId || (Meteor.user() && Meteor.user().isAdmin),
remove: (userId, doc) => doc.owner === userId || (Meteor.user() && Mete... |
import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
import cache from "./modules/cache"
import headerStore from "./modules/headerStore"
import session from "./modules/session"
import userInfoDialog from "./modules/userInfoDialog"
import readingDetailsDialog from "./modules/readingDetailsDialog"
import group... |
function noDupes(str) {
var output = {
noDupes: "",
extras: ""
}
}
noDupes("Declan Kottmeier") |
'use strict';
//Echarts
function initEnterFace($container,doc_model){
doc_model || ( doc_model={innerHTML:""} );
function setContent(innerHTMLstr){
that.$doc.find(".content").html( innerHTMLstr );
}
function start_move(e){
window.addEventListener("mousemove",move_enterface,false);
window.addEventListener("mou... |
import React from 'react'
export default class Sendedform extends React.Component {
render() {
return (
<React.Fragment>
<div className='form-sended'>
<p className='form-sended-text'>Спасибо за запись{`${this.props.user && ', '}` + this.props.user}, вскоре я с в... |
import React from "react";
import { Link } from "react-router-dom";
function NavBar(props) {
if (props) {
console.log("PROPS", props);
}
return (
<div className=" Bar">
<Link to="/" className="navButton">
{/* <button className="navButton">Home</button> */}
Home
</Link>
<L... |
angular.module('jobzz')
.controller('EmployerProfileEmployeeCtrl', ['$scope', '$http', 'employerProfileService', 'userProfilePictureService',
'dateToStringService',
function ($scope, $http, employerProfileService, userProfilePictureService, dateToStringService) {
$scope.responses = {};
... |
OC.L10N.register(
"lib",
{
"Username" : "Nama pengguna",
"Password" : "Kata laluan",
"__language_name__" : "_nama_bahasa_",
"Apps" : "Aplikasi",
"General" : "Umum",
"Search" : "Cari",
"Settings" : "Tetapan",
"Users" : "Pengguna",
"Authentication error" : "Ralat pengesahan"
},... |
const color = require('../')
console.log(`${color('red')} red ${color.RESET}`)
|
import React, { Component } from 'react';
import { Link, Route } from 'react-router-dom';
import Spinner from '../components/Spinner/Spinner';
import TMDbApi from '../services/TMDb-api';
import routes from '../routes';
import Cast from '../pages/Cast';
import Reviews from '../pages/Reviews';
import styles from '../comp... |
const express = require('express')
const exphbs = require('express-handlebars')
const app = express()
const path = require('path')
app.set('port',process.env.PORT || 4501)
app.use(express.json())
app.engine('handlebars',
exphbs({
defaultLayout:'layout'
})
)
app.set('view engine','handlebars')
app.u... |
//React
import React from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
//Apollo
import {
ApolloClient,
InMemoryCache,
ApolloProvider,
createHttpLink,
} from '@apollo/client';
import { setContext } from '@apollo/client/link/context';
// Components
import User from './components/p... |
const express = require('express');
const app = express();
app.get('/', (req,res,next) => {
res.sendFile(__dirname + "/client/JogoDaVelha.html");
});
app.use('/client',express.static(__dirname + "/client"));
module.exports = app; |
function loadingStart(tipsContent, errorTips, iconUrl) {
var isSupportTouch = window.supportTouch;
$("#loadingSection .body div").unbind(isSupportTouch ? "touchend" : "click");
if (tipsContent) {
$("#loadingSection .body p").html(tipsContent);
if (errorTips === true) {
if (iconU... |
/**
* Function that builds an array of inputs based on values
* in unspentOutputs and the satoshisToSend
* @returns {Object} { inputs, remainingSatoshis }
* @param {Object[]} unspentOutputs
* @param {number} satoshisToSend
*/
export function getInputs(unspentOutputs, satoshisToSend) {
const inputs = [];
let t... |
/**
* Created by Preet on 8/22/2015.
*/
var componentApiApp = angular.module('ConfirmationBoxModule', [])
.controller('confirmationController', ['$scope', function($scope) {
$scope.configObject = {
message : "This is a Yes No Test",
header : "Confirmation Box",
dialogI... |
import React from 'react';
import { GiBrazil, /*GiInfo,*/ GiWorld } from 'react-icons/gi';
import SidebarItem from "./sidebarItem/sidebarItem";
import styles from './sidebar.module.scss';
const Sidebar = () => (
<div className={styles.sidebar}>
<SidebarItem
title="Brasil"
link="/"
>
<GiBr... |
/**
* @note
*
* @param url
* @return {Promise}
*/
export default url => {
const Img = new Image();
return new Promise((reslove,reject)=>{
Img.onload = ()=>{ reslove("success"); };
Img.onerror = ()=>{ reject("error"); };
setTimeout(()=>{reject("timeout")},2000);
Img.src ... |
var chai = require('chai');
var chaiHttp = require('chai-http');
var server = require('../../bin/www');
var expect = chai.expect;
chai.use(chaiHttp);
var _ = require('lodash');
chai.use(require('chai-things'));
describe('Customers', function() {
describe('customerss', function() {
beforeEach(function() {
... |
/*
* 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.
*/
angular.module('appAnalist').controller('andashboardController',function($scope,$http,$interval,$rootScope){
$scope.s={};
$sco... |
const router = require("express").Router();
const sequelize = require("../../config/connection");
const withAuth = require("../../utils/auth");
const { weight_posts, users } = require("../../models");
router.get("/", (req, res) => {
weight_posts
.findAll({
attributes: ["id", "user_id", "date", "weight"],
... |
var mym = require('./mymodule.js'); //name of the module/path of the module - import
console.log(mym.numbers[1]);
console.log(mym.msg);
console.log(mym.person.fname);
console.log(mym.calArea(4.5));
|
import React from "react";
import { withStyles } from "@material-ui/core/styles";
import { CSSTransition } from "react-transition-group";
import Category from "../components/Category";
import { categories, category } from "../categories";
const styles = theme => ({
menu: {
alignItems: "center",
display: "fle... |
export const transparentHeaderStyle = {
backgroundColor: 'transparent',
position: 'absolute',
top: 0,
left:0,
right: 0,
borderBottomWidth: 0,
elevation: 0,
};
//elevation |
/**
* Copyright © 2014 Julian Reyes Escrigas <julian.reyes.escrigas@gmail.com>
*
* This file is part of concepto-sises.
*
* concepto-sises
* can not be copied and/or distributed without the express
* permission of Julian Reyes Escrigas <julian.reyes.escrigas@gmail.com>
*/
;
(function () {
"use strict";
... |
import './style/global.css'
import './style/topic_news.css'
import FastForwardIcon from '@material-ui/icons/FastForward'
let html = (<>
<div className="news_container">
{/* Barra de navegação */}
<div className="topnavbar">
<FastForwardIcon />
<a href="/">Página Inicial</a... |
function removeFirstAndLastCharacter(stringParam) {
// returning a value of string
return
}
// call the function
console.log(removeFirstAndLastCharacter("malam"))
// expected output
// "ala" |
console.log('start')
chrome.action.onClicked.addListener(tab => {
console.log('click')
console.log(tab)
var el = document.createElement('textarea');
var url = tab.url;
console.log(url)
el.value = window.location.href;
document.body.appendChild(el);
el.select();
el.setSelectionRange(url.lastIndexOf('/'... |
import { find } from "lodash";
import {
API_HOST_URL,
GEOSERVER_HOST_URL,
BUILD_ID,
} from "@/store/modules/_constants";
import { toISODate } from "@/store/stats";
export const WMS_SERVER_URI = "geoserver/SKOPE/wms?";
export const DEFAULT_CENTERED_SMOOTHING_WIDTH = 11;
export const DEFAULT_MAX_PROCESSING_TIME = ... |
/**
* Misc constants for a gameplay
*
* @type Object
*/
var GameConst = {
// how often worker (woodcutter, mason) is gonna get material [s]
worker_period : 5,
goldmine_period : 5,
farm_period : 5,
// how far a worker can go to get to his material source
furthest_possible_ma... |
export const state = () => ({
cartInfo: ""
});
export const getters = {};
export const mutations = {
setCartInfo(state, v) {
state.cartInfo = v;
}
};
export const actions = {
async updateShippingAddress({ dispatch, state, commit }, obj) {
let r = await this.$axios
.post("/api/checkout/updateSh... |
/*
The sequence of triangle numbers is generated by adding the
natural numbers. So the 7th triangle number would be
1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...
Let us list the factors of the first seven triangle numbers:
1: 1
3: 1,3
... |
"use strict";
/// <reference path="../../../default/scene/ComponentConfig.d.ts" />
Object.defineProperty(exports, "__esModule", { value: true });
const P2BodyConfig_1 = require("./P2BodyConfig");
SupCore.system.registerPlugin("componentConfigs", "P2Body", P2BodyConfig_1.default);
|
import { Provider } from 'react-redux';
import { initializeStore } from './store';
let reduxStore;
export const getInitializeStore = (initialState) => {
if (typeof window === 'undefined') {
return initializeStore(initialState);
}
if (!reduxStore) {
reduxStore = initializeStore(initialState);
}
retur... |
const test = require('tape');
const JSONToFile = require('./JSONToFile.js');
test('Testing JSONToFile', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof JSONToFile === 'function', 'JSONToFile is a Function');
t.pass('Tested on 09... |
import React from "react";
import { useRouter } from "next/router";
import { useDispatch, useSelector } from "react-redux";
import { CANCEL_POST } from "../../actions/types";
import styled from "styled-components";
import { Button, Modal } from "antd";
import {
LeftOutlined,
RightOutlined,
ExclamationCircleOutlin... |
import { createStore, applyMiddleware, combineReducers } from "redux";
import { createLogger } from 'redux-logger'
import thunk from 'redux-thunk'
import { selectedSub, postsBySub } from './reducers'
const logger = createLogger()
const rootReducer = combineReducers({
selectedSub,
postsBySub
})
const configureSto... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "c9643c8993e0769462ba1a7a39ab26aa",
"url": "/my-portfolio/index.html"
},
{
"revision": "a76aaec645b7309eb62a",
"url": "/my-portfolio/static/css/main.d1b05096.chunk.css"
},
{
"revision": "1fba77d7f6a1246d25a5",... |
google.charts.load("current", {packages:["corechart", "table", "annotatedtimeline"]});
google.charts.setOnLoadCallback(firstRun);
function drawCharts() {
if(isDataRangeValid()) {
$("#preloader").show();
$("#result").html("");
$("#timeseries").html("");
$.ajax({
type: "GET",
url... |
import React, { useState, createContext, useEffect } from "react";
export const Context = createContext();
const ContextProvider = props => {
const [thisMonthTweets, setThisMonthTweets] = useState([]);
const [todayTweets, setTodayTweets] = useState({});
const [selectedComponent, setSelectedComponent] = useState... |
const token = process.env.API_TOKEN || require('../../config/token');
const axios = require('axios');
const getNypdData = function (year) {
if (!year || year === Date().split(' ')[3]) {
return axios.get(`https://data.cityofnewyork.us/resource/5ucz-vwe8.json?statistical_murder_flag=Y&$$app_token=${token}`);... |
'use strict';
/**
* Link.js controller
*
* @description: A set of functions called "actions" for managing `Link`.
*/
module.exports = {
/**
* Retrieve link records.
*
* @return {Object|Array}
*/
find: async (ctx, next, { populate } = {}) => {
if (ctx.query._q) {
return strapi.services.... |
import path from 'path'
module.exports = {
// 导入别名
alias: {
'/@/': path.resolve(__dirname, './src'),
'/@/': path.resolve(__dirname, './src/views'),
'/@components/': path.resolve(__dirname, './src/components'),
'/@utils/': path.resolve(__dirname, './src/utils'),
},
css: {
... |
import 'bootstrap/dist/css/bootstrap.min.css'
import '../styles/globals.css'
import '../styles/header.css'
import '../styles/mainPage.css'
import '../styles/form.css'
import '../styles/programs.css'
import '../styles/coursecard.css'
import '../styles/carouselPage.css'
import '../styles/contacts.css'
import '../styles/p... |
import React from "react";
import { Link } from "react-router-dom";
import { createUseStyles } from "react-jss";
import { ArrowLeft, ArrowRight } from "@material-ui/icons";
import MdParser from "../../utils/MdParser";
const useStyles = createUseStyles({
container: {
maxWidth: "400px",
},
toggleIcon: {
w... |
const express = require('express');
const mongoose = require('mongoose');
const shop = require('./routes/shop');
const admin = require('./routes/admin');
const auth = require("./routes/auth");
const user = require('./routes/user');
const Sadmin = require('./routes/sAdmin');
const multer = require('multer');
const app =... |
$(".top-nav>ul>li").on('mouseenter',function(){
$(this).css(
"background-color","#F10180"
)
$(this)
})
$(".top-nav>ul>li").on('mouseleave',function(){
$(this).css(
"background-color","#262626"
)
})
$(".top-nav>ul>li:nth-child(2)").on('mouseleave',function(){
$(th... |
class InfiniteTweets {
constructor() {
}
} //class
module.exports = InfiniteTweets;
|
var express = require('express');
var router = express.Router();
const ItemController = require('../controllers/ItemController');
const apiConfig =require('../config/apiConfig');
router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
/*router.use(function(req,res,next){
... |
import styled from 'styled-components'
const CartCont = styled.div`
width:100%;
height:100%;
overflow:hidden;
`
const CartWrap = styled.div`
width:100%;
display:flex;
flex-direction:column;
`
const Ctitle =styled.div`
width:100%;
display:flex;
justify-content:center;
align-items... |
const {User} = require('../models/User');
module.exports = {
oneUser: (req, res) => {
User.findOne({_id: req.params.id})
.then( User => res.json(User))
.catch( err => res.status(400).json(err))
},
allUsers: (req, res) => {
User.find({})
.then( Users => res.json(U... |
import { nanoid } from "nanoid";
import prisma from "../prisma/client.js";
import s3 from "../config/s3.js";
export const updateProfile = async (req, res) => {
try {
const { userId } = req.params;
const {
id,
fullname,
username,
email,
profile_photo,
about,
contact... |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap';
// importing components
import Search from './components/search';
import Results from './components/results';
import NavBar fro... |
const mongoose = require("mongoose");
const productSchema = mongoose.Schema({
name: {
type: String,
required: [true, "Please Enter the Product Name"],
trim: true,
maxLength: [100, "Procut Name is Too lengthy"],
},
description: {
type: String,
},
shortDescription: {
type: String,
},
... |
import React, {Component} from 'react'
import {withStyles} from 'material-ui/styles'
import Typography from 'material-ui/Typography'
const style = theme => ({
root: {
padding: '1em',
}
})
@withStyles(style)
class ColumnsHeading extends Component {
render() {
const {classes, children} = this.props
re... |
var moduleController = {
connectionStart: undefined,
MODULES: [],
modules: [],
init: function( onmousedown ){
var list = document.getElementById("list");
for( var name in this.MODULES ){
var node = document.createElement("LI");
node.innerText = name;
n... |
(function(){
var module = angular.module("psMovies");
module.component("movieOverview",{
template: "psMovies/movie.overveiw.component.html"
});
}); |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GetAbsoluteRect = exports.GetViewportRect = exports.GetScrollOffset = exports.GSAPScrollBehavior = exports.ScrollBehavior = exports.ViewportCoordinateScrollAction = exports.TRANSITION_LEAVE = exports.TRANSITION_ENTER = exports.TRANS... |
var L = require('leaflet');
require('leaflet-providers');
var config = require('../config.json');
var grayscale = L.tileLayer.provider('CartoDB.Positron');
var map = L.map('map', {
center: config.map_center, // Austin!
zoom: 12,
scrollWheelZoom: false,
layers: [grayscale],
});
var baseMaps = {
'... |
import './Checkbox.css';
import React from 'react';
export default (props) => {
return (
<div className="checkbox-div">
<input
type="checkbox"
id="vegetaian"
checked={props.vegebox}
on... |
import CsvFileService from '@/services/CsvFileService'
export const namespaced = true
export const state = {
files: []
}
export const mutations = {
SET_CSV_FILES(state, files) {
state.files = files
},
ADD_CSV_FILE(state, file) {
state.files.push(file)
}
}
export const actions = {
fetchFileNames({ ... |
var loggedInUser = "";
$(document).ready(function() {
$("#go").click(function() {
var user = $("#user").val();
var pass = $("#pass").val();
login(user,pass);
});
$("#register").click(function() {
var reguser = $("#reguser").val();
var regpass = $("#regpass").val();
... |
import { createStore } from "redux";
const setAddressee = (state = 'John Bow', action) => {
switch (action.type) {
case "SET_ADDRESSEE": {
return action.payload.addressee;
}
default: {
return state;
}
}
};
export default createStore(setAddressee, 'Carl Anon'); |
const ForumQuestion = require('../../../models/forumQuestion');
const User = require('../../../models/user');
const { TransformObject } = require('./merge');
exports.createForumQuestion = async (args, req) => {
try {
if (!req.isTheUserAuthenticated) {
throw new Error('Unauthenticated!');
}
const fo... |
'use strict';
const test = require('tape');
const OGMNeoIndex = require('../lib/ogmneo-index');
test('Test create an index', (assert) => {
OGMNeoIndex.create('object', ['name','test']).then((result) => {
assert.notEqual(result, null);
assert.end();
});
});
test('Test create index with a s... |
if(typeof Global ==="undefined"){
Global={};
}
if(!Global.productDirLoader){
Global.productDirLoader = new Ext.tree.TreeLoader({
iconCls : 'lanyo-tree-node-icon',
url : "productDir.ejf?cmd=getProductDirTree&pageSize=-1&treeData=true",
listeners : {
'beforeload' : function(treeLoader, node) {
treeLoader.... |
const path = require('path');
const webpack = require('webpack');
const IS_DEV_SERVER = process.argv[1].indexOf('webpack-dev-server') >= 0;
module.exports = {
mode: IS_DEV_SERVER ? 'development' : 'production',
entry: {
bundle: path.resolve(__dirname, 'src')
},
devtool: IS_DEV_SERVER ? 'eval' ... |
const Admin = require('../models/admin/admin');
const auth = async (ctx, next) => {
const token = ctx.headers['x-auth'];
const admin = await Admin.findByToken(token);
if (!admin) {
ctx.status = 401;
return;
}
ctx.request.admin = admin;
ctx.request.token = token;
await next();
};
module.exports ... |
QUnit.test("Test the validPhone function.", function (assert) {
var num = "(415) 555-5555";
var result = validPhone(num);
assert.deepEqual(result, true, "validPhone function passed.")
});
QUnit.test("Errors thrown for validPhone", function (assert) {
assert.throws(function () {
validPhone("(415)... |
import React from 'react';
import { Redirect } from 'react-router-dom';
import Home from '../view/Home';
import Recommend from '../view/Recommend';
import Singer from '../view/Singer';
import Rank from '../view/Rank';
export default [
{
path: "/",
component: Home,
routes: [
{
path: "/",
... |
'use strict'
const AuthorizationException = require('../Exceptions')
class Is {
async handle ({ imperium }, next, [role]) {
if (await imperium.isnot(role)) throw new AuthorizationException('Unauthorized', 403, 'E_UNAUTHORIZED')
await next()
}
async wsHandle ({ imperium }, next, [role]) {
if (await... |
"use strict";
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must ... |
import express from 'express'
import { uploadGroupPhoto,uploadProfilePhoto,uploadMsgs } from '../controllers/upload.js'
import multer from 'multer'
import path from 'path'
import auth from '../middlewares/auth.js'
const storage = multer.diskStorage({
destination: (req,file,cb)=>{
cb(null,'static/imgs/')
... |
var App = require('app');
/**
* Users View Controller
*
* @namespace App
* @extends {Ember.ObjectController}
*/
App.UsersViewController = Em.ObjectController.extend({
}); |
const mongoose = require('mongoose');
const Joi = require('joi');
const discountSchema = mongoose.Schema({
_id : mongoose.Schema.Types.ObjectId,
menu : { type : String },
menuId : { type : mongoose.Schema.Types.ObjectId },
typeofDiscount : { type : String },
discountAmt : { type : Number , required... |
import { React } from 'react';
import './Data.css';
export function Data(props){
const imgSrc = 'http://openweathermap.com/img/w/'+(props.state.icon)+'.png';
const temp = Math.round(parseFloat(props.state.temp)-273.15);
const weather = (props.state.desc).toUpperCase();
const city = (props.state.city).t... |
import React from 'react'
import MonsterConfigListData from 'components-lib/monsterConfigList/MonsterConfigListData'
import MonsterConfig from 'components-lib/monsterConfig/MonsterConfig'
import SWPanel from 'components-lib/ui/SWPanel'
import {Utils} from 'ap-react-bootstrap'
import './MonsterConfigList.scss';
/* T... |
// @param {number} N
// @return {number}
const fib = N => {
let first = 1;
let second = 0;
let temp = null;
while (N >= 0) {
temp = first;
first = first + second;
second = temp;
N--;
}
return first - second;
};
export default fib;
|
module.exports = {
app: {
id: '365c9c6a-5602-4bc6-942c-7084beada709' //change this to your app's client id
},
appWallet: {
client: {
//if you have an app wallet, add your client id and secret here
id: 'ad2c4eb9-bc22-4000-b17e-54dd1e568440',
secret: '56iBfVL]fxB-pRyS}19[er9lBxuD}MvcUV6P0Y... |
// Data for the "HTML Audio" Page
var audio = {
controls: true,
source: [
{src: "https://scs.senecac.on.ca/~tanvir.alam/shared/fall-2018/web222/Track03.mp3", type: "audio/mpeg"},
{src: "https://scs.senecac.on.ca/~tanvir.alam/shared/fall-2018/web222/Track03.ogg", type: "audio/ogg"}
]
};
wi... |
import React from "react";
const CheckList = () => (
<div>
<h2>Check List for New PHM Devs</h2>
<h4>Welcome to Plaza Home Mortgage IT Department!</h4>
<p>
In order to get started contributing code there are a few things you'll
want to make sure you have a grasp of. Ask around to people in IT ... |
import Vue from "vue";
import axios from "axios";
const skill = {
template: "#skill",
props: {
skillName: String,
skillPercents: Number
},
methods: {
drawCircle() {
const circle = this.$refs["color-circle"];
const dashOffset = parseInt(
getComputedStyle(circl... |
$(document).ready(function() {
var color;
$(this).mousemove(function() {
color = 'rgb(' + (Math.floor(Math.random() * 256)) + ', ' + + (Math.floor(Math.random() * 256)) + ', ' + (Math.floor(Math.random() * 256)) + ')';
$('#chunk').css({
'background-color': color,
'left': event.pageX - 5,
'... |
var searchData=
[
['filereadexception',['FileReadException',['../structfsml_1_1FileReadException.html',1,'fsml']]],
['filewriteexception',['FileWriteException',['../structfsml_1_1FileWriteException.html',1,'fsml']]],
['flatmachine',['FlatMachine',['../structfsml_1_1FlatMachine.html',1,'fsml']]],
['flatstep',['F... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.