text stringlengths 7 3.69M |
|---|
// A reducer is a function that gets 2 properties:
// 1. initial this.state
// 2. action - a string telling us what specific action this is
// {
// type: // a defined action type
// payload: // payload attached to out action that can be anything.
// }
const INITIAL_STATE = {
currentUser: null
}
const ... |
import React, { Component } from 'react';
import './../style/gayaku.css';
import { Link } from 'react-router-dom';
import Header from './Header';
import Footer from './Footer';
class Coffees extends Component
{
render()
{
return (
<div>
<Header/>
{/* bikin gam... |
//引入套件及伺服器變數設定
const express = require('express')
const app = express()
const exphbs = require('express-handlebars')
const bodyParser = require('body-parser')
const generatePhrase = require('./generate_phrase')
const port = 8080
//設定樣版引擎
app.engine('handlebars', exphbs({ defaultLayout: 'main' }))
app.set('view engine'... |
import React from 'react';
import { InputGroup, FormControl } from 'react-bootstrap';
import '../App.css';
const Sidebar = () => {
return (
<div className="sidebar">
<h3>FILTER BY:</h3>
<InputGroup className="mb-3">
<InputGroup.Prepend>
<InputGroup.Checkbox aria-label="Checkbox for ... |
'use strict';
// IMPORTS
let fs = require('fs');
// Reads file from
exports.read = (cb) => {
fs.readFile('./data/calendar.json', (err, d) => {
if (err) throw err;
cb(d);
});
} |
<<<<<<< HEAD
function subtrair(num1, num2) {
return num1 - num2;
}
=======
function subtrair(num1, num2) {
return num1 - num2;
}
>>>>>>> master
|
'use strict';
/**
* @ngdoc function
* @name sampleApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the sampleApp
*/
angular.module('sampleApp').controller('MainController',[ '$scope', function ($scope) {
$scope.test = 'Hello';
//add active class for menu
$( "ul.page-sidebar-menu li" ).cl... |
window.onload = function () {
var servers = {};
var selected ='';
var scriptsText ='';
var scriptsResult ='';
var scripts = new Vue({
el: "#serverList",
data: {
selected:selected,
options:servers,
scriptsText:scriptsText,
scriptsResult:scriptsResult
... |
const jwt = require('jsonwebtoken');
const TOKEN_SECRET = 'hubizict';
const tokenGenerator = (data, callback) => {
let token = jwt.sign(data, TOKEN_SECRET, {
algorithm: 'HS256',
expiresIn: '8h'
});
callback(token)
}
const isValid = (token, callback) => {
jwt.verify(token, TOKEN_SECRET, (... |
const {Quotes,SellerQuote,Product} = require('../models');
const { quoteEmailSeller } = require('../utils/quoteEmailSeller');
const { quoteEmailBuyer } = require('../utils/quoteEmailBuyer');
const { notificationEmailSellerUpdate } = require('../utils/notificationEmailSellerUpdate');
const { notificacionEmailBuyerUpda... |
// 音频API
const myaudio = wx.createInnerAudioContext();
Page({
leftMove: 0,
rightMove: 0,
data: {
itemList: [], //showAction提示文字
title: '',
desc: '',
voice: 0, //声音提醒时间
leftAnimationData: '',
rightAnimationData: '',
leftTime: 0,
rightTime: 0
},
// 页面初始化
onLoad: function () {
... |
var meanApp = angular.module('meanApp', ['ngRoute', 'ngUpload', 'ngAnimate', 'meanControllers']);
meanApp.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/', {
controller:'HomeCtrl',
templateUrl:'mod_home.html'
})
.when('/game_log/:index', {
controller:'ListCtrl',
template... |
(function() {
angular
.module("hungr")
.controller("PaletteController", PaletteController);
PaletteController.$inject = ['$scope'];
function PaletteController($scope) {
}
})();
|
var defaultUrl = "https://mhsprod.jira.com";
document.addEventListener('DOMContentLoaded', function () {
document.querySelector('button').addEventListener('click', openIssue);
document.querySelector('input').addEventListener('keydown', keydown);
document.querySelector('#options').addEventListener('click', ... |
(function () {
'use strict';
/**
* @ngdoc object
* @name panel1.controller:Panel1Ctrl
*
* @description
*
*/
angular
.module('panel1')
.controller('Panel1Ctrl', Panel1Ctrl);
function Panel1Ctrl($timeout) {
var vm = this;
vm.controlsVisible = false;
vm.timeoutPromise = nul... |
window.onload = function() {
var oLink = document.getElementsByTagName("link")[0];
var oSkin = document.getElementById("skin");
var aLi = oSkin.getElementsByTagName("li");
for (var i = 0; i < aLi.length; i++) {
aLi[i].onclick = function() {
for (var i = 0; i < aLi.length; i++) {
aLi[i].class... |
const express = require('express');
const router = express.Router();
const Genre = require('../model/genres');
const passport = require('passport');
router.get('/', passport.authenticate('jwt', { session: false }), async (req, res) => {
var pageNo = parseInt(req.query.pageNo)
var size = parseInt(5)
const genre ... |
//
// ScriptWidget
// https://scriptwidget.app
//
// Usage for component rect
//
$render(
<vstack frame="max">
<rect frame="50,30" color="blue"></rect>
<rect frame="50,30" color="blue" corner="5"></rect>
</vstack>
);
|
// Given a sorted array and a target value, return the index if the target is found.If not, return the index where it would be if it were inserted in order.
// You may assume no duplicates in the array.
// Example 1:
// Input: [1, 3, 5, 6], 5
// Output: 2
// Example 2:
// Input: [1, 3, 5, 6], 2
// Output: 1
// Exam... |
import React from 'react';
import { Link } from 'react-router-dom';
import logoHeader from '../assets/images/logo.jpg'
const Menu = () => {
return(
<div className="content header">
<figure>
<img src={logoHeader} className="logo" alt="Supermercado" />
</figure>
... |
function catchErrors(error, displayError) {
let errorMsg;
if (error.response) {
// The request was made and the server responsed with a status code that is not in the range of 2XX
errorMsg = error.response.data;
console.error('Error response', errorMsg);
// For Cloudinary image uploads
if (erro... |
import React,{Component} from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import * as tool from '../../utils/tool';
import { Tabs,Spin } from 'antd';
import MyTable from '../../components/MyTable';
import jQuery from 'jquery';
import styles from './css/Block.css';
import NotFound f... |
import PositionalExample from "./positional";
export {
PositionalExample
};
|
$("#submit")
.click(
function() {
var request = {
brand: $("#brand").val(),
province: $("#province").val(),
city: $("#city").val(),
appsku: $("#appsku").val(),
channel: $("#channel").val(),
zt: $("#zt... |
// Copyright (c) 2016-2018, BuckyCloud, Inc. and other BDT contributors.
// The BDT project is supported by the GeekChain Foundation.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// ... |
//This utility makes a video element "responsive"
//by manipulating it´s source elements based on the screen size
class ResponsiveVideo {
constructor(id, sources) {
//Getting native video element
this.videoEl = document.getElementById(id);
//Sorting each source sizes array descendingly by size maxW... |
/**
* Main route definitions
*/
var path = require('path')
var image = require('../controllers/image')
module.exports = function(app) {
// Index route
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname, '../src/index.html'))
})
// Image processing endpoints
app.get('/images', image.g... |
/**
* Created by Milos on 31.1.2015..
*/
var mongoose = require("mongoose");
var systemModel = mongoose.model("system", {
flag: String,
time: String,
data: String,
created: {
type: Date,
default: Date.now
}
}, "system");
module.exports = systemModel; |
// @flow
import React from 'react'
import { withState } from 'recompose'
import { storiesOf } from '@kadira/storybook'
import Tabs from './'
const items = [
{
icon: 'fa-th-large',
label: 'Grid',
},
{
icon: 'fa-table',
label: 'Table',
},
{
icon: 'fa-list',
label: 'List',
},
]
const... |
var express = require('express');
var router = express.Router();
var items = [];
for(i = 0; i < 10; i++) {
items[i] = {"id" : i,
"mensaje": "Hola esta es la descripcion: " + i}
}
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
router.get('/api/', f... |
import React, { useCallback, useContext } from "react";
import { withRouter, Redirect } from "react-router";
import app from "./firebaseapp.js";
import { AuthContext } from "./Auth.js";
import { makeStyles } from '@material-ui/core/styles';
import { Link } from 'react-router-dom'
import 'antd/dist/antd.css';
impor... |
import React, { Component } from 'react';
import { Button } from 'reactstrap';
import './App.css';
import './Numbers/Numbers.css'
import Number from './Numbers/Numbers.js'
import 'bootstrap/dist/css/bootstrap.min.css';
class App extends Component {
state = {
number: []
};
getRandomNumbers = () => {
... |
import Dice1 from "./images/Dice-1.png";
import Dice2 from "./images/Dice-2.png";
import Dice3 from "./images/Dice-3.png";
import Dice4 from "./images/Dice-4.png";
import Dice5 from "./images/Dice-5.png";
import Dice6 from "./images/Dice-6.png";
import Dice7 from "./images/Dice-7.png";
import Dice8 from "./images/Dice-... |
import React from 'react'
import { View, StyleSheet, Text, TouchableOpacity } from 'react-native'
const ListItem = ({ record }) => {
return (
<TouchableOpacity>
<View style={styles.entry} >
<Text style={styles.col}>{record.created_at}</Text>
<Text style={sty... |
const Particle = require('particle-api-js');
const path = require('path');
class ControlDeckParticleToggle {
constructor(streamDeck, buttonId, options) {
this.particle = new Particle();
this.statusVariable = options.status_variable;
this.status = null;
this.buttonId = buttonId;
this.streamDeck = ... |
module.exports = {
getQuotation: 'https://doulaig.oss-cn-hangzhou.aliyuncs.com/boboswap/assetInfo.json',//行情
getRiseFall:'https://api.coingecko.com/api/v3/coins/markets?',//行情24H涨跌幅
} |
// import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import * as CONSTANTS from './constants'
export function getWidth (spriteId) {
return ReactDOM.findDOMNode(
document.getElementById(spriteId)
).getBoundingClientRect().width
}
export function getHeight (spriteId) {
return ReactDOM.... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Signup from '../views/Signup.vue'
import Login from '../views/Login.vue'
import Dashboard from '../views/Dashboard.vue'
import Immobile from '../views/Immobile.vue'
import NewProperty from '../views/PropertyRegistration... |
var bcache_8c =
[
[ "BodyCache", "structBodyCache.html", "structBodyCache" ],
[ "bcache_path", "bcache_8c.html#a5a6da9a92e635c11bf3af21611c6ea5f", null ],
[ "mutt_bcache_move", "bcache_8c.html#affefecb14cd62cc08faf0a6ba19b52c0", null ],
[ "mutt_bcache_open", "bcache_8c.html#a3eba1237cb1746acad5efa0a123a... |
/* Chain filter and map to collect the ids of videos that have a rating of 5.0 */
var newReleasesMov = [
{
"id": 1,
"title": "Hard",
"boxart": "Hard.jpg",
"uri": "http://vikask/movies/1",
"rating": [4.0],
"bookmark": []
},
{
"id": 2,
"title": "... |
import Vue from 'vue'
import VueRouter from 'vue-router' // eslint-disable-line import/no-extraneous-dependencies
import VueModal from 'vue-js-modal'
import VueI18n from 'vue-i18n'
import SubscribeModal from './SubscribeModal.vue'
import notificationsService from '../../services/services/notifications'
import subscrip... |
import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
// Actions
import * as gridActions from '../actions/grid.actions';
// Components
import Grid from '../components/Grid';
import Header from '../components/Header';
import Footer from '../components/Footer';
/... |
export class AbstractView {
/** @type {HTMLElement} */
rootElement;
/** @type {Map<string, HTMLElement>} */
DOM;
/**
*
* @param {HTMLElement} rootElement
*
*/
constructor(rootElement) {
this.rootElement = rootElement;
this.DOM = new Map();
}
async i... |
import {
LOGIN_TYPE,
REGISTER_TYPE,
CURRENT_USER,
LOGOUT
} from '../action-type';
import axios from '../../utils/middleware';
export const loginUser = payloads => dispatch => axios.post('/login',
{ payloads }).then((res) => {
if (res.data['success']) {
dispatch({ type: LOGI... |
export const celToFahr = (arg) => {
if (typeof arg !== "number") {
throw new Error("Input must be a number");
}
const result = (arg * 9) / 5 + 32;
return result;
};
export const fahrToCel = (arg) => {
if (typeof arg !== "number") {
throw new Error("Input must be a number");
}
const result = (a... |
var bunyan = require('bunyan');
var log = bunyan.createLogger({name: 'kga-web/db-updater'});
var endpoint = process.env.ENDPOINTS_DBUPDATER_SOCKET;
var maximum_message_size = process.env.ENDPOINTS_DBUPDATER_MAXMESSAGESIZE;
var zmq = require('zmq');
log.info('ZMQ', zmq.version);
log.info('Starting db-updater configured ... |
import $ from 'jquery';
/**
* Base64 加密函数
* @param string
*/
export const Base64 = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
encode: function (e) {
var t = "";
var n, r, i, s, o, u, a;
var f = 0;
e = Base64._utf8_encode(e);
while (f < e.length) {
... |
'use strict';
/**
* @ngdoc service
* @name dssiFrontApp.KeyCondition
* @description
* # KeyCondition
* Factory in the dssiFrontApp.
*/
angular.module('dssiFrontApp')
.factory('KeyCondition', function ($resource, urls) {
var service = $resource(urls.BASE_API + '/key-conditions/:id', null,
{
'updat... |
const BaseModel = require('./BaseModel');
const db = require('../dbConfig');
class UserModel extends BaseModel {
constructor(table) {
super(table)
}
findBy(email) {
return db('users_organizations')
.where({ user_email: email })
.select('organizations.*')
.join('organizations', 'organi... |
// Here a theme is defined. This theme is passed to the entire site (via layout.js) so the individual parts of the theme object
// can be accessed in each styled component.
export const theme = {
colors: {
main: 'thistle', //used in header
primaryAccent: 'linen', //used for thumbnails on homepage ... |
import React from 'react'
import '../css/drawerheader.css'
function DrawerHeader({ close }) {
return (
<div className='drawer'>
<div className="drawer__header">
<p>GIỎ HÀNG</p>
<CloseIcon className='drawer__buttonclose' onClick={close()}></CloseIcon>
</div>
</div>
)
}
export def... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
const config_1 = require("../config/con... |
// see: http://bl.ocks.org/ameyms/9184728
var D3WRAP = { REVISION: '1' };
var colorGenerator = d3.scale.category20();
// Bar Chart Object
D3WRAP.SimpleBarChart = function(container, dataset, params) {
this.container = container;
this.dataset = dataset;
this.params = params;
var self = this;
// Provi... |
import "../../../js/index";
import $ from "jquery";
import PartitialAjax from "django-partitialajax"
import setupCrud from "../../../js/crud";
$(function () {
PartitialAjax.initialize();
setupCrud(
PartitialAjax.getPartitialFromElement(document.getElementById("host-list-partitial")),
PartitialAjax.g... |
/* ================================================
*
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without... |
import React from 'react';
import Logo from '../../images/fortuneScution.png';
import Button from '../UI/button';
import Image from '../UI/image';
let Navigation = props => {
return (
<React.Fragment>
<div className="homeNav">
<div>
<a href="https://www.youtube... |
const officerOptions = [
{
position: "Show Coordinator",
name: "Xochitl Luna",
photoUrl: "/officer_images/Xochitl.jpg",
},
{
position: "President",
name: "Amber Zheng",
photoUrl: "/officer_images/Amber.jpg",
},
{
position: "Vice President",
name: "Sage Simhon",
photoUrl: "/... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ModelAnimations extends SupCore.Data.Base.ListById {
constructor(pub) {
super(pub, ModelAnimations.schema);
}
}
ModelAnimations.schema = {
name: { type: "string", minLength: 1, maxLength: 80, mutable: true },
dura... |
var webpack = require('webpack');
var Ex = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var getHtmlConfig=function(name){
return {
template: './src/view/'+name+'.html',
filename: 'view/'+name+'.html',
inject: true,
hash: true,
chunks: ['common', ... |
import React from 'react'
import { StyleSheet } from 'quantum'
const getMessage = (count, limit) =>
__i18n('SEARCH.PAGEINFO')
.replace('${count}', count)
.replace('${limit}', limit)
const styles = StyleSheet.create({
self: {
fontSize: '14px',
w... |
// @flow
import React from 'react';
import LocalForm from '../LocalForm';
export default function Root() {
return <LocalForm />;
}
|
import React, { Component } from 'react';
import { Route } from 'react-router';
import {connect} from 'react-redux';
import selector from './state/selector';
import dispatcher from './state/dispatcher';
import './styles';
class Game extends Component {
handleStartClick = event => {
this.props.startGame();
}... |
// 'use strict';
require('es6-promise').polyfill();
require('isomorphic-fetch');
const GITHUB = require('githubot')
const _ = require('lodash');
const Q = require('q');
const featureIds = require('../lib/featureIds');
let agm = require('../lib/agmLogin.js').agm;
let agmLogin = requir... |
const readlineSync = require("readline-sync");
function calcSurface(h, l){/* calcule le h x le l*/
return h* l;
}
console.log(calcSurface(2,3));
let a = Number(readlineSync.question('donnes une longueur'));
let b = Number(readlineSync.question('donnes une largeur'));
console.log(calcSurface(a,b));
|
const express = require('express');
const userController = require('../controller/userController');
const roou = express.Router();
app.post('/users', userController.addUser);
app.get('/users', userController.getAllUser);
app.get('/users/:id', userController.getUserById);
app.put('/users/:id', userController.updateU... |
function create_deal_document(doc_type_name, deal_id) {
var result = "";
webix.ajax().sync().get("documents/deals/" + deal_id + "?dtName=" + doc_type_name, null,
{
success: function (data, text, request) {
result = JSON.parse(data);
}, error: function (d,t,r) {
... |
import React, { Component } from 'react';
import { StyleSheet, Text, TextInput, TouchableOpacity,KeyBoardAvoidingView } from 'react-native';
export default class WriterScreen extends Component{
constructor(){
super();
this.state={
title:'',
author:'',
st... |
$(document).ready(function(){
$(".img").click(function(){
$("#slider").show();
$(".img").hide();
});
$("#slider").mouseenter(function(){
$(".btn").show();
});
$("#slider").mouseleave(function(){
$(".btn").hide();
});
});
|
// @flow
import { Platform } from 'react-native';
import TONEnvironment from './TONEnvironment';
export default class TONWorkerThread {
// constructor
workerThread: Worker;
constructor(workerName: string) {
if (TONEnvironment.isProduction() && Platform.OS !== 'web') { // iOS, Android in production... |
import reducer, {defaultValue, SET_USER_LIST, SET_PAGE} from '../reducer'
describe('Testing some functions in search reducer', () => {
let state
it('Check if reducer is started with default value', () => {
expect(reducer(undefined, {})).toEqual(defaultValue)
})
it('Check if set user list saves correctly... |
( function () {
'use strict';
angular
.module( 'app', [ 'app.config', 'app.home', 'app.add', 'app.edit' ] );
})(); |
/*使用Node.js创建一个静态Web服务器
1)创建一个HTTP Server
2)为Server指定处理请求消息的过程
2.1)解析请求URL中的资源名称, 如 /login.html
2.2)读取指定文件中的内容,如 htdocs/login.html
2.3)构建响应消息,把读取到的文件内容输出客户端
3)让Server开始监听特定端口
提示:上述程序需要用到http、url、fs模块*/
/**
* 使用Node.js创建一个静态Web服务器
* 根据客户端请求的页面名称,输出对应的文件内容
*/
/*Url {
protocol: 'http:',
slashes: true, ... |
// $( function() {
// var dateFormat = "mm/dd/yy",
// leaving = $( "#leaving" )
// .datepicker({
// defaultDate: "+1w",
// changeMonth: true,
// numberOfMonths: 3
// })
// .on( "change", function() {
// returning.datepicker( "option", "minDate", ge... |
//Import Modules
import React, {useState, useEffect} from 'react';
import Axios from 'axios';
//Import Stylesheets
import './Styles/App.css';
//Import Components
import Form from './Components/Form';
import CouponList from './Components/CouponList';
import Header from './Components/Header';
import Footer from './Compon... |
const { google } = require('googleapis')
const GithubAPI = require('./github-integration')
// Authenticate with Google Analytics
const jwt = new google.auth.JWT(
process.env.GA_EMAIL,
null,
process.env.GA_PRIVATE_KEY,
'https://www.googleapis.com/auth/analytics.readonly'
)
const view_id = process.env.GA_VIEW_I... |
import axios from 'axios';
import storage from './jas-storage';
import Vue from 'vue';
const ajax = function (type, url, oParam, isnoToken) {
if (!isnoToken) {
let token = storage.get('token', 1000 * 60 * 60 * 24); // 按照过期时间取token
if (!token) { // 未取到token,重新加载
location.reload();
return;
}
... |
import React, { Component } from 'react';
import Comment from './Comment';
import { getComments } from '../../api/httpcalls'
class PostComments extends Component{
constructor(){
super();
this.state={
comments:[],
postId:null
}
}
updateComme... |
import React from 'react';
import Main from './components/layout/Main';
import Home from './components/Pages/Home';
function App() {
return (
<div className="App">
<Main>
<Home />
</Main>
</div>
);
}
export default App;
|
'use strict'
const express = require('express'),
bodyParser = require('body-parser'),
cookieParser = require('cookie-parser'),
app = express();
require('dotenv').config()
const PORT = process.env.PORT || 3000,
LOOKUP = require('./js/lookup'),
api = require('./routes/api');
app.use(express.st... |
'use strict';
require('dotenv').config();
const awsConfig = {
accessKeyId: process.env.accessKeyId,
secretAccessKey: process.env.secretAccessKey,
region: process.env.region
};
const ELB = require('aws-sdk/clients/elb');
const classic_elb = new ELB(awsConfig);
const _ = require('underscore');
const asse... |
const options = {
root: null,
rootMargin: '-30% 0px',
threshold: 0
};
const obs = new IntersectionObserver(showIntersect, options);
const slideIn = document.querySelectorAll('.slide_in');
slideIn.forEach(sa => obs.observe(sa));
function showIntersect(changes,observer) {
changes.forEach(change => {
... |
//@flow
import React from 'react';
import PropTypes from 'prop-types';
import {withStyles} from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import CardMedia from '@material-ui/cor... |
import {createMuiTheme} from '@material-ui/core/styles';
export const theme = createMuiTheme({
direction: 'rtl',
palette: {
primary: {main: '#34347D'},
secondary: {main: '#FFCC0F'},
},
overrides: {
MuiGrid: {
container: {
textAlign: 'left',
... |
import styled from 'styled-components';
const InnerSection = styled.div`
padding: 5px;
`;
export default InnerSection;
|
// objekte für personen profil erstellen
var Persons = [
{
name: 'John',
surname: 'Doe',
favoritePerformers: ["Justin Timberlake", "Ed Sheeran", "Emma Watson"],
age: 25,
myPhoto: 'img/image1.jpg',
likes: 1
},
{
name: 'Jane',
surname: 'Doe',
favoritePerformer... |
import React from 'react';
import {Modal,ModalBody,ModalHeader,ModalFooter,
Form,FormGroup,Label,
Input,Button,Table} from 'reactstrap'
import Spinner from '../../components/UI/Spinner';
const ListBuilding = (props) => {
return (
<div>
<Modal isOpen={props.open} toggle={props.toggle} >
... |
/**
* Traffic Sales Widget
*/
import React from 'react';
import Button from '@material-ui/core/Button';
// card component
import { RctCardFooter } from 'Components/RctCard';
// chart
import HorizontalBarChart from 'Components/Charts/HorizontalBarChart';
// intl messages
import IntlMessages from 'Util/IntlMessages'... |
import styled from "styled-components";
const Button = styled.button`
padding: 0.2em 0.5em;
background-color: #0e375d;
color: #FFF;
border-radius: 0.2em;
border: none;
opacity: 0.6;
&:hover {
opacity: 1;
}
&:disabled {
opacity: 0.1;
}
`;
export default Button; |
function Cone() {
var radius;
var _height;
this.setBase = function(base) {
this.radius = base;
};
this.setHeight = function(height) {
this._height = height;
};
this.getBase = function() {
return this.radius;
};
this.getHeight = function() {
return this._height;
};
this.getVolu... |
import React from 'react';
import styled from 'styled-components';
import { toast, ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
const Toast = styled(ToastContainer)`
.Toastify__toast--info {
background: 'rgb(51, 102, 255)';
}
.Toastify__toast--success {
backgroun... |
var idb = ["samples.json"]
d3.json(idb[0]).then((data) => {
var samples=data;
console.log(samples)
console.log(samples[0])
console.log(samples[0].names)
console.log(samples[0].metadata)
console.log(samples[0].samples)
//Bar Chart for id=940 as default plot
function init() {
var isa... |
module.exports = function (app) {
app.directive('quizMenu', [quizMenu]);
function quizMenu() {
return {
template: require('./menu.template.html'),
scope: {
user: "="
},
controller: function ($scope) {
}
};
}
}; |
var Qapp = Qapp || { Models: {}, Collections: {}, Views: {} };
Qapp.initialize = function() {
var questionCollection = new Qapp.Collections.QuestionCollection();
var questionListView = new Qapp.Views.QuestionListView({
collection: questionCollection,
el: $('#trending')
});
questionCollection.fetch()... |
import './styles/root.scss';
import React, { Component } from 'react';
import { render } from 'react-dom';
import { observer } from 'mobx-react';
import { env } from './store/index';
import { Commands } from './commands';
import { Auth } from './auth';
@observer
export class Root extends Component {
render() {
... |
import React, { useState } from 'react';
import CertificateIconApproved from '../../assets/certificate-icon-approved.svg';
import CertificateIconPending from '../../assets/certificate-icon-pending.svg';
import CertificateIconDeclined from '../../assets/certificate-icon-declined.svg';
const Certificate = props => {
... |
(function() {
$(function() {
$('a[href="#fakelink"]').click(function(e) {
return e.preventDefault()
});
$('a.droplink').click(function(e) {
var $drop, $link;
$link = $(e.currentTarget);
$drop = $link.siblings('.dropdown');
if ($link.is('.active') || $drop.is('.active')) {
... |
import FireService from './FireService';
import SettingsService from './SettingsService';
import UserService from './UserService';
import storageFactory from "./StorageFactory";
const localStore = storageFactory(localStorage);
const sessionStore = storageFactory(sessionStorage);
export {
FireService,
Settings... |
'use strict';
var envvar = require('envvar');
var express = require('express');
var bodyParser = require('body-parser');
var moment = require('moment');
var plaid = require('plaid');
var Req = require('request');
var APP_PORT = envvar.number('APP_PORT', 8000);
var PLAID_CLIENT_ID = envvar.string('PLAID_CLIENT_ID');
v... |
'use strict'
import nodeDebug from 'debug'
import express from 'express'
import TweetsService from './../services/TweetsService'
import TweetsWorker from './../services/TweetsWorker'
import {
prepareWebsocketResponse
} from './../utils'
const debug = nodeDebug('tweetwall:routes')
export default () => {
const r... |
import { contactAdded, contactUpdated, contactDeleted } from "./events.js";
import { domCache } from './domCache.js';
export let contactAPI;
(function() {
const ContactAPI = (function() {
const URI = 'http://localhost:3000/api/contacts';
let xhRequest = new XMLHttpRequest(),
currentMethod,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.