text stringlengths 7 3.69M |
|---|
import React, { useState } from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity,
ScrollView,
ImageBackground,
ToastAndroid,
} from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import auth from '@react-native-firebase/auth';
import firestore from '@r... |
import firebase from 'firebase/app';
import 'firebase/firestore';
import 'firebase/auth';
//todo: make auth into server
//todo: make google auth into our own server
//todo: make facebook and github auth
const firebaseConfig = {
apiKey: "AIzaSyDB-8RJiLIRChfSl8f2lfqvobEv6KxL3T4",
authDomain: "react-clothes-db-172... |
var keymap_8h =
[
[ "Keymap", "structKeymap.html", "structKeymap" ],
[ "KeyEvent", "structKeyEvent.html", "structKeyEvent" ],
[ "Binding", "structBinding.html", "structBinding" ],
[ "EventBinding", "structEventBinding.html", "structEventBinding" ],
[ "MUTT_UNBIND", "keymap_8h.html#a3056cbe028c833095... |
import Vue from 'vue'
import App from './App'
import home from './pages/home/home.vue'
Vue.component('home',home)
import person from './pages/person/person.vue'
Vue.component('person',person)
import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)
Vue.config.production... |
define(function(require) {
'use strict';
var localForage = require('localforage');
var guuid = require('./guuid');
var File = require('./file');
var metakey = 'metadata|';
var storage = navigator.webkitPersistentStorage;
var isChrome = !!storage;
function request(size) {
return new Promise(function... |
import {
ERROR,
WAIT,
LOGIN,
LOGOUT,
REGISTER_DONE
} from '../actions/userActions';
const initState = () => {
let user =null;
if(sessionStorage.getItem("user")){
user = JSON.parse(sessionStorage.getItem("user"));
}
return ({
wait: false,
err: null,
... |
var http = require('http');
var config = require('./smart-config.json');
var HttpDispatcher = require('httpdispatcher');
var dispatcher = new HttpDispatcher();
var PostCount=0;
function handleRequest(request, response){
try {
console.log("Requested URL: " + request.url);
dispatcher.dispatch(request... |
import React, { PureComponent } from 'react';
import styled from 'styled-components';
import { db } from '../../firebaseConfig';
import { Content } from '../../components/MainWrapper';
import Mosaic from '../../components/Mosaic/signup';
import Field from '../../components/FormField';
const Step1 = styled.div`
disp... |
new Vue({
el: '#app',
data: {
mycolor: '#000000',
backColor: '#000000'
},
methods: {
generator(event){
this.mycolor = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
this.backColor = this.mycolor
}
}
})
|
import chai from 'chai';
import chaiHttp from 'chai-http';
import jwt from 'jsonwebtoken';
import dotenv from 'dotenv';
import index from '../src/index';
chai.use(chaiHttp);
chai.should();
chai.expect();
dotenv.config();
const userToken = jwt.sign({
id: 3,
username: 'testUser',
email: 'user@gmail.com',
role:... |
var User = require('../models/user');
var Post = require('../models/post');
module.exports = function(app) {
app.get('/user/:id', function(req, res) {
var id = parseInt(req.params.id);
User.getUsers({_id: id},{}, function(err, users) {
if (err) {
return res.send(err);
... |
import FirebaseApi from "./FirebaseApi";
import ZomatoApi from "./zomato/ZomatoApi";
const cacheInterval = 15 * 60 * 1000;
class RestaurantProvider {
static getDailyMenu(restaurantId, source, useCache = true) {
if (!useCache) {
return RestaurantProvider.getDailyMenuFromApi(restaurantId, source... |
import React from 'react';
import { Link } from 'react-router-dom';
import axios from 'axios';
import { Redirect } from 'react-router-dom';
import Header from './Header.jsx';
import CountDownRoom from './CountDownRoom.jsx';
class Lobby extends React.Component {
constructor(props) {
super(props);
this.state... |
/**
* Portfolio.js
*
* @description :: A model definition represents a database table/collection.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
... |
/**
* @author Ignacio González Bullón - <nacho.gonzalez.bullon@gmail.com>
* @since 11/12/15.
*/
(function () {
'use strict';
angular.module('corestudioApp.group')
.controller('GroupController', GroupController);
GroupController.$inject = ['Alerts', '$uibModal', 'Config', 'Group', 'translateDays... |
import Subscription from './subscription';
export default class CompositeSubscription extends Subscription {
constructor(...subscriptions) {
super();
this._subscriptions = subscriptions;
}
add(subscription) {
this._subscriptions.push(subscription);
return this;
}
remove(subscription) {
... |
import React from 'react';
import classes from './TopBar.module.css';
import { Link } from "react-router-dom";
const TopBar = () => {
return(
<>
<div className = {classes.TopContainer}>
<div className = {classes.innerContainer}>
<h3>Edyoda</h3>
... |
SubmitIdea({
isNew: true,
render(){
<div>
<NewIdea b="if: isNew" />
<Submitted b="if: !isNew" />
</div>
}
}) |
import React, { Component } from 'react';
import { StyledNavigation
, StyledNavigationButton
} from '../Styles/styles'
const Jazyx = Session.get("Jazyx")
export default class Navigation extends Component{
constructor(props) {
super(props)
}
render() {
return (
<StyledNavigation>
... |
import React,{useState} from 'react';
import Wishlist from '../components/Wishlist';
function Address() {
const showtab = (e, i) => {
const curr = [];
curr[i] = curr[i] ? 0 : 1;
setopenTab(curr);
};
const [openTab, setopenTab] = useState([1, 0, 0, 0]);
return (
<div className="page-content">
<div cl... |
/* Skriv din kod här */
const url = 'https://restcountries.eu/rest/v2/all';
fetch(url).then(
function (response) {
return response.json()
}
).then(
function (data) {
let mainCountries = [];
console.log(data[0])
for (i = 0; i < 3; i++) {
let ran = Math.floor(Mat... |
var listaArquivos = divPagina.getElementsByTagName("ul")[0],
formArquivos = divPagina.getElementsByTagName("form")[0],
listaEnvio = divPagina.getElementsByTagName("ul")[1],
botaoApagar = document.getElementById("botao-apagar");
//Listar os arquivos dos administradores
validarCategoria("admin").then(()=>{
... |
// Strict Mode On (엄격모드)
"use strict";
"use warning";
/**
* @author Lazuli
*/
var ResultPopup = new function() {
var INSTANCE = this;
var frameCnt = 0;
var focus = 0;
var result = 0;
var grade = 0;
var isLastStage = false;
var firstReward;
var starReward;
var ... |
import React from 'react'
import { CartesianGrid, Line, LineChart, YAxis } from 'recharts'
export default class Advantage extends React.Component {
static defaultProps = {
data: [],
}
render() {
return (
<div className='liveMatchChart'>
<header>
<h4 className='title'>Gold Advan... |
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Row, Col, Icon } from 'antd';
import rekitLogo from '../../images/rekit-logo.svg';
import * as actions from './redux/actions';
import utils from './utils';
import { RecentProjects } from... |
import { AbstractList } from './AbstractList';
export class WordList extends AbstractList {
modelName = 'words';
} |
import React, {Component} from 'react';
import axios from 'axios';
import logo from '../assets/auth_logo.png';
import './Home.css';
class Home extends Component {
constructor(){
super()
this.state = {
userName: '',
password: '',
}
}
setName(name) {
th... |
config({
'editor/plugin/indent': {requires: ['editor','editor/plugin/indent/cmd']}
});
|
import {GraphQLServer, PubSub} from 'graphql-yoga'
import {MongoClient} from 'mongodb';
import 'babel-polyfill';
import Query from './resolvers/Query'
import Mutation from './resolvers/Mutation'
import Publication from './resolvers/Publication'
import Subscription from './resolvers/Subscription'
/**
* Connects to Mon... |
export {default as useTags} from "./useTags"
export {default as useAbout} from "./useAbout"
export {default as usePosts} from "./usePosts"
export {default as useStore} from "./useStore"
export {default as useEpisode} from "./useEpisode"
export {default as useEpisodes} from "./useEpisodes"
export {default as usePlaylist... |
var _ = require('lodash'),
screen = {};
exports = module.exports = screen;
_.mixin({
'underscore': function (string) {
return string.replace(/([A-Z])/g, function ($1) { return "_" + $1.toLowerCase(); });
}
});
screen.screenFromWindow = function () {
this.stack.push(function (window) {
if (_.isUndef... |
//check Node's event-driven
var http = require('http');
var server=http.createServer();
server.on('request',function(request,response){
console.log('request event');
response.writeHead(200,{'Content-Type':'text/plain'});
response.end('Hello World\n');
});
server.on('connection',function(){
con... |
const express = require('express');
const authController = require('../controllers/authController');
const userController = require('../controllers/userController');
const router = express.Router();
router.route('/signup').post(authController.signUp);
router.route('/login').post(authController.login);
router.route('/... |
const Account = require("../models/account");
const passport = require("passport");
//this file handles all of the register page's routing
//gets the page
exports.registerPageGET = (req, res) => {
res.render("register", {});
};
//post request to register users
exports.userRegisterPOST = (req, res) => {
Account.r... |
import React, { Component } from 'react'
import { reduxForm, Field } from 'redux-form'
import { connect } from 'react-redux'
import * as actions from '../../actions'
import renderInput from '../../components/render_input'
class Signup extends Component {
handleFormSubmit(formProps){
this.props.signupUser(formProps,... |
$(document).ready(function() {
var swiper = new Swiper('.slide1', {
slidesPerView: 3,
spaceBetween: 30, /* 한쪽 방향 margin */
slidesPerGroup: 3,
loop: true,
loopFillGroupWithBlank: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
... |
const internalError = (message, internalCode) => ({
message,
internalCode
});
exports.DATABASE_ERROR = 'database_error';
exports.databaseError = message => internalError(message, exports.DATABASE_ERROR);
exports.DEFAULT_ERROR = 'default_error';
exports.defaultError = message => internalError(message, exports.DEFA... |
const { create } = require('ipfs-http-client');
const client = create("https://ipfs.infura.io:5001/");
(async () => {
const rage = {
bonus: {
attack: 50
}
}
const rageCID = await client.dag.put(rage);
const shield = {
bonus: {
defense: 50
}
}
const shieldCID = await client.dag... |
var VCObj = require('../vcobj.js');
var util = require('../util.js');
var assert = require('assert');
var HashDB = require('../hashDB.js');
var DummyKVS = require('../keyvalue.js');
describe('VCObj', function(){
describe('createObject(cls, s0, cb(err, h0))', function(){
it('should create an object state hash for ... |
import React from 'react';
import { ImageBackground, Dimensions } from 'react-native';
import PropTypes from 'prop-types';
import { Header } from 'react-navigation';
import appStyle from '../../const/appStyles';
function BackgroundImage(props) {
const { children, dim, stackHeader } = props;
const { height } = Di... |
import React from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faHeart, faCompass, faUser} from '@fortawesome/free-regular-svg-icons';
import {faInstagram} from '@fortawesome/free-brands-svg-icons';
const SearchBar = () => {
return (
<div className="search-bar">
<div cl... |
//简单的单向链表
function LinkedList() {
var head = null;
var tail = null;
this.counter = 0;
this.add = function(obj) {
var node = new Node(obj);
if (this.head == null) {
this.head = node;
this.tail = this.head;
} else {
this.tail.next = node;
this.tail = node;
}
this.counter++;
};
this.removeAt =... |
noseX=0;
noseY=0;
rsX=0;
rsY=0;
difference=0;
leftWristX=0;
rightWristX=0;
mainX=0;
function preload() {
img=loadImage('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQWONCW2eRNoYkf81opwW7Jp05qJiuY-Pd2WA&usqp=CAU');
}
function setup() {
vedio=createCapture(VIDEO);
vedio.size(550,500)... |
const fs = require("fs");
console.log("start"); // imp
let f1KaData = fs.readFileSync("./f1.txt"); // 100gb file
console.log(f1KaData+"");
// it is not dependent on f1KaData
console.log("end"); // imp |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _users = require("../models/users.model");
var _users2 = _interopRequireDefault(_users);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var controller = {};
controller.find = async fu... |
// find the list on the page
const toDoList = document.querySelector("#to-do-list");
// listen for a button click from the user
const addItemForm = document.querySelector("#add-item");
// add event listener to the submit button
addItemForm.addEventListener("submit", addNewItem);
// grabs audio files to be played
const... |
(function() {
'use strict';
angular
.module('simplesdlcApp')
.controller('StoryDialogController', StoryDialogController);
StoryDialogController.$inject = ['$timeout', '$scope', '$stateParams', '$uibModalInstance', '$q', 'entity', 'Story', 'Product', 'Release', 'User', 'Sprint'];
funct... |
(function () {
"use strict";
angular.module("app", ["app.templates", "ngRoute", "ngSanitize", "app.home", "app.game", "app.results"]);
angular.module("app.common", []);
angular.module("app.home", ["app.templates", "app.common"]);
angular.module("app.game", ["app.templates", "swipe", "app.common"]);
... |
import React, { useContext } from 'react';
import Note from './Note';
import NotesContext from '../context/notes';
const NoteList = () => {
// Return the notes state from the current context value
// https://reactjs.org/docs/hooks-reference.html#usecontext
const { notes } = useContext(NotesContext);
// Maps e... |
import utilities from '../../helpers/utilities';
import './home.scss';
const homeComponent = () => {
const domString = '<h1>Welcome to Pickterest: The Pinterest For Your Guitar Gear Addiction</h1>';
utilities.printToDom('home', domString);
};
export default { homeComponent };
|
'use strict'
const gulp = require("gulp");
const foos = require("./tasksFoo");
const bs = require("browser-sync").create();
let build = foos.build("builds/dev/**/*.*", "builds/prod");
let sass = foos.sass("builds/dev/**/*.scss", "builds/prod");
let lint = foos.lint("./builds/dev/**/*.js", "./builds/prod");
let init = f... |
const path = require('path');
const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const isProduction = typeof process.env.NODE_ENV !== 'undefined' && process.env.NODE_ENV === 'production';
const mode = isProduction ? 'pro... |
import React from "react";
const StoriesCard = props => {
return (
<div className="row">
<div className="story">
<figure className="story_shape">
<img
className="story_img"
src={props.storyImage}
alt={props.storyAlt}
/>
<figcaption class... |
require('dotenv').config({ path: '../.env' })
const express = require('express');
const router = express.Router();
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const Cloudant = require('@cloudant/cloudant');
const { validate_login } = require('../classes/validators');
router.post('/', async ... |
import React, { Component } from "react";
import QueryService from "../../services/queryServices";
export default class RaiseQuery extends Component {
constructor(props) {
super(props);
this.queryService = new QueryService();
this.state = {
queries: {
name: props.name,
email: props.... |
import React, { Component } from 'react'
import { StatusBar, View, StyleSheet } from 'react-native'
import { connect } from 'react-redux'
import Permissions from 'react-native-permissions'
import { createAppContainer, createStackNavigator } from 'react-navigation'
import { Icon } from 'react-native-elements'
import { c... |
/**
* octopus.js
* 2017-04-18
*
* @author: Robert Becker <becker.robert.93@gmail.com>
* @version: 1.0.0
*/
/**
* Octupus
*
* @copyright: Robert Becker <becker.robert.93@gmail.com>
*/
/**
* {class} Octpus
*/
var Octopus = function(settings){
/**
* Config of Octopus
*/
var config = {
debugging :... |
// Fullstack HQ
// Part 1
// Using what you now know about scope, adjust the code below so it prints out the correct message: "Fullstack HQ is at Planet Earth, United States, New York State, New York City".
var planet = 'Planet Earth,';
outerFunction();
function outerFunction(){
var country = 'United States,';
... |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, hashHistory } from 'react-router'
import Layout from './Layout';
import Welcome from '../components/Welcome';
import ItemsList from '../components/ItemsList';
import Editor from '../components/Editor';
clas... |
/**
* Created by Hew4803 on 6/7/17.
*/
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
const RepoDetails=(props)=>{
//display only - no state
console.log('details');
console.log(props);
return(
<div id="repoList" className="row text-center">
<h3>{pro... |
import React, {useEffect} from 'react'
import {Route} from 'react-router-dom'
import {useGitHubContents} from 'Hooks/useGitHubContents'
import DataSourceForm from 'Components/DataSourceForm'
import Browse from './Browse'
import Add from './Add'
const Resources = () => {
const either = key => defaultValue => (
... |
const object = document.querySelector("div");
let movement = false
let offsetX;
let offsetY;
object.addEventListener("mousedown", (e) => {
console.log("klkik")
object.style.backgroundColor = "yellow"
movement = !movement;
offsetX = e.offsetX;
offsetY = e.offsetY;
object.style.borderRadius = "5... |
const TennisGame = require("../main/tennisGame");
test("each player has 0 points at the beginning of the game", () => {
const game = new TennisGame();
const points = game.getScore();
const expectedPoints = {
players: [
{
player1: {
Name: "Ben",
... |
$(document).ready(() => {
$('#role-btn').on('click', event => {
if ($('#role-btn').text() == 'User') {
$('#role-btn').html('Organizer');
$('#role-input').prop('value', 'O');
} else {
$('#role-btn').html('User');
$('#role-input').prop('value', 'U');
... |
function solve(input){
// class Employee{
// constructor (firstName, lastName, personalId){
// this.firstName = firstName,
// this.lastName = lastName,
// this.personalId = personalId
// }
// }
for (let i = 0; i < input.length; i++) {
let n... |
function validateFilesUpload() {
var fuData = $("#photoAlbum");
var k = 0;
var j = 0;
for (var i = 0; i < fuData.get(0).files.length; i++) {
var fileUploadPath = fuData.get(0).files[i].name;
var extension = fileUploadPath.substring(fileUpl... |
export function setup(api, nodemiral) {
if (!api.getConfig().wekan) {
console.log('No setting in config for Wekan');
return;
}
const sessions = api.getSessions(['wekan']);
const list = nodemiral.taskList('Setup Wekan');
list.executeScript('Setup Environment', {
script: api.resolvePath(__dirname... |
import _ from 'lodash';
import AccessibilityModule from '@curriculumassociates/createjs-accessibility';
export default class MultiListBox extends createjs.Container {
constructor(options, width, height, tabIndex) {
super();
_.bindAll(this, 'onFocus', 'onBlur', '_onClickUp', '_onValueChanged');
Accessibil... |
import React from 'react'
const SearchResult = ({ title, websiteUrl, description }) =>
<div id="search-result">
<div id="result-1" className="result">{title}</div>
<div id="result-2" className="result">
{websiteUrl}
{ websiteUrl && <span style={{ fontSize: 8 }}> ▼</span> }
</div>
... |
import React, {Component} from 'react'
import './table.css';
const TableHeader = () => {
return (
<thead>
<tr>
<th>Title</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
)
}
const TableBody = (props) => {
const rows = props.taskData.map((row, ... |
function gameserver(port) {
const utils1 = require("./modules/IMPmodules/util")
const util = new utils1()
const vector = require('victor');
const ipban = require("./banips.js")
const devsip = require("./devip.js")
const writer1 = require("./modules/IMPmodules/writer.js");
const writer = new writer... |
import PropTypes from 'prop-types'
import React from 'react'
import { getProp } from 'services/utils/mapper'
import * as styles from './styles'
const List = ({
items, keyProp, Component, itemStyle, itemMapper, containerStyle,
}) => (
<ul css={[styles.listBaseStyle, containerStyle]}>
{items.map(itemMapper).map... |
db.superheroes.find({"aspects.eyeColor":"green"}).pretty() |
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw n... |
"use strict";
const HELP_COMMAND = "help",
LISTEN_COMMAND = "listen",
VERSION_COMMAND = "version";
module.exports = {
HELP_COMMAND,
LISTEN_COMMAND,
VERSION_COMMAND
};
|
document.onclick=hideDrop;
var fld1,fld2,fld3;
var frameName;
function showDrop(sImg,sFld1,sFld2)
{
var cf=document.getElementById(frameName);
var oImg=document.getElementById(sImg);
if(!oImg){alert("控制对象不存在!");return;}
if(!sFld1){alert("输入控件未指定!");return;}
fld1=document.getElementById(sFld1);
if(!fld... |
// Teatros
var teatrosQuery = 'select ?nombre ?lat ?long ?tieneEnlaceSIG where {?uri a om:Teatro. ?uri rdfs:label ?nombre.?uri geo:lat ?lat.?uri geo:long ?long OPTIONAL{?uri om:tieneEnlaceSIG ?tieneEnlaceSIG.}}'
// Cines
var cinesQuery = 'select ?nombre ?lat ?long ?tieneEnlaceSIG where{?uri a om:Cine. ?uri rdfs:label ... |
import SourceApi from './api'
import SourceParser from './parser'
export {
SourceApi,
SourceParser
}
|
const inert = require(`inert`);
const Hapi = require(`hapi`);
const fs = require(`fs`);
const Path = require(`path`);
const shortid = require(`shortid`);
const qrcode = require(`qrcode-generator`);
let tls = false;
{
const init = () => {
if (process.env.NODE_ENV === `development`) {
tls = {
key: ... |
module.exports = {
site_name: "黄丁智的博客",
keywords: "web全栈开发 爱生活",
nickname:"蓝山小智",
db: "mongodb://127.0.0.1/qtdui",
admin: {
username: 'admin',
password: '123456tb'
}
}
|
import React from 'react';
import styled from 'styled-components';
import Filter from '../../../../components/Filter';
const filters = [
{
id: 1,
type: 'categoria',
values: [
'impresoras',
'sistemas continuos',
'cartuchos recargables'
]
},
{
id: 2,
type: 'marca',
val... |
import React, { Component } from 'react'
import Home from './Home'
import Shows from './Shows'
import Music from './Music'
import Writings from './Writings'
import Footer from './Footer'
import '../static/text-decorations.css'
class App extends Component {
constructor(props) {
super(props)
}
render() {
... |
[{"locale": "es"}, {
"key": "F",
"names": ["F", "F.", "°F"],
"mappings": {"default": {"default": "Fahrenheit"}}
}, {"key": "C", "names": ["C", "°C"], "mappings": {"default": {"default": "centígrados"}}}, {
"key": "K",
"names": ["K", "°K"],
"mappings": {"default": {"default": "Kelvin"}}
}]
|
import React from 'react';
import { View,Text,TouchableOpacity } from 'react-native'
import Spinner from '../Spinner'
import styles from './styles'
import props from './props';
const Button=({
containerStyle,
disabledStyle,
buttonStyle,
titleStyle,
loadingStyle,
title,
onPress,
loading,
loadingColor,... |
import { createSelector } from 'reselect';
import { selectCurrentDate } from '@/containers/DateSelector/selectors';
import { toPrecision } from '@/utils/formatData';
import { withDataHashKey } from '@/utils/hashData';
import { STATE_KEY } from './constants';
import { initialState } from './reducer';
const selectStat... |
import Vue from 'vue';
import Vcharts from 'v-charts'
Vue.use(Vcharts);
export default new Vcharts({
});
|
import { App, mapStateToProps, mapDispatchToProps } from './App';
import React from 'react';
import { shallow } from 'enzyme';
jest.mock('../../thunks/fetchProjects')
jest.mock('../../thunks/fetchPalettes')
describe('App Container', () => {
describe('App', () => {
let wrapper
const mockError = "Something we... |
class CardFactory {
constructor() {
// もうなんでもアリになるから微妙…
// 振る舞いだけ変更するなら、関数を引数で上書きするのはアリ
// 内部で保持する状態を変更するなら、大人しく継承する方が良い
this._construnctor(this)
}
create(owner) {
const product = this.createProduct(owner)
this.registerProduct(product)
return product
... |
import preloader from '../../../image/831.gif'
import React from 'react'
let Preloader=()=>
{//debugger
return (
<div>
<img src={preloader}/>
</div>
)
}
export default Preloader; |
'use strict';
// Setting up route
angular.module('core').config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
// Redirect to home view when route not found
$urlRouterProvider.otherwise('/');
// Platform state routing
$stateProvider
// Parent state: p... |
const fs = require('fs');
const globals = require("../globals.json");
const globalsFunction = require("../globalFunc");
var md5 = require('md5');
const { check, validationResult } = require('express-validator');
const { json } = require('body-parser');
const mongodb = require('mongodb');
const multer = require('multer... |
const btn1=document.getElementById("admin");
const btn2=document.getElementById("rep");
const btn3=document.getElementById("cus");
const div1=document.getElementById("div1");
const div2=document.getElementById("div2");
const div3=document.getElementById("div3");
btn1.onclick=function(){
div1.style.visibility="visible"... |
angular.module("app").factory("mvManufactureCUD", function ($q, mvManufacture) {
return {
createData: function(newData) {
var data = new mvManufacture(newData);
var dfd = $q.defer();
data.$save().then(function (response) {
dfd.resolve(response);
... |
const Validator = require('validator');
const isEmpty = require('./is-empty');
module.exports = function validatePostInput(data) {
let errors = {};
data.reason = !isEmpty(data.reason) ? data.reason : '';
data.nameOfActor = !isEmpty(data.nameOfActor) ? data.nameOfActor : '';
console.log(data);
if (Valid... |
function b64toBlob(b64Data, contentType, sliceSize) {
contentType = contentType || '';
sliceSize = sliceSize || 512;
var byteCharacters = atob(b64Data);
var byteArrays = [];
for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
var slice = byte... |
import React,{Component} from 'react';
import {withRouter} from 'react-router-dom';
import AuthServices from './AuthServices/AuthServices';
import './Styling/NavBar.css';
/*
This is the NavBar component
*/
class NavBar extends Component{
constructor()
{
super()
this.Auth=new AuthServices();
... |
(function() {
'use strict';
angular
.module('jhipsterApp')
.controller('SavingsAccountDetailController', SavingsAccountDetailController);
SavingsAccountDetailController.$inject = ['$scope', '$rootScope', '$stateParams', 'entity', 'SavingsAccount', 'BankAccount'];
function SavingsAccou... |
var main;
Ext.QuickTips.init();
Ext.ns('App');
window.Global = window.Global || {};
Global=Ext.apply(Global, {
iframe:false,
openExtAppNode:function(node,e){
App.main.openExtAppNode.call(this,node,e);
}
});
function menuClick(node, e) {
if (node.attributes.appClass) {
var script = node.attributes.script|... |
(function(){
/**
* @description creates a grid with specified height and width
*/
function makeGrid() {
var colorSelected = document.getElementById("colorPicker").value,
gridWidth = document.getElementById("input_width").value,
gridHeight = document.getElementById("input... |
$(document).ready(function() {
// Referencias a los objetos a utilizar
var wrapper = $('#wrapper-home'),
heading = $('#wrapper-home h1'),
subheading = $('#wrapper-home h2'),
text = $('#wrapper-home p'),
intromockup = $('#wrapper-home img.bg-mockup'),
bglogo = $('#wrapper... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.