text stringlengths 7 3.69M |
|---|
import modalForm from '../../../lib/flatfoot_web/static/js/reducers/modal_form';
var initialState = {
formValues: undefined,
formErrors: undefined
};
const SET_FORM_VALUES = 'SET_FORM_VALUES', CLEAR_FORM_VALUES = 'CLEAR_FORM_VALUES', SET_FORM_ERRORS = 'SET_FORM_ERRORS', CLEAR_FORM_ERRORS = 'CLEAR_FORM_ERRORS', AD... |
import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store'
import toast from 'components/common/toast/index'
// 解决移动端300ms延迟
// 1.npm install fastclick --save
// 2.导入
import FastClick from 'fastclick'
// 图片懒加载
// 1.npm install vue-lazyload --save
// 2.导入
import V... |
import React from 'react'
import { RefreshAction, Toolbar, View } from '@reforma/ui'
import { Button } from '@blueprintjs/core'
import presidentDS from './presidentDS'
class PresidentView extends React.PureComponent {
render() {
return (
<div style={{ padding: 16 }}>
<Toolbar bottomMargin>
... |
var searchData=
[
['block_5fcluster',['block_cluster',['../classbctree.html#acc45b082bb211c6b9a193bc19bf5f28c',1,'bctree']]]
];
|
import { connect } from "../../slomux";
import { changeInterval } from "../../actions";
import IntervalComponent from "./component";
const Interval = connect(
state => ({
currentInterval: state
}),
dispatch => ({
changeInterval: value => dispatch(changeInterval(value))
})
)(IntervalComponent);
export... |
import axios from "axios";
export const getOrdersAdmin=()=>{
return async dispatch =>{
try{
const response = await axios.get('http://localhost:8888/back/api/read_orders_admin.php')
const json = await response.data;
dispatch({
type:'GET_ORDERS_ADMIN',
... |
const express = require('express')
const { Socket } = require('socket.io')
const app = express()
const server = require('http').Server(app)
const io = require('socket.io')(server)
const PORT = process.env.PORT || 80
const {v4: uuidV4} = require('uuid')
app.set('view engine', 'ejs')
app.use(express.static('public'))
a... |
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var partySchema = new Schema({
personPosting: Object,
host: String,
typeOfParty: String,
location: {
address: {
type: String,
required: true
},
city: {
type: String,
... |
/**
* NBTTagByteArray represents a bytes storage
* @example
* var bb1 = new NBTTagByteArray([1,2,3,10], "tagBytes");
* bb1.size; // 4
* var bb2 = new NBTTagByteArray();
* bb2.size; // 0
*
* @memberOf NBT
* @augments NBT.NBTArray
* @param {Array<number>|ArrayBuffer|String=} value Value of tag
* @param {string... |
// FB登入
const fbButton = document.querySelector('.FB_login #facebook_login');
fbButton.addEventListener('click', () => {
FB.getLoginStatus((response) => {
statusChangeCallback(response);
});
});
function statusChangeCallback(response) {
if (response.status === 'connected') {
// user登入了
const { acces... |
const React = require('react');
const { renderToStream } = require('@react-pdf/renderer');
class PdfTemplate {
constructor(Component, getAdditionalProps = null) {
this.getAdditionalProps = getAdditionalProps;
this.Component = Component;
}
async render(props) {
return renderToStream(await this._rende... |
var bikes, database,player, game, form;
var playerInfo;
var gameState=0
var playerCount=0
var playerNumber=0
var bike1,bike2,bike3,bike4;
var bike1Img,bike2Img,bike3Img,bike4Img;
var track;
function preload(){
bike1Img=loadImage("Sprites/motorcycle.jpg");
bike2Img=loadImage("Sprites/motorcycle.jpg");
bike3Im... |
var pageSize = 25;
var boolPassword = true;//secretcopy
//簡訊查詢Model
Ext.define('gigade.Sms', {
extend: 'Ext.data.Model',
fields: [
{ name: "id", type: "int" },
{ name: "order_id", type: "string" },
{ name: "mobile", type: "string" },
{ name: "subject", type: "string" },
{ name: "content",... |
import React, { useState } from "react";
import { Text ,View} from "react-native"
export default function Catalogo() {
return (
<View style={{flex:1,backgroundColor:"white"}}>
<Text>Catalogo</Text>
</View>
)
} |
export const STATUS_INITIALIZING = 'Initialising';
export const STATUS_READY = 'Ready';
export const STATUS_DISCONNECTED = 'Disconnected';
export const STATUS_CLOSED = 'Closed';
|
Template.editPanel.onRendered(function() {
$('.help-icon').attr({
'data-toggle': 'tooltip',
'data-placement': 'bottom',
'data-html': true,
'title': '<span style="text-align: center;"><strong>Tips:</strong></span> <br /> ' +
'1. Double click circles for more information.<br .> ' +
'... |
import tw, { styled } from 'twin.macro'
function ThematicBreak(props) {
return (
<Container {...props}>
<Circle />
<Circle />
<Circle />
</Container>
)
}
export default styled(ThematicBreak)``
const Circle = styled.div`
${tw`bg-gray-500`}
width: 12px;
height: 12px;
border-radiu... |
export const INIT_FIELD_CELLS = 'INIT_FIELD_CELLS';
export const INPUT_CHANGE = 'INPUT_CHANGE';
export const SUBMIT_PLAYER = 'SUBMIT_PLAYER';
export const SUBMIT_STATUS_TEXT = 'SUBMIT_STATUS_TEXT';
export const SET_START_CHIPS = 'SET_START_CHIPS';
export const ADD_NEIGHBORS = 'ADD_NEIGHBORS';
export const STEP_CHIP ... |
import React from 'react';
import './App.css';
import axios from 'axios';
class App extends React.Component {
constructor() {
super();
this.state = {
input: "",
newBook: [
{
title: "",
author: [],
p... |
import React, { Component } from "react";
import MenuLeft from "../../components/MenuLeft/MenuLeft";
import MenuMain from "../../components/MenuMain/MenuMain";
import MenuRightHeader from "../../components/MenuHeader/MenuRightHeader";
// import MenuRight from "../../components/MenuRight/MenuRight";
// import TaskForm f... |
import api from 'axios';
export const ACCESS_TOKE = 'token';
const PROTOCOL = 'https';
const HOST_NAME = 'localhost';
const PORT = 44376;
const PROD_PROTOCOL = 'https';
const PROD_HOST_NAME = '';
const HOME_URL = '/';
const getApiUrl = () => {
let apiUrl = `${PROTOCOL}://${HOST_NAME}:${PORT}`;
if (!process ... |
import parseUri from './parse-uri'
function buildQueryString(keyValues) {
const pairs = []
for (let key in keyValues) {
const value = keyValues[key]
pairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
}
return `?${pairs.join('&')}`
}
export default function buildUri(parts) {
if (ty... |
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
/**
* @param {TreeNode} root
* @param {TreeNode} p
* @param {TreeNode} q
* @return {TreeNode}
*/
var lowestCommonAncestor = function (root, p, q) {
if (!root) return null;... |
import React, { Component } from 'react';
import footerlogo from '../../images/logo-white.png';
export default class Footer extends React.Component {
constructor (props) {
super(props);
this.state = {}
}
componentDidMount() {}
render() {
return (
<footer className="sec-block">
<div className="cont... |
'use strict';
let chai = require('chai');
chai.use(require('chai-as-promised'));
chai.should();
describe('Reader', async function() {
const { Reader } = require('../');
it('basics', async function() {
let reader = new Reader();
reader.input.write(Buffer.from([1, 0, 0]));
reader.input.... |
import React, {Component} from 'react';
import logo from './logo.svg';
import Header from './components/Header'
import './App.css';
export default class App extends Component {
state = {
user: {},
name: "",
apellido: "",
age: ""
}
getDataFromGitHub = () => {
fetch('https://api.github.com/u... |
import * as React from 'react'
import { Container } from '../../../GlobalStyle'
import { FaGithub } from '@react-icons/all-files/fa/FaGithub';
import { FaLinkedinIn } from '@react-icons/all-files/fa/FaLinkedinIn';
import LanguageSelection from '../LanguageSelection';
import { LinksBackground, LinkName, SocialLink, Soci... |
/**
* Created by pl on 2017/9/12.
*/
// var mima2 = document.getElementById('inputpassword2').value();
// var tishi2 = document.getElementById('sure2');
function Display2() {document.getElementById('sure2').style.display = "block";};
function Display3() {document.getElementById('sure3').style.display = "block";};
f... |
import React from 'react';
import ReactDOM from 'react-dom';
import Login from './login.jsx';
import RegistrationPage from './RegistrationPage.jsx';
import RiderPage from './rider.jsx';
import DriverPage from './DriverPage.jsx';
class App extends React.Component {
constructor() {
super();
this.state = {
... |
const express = require('express');
const app = express();
const fs = require('fs');
const path = require('path');
const mainRouterAr = require('./routes/mainAr');
const mainRouterEn = require('./routes/mainEn');
const mainRouter = require('./routes/main');
app.use(require('body-parser').urlencoded({ extended: false ... |
// redux reducer
// interprits what to do with actions
function counter(state, action){
if (state == null) {
return { count: 0};
}
var count = state.count;
switch(action.type) {
case "increase":
return {count: ++count};
case "decrease":
retu... |
var next = $(".next i");
var prev = $(".prev i");
// funzione click di destra, quindi next
next.click(function(){
// assegno ad una variabile l'immagine attiva
var immagineAttiva = $("img.active");
// rimuovo dall'immagine la classe active,
// quindi l'immagine non è più attiva
immagineAttiva.remo... |
const list = require("prompt-list")
exports.run = () => {
const player = new list({
name: "Main Menu",
message: "You see a minecraft crEEper. WHat do you DO??",
choices: [
"run away liek a baby",
"attacc",
"nothing"
]
})
player.a... |
import React,{Component} from 'react'
const textWraperStyle = {
fontFamily: 'PingFangSC-Light',
fontSize: '50px',
color: '#FFFFFF',
letterSpacing: 0,
lineHeight: '40px',
position: 'absolute',
top: '41.8%',
left: '15.5%'
}
const btnWraperStyle = {
height:'44px',
width:'140px',
... |
import React from "react";
import {connect} from "react-redux";
import Users from "../Users/Users"
import reloaderPhoto from "../../Common/img/reload.gif"
import userAvatar from "../../Common/img/auto_avatar.jpg"
import {NavLink} from "react-router-dom";
import {
deleteFollowThunkCreator, addFollowThunkCreator, g... |
angular.module('myApp', ['ngMaterial', 'ngMessages', 'md.data.table']); |
import React, { Component } from 'react';
import './App.less';
import { Button } from 'antd';
class App extends Component {
// 路由跳转
toHome(){
this.props.history.push('/home')
}
render() {
return (
<div className="App">
<h1>app</h1>
<Button type="primary" onClick={() => {this.toHom... |
// @flow
import React, { Component } from 'react';
export type ScreenViewType<T> = {
viewComponent: typeof Component,
initialProps: ?T,
viewProps: ?T,
to: (string, T) => void
};
const ScreenView = <T>({
viewComponent: View,
initialProps,
viewProps,
...others
}: ScreenViewType<T>) => <View {...others} ... |
module.exports = {
fetchAllFriends(userId, success){
$.ajax({
url: `api/users/${userId}/friends`,
success(resp){
success(resp);
}
});
},
createFriend(data, success){
$.ajax({
url: `api/friends`,
method: "POST",
data: {friend: data},
success(resp){
... |
/**
* Copyright IBM Corp. 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
export default function getCssPropertyForRule(rule, prop, sheets) {
const slen = sheets.length;
for (let i = 0; i < slen; i++) {
let rules;... |
const modifyNewComment = (contact_id, comment_id, value) => {
const CommentContainer = document.querySelector(`.comments-${contact_id}`);
const tempContainer = document.createElement("div");
tempContainer.className = `comment comment-${comment_id}`;
/* comment wrapper */
const commentWrapper = do... |
Meteor.publish("folios",function(params){
return Folios.find(params);
});
Meteor.publish("foliosPanel",function(params){
return Folios.find(params, {fields: { _id:1
,folio:1
,nombre:1
,fecha:1
,zona_id:1
... |
import { getSchema } from 'Test/factories'
import createViewProps from '../ViewProps'
describe('ViewProps', () => {
test('createViewProps', () => {
const schema = getSchema()
const props = createViewProps({
schema,
columns: [{
name: 'firstName',
caption: 'Name'
}, 'age'],
... |
import Image from 'next/image'
import Link from 'next/link'
import HeadMetadata from '../components/HeadMetadata'
function about() {
return (<>
<HeadMetadata title='About me (cent) | Cent Blog' metaDescription="About me (cent)" />
<main className="parent">
<div className="left"></div>
<div class... |
var express = require("express"),
app = express(),
port = process.env.PORT || 3000,
bodyParser = require('body-parser'),
handlebars = require("express-handlebars"),
mysql = require('mysql');
var db = require("./models");
app.engine('handlebars', handlebars({defaultLayout: 'main'}));
app.set('view engine', ... |
//return
const sum = (a = 3) => a + 5
sum(5)
arr.map( el => el + 2 )
//ciało funkcji rozbudowane
(a = 3) => { return a + 5 }
//zwraca obiekt
(a = ()=>{}) => ({ value : a })
function(a = 3){
return { value: a}
}
|
define(['backbone', 'marionette'], function(Backbone, Marionette) {
return Backbone.Marionette.AppRouter.extend({
initialize: function(options) {
console.log("Wavity login router initialize called");
},
// all routes need to be defined in controller
appRoutes: {
'': 'login'
}
});
});
// E... |
import { BASE_PATH_FRAGMENT, PROPERTY_ID_PATH_FRAGMENT } from '../constants';
export const RESOURCE_NAME = 'roomtype';
export const PATHNAME_TEMPLATE = `${BASE_PATH_FRAGMENT}/${RESOURCE_NAME}${PROPERTY_ID_PATH_FRAGMENT}`;
|
import React, { Component } from 'react'
import importcss from 'importcss'
@importcss(require('./Layout.global.css'))
export default class Layout extends Component {
constructor() {
super()
}
render() {
return <div styleName="layout" className="app-inner2">
{this.props.children}
</div>
}
}
|
_.isDate = function(value){
return value && typeof value === 'object' && toString.call(value) === '[object Date]';
} |
import React,{Component} from 'react'
import HomeModal from '../../components/home'
import {toggleQRcode,toggleShopCode} from '../../actions/navbar'
import {connect} from 'react-redux'
class Home extends Component{
render(){
const {isQRcode,isShopCode,dispatch} = this.props
return(
<HomeModal
qrcode={(... |
import React from "react";
import Dropdown from "./Dropdown";
import AuthComponent from "./AuthComponent";
import Logo from "./logo.png";
function NavBar(props) {
return (
<nav className="navbar fixed-top navbar-light">
<div>
<div id="navHeader" className="navbar-brand" onClick={props.onClick}>
... |
import {
SET_CURRENT_USER,
GET_ERRORS,
GET_ASSOCIATE_ID,
ADD_ASSOCIATE_OBJECT,
GET_DESTINATION,
LOGOUT_USER
} from '../constants';
import axios from "axios";
import setAuthToken from "../utils/setAuthToken";
import jwt_decode from "jwt-decode";
export const registerUser = (userData, history, u... |
import React, { useState, useContext } from "react";
import { View, Text, StyleSheet } from "react-native";
import { Input, Button } from "react-native-elements";
import AuthContext from "../context/authContext";
const AuthForm = (props) => {
const { buttonTitle, onPress } = props;
const { data } = useContext(AuthCo... |
// Author of the project - SAYANI SASHA
// ---------- Урок № 6 - Преобразование типов ----------
// В JS есть автоматическая конвертация типов, что означает если интерпретатор ожидает увидеть в каком-то месте программы значение определенного типа, то любое значение будет приведено к этому типу.
// Например если одн... |
import { FullScreen, useFullScreenHandle } from "react-full-screen";
import { Rnd } from "react-rnd";
import { AiOutlineClose } from "react-icons/ai";
import { BiWindow, BiWindows, BiFullscreen } from "react-icons/bi";
import { FaRegWindowMinimize } from "react-icons/fa";
import { TiInfoLarge } from "react-icons/ti";
... |
/**
* A mini calendar allowing the user to select a single date.
*/
P.views.calendar.Mini = P.views.Item.extend({
templateId: 'calendar.mini.layout',
className: 'v-miniCal',
events: {
'click .js-day': 'select',
'click .js-month-after': 'monthAfter',
'click .js-month-before': 'monthBefore',
'clic... |
//NPM Packages
const request = require( "request" );
const forecast = ( lat, long, callback ) => {
const url = `https://api.darksky.net/forecast/5dbb8aceac436233245ecf1a4aa27213/${ lat }, ${ long }`;
request( { url, json: true }, ( err, res ) => {
const { daily, currently, code } = res.body;
... |
var word = (prompt("Enter a message, four letters or longer"));
while (word.length < 4)
word = (prompt("Try again."));
alert("You entered: " + word);
alert(word + " has " + word.length + " characters");
alert("The third character is \'" + word.charAt(2) + "\'");
alert(word + " to uppercase is: " + word.toUpperCa... |
"use strict";
import { getQueryVar } from "./getQueryVar.js";
let problemCount;
window.onload = function () {
problemCount = Number(getQueryVar("problemCount"));
const problemNum = Number(getQueryVar("problem"));
RefreshActionBar(problemNum);
document.getElementById("title").innerHTML = getQueryVar("title"... |
var Splash = function () {};
Splash.prototype = {
preload: function(){
},
create: function(){
console.log('Hi, this is the splash screen');
},
update: function(){
}
};
|
const prices = {
pepperonnis: 1,
mushrooms: 1,
greenPepper: 1,
whiteSauce: 3,
glutenFreeCrust: 5
}
/*******************************/
/********* PEPPERONNI *********/
/*******************************/
const pepperonniButton = document.querySelector('.btn-pepperonni')
const pepperonnis = document.querySelector... |
import React, { useContext, useEffect } from 'react';
import ListItem from './ListItem';
import { globalState } from '../context/GlobalState';
import { v4 as uuidv4 } from 'uuid';
const History = () => {
const globalstate = useContext(globalState);
useEffect(() => {
globalstate.getInitialData();
... |
import React from 'react';
import {StyleSheet, Text, View, FlatList} from 'react-native';
import {ms} from 'react-native-size-matters';
import {connect} from 'react-redux';
import WeatherCard from '../Components/WeatherCard';
import Spinner from 'react-native-loading-spinner-overlay';
function Weather(props) {
// co... |
require('dotenv').config();
const express = require('express');
const router = express.Router();
const moment = require('moment')
const mapbox = require('@mapbox/mapbox-sdk/services/geocoding');
const axios = require('axios');
const geocodingClient = mapbox({
accessToken: process.env.MAPBOX_PUBLIC_KEY
})
router.ge... |
export const Search = () => null
|
var express = require('express');
//var Blob = require('blob');
var router = express.Router();
const axios = require('axios');
const bodyParser = require('body-parser');
router.use(bodyParser.urlencoded({ extended: true }));
router.use(bodyParser.json());
router.use(bodyParser.raw());
const ApiBaseUrl = 'https://wor... |
// Começa o comando gerar memes.
module.exports.run = async (bot, message, args) => { // kk burro
var Discord = require('discord.js'); //Define que talvez usaremos discord.js nisso aqui.
var fs = require('fs'); // Define que talvez usaremos fs (controle de diretórios, pastas) aqui.
message.channel.send(`✅ Olá, e... |
class Paddle{
constructor(x, y){
this.loc = createVector(0, -1)
this.clr = (random(255), random(255), random(255))
this.loc.x = x
this.loc.y = y
}
run(){
this.render()
this.update()
}
render(){
fill(this.clr)
rect(this.x, this.y, 20, 20)
}
update(){
var mouseLoc = cr... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsHighlight = {
name: 'highlight',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 14l3 3v5h6v-5l3-3V9H6zm5-12h2v3h-2zM3.5 5.875L4.914 4.46l2.12 2.122L5.62 7.997zm13.46.71l2.123-2.12 1.414 1.414L18.375 8z"/></svg>`
};... |
import axios from 'axios';
import Config from 'react-native-config';
export const getTipoReceitasAsync = async () => {
const response = await axios.get(Config.APP_URL_BASE + '/tipoReceita');
return response;
}
export const getTodasReceitasAsync = async (receitaId) => {
const response = await axios.get(Co... |
var path = require('path')
var proc = require('child_process')
module.exports = function getUntracked (repoPath, cb) {
if (typeof repoPath === 'function') {
cb = repoPath
repoPath = process.cwd()
}
proc.exec('cd ' + repoPath + ' && git ls-files --others --exclude-standard', function (err, result) {
... |
const express = require('express');
const exphbs = require('express-handlebars');
const path = require('path');
const app = require('./app');
const environment = (app) => {
app.engine('.hbs', exphbs({
defaultLayout: 'main',
extname: '.hbs',
layoutsDir: path.join(__dirname, './../views/layouts'),
part... |
const express = require("express");
const app = express();
const port = process.env.PORT || 8080;
app.use(express.static("public"));
let customers = [
{ id: 1, name: "Jack" },
{ id: 2, name: "Tina" },
];
let database = [
{ id: 1, latitude: 60, longitude: 70 },
{ id: 2, latitude: 40, longitude: 80 },
];
var str... |
import './Option.css'
const Option = (data) =>{
const {displayNum, optNum, setOption} = data;
const optionClicked = () =>{
setOption(optNum)
}
return (
<div className="Option">
<button className="Option-Button" onClick={optionClicked}>
{displayNum}
... |
//text recall
/*------------------------------------------------------------------------------------------------------------------*/
var myInput = document.getElementById('input');
var myInput1 = document.getElementById('input1');
myInput.onfocus = function () {
'use strict';
//store place holder Attr in ba... |
//DayHeaderView Object constructor
//This view constructs a view for each day, it put out the initial starttime from the model,
// get the endtime and totaltime from the model
//it also creats an activitylist view to hold the dragables
var DayView = function(container, model, dayId) {
this.container = container.clon... |
var searchData=
[
['board_152',['Board',['../_interface_8h.html#a6b9d49fc70cadab85447f14c584095b3',1,'Board(): Interface.h'],['../_player_8h.html#aff2077940e775ff7cb8a2c704b3a6174',1,'Board(): Player.h']]]
];
|
function runTest()
{
FBTest.setPref("showXMLHttpRequests", true);
FBTest.openNewTab(basePath + "console/spy/5049/issue5049.html", function(win)
{
FBTest.openFirebug(function()
{
FBTest.enableConsolePanel(function(win)
{
var options = {
... |
import axios from 'axios';
import { normalize } from 'normalizr';
import * as schema from './schema';
import withUser from '../utils/withUser';
import {
UPDATE_FRAME,
} from './types';
const updateFrame = data => ({
type: UPDATE_FRAME,
payload: data,
});
export const setThrow = (id, ball, pins) => (dispatch, g... |
const getters = {
getTableSize(state) {
return state.table.size;
},
getTableValues(state) {
return state.table.values;
}
};
export default getters
|
import React from 'react';
import ClientFolder from './ClientFolder';
import store from '../store';
export default React.createClass({
render() {
let clientFolders;
if(!this.props.client.clientFolders) {
clientFolders = <div />;
} else {
clientFolders = this.props.client.clientFolders.ma... |
/* eslint-disable import/prefer-default-export */
export { default as promiseWhile } from './promiseWhile';
/* eslint-enable import/prefer-default-export */
|
var tokki = angular.module("homeController", []);
tokki.config(["$stateProvider", "$urlRouterProvider",
function($stateProvider, $urlRouterProvider){
$stateProvider
.state('system.home', {
url: "/home",
templateUrl: "pages/home/home.html",
controller: 'Home',
resolve: {
tokkiData: ["$q", "... |
import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home.vue'
import SaveAnswers from '@/views/SaveAnswers.vue'
import Play from '@/views/Play.vue'
import Winners from '@/views/Winners.vue'
import Admin from '@/views/Admin.vue'
Vue.use(Router)
export default new Router({
routes: [
{
... |
import Link from "next/link";
import { useRouter } from "next/router";
import { useState, useEffect } from "react";
export default function Layout({ children }) {
//* Rendering JQuery
useEffect(() => {
"use strict"; // Start of use strict
// Toggle the side navigation
$("#sidebarToggle, #sidebarToggl... |
import React from 'react'
function PageDetail(props) {
// console.log(props)
return (
<div>
<div> 我是PageDetail</div>
<h2>{props.match.path}</h2>
{/*<h2>{props.match.url}</h2>*/}
{/*<h2>{props.match.params.id}</h2>*/}
</div>
)
}
export default ... |
var _ = require("underscore");
module.exports = {};
module.exports.slack = new function(username){
var token = process.env.SLACK_TOKEN;
var WebClient = require('@slack/client').WebClient;
var client = new WebClient(token);
client.users.list(null, function usersCb(err, res) {
if (err) {
console.log('... |
class Card {
constructor(name, order) {
this.name = name
this.order = order
}
getFullName() {
return `${this.name} (${this.order})`
}
}
const DATA_COLLECTION = [
{
name: "Avalon"
},
{
name: "Bahamut"
},
{
name: "Charizard"
},
{
name: "Drogon"
},
{
name: "Ender... |
import React from 'react';
import {
Image,
ScrollView,
StyleSheet,
View,
} from 'react-native';
import {
widthPercentageToDP as wp,
heightPercentageToDP as hp,
} from 'react-native-responsive-screen';
// 현재 배너와 열어본 상품을 여기에 함께 정의해 놓았음
const MainBannerLinks = () => (
<View style={[style... |
import React, { Component } from 'react';
import { WhiteSpace,WingBlank,Toast} from 'antd-mobile';
import {
Text,
View,
TouchableNativeFeedback,
FlatList,
Image
} from 'react-native';
import getServices from '../../fetch/fetch';
import api from '../../api/api';
import MenuCard from '../../component/menuCard... |
import gql from "graphql-tag";
export const LAUNCH_TILE_DATA = gql`
fragment LaunchTile on Launch {
id
isBooked
rocket {
id
name
}
mission {
name
missionPatch
}
}
`;
export const getLaunchesQuery = gql`
query launchList($after: String) {
launches(after: $after... |
var exec = require('child_process').exec
module.exports = function(){
var packerCmd = {}
//Build the command, pass the options appropriately, return the feedback
packerCmd.command = function(command, file, options){
if(typeof file == 'object'){
options = file
file = null
}
var cmd = 'p... |
require('babel-register')({
sourceMaps: true
});
const logFactory = require('log-factory');
logFactory.init({ console: true, log: process.env.LOG_LEVEL || 'info' });
global.testLogger = logFactory.getLogger('TEST');
global.logSpy = (s) => {
testLogger.info('logSpy: ', s);
for (var i = 0; i < s.callCount; i++) ... |
require('./db/connection')
const express = require('express')
const cors = require('cors')
const { Record } = require("./models/Records")
const { recordRouter } = require("./routes/records")
const { userRouter } = require("./routes/user")
const port = process.env.PORT || 5000
const app = express()
app.use(cors())
app... |
import React from "react";
function Footer() {
const instagram = process.env.REACT_APP_INSTAGRAM;
const facebook = process.env.REACT_APP_FACEBOOK;
const youtube = process.env.REACT_APP_YOUTUBE;
const twitter = process.env.REACT_APP_TWITTER;
const github = process.env.REACT_APP_GITHUB;
const linkedin = proc... |
define(['model/query.model'], function (query) {
'use strict';
var Select_Template_View = function () {
var btn_query_report=$(document).find('#btn-query-report');
var outData = $(document).find("#outdata");
var submitQuery = function () {
/* var iframe = $(window.frames["iframe-outdata"].document)... |
$(function () {
// 好友店商品ajax无限滚动加载
var loading = false;
// 最多可加载的条目
var maxItems = 60;
$.detachInfiniteScroll($('.infinite-scroll'));
// 每次加载添加多少条目
var itemsPerLoad = 20;
function addItems(number, lastIndex) {
// 生成新条目的HTML
var html = '';
... |
var image = document.images[0];
var buttons = document.getElementsByTagName("button");
var i;
for (i = 0; i < buttons.length; i++) {
buttons[i].addEventListener("click", function() {
if (this.id == "field") {
image.src = "images/field.jpg";
} else if (this.id == "tree") {
... |
import React from 'react'
import './FooterControls.css'
import MicOffIcon from '@material-ui/icons/MicOff'
import StopIcon from '@material-ui/icons/Stop'
import SecurityIcon from '@material-ui/icons/Security'
import PeopleIcon from '@material-ui/icons/People'
import ChatIcon from '@material-ui/icons/Chat'
function Foo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.