text stringlengths 7 3.69M |
|---|
import { defineConfig } from "../lib";
export default defineConfig({
host: "59.110.167.48",
localRoot: __dirname + "/../lib",
remoteRoot: "",
deleteRemote: true,
includes: ["*", "**/*"],
excludes: ["test/*"],
auth: {
username: "tuancanadmin",
password: "Ze7xMAHfY7ZwkHb6",
},
});
|
import React from 'react';
import './breadCrumb.scss';
import { Link } from 'react-router-dom';
import addfunc from '../../ultis/additionalFunction';
const BreadCrumb = ({ title, titleParent }) => {
return (
<div className="banner-breadcrumb">
<div className="overlay-banner-breadcrumb"></div>
... |
const express=require('express');
const expressjwt=require('express-jwt')
const jwt=require('jsonwebtoken');
const {OAuth2Client}= require('google-auth-library');
const client= new OAuth2Client('601534516278-jpkuqoe0ckbt48o9kohl8ueg18miktjd.apps.googleusercontent.com');
const authRoute=express.Router();
const User = re... |
import React, { Component } from 'react';
import { Link } from "react-router-dom";
import ListarCompras from "./ListarCompras";
class Cliente extends Component {
state = {
compras: []
}
componentDidMount() {
//##### Carregar as compras no bd
this.setState({ compras: testeCompras }... |
var win=nw.Window.get();
var gui=require('nw.gui');
var fs=require("fs");
var exec=require("child_process").exec;
var execSync=require("child_process").execSync;
var spawn=require("child_process").spawn;
var elevate=require('node-windows').elevate;
var fileGet=require('resolve');
var http = require('http');
var fs = re... |
import React from 'react';
import { InputGroup, Input, Button } from 'reactstrap';
import SamplesHome from './SamplesHome';
import { useStateValue } from './state';
import { StateContext } from './state';
class Logon extends React.Component {
static contextType = StateContext;
render(){
const [{ user }, dispa... |
//This application file holds the routes for the url
'use strict';
module.exports = function(app) {
var todoList = require('../controllers/Controller');
// todoList Routes
//this will be used to get a list of all the users and the post to create a user
app.route('/user')
.get(todoList.list_users)
.post... |
import React from 'react';
import { Text, View } from 'react-native';
const propTypes = {};
const defaultProps = {};
const navigationOptions = {
title: 'Private',
};
class Private extends React.Component {
render = () => {
return (
<View>
<Text> Private </Text>
</View>
)
}
}
Private... |
/**
* weixin signature
* @author yuji <leecade@163.com>
* https://github.com/leecade/weixin-node
* 1. appid + appsecret -> access_token
* 2. access_token -> ticket
* 3. ticket + url -> signature
*/
'use strict'
var fs = require('fs')
var request = require('co-request')
var config = require('config');
var utils ... |
import React, { Component } from 'react';
import JobItem from './JobItem';
class Jobs extends Component {
render() {
return (
this.props.jobs.map((job) => {
return <JobItem job = {job}/>
})
)
}
}
export default Jobs;
|
var orm = require('../config/orm')
var user = {
//Expecting newUser object that includes username, email and password
createUser: function (newUser, callback) {
let query = {
table: 'users',
data: newUser, //the object keys must match the table columns
debug: true
... |
import React, {useEffect, useState} from "react";
import "../styles.css";
import { formatDistanceToNow, subHours } from "date-fns";
import Card from "@material-ui/core/Card";
import Typography from "@material-ui/core/Typography";
import { makeStyles } from "@material-ui/core/styles";
import leaguesData from "../assets/... |
import React from 'react';
import {withRouter,Switch,Route} from 'react-router-dom';
import StrategyEditorComponent from './component';
class StrategyEditorContainer extends React.Component{
render(){
return (
<Switch>
<Route exact path={this.props.match.url} render={()=>{
return <StrategyEditorComponen... |
import {useState} from 'react'
import {Tab} from "./Tab";
import TabList from "./TabList"
function TabApp() {
return (
<TabList>
<div key="Tab 1">Hello, world!</div>
<div key="Tab 2">Goodbye, universe!</div>
</TabList>
);
}
export default TabApp;
|
console.log('Hellos')
const express = require('express')
const bodyParser = require('body-parser')
const cors = require('cors')
const morgan = require('morgan')
const app = express()
/* Useful to show logs on the terminal about the processes */
app.use(morgan('combined'))
/* Useful to parse your data into a proper jso... |
(function($) {
"use strict";
// Page Preloader
$(window).load(function() {
$(".loader").delay(300).fadeOut();
$(".animationload").delay(600).fadeOut("slow");
});
// DM Top
jQuery('.top').click(function(){
jQuery('html, body').animate({scrollTop: '0px'}, 800);
return f... |
import React, {useState, useEffect} from 'react';
import {Link} from 'react-router-dom';
import {useDispatch,useSelector} from 'react-redux';
import {login} from '../../actions/authActions';
import Alert from '../alert/Alert';
const Login = () => {
const dispatch = useDispatch();
const [isLogin,setLogin] = useStat... |
import React, { Component } from 'react';
import {
Card,
CardImg,
CardText,
CardBody,
CardTitle,
Breadcrumb,
BreadcrumbItem,
Button,
Modal,
ModalHeader,
ModalBody,
Label,
Row,
Col,
CardImgOverlay
} from 'reactstrap';
import { Link } from 'react-router-dom';
im... |
var DataStore = require('./dataStore');
var Boom = require('boom');
var JWT = require('jsonwebtoken');
var Handlers = {};
/******ENVIAR CORREO****************************************************************************************************************************************************************************... |
module.exports = {
files: {
'<%= assets.styles %>/main.min.css': ['<%= assets.styles %>/main.sorted.css']
}
};
|
const fetch = require('node-fetch');
const handler = {
async exec({ m, args, MessageMedia, client, messageFrom, dbid }) {
try {
let _fetch = await fetch('https://covid19.mathdro.id/api/countries/indonesia', {
mode: 'no-cors',
timeout: 0
});
... |
const name = 'Peer Fisser'
export default name
|
'use strict'
const db = require('./db')
const request = require('request-promise-native')
exports.search = async (req, res, next) => {
const { term } = req.params
const options = {
url: 'https://www.googleapis.com/customsearch/v1',
qs: {
key: process.env.API_KEY,
cx: process.env.CX,
q: e... |
/*En esta oportunidad el juego evaluará tus
aptitudes a partir de la cantidad de intentos,
por lo cual se informará lo siguiente:
1° intento: “usted es un Psíquico”.
2° intento: “excelente percepción”.
3° intento: “Esto es suerte”.
4° intento: “Excelente técnica”.
5° intento: “usted está en la media”.
Desde 6 Inten... |
import { useState } from 'react';
import Head from 'next/head'
import Link from 'next/link';
import FeaturedPost from '@components/FeaturedPost';
import InfoPost from '@components/InfoPost';
import Container from '@components/Container';
import Layout from '@components/Layout';
import SectionHeader from '@components/Se... |
const dartResult = "1D2S3T*";
function solution(dartResult) {
let score_arr = [];
let SDT_arr = [];
let prize_arr = ["", "", ""];
let idx = -1;
for (let i = 0; i < dartResult.length; i++) {
if (dartResult[i] >= "0" && dartResult[i] <= "9") {
if (dartResult[i + 1] == "0") {
score_arr.push(10... |
var Videos = Backbone.Collection.extend({
url: 'src/data/exampleVideoData.js',
model: Video
// initialize: function() {
// // console.log('this', this);
// // this.fetch();
// }
});
|
'use strict';
var events = require('../../app/controllers/events.server.controller');
module.exports = function(app) {
app.route('/events')
.get(events.list)
.post(events.create);
app.route('/events/:eventId')
.get(events.read)
.post(events.update)
.delete(events.delete);
app.param('eventId', events.e... |
import React from 'react';
import PostsGrid from '../../components/PostsGrid';
import fetch from 'isomorphic-unfetch';
const dev = process.env.NODE_ENV !== 'production';
export const server = dev ? 'http://localhost:3000' : 'https://my-next-app.com';
const Posts = (props) => {
return (
<section className="page-... |
const Recipe = require("../models/Recipes");
const getRecipes = async (req, res, next) => {
try {
const recipes = await Recipe.find();
res.json({
data: recipes,
});
} catch (err) {
console.log(err);
}
};
const getRecipe = async (req, res) => {
try {
const { id } = req.params;
con... |
'use strict'
let path = require('path'),
db = require(path.resolve('backend/models/downloadData.js')),
mq = require(path.resolve('backend/models/messagequeue.js'))
var raspiAlive = false
module.exports = (app, passport) => {
app.get('/getsensorids', (req, res) => {
db.getTemperatureSensors(function(returndata)... |
'use strict';
/**
* @name OnhanhBranh
* @description branhModule
*/
var branhModule = angular.module("app.branh", []);
|
const Movies = require("./Movies.js");
const data = require("./data.json");
Movies.deleteMany({}).then(() => {
Movies.create(data).then((movies) => {
console.log(movies);
process.exit();
});
});
|
const { Jobs } = require("./models");
const { Recruiter } = require("./models");
const { User } = require("./models");
const seed = async () => {
await Jobs.destroy({ where: {} });
await Recruiter.destroy({ where: {} });
const admin = await User.create({
username: "omnia",
password_digest: "$2b$11$J/T6H... |
var _ = require('lodash');
var Promise = require('promise');
var fs = require('fs');
var mkdirp = require('mkdirp');
var Telemetry = require('telemetry-next-node');
// Create output directory
mkdirp.sync('histograms');
// Initialize telemetry
var telemetry_inited = new Promise(... |
const defaultTimeout = 30 * 1000;
const HostUrl = '';
function baseRequest(config) {
uni.request({
url: HostUrl + config.url,
method: config.method,
data: config.data,
timeout: defaultTimeout,
success: (data) => {
if (config.success) {
config.success(data);
}
},
fail: (err)... |
map = new Object();
map.currentMap = null;
map.monsters = new Array();
map.obstacles = new Array();
map.setMap = function(mapData)
{
map.currentMap = new Image();
map.currentMap.src = mapData;
map.currentMap.onload = () => { map.generateTerrain(); map.spawnMonsters(); }
};
map.draw = function()
{
//render... |
const MovieModel = require('../models/Movie')
class MovieController {
static async getAllMovies(req, res) {
try {
const movies = await MovieModel.getAllMovies()
res.status(200).json(movies)
}
catch (err) {
res.status(500).json(err)
}
}
static async addMovie(req, res) {
try... |
import axios from "axios";
const baseURL = `/api/persons`
const getAll = () => {
const request = axios.get(baseURL)
return request.then(response => response.data)
}
const add = (newObject) => {
const request = axios.post(baseURL, newObject)
return request
.then(response => response.data)
... |
import $ from 'jquery'
/*=========================================
= Mobile Navigation =
==========================================*/
const Navigation = () => {
// Click on .ss-nav when viewing the mobile version of the site
let mobileDisplay = $('#nav-toggle').css('display')
if (mobileDis... |
const palette = require('./palette')
const colors = require('tailwindcss/')
module.exports = {
future: {
// removeDeprecatedGapUtilities: true,
// purgeLayersByDefault: true,
},
purge: [],
theme: {
extend: {
colors: palette
},
scale: {
'300': '3',
},
borderRadius: {
... |
import {guardPlainObj} from '../esm/'
test('Returns plain object as-is.', () => {
const x = { a: 'AAA' }
expect(guardPlainObj({}, x)).toBe(x)
})
test('Returns default value if not a plain object.', () => {
const defaultValue = { a: 'AAA', b: 'BBB' }
expect(guardPlainObj(defaultValue, 'relax, this is ... |
import Vue from 'vue'
import Router from 'vue-router'
import RecentNews from '../pages/views/RecentNews'
import SocialCircle from '../pages/views/SocialCircle'
import OpenSource from '../pages/views/OpenSourece'
import BokeList from '../pages/views/BokeList'
Vue.use(Router)
export const constantRouterMap = [
{
... |
(function($) {
//globals
var page_idx = 0;
//init method for module
function _init() {
//defined module inits
jloupe().init();
jloupe().tab_init();
//subscribe to when a person clicks on an area... referenced publish in DV/helpers/helpers.js
$.subscribe('clickSpot', funModal);
hide_Modal();
}
func... |
google.maps.event.addDomListener(window, 'load', function initialize() {
navigator.geolocation.getCurrentPosition(function (position) {
var myLatlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var map = new google.maps.Map(document.getElementById("home-map"),
... |
OC.L10N.register(
"core",
{
"Sunday" : "კვირა",
"Monday" : "ორშაბათი",
"Tuesday" : "სამშაბათი",
"Wednesday" : "ოთხშაბათი",
"Thursday" : "ხუთშაბათი",
"Friday" : "პარასკევი",
"Saturday" : "შაბათი",
"Sun." : "კვ.",
"Mon." : "ორშ.",
"Tue." : "სამ.",
"Wed." : "ოთხ.",
"... |
// Author: Jasser Dhaouadi
// Exercise 3
// REMARK: in order to run the code, please don't forget to comment out the section that is not used in testing
// for example: if you want to run the section of "function constructor", comment out the section of "Object.create()"
// function constructor
function Person... |
//========추가================
// 기관코드
const iscd = ""
//임시 : 000537
// 인증키
const accessToKen = ""
// 임시 : 238489426e54540b1cee32c5a2066c0c9e9f25166bebdc9696fa76e4657c11e8
//===================================
const Axios = require("axios")
const date = new Date()
const year = date.getFullYear()
const month = date.ge... |
import DetailsSection from "./DetailsSection";
const BaseInfoSection = () => {
const sectionProps = {}
sectionProps.navLink = './profile'
sectionProps.title = 'Образование'
sectionProps.items = [
{title:'Родной город', value:'Санкт-Петербург', navLink:'/profile' },
{title:'Язык', value... |
import React from 'react';
import { View, Text, ImageBackground } from 'react-native';
import SpaceItem from '../SpaceItem'
import styles from './styles';
import space from './space'
const SpaceList= (props) => {
return (
<View style={styles.spaceContainer}>
<ImageBackground source={require('.... |
module.exports = function (array) {
return {
array: [].concat(array),
length: array.length
}
}
|
import babel from 'rollup-plugin-babel'
import uglify from 'rollup-plugin-uglify'
const config = {
input: 'src/index.js',
plugins: [babel({ exclude: 'node_modules/**' })],
output: {
name: 'robin',
sourcemap: false,
format: 'es'
}
}
if (process.env.NODE_ENV === 'production') {
config.output.file ... |
const { readFileSync } = require("fs");
const { resolve } = require("path");
const { part1, part2 } = require("./solution");
const data = readFileSync(resolve(__dirname, "data.txt"), "utf8").trim().split("\n");
describe("Day 18", () => {
test("part 1 example", () => expect(part1(["2 * 3 + (4 * 5)"])).toBe(26));
t... |
/*
OBS Websocket Bot for Twitch
Author: derrobin154
Used Packages: tmi.js@npm, obs-websocket-js@npm, dotenv@npm, node-fetch@npm
*/
const version = "2.2";
const twitch = require('tmi.js');
const dotenv = require('dotenv').config({path: './.env'});
const client = new twitch.client({
connection: {
... |
(function(){
angular
.module('linguine.corpora')
.controller('CorporaShowController', CorporaShowController);
function CorporaShowController ($scope, $http, $stateParams, $window, flash, $state, $rootScope) {
$scope.back = function () {
$window.history.back();
};
$scope.delete = functi... |
class Game {
static generateCells() {
const cells = [];
for (let i = 0; i < 3; i++) {
for (let j = 0; j < 3; j++) {
cells.push({
row: j,
col: i,
status: 0,
});
}
}
return cells;
}
static setStatus(i, cells, val) {
const res = cells;
... |
const express = require('express')
const router = express.Router()
const signUpTemplateCopy = require('../models/signupmodels')
const bcrypt = require('bcrypt')
router.post('/signup', async (req, res) => {
const saltPassword = await bcrypt.genSalt(10)
const securePassword = await bcrypt.hash(req.body.password... |
function setUpAlertBox(blessed) {
// Create an alert box used by blessed module in terminal
const alertBox = blessed.log({
top: '0%',
left: '50%',
width: '50%',
height: '100%',
style: {
fg: 'white',
bg: 'black',
},
border: {
type: 'line',
},
tags: true,
cont... |
//? dependencies
const express = require("express");
require('./db/conn');
const router = require("./routers/student");
//? constants
const app = express();
const port = process.env.PORT || 3000;
//? middleware
app.use(express.json())
app.use(router)
//?listening server
app.listen(port, () => {
console.log("li... |
var util_8c =
[
[ "imap_adata_free", "util_8c.html#a9067b3d9d150797256089f14b2f364c3", null ],
[ "imap_adata_new", "util_8c.html#a9aa9b8023a54c022c721d647af6cf856", null ],
[ "imap_adata_get", "util_8c.html#a0ca70f0a790494cb3e6cbdaf3cb004a4", null ],
[ "imap_adata_find", "util_8c.html#ac1109505626c478d3... |
/*Break与Continue
* Break:表示终止(中断)当前(整个)循环,循环余下次数不会再执行循环
* Continue:表示终止本次循环,进行下一次循环
* Break和Continue之后不能再写代码(写了也不执行),“之后”表示处在同一个顺序结构中*/
/*案例一*/
function showView01() {
var sum = 0;
for (var i = 1; i <= 1000; i++) {
if (i % 7 === 0) {
console.log("能被整除的整数为*********************>>" + i);
... |
import clone from 'clone';
import types from '../../actions/actionTypes';
import initialState from '../initialState';
export default function (state = initialState.user, action) {
switch (action.type) {
case types.UPDATE_USER: {
const oldState = clone(state);
const newState = Object.assign({}, ... |
var express = require('express');
var bcrypt = require('bcrypt-nodejs');
var router = express.Router();
var jwt = require("jwt-simple");
var fs = require('fs');
var Device = require("../models/device");
var User = require("../models/user");
var secret = fs.readFileSync(__dirname + '/../jwtkey').toString();
//var app... |
var searchData=
[
['heap',['heap',['../_global_variables_09headers_8cpp.html#af69e1440d3b8b8468dc0b4d3572bc379',1,'GlobalVariables+headers.cpp']]],
['height',['height',['../_global_variables_09headers_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534',1,'GlobalVariables+headers.cpp']]]
];
|
let BaseDao = require('../dao/baseDao');
const usersModel = require('../schema/user')
const commonDao = new BaseDao(usersModel);
const role = require('../constants').roles;
const status= require('../constants').status;
function create(data) {
return commonDao.save(data).then((result) => {
return result;
... |
#!/usr/bin/env node
'use strict'
const chalk = require('chalk')
const sywac = require('../../index')
sywac
// commands
.command(require('./cmds/env'))
.command(require('./cmds/build'))
.command(require('./cmds/release'))
.showHelpByDefault()
// global options
.string('-r, --remote <host>', {
group:... |
import styled from "styled-components";
import notFound from "../assets/no-results.svg";
export default function NoResult() {
return (
<Wrapper>
<img src={notFound} height={200} alt="Your search did not return any results" />
<h3>Your search did not return any results.</h3>
</Wrapper>
);
... |
/* begin copyright text
*
* Copyright © 2016 PTC Inc., Its Subsidiary Companies, and /or its Partners. All Rights Reserved.
*
* end copyright text
*/
/* jshint node: true */
/* jshint strict: global */
/* jshint esversion: 6 */
'use strict';
/**
* Class to collect list of values associated with a key
*/
class M... |
export default /* glsl */`
// the envAtlas is fixed at 512 pixels. every equirect is generated with 1 pixel boundary.
const float atlasSize = 512.0;
const float seamSize = 1.0 / atlasSize;
// map a normalized equirect UV to the given rectangle (taking 1 pixel seam into account).
vec2 mapUv(vec2 uv, vec4 rect) {
re... |
import React from 'react';
const SearchBoxAttrsRender = ({attributes}) => {
return (
<React.Fragment>
{
attributes.nodes.map(attr => {
if (attr.name === 'pa_publisher') {
return (<span key={attr.attributeId}>{attr.value}</span>);
... |
// const square = function(x){
// return x*x;
// };
function square() {
return x*x;
}
// const squareArrow = (x) => {
// return x*x;
// };
//Arrow function expression syntax
const squareArrow = (x) => x*x;
console.log(squareArrow(10)); |
import styled from "styled-components";
import { device } from "../../../device";
export const CheckoutItemContainer = styled.div`
@media ${device.mobileS} {
width: 100%;
display: flex;
min-height: 100px;
border-bottom: 1px solid darkgrey;
padding: 15px 0;
align-items: center;
& > div {
... |
const express = require('express');
const expressSession = require('express-session');
const routes = require('./routes');
const auth = require('./auth');
const app = express();
app.use(expressSession({
secret: 'my random secret',
resave: false,
saveUninitialized: true,
cookie: { secure: false }
}));
... |
import express from 'express';
import DocumentDispatched from './controller';
import mdw from '../../middlewares/authentication';
const app = express();
app.get('/', [mdw.verifyToken], DocumentDispatched.Fetch);
app.get('/:id', [mdw.verifyToken], DocumentDispatched.FetchOne);
app.post('/', [mdw.verifyToken], Document... |
import React, { useEffect, Fragment } from 'react'
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { getTasks } from "../../actions/taskActions"
import TaskItem from "./TaskItem"
import AddBtn from "../layout/AddBtn";
import AddTaskModal from "./AddTaskModal";
import EditTaskModal from... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.Types.ObjectId;
var Head = require('./head.js')
// A model for the year object
var YearSchema = new Schema({
name: String,
iteration: Number
});
var YearModel = mongoose.model('Year', YearSchema, 'years');
module.exports =... |
jQuery('.block-coloumn-material').scroll(function(){
var $sections = $('h2');
$sections.each(function(i,el){
var top = $(el).offset().top-100;
var bottom = top +$(el).height();
var scroll = $(window).scrollTop();
var id = $(el).attr('id');
if( s... |
/*Copyright (C) 2013 Baptiste Clement
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in t... |
import React from "react";
import styled from "styled-components";
import AOS from "aos";
import "aos/dist/aos.css";
import "./App.css";
import { Nav } from "./Components/Nav";
import { Header } from "./Components/Header";
import { Map } from "./Components/Map";
import { Poem } from "./Components/Poem";
import { Info }... |
// @flow
import React from "react";
import Story from "./Story";
import { Hotkeys } from "./../src";
type Props = {};
type State = {
currentZIndex: number
};
class HOCExample extends React.Component<Props, State> {
constructor() {
super();
this.state = { currentZIndex: 0 };
}
decremen... |
function doCopy(data) {
var obj = document.getElementById('copy-clip-div');
obj.style.display = '';
obj.contentEditable = true;
obj.innerHTML = data;
obj.unselectable = false;
obj.focus();
document.execCommand('SelectAll');
document.execCommand('Copy', false, null);
obj.style.display = 'none'
}
v... |
var NAVTREEINDEX37 =
{
"structImapAccountData.html#a7ed31d012f389db2e60adfe46c7b1622":[1,0,87,2],
"structImapAccountData.html#a89ff311b312a9d0bc216d689161bf1a7":[1,0,87,9],
"structImapAccountData.html#a91de1ca6b20913cfe9ee5cc12ba56cb2":[1,0,87,7],
"structImapAccountData.html#a9ce6191c36074e9613d78e22851119d0":[1,0,87,1... |
/**
* Represents a stack (classic object)
*/
function Stack()
{
this.values = [];
}
Stack.prototype.push = function(value) {
this.values.push(value);
};
Stack.prototype.pop = function() {
return this.values.pop();
};
Stack.prototype.peek = function() {
if (this.values.length)
{
return ... |
import Ember from 'ember';
export default Ember.Route.extend({
transitionToSecrets: null,
setupController: function (controller, model) {
this._super(controller, model);
var secretsController = this.controllerFor('secrets');
if (secretsController.get('position') !== 'left full-height'... |
function ddaAlgo(coord1, coord2) {
const lineCoords = [];
const dy = coord2.y - coord1.y;
const dx = coord2.x - coord1.x;
const steps = Math.max(Math.abs(dy), Math.abs(dx));
const incX = dx / steps;
const incY = dy / steps;
let { x, y } = coord1;
for (let i = 0; i <= steps; i++) {
... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import '../css/header.css';
import Star from '../svg/star.svg';
import Search from '../svg/search.svg';
import CartIcon from '../svg/cart.svg';
import Cart from "./cart";
export default function Header(props) {
... |
express = require("express");
const port = process.env.PORT || 4856;
var server = express()
.use((req, res) => res.send('HelloW plase use WS:// not HTTP://') )
.listen(port, () => console.log(`Listening on ${ port }`));
var WebSocket = require("ws");
var WebSocketServer = WebSocket.Server;
var wss = new WebSocket... |
import React, { Component, Fragment } from 'react'
import { Group, Button } from 'rebass'
import { MdClose, MdSettings, MdDelete } from 'react-icons/md'
import Popout from './Popout'
import PopoutForm from './PopoutForm'
import EditorPortal from './EditorPortal'
import micropub, { uploadMf2FilesToMediaEndpoint } ... |
angular
.module('app')
.service('Data', DataService);
function DataService($http) {
var data = this;
data.categories = [];
data.contacts = [];
data.getCategories = function() {
return this.categories;
};
data.getContacts = function() {
return this.contacts;
};
... |
import ModeleRankingTeam from './modele/modele_team';
import requestURI from './modele/nbaURI';
import ControllerRankingTeam from './controller/controller_equipe';
const sendStanding = (datas, index) => {
// Initialise Team Instance Variable with Controller Team Data
const teamsCollection = datas.body.resultSets[i... |
"use strict";
var Pedido = require('../models/models').Pedido,
Cliente = require('../models/models').Cliente,
Item = require('../models/models').Item,
_ = require('lodash');
var pedidos = {
crear: function(req, res, next) {
var nuevoPedido = {
_id : req.body._id,
can... |
import * as actions from './../actions/actionTypes';
import { cloneDeep } from 'lodash';
const initialState = {
user: {},
isLoggedIn: false,
loginError: null
}
const reducer = (state=initialState, action) => {
let clonedState = cloneDeep(state);
switch(action.type) {
case actions.LOGIN_SUC... |
/// <reference path="../../typings/tsd.d.ts" />
var $wrapper = $('.wrapper'),
$tools = $('#tools-container'),
canvas = document.getElementById('canvas'),
tempcanvas = document.getElementById('tempcanvas'),
ctx = tempcanvas.getContext('2d'),
mainctx = canvas.getContext('2d'),
color = 'black',
... |
import GoogleMapReact from 'google-map-react';
import React, { useContext } from 'react';
import { resortContext } from '../../App';
import LocationPin from './LocationPin';
const GoogleMap = () => {
const [currentResort] = useContext(resortContext);
const {address,lat,lng} = currentResort; //get lat and lang ... |
import React, { useState } from "react"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { faEdit, faTrash } from "@fortawesome/free-solid-svg-icons"
import Editor from "./Editor"
import "./EditorBlockItem.scss"
import CopyableCodeSnippet from "../CopyableCodeSnippet/CopyableCodeSnippet"
import G... |
parent.postMessage("setStatus-folder","*");
var sel=document.getElementById('sel');
function liclick(li){
var style=window.getComputedStyle(li);
var url=style.getPropertyValue('list-style-image');
var str=url.split('/');
str=str[5].split('.');
if(str[0]=="folder-sel" && sel.value==li.innerText){
location.replace... |
/*
* Package Import
*/
import React from 'react';
/*
* Local Import
*/
/*
* Component
*/
const Home = () => <div>Home</div>;
/*
* Export
*/
export default Home;
|
import {Store} from "pullstate";
export const AppStore = new Store({
attributes: {
name: "John Doe",
title: "Professor"
}
}); |
angular.module('app', ['ngComponentRouter', 'ionic', 'app'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function($rootScope) {
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordov... |
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View, Image, TextInput, KeyboardAvoidingView, ScrollView, TouchableHighlight } from 'react-native';
import styles from './styles';
import firebase from 'react-native-firebase';
//So I dont have to type these out a thousand times when confir... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.