text stringlengths 7 3.69M |
|---|
import {bindable, inject} from "aurelia-framework";
import ImagePreloader from "image-preloader";
import pieces from "../../shared/pieces/Piece";
const TILE_WIDTH = 36;
const TILE_HEIGHT = 36;
//Need the list of filenames for preloading
const sprites = Object.freeze([
"Apple.png",
"Ball.png",
"Barrel.png... |
import React from 'react';
import styles from './styles.Square.css';
import Radium from 'radium';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faBomb } from '@fortawesome/free-solid-svg-icons';
import { throttle } from 'lodash';
const LABEL_MAP = {
1: 'A',
2: 'B',
3:... |
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import saveGame from '../actions/update-game'
import './Reaction.sass'
class Reaction extends Component {
// before mounting occurs set state of React to false
componentWillMount(){
this.setState({ React: false })
}
// componen... |
function transpose(matrix) {
return matrix.map((row, rowIdx) => row.map((_, colIdx) => matrix[colIdx][rowIdx]));
}
var matrix = [
[1, 5, 8],
[4, 7, 2],
[3, 9, 6]
];
var newMatrix = transpose(matrix);
console.log(newMatrix); // [[1, 4, 3], [5, 7, 9], [8, 2, 6]]
console.log(matrix); // [[1, 5, 8],... |
import React from 'react';
import "./UserOutput.css";
export default function UserOutput(props) {
const style={
color:"red",
fontStyle:"italic"
}
const paraStyle={
fontSize:"20px",
}
return (
<div className="output">
<h1>My name is<span style={st... |
/**
* Created by bilbowm on 26/11/2015.
*/
'use strict';
define(function () {
function now() {
return +new Date() / 1000;//.getSeconds();
}
var Bomb = function newBomb(obj) {
if (obj) {
for (var k in obj) {
if (!this[k]) { //do not override prototype.
... |
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
'use strict';
const chalk = require( 'chalk' );
const buildOptions = require( 'minimist-options' );
const minimist = require( 'minimist' );
const gitStatusParser = require( '../utils/gitst... |
import React, { useState } from 'react';
import {
ScrollView,
StatusBar,
StyleSheet,
Text,
View,
Dimensions,
TouchableOpacity,
TextInput
} from 'react-native';
import { Calendar, LocaleConfig } from 'react-native-calendars';
import { Dropdown } from 'react-native-material-dropdown';
import EvilIcons fro... |
/**
* UserController
*
* @module :: Controller
* @description :: A set of functions called `actions`.
*
* Actions contain code telling Sails how to respond to a certain type of request.
* (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL)
*
... |
const initState ={
url:'http://newsapi.org/v2/top-headlines?country=eg&apiKey=69ebdeb9f7ce4f3eb2a2a925a4392ab8',
category:'general',
country:''
}
const reducer = (state = initState, action)=>{
if(action.type.toString() == 'SEARCH'){
console.log( "--"+action.val+"--");
return {
... |
// Examples
/**
* @type {HTMLTemplateElement|null}
*/
const exampleCodeTemplate = document.querySelector('#example-code-block-template')
/**
* @type {HTMLTemplateElement|null}
*/
const exampleControlsTemplate = document.querySelector('#example-controls-template')
if (!exampleCodeTemplate || !exampleControlsTemplat... |
import { Meteor } from 'meteor/meteor'
import { Mongo } from 'meteor/mongo'
import { TaskSchema } from './tasks.js'
export const Lists = new Mongo.Collection('lists')
Lists.schema = new SimpleSchema({
name: {type: String},
incompleteCount: {type: Number, defaultValue: 0},
userId: {type: String, regEx: SimpleSch... |
import React from 'react';
import { Link } from 'react-router-dom';
const CommentList = ({ comments, title }) => {
if (!comments.length) {
return <h3>No Comments Yet</h3>;
}
return (
<div>
<h3>{title}</h3>
{comments && comments.map(comment => (
<div key={comment._id} className="com... |
import {LOGOUT_ERROR} from "../../const/actionTypes";
const logoutError = response => {
return {
type: LOGOUT_ERROR,
payload: response.data
}
}
export default logoutError; |
import React from 'react';
import BarNavigation from '../../components/BarNavigation'
import Footer from '../../components/Footer'
import mainLogo from './../../img/mainLogo.png'
import './verificar-cuenta.css'
import verificarCuenta from './../../img/registro/verificarCuenta.png'
const VerificarCuenta = props => (
... |
import React from 'react'
import {Link, useLocation} from 'react-router-dom'
import profileIcon from "../../profileIcon.png"
import SearchBar from "material-ui-search-bar";
import { useNavigate} from "react-router-dom";
// import Event from "../Event/Event"
import { useState} from 'react';
import apiClient from "../../... |
import React from 'react'
import CourseTable from "./course-table/course-table";
import CourseGrid from "./course-grid/course-grid";
import CourseNavbar from "./course-navbar/course-navbar";
import {BrowserRouter, Link, Route} from "react-router-dom";
import courseService, {findAllCourses, deleteCourse} from "./service... |
app.factory('ctrlctrlServ',function(restServ){return restServ.getCrud('/structure/control/:id','u');});
app.factory('ctrlServ',function(ctrlctrlServ,constServ,chartServ,structureCrudAdminServ,uiServ){
var controlNode = {};
var controlPoint = [];
var montiorPoint = [];
return {
chkType: function(str){retur... |
// document.write("五毛的第二个入口")
// "use strict";
import 'babel-polyfill'
import React from 'react'
import ReactDom from 'react-dom'
import logo from '../images/240_160.png'
import {a} from './tree-shaking'
import './index.less'
class Index extends React.Component {
constructor(){
super(...arguments)
... |
import {Tab,TabItem} from './tab/deku/';
import {TabNav,TabNavItem} from './tab-nav/deku';
import {Modal,Toggle as ToggleModal,toggle as toggleModal} from './modal/deku';
module.exports={
Tab,TabItem,
TabNav,TabNavItem,
Modal,ToggleModal,toggleModal
};
|
import { Point2d } from './GeneralUtilities'
import BSGameBoard from './GameBoard'
import {BSContextMenu,BSInfoWindow,BSUnitFlyout} from './UIWidgets'
import { BSGame, GameSingleton } from './GameBase'
//Context menu handlers
function onTerrainInfo(e, target) {
console.log("onTerrainInfo");
var x = e.offs... |
import iconMenu01 from "../assets/images/icon-menu-01.png";
import iconMenu02 from "../assets/images/icon-menu-02.png";
import iconMenu03 from "../assets/images/icon-menu-03.png";
import iconMenu04 from "../assets/images/icon-menu-04.png";
import iconMenu05 from "../assets/images/icon-menu-05.png";
import iconMenu06 fr... |
let num = 10;
function test() {
var num = 90
console.log("value of num in test() "+num)
}
test()
console.log(num) |
angular.module('ucms.app.services')
.factory('$group',
function ($xhttp, $q) {
var service = {
//group
create: function (group) {
var defer = $q.defer();
$xhttp.post(WEBAPI_ENDPOINT + '/api/group/Create', group).then(function (response) {
... |
#!/usr/bin/env node
var fs = require('fs');
var blast = require('..');
var concat = require('concat-stream');
// TODO: find a more reliable way to detect empty stdin
if (process.stdin.isTTY) {
withoutPipe();
} else{
withPipe();
}
function withPipe() {
function callback(str){
process.stdout.write(JSON.string... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import DocumentMetaModule from 'react-document-meta';
import { pageContent } from './seo-content';
class DocumentMeta extends Component {
render() {
const meta = pageContent[this.props.page];
return <DocumentMetaModule {...meta} {.... |
var searchData=
[
['se3tracker',['SE3Tracker',['../classlsd__slam_1_1_s_e3_tracker.html',1,'lsd_slam']]],
['sim3residualstruct',['Sim3ResidualStruct',['../structlsd__slam_1_1_sim3_residual_struct.html',1,'lsd_slam']]],
['sim3tracker',['Sim3Tracker',['../classlsd__slam_1_1_sim3_tracker.html',1,'lsd_slam']]],
['s... |
var express = require('express');
var router = express.Router();
var https = require('https');
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'DirtyDish', description: 'DirtyDish is on its way!!!' });
});
function restaurant() {
this.id: '',
this.name: '',
this.local... |
import React from 'react';
import { Menu, Segment, Input, Image } from 'semantic-ui-react';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { changeActive } from '../actions';
import './Menu.css';
class MLBMenu extends React.Component {
... |
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import Link from 'next/link';
const PlaylistItem = ({ playlist, current, children }) => {
if (playlist !== current) {
return (
<Link href={`/?playlist=${current}`}>
<a>{children}</a>
</Link>... |
import React, { Component } from 'react'
export default class ContentStr extends Component {
render() {
return (
<div>
<div className="stroka">
<div className="ui breadcrumb">
<div className="active section">Dashboard</div>
... |
/************************
des: 公共控制器
date: 2017/01/11
auth: mike
************************/
import ngApp from '../components/app';
import {apiConfig} from '../components/config';
export default ngApp.controller('commonCtrl', ['$scope', 'dialogService','questfactory', function($scope, dialogService,questfactory) {
$s... |
/*
* Copyright (C) 2012-2013 DFKI GmbH
* Deutsches Forschungszentrum fuer Kuenstliche Intelligenz
* German Research Center for Artificial Intelligence
* http://www.dfki.de
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation file... |
import GeoLocation from './GeoLocation';
import GeoLocationStore from './Store';
import store from '@/store';
store.registerModule('GeoLocation', GeoLocationStore);
export default GeoLocation;
|
import { useSelector, useDispatch, shallowEqual} from 'react-redux';
import { Formik, Form, Field } from "formik";
import { fields } from './fields';
import { initialValues } from './initialValues';
import { changeFilter } from '../../../redux/contacts/contacts-actions';
import { getContactsFilter } from '../../../re... |
import React from 'react';
import cl from './MyPosts.module.css';
import Post from './Post/Post';
import {addPostActionCreator, updateNewPostTextActionCreator} from "../../../Redux/profile-reducer";
import {Field, reduxForm} from "redux-form";
import {
maxLenghtCreator,
maxLengthCreator,
minLenghtCreator,
... |
const fs = require('fs');
const EE = require('events');
const ee = new EE();
function readFile(filePath, callback) {
fs.readFile(filePath, function(err, data) {
if(err) console.log(err);
console.log('54 byte header infor of bitmap file in hex: ' + data.toString('hex').slice(0,108));
bitmapHeader... |
//重慶時時彩3
// ------------------------------
// score one time requests |
// ------------------------------
window.addEventListener("load", function() {
setTimeout(parse, 1000);
}, true);
function parse() {
var dt=new Date(); // *抓現在的Date*
var ret={};
ret.error="";
ret.loc="cq2_3";
ret.locname="重慶時時彩3";
ret... |
const rotate = (matrix) => {
// matrix 4x4
// calculate how many levels
// for each level
// start pointers
// top, right, bottom, left
// swap elements
// iterate 4 times in first layer
// iterate 2 times in second layer
let layerCount = Math.floor(matrix.length / 2);
let size = matrix.length - 1;
... |
'use strict'
angular.module('tutorialize')
.component('newtuto', {
templateUrl: 'components/newtuto/newtuto.html',
controller: NewTuto
})
function NewTuto($resource, $scope, $http) {
// Controller
const that = this
this.tuto = {
title: "Angular Smart Table",
lang: "French",
... |
var years = prompt('Ввыедите ваш логин?', 'NonAuthorized');
$('#send-message').on('submit', function (event) {
event.preventDefault();
var message = $('.messages-me').first().clone();
message.find('p').text($('#input-me').val());
let client_meesage = $('#input-me').val();
// console.log(client_me... |
d3.csv('data.csv', function (error,data) {
function tabulate(data) {
// get columns and add flag
var columns = [];
for(var k in data[0]) columns.push(k);
columns.push('Flag')
var summary_digt = "<table class='table-sm'>"
var summary_bar = "<table class='table-sm'>"
var metric = "<table class='table-str... |
import React, { Component } from "react";
import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import Button from "@material-ui/core/Button";
import Typography from "@material-ui/core/Typography";
import Checkbox from "@material-ui/core/Checkbox";
import { withStyles } fro... |
const Pool = require("pg").Pool;
const pool = new Pool({
user: "borisjerrar",
host: "localhost",
database: "jsonplaceholder",
password: "",
port: 5432,
});
const getUsers = (request, response) => {
pool.query('SELECT * FROM users ORDER BY id ASC', (error, results) => {
if (error) {
throw err... |
import React from "react";
function Logo() {
return <img className="logo-new" src="./image/prato.png" />;
}
export default Logo;
|
import React from "react";
import { Route, useLocation, Redirect } from "react-router-dom";
// HOC особый компонент!
const ProtectedRoute = ({ isLoading, loggedIn, handleOpenLogin, ...props }) => {
const { pathname } = useLocation();
React.useEffect(() => {
if (!loggedIn && pathname === "/saved-news") {
... |
var weatherPage = {}
module.exports ={
beforeEach: browser => {
weatherPage = browser.page.weathermanPage()
weatherPage.navigate()
},
after: browser => {
weatherPage.end()
},
'Search Weather Test' : browser => {
var searchTest = {
zip: '43082',
city:... |
function countTimer(deadline) {
'use strict';
let timerHours = document.querySelector('#timer-hours'),
timerMinutes = document.querySelector('#timer-minutes'),
timerSeconds = document.querySelector('#timer-seconds');
function getTimeRemaining() {
let dateStop = new Date(deadline).ge... |
import React, {useState } from 'react';
const Ingredient = ({accompagnement, addToCart}) => {
let { name, image } = accompagnement;
const [check, setCheck] = useState(false);
const handleCheck = () => setCheck(!check);
return (
<div key={name} className="ingredient" onClick={() => {addToCart(ac... |
import React from 'react';
import { StyleSheet, View, Text, Alert, TouchableOpacity, ScrollView, TextInput } from 'react-native';
import theme from '../constants/theme';
import Icon from 'react-native-vector-icons/FontAwesome';
export default Chat = (props) => {
const { chat, color, isUser, userColor, username } ... |
class Node {
constructor(data) {
this.data = data
this.prev = this.next = null
}
}
class LinkedList {
constructor() {
this.head = this.tail = null
this.size = 0
}
pushFront(data) {
if (this.size === 0) {
this.head = this.tail = new Node(data)
} else {
let o... |
/**
* Created by suwt on 2017/3/9.
*/
import Mock from 'mockjs';
export default {
mockData() {
Mock.mock('/api/user', {
"code": "000",
"datas": {
"name": "@cname", // 内容:npm安装后 mockjs/src/mock/random/xxx.js
"area": "@province(true)",
... |
import Vue from 'vue';
import ls from 'local-storage';
const rawProducts = [{
_id: '1',
title: 'Leine',
description: 'Eine normale Leine. Damit lassen sich Hunde zügeln!',
category: 'Leinen',
brand: 'Hundkatzemaus',
price: 25,
}, {
_id: '2',
title: 'Leine9000',
description: 'Mindestens 8999 mal besse... |
var searchData=
[
['pub_5fbutton',['pub_button',['../classOmniBase.html#a1cbe27fd9e63d07a9875e82a581bfab5',1,'OmniBase']]],
['pub_5fjoint',['pub_joint',['../classOmniBase.html#a610f935950307a0395c07d36313809b7',1,'OmniBase']]],
['pub_5fpose',['pub_pose',['../classOmniBase.html#ad8d0103682a01ed2a635f6aa01fb0124',1... |
import Reforma from '@reforma/core'
import President from './presidentType'
export default Reforma.createRecordDS({
type: President,
url: '/presidents'
})
|
/**
* 用户关系链相关的 API
* @author heroic
*/
/**
* Module dependencies
*/
var models = require('../models'),
Relation = models.Relation;
/**
* 关注某个用户
* @param {Object} args
* - userId 当前用户 id
* - followId 要关注的用户 id
* @param {Function} callback
* - err MongooseError
*/
exports.create = function(a... |
import BruteIcon from './classIcons/BruteIcon.png';
import CragheartIcon from './classIcons/CragheartIcon.png';
import MindthiefIcon from './classIcons/MindthiefIcon.png';
import ScoundrelIcon from './classIcons/ScoundrelIcon.png';
import SpellweaverIcon from './classIcons/SpellweaverIcon.png';
import TinkererIcon from... |
jQuery(document).ready(function($) {
$('.accomp_datepicker').pickadate({
format: 'mmmm dd, yyyy',
onStart: function() {
var date = new Date()
this.set('select', [date.getFullYear(), date.getMonth(), date.getDate()]);
}
});
// show the form for adding a new accomplishment
jQuery(document... |
;(function(){
"use strict"
class List{
constructor(){
this.url = "http://localhost/bookuu/data/goods data/data1.json";
this.contain = document.querySelector(".contain");
this.load();
}
load(){
var that = this;
ajax({
... |
export default (a, b) => a.map((d, i) => d + b[i]);
|
// Variables - Styles that are used on more than one component
// MUI THEME
import { createMuiTheme } from "@material-ui/core/styles";
const drawerWidth = 240;
const transition = {
transition: "all 0.33s cubic-bezier(0.685, 0.0473, 0.346, 1)"
};
const container = {
paddingRight: "15px",
paddingLeft... |
function animate(obj,target,callback){
clearInterval(obj.timer);
obj.timer=setInterval(function(){
var step=(target-obj.offsetLeft)/10;
step=step>0? Math.ceil(step):Math.floor(step);
if(obj.offsetLeft==target){
//等于移动距离,停止定时器
clearInterval(obj.timer);
... |
//On crée une base de données.
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/dbtest";
//
// MongoClient.connect(url, function(err, db) {
// if (err) throw err;
// console.log("Database mydb created!");
// db.close();
// });
// On crée une collection "expPro" dans cette ... |
'use strict';
var mongoose = require('mongoose-q')();
var Schema = mongoose.Schema;
var SensorSchema = new Schema({
name: String,
type: {
type: String,
enum: ['value', 'state', 'electricity'],
default: 'value'
},
boardId: String,
lastValue: Number,
connected: Boolean,
lastUpdated: Date,
pi... |
import React from "react";
import { Button } from "semantic-ui-react";
import styled from "styled-components";
import { mobileScreenSize } from "styleguide/breakpoints";
export const HealthySurveyButton = () => (
<Button
onClick={() => window.open("https://forms.gle/wUChYFb5ViBuKCkWA")}
size="huge"
color... |
describe('standard.global.setGlobal', () => {
test.todo('Extendo o global com as novas keys/values')
test.todo('Notifica que o global foi alterado')
test.todo('Notifica que uma key expecifica foi alterado')
})
|
import "react-responsive-carousel/lib/styles/carousel.min.css";
import { Carousel } from "react-responsive-carousel";
const MainCarousel = () => {
return (
<Carousel
autoPlay
infiniteLoop={true}
showThumbs={false}
showStatus={false}
>
<div>
<img src="/images/banner1.jpg" ... |
import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@material-ui/core/MenuItem';
import FormControl from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';
export const TransactionFilterDropdown = ({options, selectedOption, onChange}) => (
<FormControl style={{ m... |
import React, { useRef, useState, useEffect } from "react";
import { Form, Nav, Toast } from "react-bootstrap";
import {
AiOutlineSearch,
AiOutlinePlus,
AiOutlineUserAdd,
} from "react-icons/ai";
import { BsCheck } from "react-icons/bs";
import { FaCheck, FaTimes } from "react-icons/fa";
import { NavLink } from "... |
// here we test our sc that its working.
// libraries helpful for tests are
// chai and mocha that comes with truffle.
const { assert } = require('chai');
const _deploy_contracts = require('../migrations/2_deploy_contracts');
const Trust = artifacts.require("Trust");
const Registration = artifacts.require("Registra... |
// web server
var restify = require('restify');
var builder = require('botbuilder');
//crear servidor
var server = restify.createServer();
//se escucha distintos puertos,particularmente en el 3978
server.listen(
process.env.port ||
process.env.PORT ||
3978, function(){
console.log('%s listening to ... |
import styled from 'styled-components';
export const CollectionPreviewContainer = styled.div`
display: flex;
flex-direction: column;
margin-bottom: 30px;
> h1 {
font-size: 28px;
margin-top: 0;
margin-bottom: 25px;
text-transform: uppercase;
}
> div {
display: flex;
justify-content... |
/* eslint-disable no-restricted-syntax */
const dummyObject = {
GameDate: new Date()
};
export const selectCategory = (object, playerInfo) => dispatch => {
const players = [];
const title = object.event.target.value;
if (title === 'Select') {
dispatch({
type: 'PL_GET_PLAYERS',
players
});
... |
import { react, useState } from "react";
function App() {
return (
<>
<h1>I'm redoing everything. FML</h1>
</>
);
}
export default App;
|
var app = angular
.module("quizApp", ["ngRoute", "LocalStorageModule"])
.factory("AuthService", [function () {
var identity = {},
login = function (username, rememberMe) {
if (username.length < 3) {
return false;
}
... |
'use strict';
var _ = require('lodash');
var utils = require('../utils');
var Resource = require('../Resource');
var Method = Resource.method;
module.exports = Resource.extend({
path: 'application',
includeBasic: ['get']
});
|
import express from "express";
import ItemControler from "../controlers/item.controler.js"
import authControler from "../controlers/auth.controler.js";
const router = express.Router();
router.post("/", authControler.verifyToken, ItemControler.createItem);
router.put("/", authControler.verifyToken, ItemControler.updat... |
/**
* 保留小数的位数:
* @param {*} number
* @param {*} decimals
* @param {*} roundtag
*/
export function decimalsNum(number, decimals, roundtag) {
let num = (number + '').replace(/[^0-9+-Ee.]/g, ''); //去除非法字符
let dec = Math.abs(decimals);
let tag = roundtag || 'ceil'; //"ceil","floor","round","slice"
if (+num ... |
import { createStackNavigator, createAppContainer, createDrawerNavigator } from "react-navigation";
import Login from '../../Screens/Login/Login'
import SavingProfile from '../../Screens/SavingProfile/SavingProfile'
import Home from '../../Screens/Home/Home'
import Circles from '../../Screens/Circles/Circles'
import Cr... |
//JavaScript Declarations are Hoisted
//En js una variable puede ser declarada despues de que fue usada.
//En otras palabras una variable puede ser usada antes de ser declarada.
//JavaScript solo hace el hoist de las declaraciones, no de la inicializaciones.
//In JavaScript, every variable or function declaration you ... |
/** @flow */
import * as React from 'react';
import PropTypes from 'prop-types';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
import theme from './theme';
type Props = {
children: React.Node,
};
export default function ListItem(props: Props) {
return (
<View style={styles.item}>
<Text... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "0568ba2eda03e7868d52386593ad4429",
"url": "/ReactToDoList/index.html"
},
{
"revision": "cbe01b4af41e25f2dfff",
"url": "/ReactToDoList/static/css/main.3d3f94c5.chunk.css"
},
{
"revision": "ee205fbab5174c091753... |
const api_url = 'https://rickandmortyapi.com/api/episode';
const monthChars = async (String) => {
try {
const rptChars = [];
const response = await fetch(api_url);
const { results } = await response.json();
const episodes = Array.from(results).filter((episode) =>
episode.air_date.includes(Strin... |
$(function () {
//1.初始化Table
var oTable = new TableInit();
oTable.Init();
//2.初始化Button的点击事件
var oButtonInit = new ButtonInit();
oButtonInit.Init();
});
var TableInit = function () {
var oTableInit = new Object();
//初始化Table
oTableInit.Init = function () {
$('#recordsTabl... |
export const BACK_END_IP = "http://spacedesign.store:3000";
export const API_DO_AUTH = "/admin/auth";
export const API_DATA_GET = "/admin/data";
export const API_DATA_ADD = "/admin/data/add";
export const API_DATA_EDIT = "/admin/data/edit";
export const API_DATA_REMOVE = "/admin/data/remove";
export const AUTH_PENDI... |
// var app;
var jsforce = require('jsforce');
var secrets = require("../../secrets/secrets.js");
var sf = require("./module_salesforce");
var fs = require("fs");
function init(pass_express) {
allObject(pass_express);
// singleObject(pass_express);
}
function allObject(app){
app.get('/coops', function(req, ... |
import React from 'react';
class SelectItem extends React.Component{
render(){
var dropdowmItem=[];
this.props.items.forEach((item)=>{
dropdowmItem.push(<option key={item.name}>{item.name}</option>);
});
return(
<div>
<select>{dropdowmItem}</select>
</div>
);
}
}
class DropdownFilter extends... |
class Pregunta
{
constructor(pregunta, respuestas = [], correcta)
{
this.pregunta = pregunta;
this.respuestas = respuestas;
this.correcta = correcta;
}
}
let q0 = new Pregunta(`¿Quién fue el padre de la geometría?`, [`Pitagoras`, `Arquímides`, `Euclides`, `Apolonio`], 'r3'... |
import { combineReducers } from 'redux';
import about from './About/AboutReducer';
import home from './Home/HomeReducer';
import register from './Register/RegisterReducer';
import login from './Login/LoginReducer';
import news from './News/NewsReducer';
import booking from './Booking/BookingReducer';
import movies fro... |
"use strict"; // javascript 严格说明
/**
* 模块引用
*
* @example <caption>Example usage of method1.</caption>
* database.query;
* @private
*/
var mysql = require("mysql"),
async = require("async"),
pool_option = undefined,
pool = undefined;
/**
* 构造mysql数据库访问对象实例。
* @param {object} options mysql ... |
import moment from 'moment';
import qs from 'query-string';
import Feed from './feed';
export default class TheatricsAPI {
constructor() {
this.prefix = '/api';
this.version_prefix = '/v1'
this.fetch = window.fetch.bind(window);
}
fetchEvent(id) {
return this.get(`/events/${id}/`, {expand: 'pl... |
import React from 'react';
import PropTypes from 'prop-types';
import ItemDetailsHeader from './itemDetailsHeader';
import Price from './price';
import Prime from './prime';
import InStock from './inStock';
import DescriptionList from './descriptionList';
import Shipping from './shipping';
const ItemDetailsView = ({ d... |
import React from "react";
import axios from "./axios";
import ProfilePic from "./ProfilePic";
import ProfileWhite from "./ProfileWhite";
import CoverPic from "./CoverPic";
import Bio from "./Bio";
import Uploader from "./Uploader";
import Wallposts from "./Wallposts";
import MyFriends from "./MyFriends";
import Upload... |
import React from 'react'
export default () => <button>Beep</button>
|
import ImmuLevel from './components/ImmuLevel.js';
export default ImmuLevel; |
import React from 'react';
import PropTypes from 'prop-types';
import DeleteItem from '../DeleteItem';
import {
Container, Title, TitleLink, Description, Tags,
} from './styles';
function ListItem({ item, handleDelete }) {
function renderTitle() {
if (item.link) {
return (
<TitleLink href={item... |
import React from 'react';
import { node } from 'prop-types';
import { makeStyles } from '@material-ui/styles';
import { Drawer, Grid } from '@material-ui/core';
const propTypes = {
children: node.isRequired,
};
export const WIDTH = 380;
const useStyles = makeStyles(theme => ({
root: {
flexShrink: 0,
wi... |
const Runtime = require('../../../lib/runtime');
const tap = require('tap');
const path = require('path');
tap.test('Twing runtime', function (test) {
let exports = {
compare: './twing/helper/compare',
echo: './twing/output-buffering',
flush: './twing/output-buffering',
getContextP... |
'use strict';
describe('lists location brands', function () {
var $scope;
var element;
var $location;
var brandFactory;
var locationFactory;
var splashFactory;
var q;
var deferred;
var $httpBackend;
beforeEach(module('myApp', function($provide) {
brandFactory = {
update: function () {
... |
class ElectronicDevice {
constructor(name) {
this.name = name;
this.on = false;
}
turnOn() {
if(this.on) {
console.log(`${this.name} já ligado`)
return;
}
this.on = true;
}
turnOff() {
if(!this.on) {
console.log(`... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.