text stringlengths 7 3.69M |
|---|
import { createGlobalStyle } from "styled-components";
export const GlobalStyle = createGlobalStyle`
html {
font-size: 16px;
}
body {
margin: 0;
padding: 0;
height: 100%;
font-family: 'Noto Sans TC', Open-Sans, Arial;
font-weight: 400;
background: #e9e9e9;
color: #505050;
tra... |
import React, {Component} from 'react'
import {Switch} from 'react-router'
import {BrowserRouter as Router, browserHistory, Link,} from 'react-router-dom'
import Route from 'react-router-dom/Route'
//applicaiton components
import requireAuthentication from './Components/Auth/RequireAuth'
import Home from './Components/... |
var rs = require("readline-sync");
var options = ["open door", "Look for Key"];
var keyFound = false;
while(true){
var selection = rs.keyInSelect(options, "What would you like to do?");
if(selection === 0){
// check for key
if(keyFound){
console.log("You win!");
} else {
... |
document.getElementById('lastname').addEventListener('blur',function () {
alert('Merci de votre participation')
}
)
|
export default {
consolidated_weather: [
{
id: 5374798431518720,
weather_state_name: "Heavy Cloud",
weather_state_abbr: "hc",
wind_direction_compass: "E",
created: "2018-08-31T14:53:02.233040Z",
applicable_date: "2018-08-31",
min_temp: 11.3475,
max_temp: 20.6275,
... |
var loadSample = function(url, callback) {
var request = new XMLHttpRequest();
request.open('GET', url, true);
request.responseType = 'arraybuffer';
request.onload = function() {
console.log('url loaded');
context.decodeAudioData(request.response, callback);
}
console.log('reading url');
request.send();
} |
const { User } = require('../models')
const middleware = require('../middleware')
const LogUserIn = async (req, res) => {
try {
const user = await User.findOne({
where: { email: req.body.email },
raw: true
})
if (
user &&
(await middleware.comparePassword(user.passwordDigest, req.... |
// @flow
/* **********************************************************
* File: sensorSettingsComponent.js
*
* Brief: React component for changing settings on sensors.
* this is a poor name - consider renaming as this component
* also includes generators.
*
* Authors: Craig Cheney
*
* 2017.09.25 CC - Changed name to... |
function person(fname, lname, age, skills, dateofbirth, address, married, profession) {
this.fname = fname;
this.lname = lname;
this.age = age;
this.skills = skills;
this.dateofbirth = dateofbirth;
this.address = address;
this.married = married;
this.profession = profession;
}
... |
var files_dup =
[
[ "Attendance Management System", "dir_7159a0b79bffcc693b8d3696d3c54cc7.html", "dir_7159a0b79bffcc693b8d3696d3c54cc7" ]
]; |
//https://github.com/levelgraph/levelgraph
var level = require("level-browserify");
var levelgraph = require("levelgraph");
// just use this in the browser with the provided bundle
var db = levelgraph(level("data/testyourdb"));
//console.log(db);
//Inserting a triple in the database is extremely easy:
var triple = ... |
import React from 'react'
import './loaderHOC.css'
// Loader HOC , при запросе к API выводится loader
const LoaderHOC = (WrappedComponent) => (props) => {
return props.loading ? (<div className='loader'></div>) : <WrappedComponent {...props} />
}
export default LoaderHOC |
(function () {
"use strict";
function LShapeComponent(x, y, width, height, basicLength) {
this.width = width;
this.height = height;
this.speedY = basicLength;
this.basicLength = basicLength;
this.done = false;
(() => {
// combination of one Square compon... |
/**
* Created by Jasmine on 3/27/16.
*/
(function($) {
$.fn.ellipsisBtn = function (options) {
var config = $.extend({
type: 'start',
original_text: "跳转",
ellipsis_text: "正在跳转",
ellipsis_icon: ".",
ellipsis_number: 3,
... |
import React from 'react'
import moment from 'moment'
import { Row, Col, Card } from 'react-materialize'
import { Icon } from 'react-icons-kit'
import {ic_stars} from 'react-icons-kit/md/ic_stars'
import '../../styles/orgEventReviews.css'
const OrgReviewCardM = ({ review, idx }) => {
const { avatar, created_at, cont... |
Page({
data: {
projId: 0,
title: '',
intro: '',
vision: '',
members: [],
myProjects: []
},
onShareAppMessage: function () {
if (!parseInt(this.data.projId)) {
return
}
var str = '点击链接,加入' + this.data.title
return {
... |
var RequestHelper = require('app/model/RequestHelper');
var Actions = require('app/resources/Actions');
var Basic = require('app/model/Model');
var <%=umodelName%>,
Mdl = Core.Class.Model,
lcStorage = Core.localStorage;
function <%=modelName%>(){
}
//demo sub model for get request
<%=modelName%>.prototype.t... |
module.exports = function(app) {
Ember.TEMPLATES['components/img-slider'] = require('./template.hbs');
require('./style.less');
app.ImgSliderComponent = Ember.Component.extend({
classNames: ['img-slider'],
image: '',
index: 0,
big: false,
model: [], // images array
... |
// core frameworks
import React, {Component, PropTypes} from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import {Router, browserHistory} from 'react-router';
import {syncHistoryWithStore} from 'react-router-redux';
import configureStore from './store/configureStore';
import i18n fr... |
module.exports = function (sequelize, DataTypes) {
const Team = sequelize.define("Team", {
team_id: {
type: DataTypes.INTEGER,
allowNull: false,
},
team_name: {
type: DataTypes.STRING,
allowNull: true
},
sport_name: {
... |
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable camelcase */
/* eslint-disable no-case-declarations */
/* eslint-disable default-case */
/* eslint-disable no-multi-assign */
const path = require('path');
const fs = require('fs');
const fetch = require('node-fetch');
const cheerio = require('c... |
import React, { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { fetchStats } from "./action";
import { Row, Nav, NavItem, NavLink, Container } from "reactstrap";
import { Link } from "react-router-dom";
const Home2 = () => {
const dispatch = useDispatch();
const { loading... |
/*
*
* relatedProductsController.js
*
* Copyright (c) 2018 HEB
* All rights reserved.
*
* This software is the confidential and proprietary information
* of HEB.
* @author vn73545
* @since 2.20.0
*/
'use strict';
/**
* The controller for the Related Products Controller.
*/
(function() {
var app=angular.... |
import AssetManager from './manager.vue'
export default AssetManager
|
import { RefCountedCache } from '../../core/ref-counted-cache.js';
// Pure static class, implementing the cache of lightmaps generated at runtime using Lightmapper
// this allows us to automatically release realtime baked lightmaps when mesh instances using them are destroyed
class LightmapCache {
static cache = n... |
import React, { memo, useContext } from "react";
import { Button, Typography, Container } from "@material-ui/core";
import FlexBox from "components/FlexBox";
import DoneImg from "../../assets/done.svg";
import useRegisterStyle from "./style";
import RegisterContext from "./RegisterContext";
import { register } from "se... |
import React from 'react';
import { useTagsData } from '../../../reduxStore/Highlights/selectors';
import ImageLoader from '../LoadSpinner/ImageLoader';
const Post = ({ postImg, Tags, title, article_link, article_title, key }) => {
const tags = useTagsData();
return (
<div className="feature" key={key... |
export const $primaryColor = '#FFC864';
export const $secondaryColor = '#7DFFBA';
export const $alternativeColor = '#973BCC';
export const $defaultLinkColor = '#494949';
export const $defaultBackground = '#EFF0F1';
export const $defaultLinkActiveColor = '#34DDE6';
export const $grayLightColor = '#E0E0E0'
export const $... |
import {h} from 'hyperapp';
import {Cross} from '../../theme/Icons'
import {Box} from '../../theme/Box'
import {stopBubbling} from '../../utils'
import './style.css'
export const Modal = ({title, close, bottom, ...rest}, children) => (
<div class="modal-container" onclick={close} {...rest}>
<Box
class="... |
var express = require('express');
var fileUpload = require('express-fileupload');
var Notificacion = require('../models/notification')
var fs = require('fs');
var app = express()
app.use(fileUpload());
//========================================//
//==========GET DE NOTIFICACIONES=========//
//=========================... |
// search()
// function search(){
var header = document.getElementsByClassName("header")[0];
var loop = document.getElementsByClassName("loop")[0];
// 获取banner卷进去的高度
var height = loop.offsetHeight;
window.onscroll = function() {
var top = document.documentElement.scrollTop;
if(top>heig... |
let i = -1;
setInterval(function() {
const pics = ["pfp.png", "Checker_Piece_Red.png"];
let pic = document.getElementsByTagName("img")[0];
i++;
let photo = pics[i % 2];
// pic.setAttribute("src", photo);
pic.srcset = photo;
// console.log(i);
}, 1000); |
const mongoose = require("../../../shared/http/db");
const OwnerSchema = new mongoose.Schema({
name: {
type: String,
required: true,
},
sex: {
type: String,
required: true,
enum: ["m", "f", "M", "F"],
},
cpf: {
type: String,
requierd: true,
},
cars: {
type: mongoose.Schema... |
'use strict';
const gulp = require('gulp');
const replace = require('gulp-replace');
gulp.task('font-awesome', () => {
const blockPath = 'vendor.blocks/font-awesome';
gulp.src('node_modules/font-awesome/fonts/*')
.pipe(gulp.dest(blockPath));
gulp.src('node_modules/font-awesome/css/font-awesome.c... |
import { combineReducers, createStore, applyMiddleware, compose } from "redux";
import thunkMiddleware from "redux-thunk";
import { rulesReducer } from "./reducers/rules-reducer";
const appReducer = combineReducers({
rules: rulesReducer,
});
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || co... |
/**
* This view provides a check of the quality of a knowledge element (e.g., requirement,
* code file, decision knowledge element, or work item).
*
* Requires: condec.api.js, condec.quality.check.api.js
*
* Is required by: condec.knowledge.page.js, condec.rationale.backlog.js,
* templates/tabs/qualit... |
import styled from 'styled-components';
import { Body } from '../../../../theme/typography';
export const Paragraph = styled.p`
${Body};
color: ${({ color, theme }) =>
color === 'blueBayoux'
? theme.colors.secondary.blueBayoux
: theme.colors.primary.white};
padding-bottom: ${({ paddingBottom }) =... |
/**
* @author mokuteno / https://github.com/manymeeting
* @author syt123450 / https://github.com/syt123450
*/
import { AbstractDataProcessor } from "./AbstractDataProcessor.js";
/**
* This default data preprocessor is used to create mentionedCountries for controller.
* The process() function will be called when... |
import mongoose, { Schema } from 'mongoose';
import bcrypt from 'bcryptjs';
const UserSchema = new Schema({
email: { type: String, unique: true, lowercase: true },
password: String,
fullname: String,
profile_image: String,
// your active request
current_request: { type: Schema.Types.ObjectId, ref: 'Reque... |
/*
dataflow.js - actor-based single-assignment dataflow variable
The MIT License (MIT)
Copyright (c) 2016 Dale Schumacher
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
restriction, in... |
const mongoose = require('mongoose')
const stampCardTemplate = new mongoose.Schema({
// uuid:{
// type:String,
// required:true
// },
reward_name:{
type:String,
required:true
},
published:{
type:Boolean,
required:true
},
num_stamps:{
t... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import SvgIcon from "@material-ui/core/SvgIcon";
const useStyles = makeStyles((theme) => ({
... |
import styles from './PitchLabel.module.scss';
import classnames from 'classnames';
import { DEGREES_IN_CIRCLE } from 'util/constants';
export default function PitchLabel({pitchNamesSorted, diameter, chordNamesSorted}) {
const semitones = pitchNamesSorted.length;
return <div className={styles.root}>{pitchNamesSor... |
var dropdown = document.querySelector("nav .dropdown");
var button = document.querySelector("nav .menu");
var body = document.querySelector("body");
var navbar = document.querySelector("nav .content");
function menu(){
if(dropdown.style.display ==="grid"){
dropdown.style.display = "none";
button.innerHTML = ... |
// ==== FONTS ==== //
var gulp = require('gulp'),
del = require('del'),
plugins = require('gulp-load-plugins')({ camelize: true }),
config = require('../../gulpconfig');
gulp.task('fonts-cleanup', function() {
return del([ config.fonts.dest ]);
});
gulp.task('fonts-cleanup-dist', function() {
retu... |
module.exports = function(appplication) {
appplication.get('/', function(req, res){
res.render("home/index");
});
}; |
/* global describe, it, expect */
import React from 'react'
import { render } from 'setup-test'
import TableResponsive from '.'
describe('TableResponsive', () => {
it('should render as default', () => {
const { container } = render(
<TableResponsive
minWidth="1200px"
rowData={[
... |
import React, { useState, useEffect } from 'react';
import axios from "../axios";
import {useAuth} from "../contexts/AuthContext";
import RemoveCircleRoundedIcon from '@material-ui/icons/RemoveCircleRounded';
import RemoveIcon from '@material-ui/icons/Remove';
const DailyEventInfo = (props) => {
const {currentEvent... |
import ComparisonContentDisplay from './comparison/Display'
import DetailContentDisplay from './detail/Display'
import MovieContentDisplay from './movie/Display'
import ObjContentDisplay from './obj/Display'
import PictureContentDisplay from './picture/Display'
import MapContentDisplay from './map/MapDisplay'
export d... |
function loadJSON(file, callback) {
var xobj = new XMLHttpRequest();
xobj.open('GET', file, true);
xobj.onreadystatechange = function () {
if (xobj.readyState == 4 && xobj.status == "200") {
callback(xobj.responseText);
}
};
xobj.send(null);
}
function index() {
loadJSON('http://stream.coolg... |
import * as Actions from './actions';
import initialState from '../store/initialState';
// stateには現在のstoreの状態、actionにはActionsがreturnした値(プレーンなオブジェクト)が入る
export const UsersReducer = (state = initialState.users, action) => {
// Actionのtypeに応じてどの状態をどのように変更していくかを書いていく
switch (action.type) {
case Actions.SIG... |
import $ from 'jquery';
function animate() {
/* Animate image when scrolling to it */
let $animatedIcons = $('.section-6'); // Add classnames here
let $window = $(window);
let lastScrollTop = 0;
function checkIfInView() {
let windowHeight = $window.height();
let windowTopPosition = $window.scrollTo... |
const mongoose = require('mongoose');
var nodemailer = require('nodemailer');
const jwt = require('jsonwebtoken');
const model = mongoose.model('Correntista');
const isObjectEmpty = require('../services/isObjectEmpty');
const logger = require('../services/logger');
const api = {};
const crypto = require('crypto');
co... |
const express = require('express');
const router = express.Router();
const createToken = () => {
let token = ''
const characters = 'abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ123456789'
for (let i = 0; i < 12; i++) {
const number = Math.floor(Math.random() * characters.length)
token... |
(function () {
'use strict';
/**
* Search Service
*/
angular
.module('app')
.factory('searchService', service);
function service($http) {
var searchFeatures = [];
$http.get('./searches.json').then(function (data) {
searchFeatures = data.da... |
"use strict";
Object.defineProperty(exports, "exportDataGrid", {
enumerable: true,
get: function get() {
return _export_data_grid.exportDataGrid;
}
});
Object.defineProperty(exports, "exportPivotGrid", {
enumerable: true,
get: function get() {
return _export_pivot_grid.exportPivotGrid;
}
});
var _... |
arr = [-1, 1.5, 2, 2.5, 4, 5];
num = 4;
function numFinder(arr, num) {
let left = 0;
let right = arr.length-1;
while(left <= right) {
var mid = Math.floor((left + right)/2);
if(arr[mid] == num) {
return console.log(arr[mid])
} else if(arr[mid] < num) {
left ... |
//STEP 1
// let yourName = prompt('What is your name?');
// alert('Your name has ' + yourName.length + ' chracters');
//STEP 2
// let yourName = prompt('What is your name?');
// let number = prompt('Pick a number between 1 and ' + (yourName.length));
// let letter = yourName.charAt(number-1);
// alert('The let... |
import React from 'react'
import PropTypes from 'prop-types'
// redux
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
// module
import { ActionCreators as AppActions } from '../../modules/app/actions'
import { ActionCreators as AccountActions } from '../../modules/form-templates/action... |
import CommonModule from "../common.module";
describe('config singleton', () => {
let config;
beforeEach(window.module(CommonModule));
beforeEach(inject((_config_) => {
config = _config_;
}));
it('contains configurations', () => {
// Assert
expect(config.COUNTRIES_API_BASE).toEqual('/countries... |
import React, {useEffect, useRef} from 'react';
import GoalButtons from './goalButtons';
const Goal = (props) => {
const goalRef = useRef(null);
useEffect(()=>{
console.log(goalRef.current);
}, [])
return (
<div className='goals'>
<div ref={ goalRef } className={ props.go... |
// Write your Pizza Builder JavaScript in this file.
//
$(".btn-crust").removeClass("active");
$(".btn-sauce").removeClass("active");
if ($(".green-pepper").is(":hidden")) {
$(".btn-green-peppers").removeClass("active");
} else {
$(".btn-green-peppers").addClass("active");
}
if ($(".mushroom").is(":hidden")) {
... |
import React from 'react';
import styled from 'styled-components'
const ModalElement = styled.div`
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.3);
`;
const Modal = () => {
return (
<ModalElement>
<button>Click</button>
</ModalElement>
);
... |
const initialState = {
isLoggedIn: false,
tampung:[]
}
const fetchData = (state = initialState, action) => {
switch (action.type) {
case "FETCH":
return {
tampung:action.payload.tampung
}
case "REGISTER":
return {
...state... |
export const serializeForm = (elements) => {
let form = {};
try {
JSON.stringify(elements);
return elements
} catch (e) {
}
for (let i = 0; i < elements.length; i++) {
if (elements[i].value)
form[elements[i].name] = elements[i].value;
}
return form;
};
export const resetForm = (form) =>... |
import React, { PureComponent, Fragment } from 'react';
import { Card, Button, Modal, Table} from 'antd';
import Axios from './../../axios';
// import Utils from '/../../utils/utils';
import { connect } from 'react-redux';
import { actionCreators } from './store';
import CreateEmpForm from './createempform.js';
impor... |
let skyIsBlue = "true",
waterIsWet = "true"
if(skyIsBlue) console.log("This")
if(waterIsWet == skyIsBlue) console.log("Is")
if(skyIsBlue == waterIsWet == "true") console.log("the truth")
else console.log("a lie")
//What does it print?
|
export default {
projections: {
AuditView: {
name: {
__caption__: 'Name'
}
},
TypeE: {
name: {
__caption__: 'Name'
}
},
TypeL: {
name: {
__caption__: 'Name'
},
createTime: {
__caption__: 'Создание'
},
creator: {
... |
import React from 'react'
import { Grid, Cell } from '..'
import Box from './Box.jsx'
class GridDemo extends React.Component {
render () {
let props = this.props
return (
<Grid gutter={props.gutter}>
{props.grid.cells.map(function(cell, i) {
return (
<Cell key={i}
... |
// Import Express
var express = require("express");
var path = require("path");
// Create App
var app = express();
var PORT = process.env.PORT || 3000;
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
// Tables Array
var tables = [
{
name: "Kat Ruth",
phoneNu... |
import React, { useEffect } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import {
setCurrentTab,
} from "../actions/MovieActions";
import CastTableRow from "../components/CastTableRow";
export const MovieActorsView = ({
dispatch,
cast,
}) => {
useEffect(() => {
... |
const AbstractUI = require('./AbstractUI');
const { mongooseUtil } = require('../utils/mongooseUtil')
const { SchoolSchedule } = require('../beans/SchoolSchedule')
const { Person } = require('../beans/Person')
const { FileUpload } = require('../beans/FileUpload')
class SchoolUI extends AbstractUI {
async getPWidge... |
'use strict'
const http = require('http')
const path = require('path')
const express = require('express')
const bodyParser = require('body-parser')
const socketIo = require('socket.io')
const mongodb=require('mongodb');
var {mongoose}=require('./mongoose/mongoose');
const api=require('./routes/api.js');
const {Deliver... |
import React from "react";
import { Auth } from "components/pages/Auth";
import { render, fireEvent, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import TestingRouter from "../utils/TestingRouter";
describe("Auth page component", () => {
it("Should redirect to... |
import ItemOptionAction from './ui.form.item_option_action';
import { data } from '../../core/element_data';
import { extend } from '../../core/utils/extend';
import { getFullOptionName } from './ui.form.utils';
class WidgetOptionItemOptionAction extends ItemOptionAction {
tryExecute() {
var {
value
} ... |
var _api = require("../api.js");
var _api2 = _interopRequireDefault(_api);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
Page({
data: {
flag: false,
wrapAnimate: "",
bgOpacity: 0,
frameAnimate: "",
showFrame... |
var owner = 'mbostock';
var repoName = 'd3';
var gitdownload = require('../tasks/lib/download-github-repo.js');
gitdownload(owner + '/' + repoName, 'outputPath/' + repoName, function (err) {
console.log('failed: download ' + repoName);
callback();
}); |
{
"account1":[
{
"accountNumber": "0400",
"ownerName":"Mark Jones",
"openingBalance": "500"
}
],
"account2":[
{
"accountNumber": "9302",
"ownerName":"Sarah Moore",
"openingBalance": "25"
}
]
}
|
let prev = document.title;
export default ({ getState }) => (next) => (action) => {
const { title } = getState().board || {};
if (title !== prev) {
prev = document.title = title ? `${title} - Nekoboard` : 'Nekoboard';
}
return next(action);
};
|
const proFile = document.querySelector('#bigBody')
fetch('https://randomuser.me/api/?results=30')
.then((resp) => resp.json())
.then(function (data) {
let users = data.results;
console.log(users);
// console.log(users[0].nat);
// exit();
return users.map((user) ... |
/**
* @Name patient.controller.js
*
* @Description Patient Operations
*
* @package
* @subpackage
* @author Suhaib <muhammad.suhaib@shifa.com.pk>
* @Created on October 02, 2020 2021
*/
const Common = require("./../model/common.model");
const Patient = require("./../model/patient.model");
const Doctor = require... |
import React from 'react';
import classes from './OrderSummary.css';
import Aux from '../../../hoc/Auxilliary';
import Button from '../../Button/Button';
const OrderSummary = props => {
let transformedIngredients = Object.keys(props.ingredients).map((key) => {
return <li key={key}> {key} : {props.ingredie... |
import {Game} from "./game";
export class GameGui extends Game {
constructor(doc) {
super(doc);
this.map.setGame(this);
this.setStatus();
this.sounds = {
station: new Howl({src: ['/snd/station.wav'], volume: 0.5}),
remove: new Howl({src: ['/snd/remove.wav'], volume: 0.5}),
drag: ne... |
import React, {useEffect,useState} from 'react'
import api from './api/api'
import SideBar from './components/SideBar/SideBar'
import DevList from './components/DevList/DevList'
import './global.css'
import './App.css'
export default () => {
const [latitude,setLatitude] = useState('')
const [longitude,setLongit... |
import React, { Component } from "react";
import { Mutation } from "react-apollo";
import gql from "graphql-tag";
import Error from "../ErrorMessage";
import { CURRENT_USER_QUERY } from "../Accounts/User";
import PropTypes from "prop-types";
import Router from "next/router";
/* GraphQl Query */
/* Mutation Query */
... |
import AccessibilityModule from '../../index';
describe('ImgData', () => {
describe('register role', () => {
let cjsImg;
let imgEl;
let altVal;
let crossOriginVal;
let heightVal;
let isIsMap;
let longDescVal;
let sizesVal;
let srcVal;
let srcSetVal;
let useMapVal;
let ... |
const fs = require('fs')
const path = require('path')
const readline = require('readline');
var LineReaderSync = require("line-reader-sync")
var async = require('async');
const MongoClient = require('mongodb').MongoClient;
var moment = require('moment') //時間
var moment = require('moment-timezone') //時區
//引用 nod... |
// Given a string and an int n, return a string made of the first and last n chars from the string. The string length will be at least n.
// Examples
// nTwice('hello', 2) → helo
// nTwice('Chocolate', 3) → Choate
// nTwice('Chocolate', 1) → Ce
function nTwice(str, n) {
let first = str.substring(0, n);
let last... |
//serve some mock api
"use strict"
// const fs = require('fs')
// const path = require('path');
const express = require('express')
const app = express()
const request = require('superagent')
const domainXtj = 'http://app.xiaotaojiang.com'
const apiBanner = '/ws/settings/json/discover.banners'
const apiArticle = '/art... |
import React from 'react';
import PropTypes from 'prop-types';
import styles from '../CSS/reservationCosts.css';
// cleaningFee={cleaningFee} occupancyFee={occupancyFee} serviceFee={serviceFee} price={price}
function ReservationCosts(props) {
const {
cleaningFee, occupancyFee, serviceFee, price, checkinDate, ch... |
import React, {Component} from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import {Link, hashHistory} from 'react-router';
import SearchInput from '../SearchInput';
import './style.scss';
export default class HomeHeader extends Component {
constructor() {
super();
this.s... |
module.exports = require('./uki-core');
require('./uki-view');
module.exports.createStylesheet(__requiredCss);
|
angular.module('homeTrip', []);
|
// server/app.js
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable global-require */
/* eslint-disable no-console */
const express = require('express');
const compression = require('compression');
const morgan = require('morgan');
const path = require('path');
const bodyParser = require('body-pa... |
$("#tab-menu li a").click(function() {
$(this).blur();
if (!$(this).closest("li").hasClass("active")) {
$("#tab-menu li").removeClass("active");
$(this).closest("li").addClass("active");
$(".tab-content").hide();
$("#content-" + $(this).data("tab")).fadeIn(500);
if ($(thi... |
// import React, { Component } from 'react';
// import axios from 'axios';
// import '../css/product.css';
// export default class Product extends Component{
// constructor(){
// super()
// this.state= {
// size: '',
// track: '',
// trackColor: '',
// ... |
import React from 'react'
const FullName = () => {
return (
<div className="text-white bg-blue-600 h-6 w-32 rounded-sm text-center">
<h1>Isa Haji</h1>
</div>
)
}
export default FullName
|
// USGBC LEED Plaque - IDEO D-Shop (Tobias Toft and Ethan Klein)
// IDEO password for LEED api username: ideo password: password
// the Object Literal 'plaque' contains our js code.
// reference any function or property via 'plaque.width' etc.
var plaque = plaque || {
width: 750,
height: 750,
radius: 216/2, // ... |
import * as Yup from 'yup';
import Location from 'react-app-location';
const isNullableDate = Yup.string().test('is-date', '${path}:${value} is not a valid date', date => !date || !isNaN(Date.parse(date)));
const string = Yup.string();
const integer = Yup.number().integer();
const naturalNbr = integer.moreThan(-1);
c... |
export default class UserError extends Error{
statusCode = 400;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.