text stringlengths 7 3.69M |
|---|
import { StyleSheet } from 'react-native';
import { color } from '../functions/providers/ColorContext';
const resourceStyles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
},
categoryContainer: {
borderRadius: 15,
padding: ... |
import gql from "graphql-tag";
export const SIGN_IN = gql`
mutation ($username: String!, $password: String!) {
signIn(login: $username, password: $password) {
token
me {
id
agentId
username
email
role
players {
id
agentId
... |
frist
Second
third |
let images = {
"cube": [
loadImage("cube-red"),
loadImage("cube-orange"),
loadImage("cube-yellow"),
loadImage("cube-green"),
loadImage("cube-cyan"),
loadImage("cube-blue"),
loadImage("cube-indigo")
],
"outline": loadImage("outline")
};
function loadI... |
export const GET_DEMO_REQUEST = 'GET_DEMO_REQUEST';
export const GET_DEMO_SUCCESS = 'GET_DEMO_SUCCESS';
export const SEARCH_MEDIA_ERROR = 'SEARCH_MEDIA_ERROR';
export const GET_OAUTH_GITHUB_TOKEN_START = 'GET_OAUTH_GITHUB_TOKEN_START';
export const GET_OAUTH_GITHUB_TOKEN_SUCCESS = 'GET_OAUTH_GITHUB_TOKEN_SUCCESS';
exp... |
import {IonContent, IonItem} from "@ionic/react";
const NavBar = props => {
return (
<IonContent style = {{position:"absolute", top: "0", left: "0", height: "50px", width: "100%"}}>
<IonItem > Tool </IonItem>
</IonContent>
)
}
export default NavBar;
|
angular.module("app")
.controller("mainCtrl", function($scope, mainService){
$scope.red = mainService.getcolor('red');
$scope.orange = mainService.getcolor('orange');
$scope.yellow = mainService.getcolor('yellow');
$scope.green = mainService.getcolor('green');
$scope.blue = mainService.getcolor('bl... |
'use strict'
const Proyecto = use('App/Models/Proyecto');
const Tarea = use('App/Models/Tarea');
const AutorizacionService = use('App/Service/AutorizacionService');
class TareaController {
async index({auth, params}){
const user = await auth.getUser();
const { id } = params;
const proyec... |
// black box goes here.
var pull = require('pull-stream');
var freeze = require('pull-freezed');
var meta_match = require('metamatch');
function black_box (strategy) {
if (! (this instanceof black_box)) {
return new black_box (strategy);
}
this.meta = new meta_match (strategy);
... |
import axios from "axios";
// const END_POINT = "http://localhost:8000";
const END_POINT = "https://eain-thone.herokuapp.com/";
export default axios.create({
baseURL: END_POINT,
});
|
import React from 'react';
import IconButton from 'material-ui/IconButton';
import ActionGrade from 'material-ui/svg-icons/action/grade';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const style = {
margin: 20
};
class FlatButtonExampleSimple extends React.Component {
constructor(props) {... |
/**
* 公用js
*/
/**
* 服务器地址
*/
var HOST_URL = "http://39.106.56.107:8888";
//var HOST_URL = "http://127.0.0.1:8888";
var IMAGE_URL = "http://39.106.56.107/images/";
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
f... |
function buildDetialBtn(article){
var detial_btn=document.createElement("button");
detial_btn.setAttribute("type","button");
detial_btn.setAttribute("class","btn btn-default btn-sm control");
detial_btn.setAttribute("data-toggle","collapse");
detial_btn.setAttribute("data-target","#demo"+ article.id);
detial_btn.... |
// This step in the build does a rough verification of the newly built dist file
// It simply imports dist/snacks.js and tries to run a few things
// This ensures we don't publish a release that will break others' code bases
// This also ensures that Snacks can be imported into a node environment
// basic importing wo... |
const actionTable = {
templateUrl: './app/components/mco/action-table/action-table.html',
controller: ActionTableController
};
angular.module('mco').component('actionTable', actionTable);
|
/*global define*/
define([
'jquery',
'underscore',
'backbone',
'templates'
], function ($, _, Backbone, JST) {
'use strict';
var NavView = Backbone.View.extend({
template: JST['app/scripts/templates/nav.ejs'],
tagName: 'section',
className: 'navs',
events: {
//'click .btn_close': ... |
import React from 'react'
import {Link} from 'react-router-dom'
export default function NotFound(){
return(
<>
<h1>404 page not found</h1>
<p>Voltar ao inicio<Link to="/">Voltar</Link></p>
</>
)
} |
import { createStackNavigator } from "react-navigation";
import LoginScreen from "./containers/screens/LoginScreen";
import SignUpScreen from "./containers/screens/SignUpScreen";
export default createStackNavigator({
SignInScreen: { screen: LoginScreen },
SignUpScreen: { screen: SignUpScreen },
}, {
headerMode... |
const { mockRepo } = require('../../helper');
const mockUser = mockRepo();
const mockIncident = mockRepo();
jest.mock('../../models', () => ({
User: mockUser, Incident: mockIncident
}));
const { incidents } = require('./incidents');
describe('/src/graphql/resolvers/raiseIncidentToUser.js', () => {
beforeEach(() =... |
// Start for couruse categories
// const b = document.querySelectorAll(".bg-design");
// const len = b.length;
// for(var i = 0; i < len; i++) {
// const result = document.querySelectorAll(".bg-design")[i];
// result.addEventListener('mouseenter' function(){
// result.style.background = 'red';
// });
// }
const c... |
// Declaring Variables
const menuThemeTrigger = document.getElementById("down-arrow");
const sailorDay = document.getElementById("theme-day");
const sailorNight = document.getElementById("theme-night");
const menuTheme = document.getElementById("theme-option");
const createGifosButton = document.getElementById("create-... |
const mongoose = require('mongoose');
//Schema del cliente, es el modelo de como son los objetos cliente
const studentSchema = mongoose.Schema({
firstName: {
type: String
},
lastName: {
type: String
},
id: {
type: String
}
});
//Se exporta el modelo para que pueda ser utilizado en app.js
//El p... |
const validBraces = (braces) => {
const validBraces = [];
let res = true;
[...braces].map((cur) => {
if (cur === "(" || cur === "{" || cur === "[") {
validBraces.push(cur);
} else {
const pop = validBraces.pop();
if (cur === ")" && pop !== "(") {
res = false;
} else if (cur... |
import git from '..'
import pkg from '../package.json'
describe('version', () => {
test('version', () => {
let v = git().version()
expect(v).toEqual(pkg.version)
})
})
|
export const state = () => ({
// This is the name.js store, with all the logic containing the random name generator,
// or the custom the visitor has chosen him or her self.
nameCurrent: "Name Your Setup",
// A database of random names saved in three parts
// 📝 this will later come from a real data base, bu... |
import { Navigation } from '../../../src/Navigation';
import Base from '../../../src/Base';
describe('Navigation', () => {
describe('.back', () => {
it('should resolve immediately if navigation is locked', () => {
const navigation = new Navigation();
navigation.locked = true;
expect(navigation.... |
let pageToken = {};
const endpoint='https://www.googleapis.com/youtube/v3/search';
function apiFunction(str,cb){
let formQuery = {
part: 'snippet',
key: 'AIzaSyBulISD75zhez62BB5L1BnZn7VllIUyAd4',
q: `${str}`
// pageToken: pageToken['current']
};
$.getJSON(endpoint, formQuery,cb);
}
// format
fu... |
/*
输入二叉树和一整数,打印二叉树中结点和为整数的所有路径。
路径:从根结点开始往下直到叶结点所经过的结点
每个路径就是一个数组,最终结果为二维数组
*/
function FindPath(root, expectNumber) {
var result = []
var path = []
if (!root) return result // 注意为空的情况,否则会报错:返回的结果值不对
dfsFind(root, expectNumber, result, path)
return result
}
function dfsFind(root, expectNumber, result, pat... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import md5 from 'crypto-js/md5';
import { login, handleToken } from '../actions';
import '../style/login.css';
class Login extends Component {
constructor(pro... |
/**
* Copyright 2009 Society for Health Information Systems Programmes, India (HISP India)
*
* This file is part of Inventory module.
*
* Inventory module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software... |
const Fibnacci = require("./Modules/Fibonacci");
const readline = require('readline');
var rl = readline.createInterface({
input:process.stdin,
output:process.stdout
});
rl.question("请输入你想要的输出长度:",function(n){
console.log(Fibnacci(n));
})
|
import './style'
import { urlFor } from '@kuba/router'
import h from '@kuba/h'
import Link from '@kuba/link'
import text from '@kuba/text'
function component () {
return (
<text.Span className='createanaccount__logIn' master xxs>Already have an account? <Link href={urlFor('logIn')}>Log in</Link></text.Span>
)
... |
$(document).ready(function () {
function getCookie(cname)
{
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++)
{
var c = ca[i].trim();
if (c.indexOf(name)==0) return c.substring(name.length,c.length);
}
... |
var challengers = require('./challenge.js')
function generateUUID() {
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c=='x' ? r : (r&0x3|0x8)).toString(16... |
function reverseString(hello){
var reverse = ""
for(var i = 0; i<hello.length; i++){
var char = hello[i];
reverse = char + reverse;
}
return reverse;
}
var hello = "Hello Bangladesh"
var result = reverseString (hello);
console.log(result); |
import * as DXFSolidObjectRenderer2D from "../view/render2D/dxfSolidObjectRenderer2D";
import CustomComponent from "../core/customComponent";
import FeatureSet from "./featureSet";
import * as Basic from "./basic";
const registeredFeatureSets = {};
const typeStrings = {};
import * as Registry from "../core/registry";
... |
(function() {
'use strict';
angular.module('app.peratiende.directivas', [
]).directive('peratiendecreate', peratiendeCreate)
.directive('peratiendelist', peratiendeList)
.directive('peratiendeupdate', peratiendeUpdate);
function peratiendeCreate() {
return {
scope: {},
templateUrl:... |
var fish = {
Fish: function(){
this.realx = Math.random() * map.width;
this.realy = Math.random() * map.height;
this.xv= 0;
this.yv= 0;
this.xa= 0;
this.ya= 0;
this.x= 0;
this.y= 0;
this.space_out = Math.random() * 60;
this.follower = M... |
const Validator = require("jsonschema").Validator;
Validator.prototype.customFormats.isFunction = function (input) {
return typeof input === "function";
};
Validator.prototype.customFormats.isFunctionOrString = function (input) {
return typeof input === "function" || typeof input === "string";
};
Validator.prototype.... |
/*
Being a bald man myself, I know the feeling of needing to keep it clean shaven.
Nothing worse that a stray hair waving in the wind.
You will be given a string(x). Clean shaved head is shown as "-" and stray hairs are shown as "/".
Your task is to check the head for stray hairs and get rid of them.
You should ret... |
import React, { Component } from 'react';
import 'bulma/css/bulma.css';
import '../App.css';
class AddNewFoodForm extends Component {
constructor(){
super();
this.state = {
error: "",
name: "",
calories: 0,
quantity: 0,
image: "",
}
}
handleSubmit(){
let {... |
const path = require(`path`);
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions;
return new Promise((resolve, reject) => {
const projectTemplate = path.resolve(
'src/templates/project.js'
);
resolve(
graphql(
`
{
allAirtable {
... |
import React, {Component} from "react";
import {ScrollView, StyleSheet, TouchableOpacity, View} from "react-native";
import HeaderWithBackButton from "./HeaderWithBackButton";
import {getAuthedAPI} from "../api";
import {ListItem, Text} from "react-native-elements";
import strings from "../strings";
import PropTypes fr... |
const defaultState = {
search_data:[]
}
export default (state=defaultState,action)=>{
switch(action.type){
case "SEARCH_ACT":
let searchState = JSON.parse(JSON.stringify(state));
searchState.data=action.data;
return searchState;
}
return state;
} |
import React, {Component} from "react";
import Grid from "@material-ui/core/Grid";
import Button from "@material-ui/core/Button";
import StatusGraphsGrid from "./StatusGraphsGrid";
class ServiceStatus extends Component {
constructor(props) {
super(props);
this.state = {
serviceData: {s... |
const schedule = require('node-schedule');
const stripe = require('stripe')(process.env.STRIPE_SKEY);
const User = require('../models/User');
const { USER_STATUSES } = require('../models/User');
const mailer = require('../helpers/mailer');
const CHARGE_DEFAULT_AMOUNT = 51;
const CHARGE_DIFF_DAYS = 7;
const CHARGE_TIME... |
const getSchema = require('../../src/lib/get-schema');
const schema = { type: 'string' };
test('should return the first type if there is content', () => {
expect(
getSchema({
requestBody: {
content: {
'application/json': {
schema,
},
'text/xml': {
... |
import logo from './logo.svg';
import './App.css';
import {Button, TextField} from '@mui/material'
import { useState } from 'react';
import { supplyChainDeliveryMan, supplyChainWareHouse } from './config/ethersUtil';
import { deliveryManAddress, receiverAddress } from './config/vars';
function App() {
const [state, ... |
'use strict';
const fs = require('fs');
const readline = require('readline');
const rs = fs.ReadStream('./popu-pref.csv');
const rl = readline.createInterface({ 'input': rs, 'output': {} });
const prefectureDataMap = new Map(); // key: 都道府県名 value: 集計データのオブジェクト
rl.on('line', (line) => {
const columns = line.split(... |
import React from 'react';
import Header from './header';
import Login from './login';
import Dashboard from './dashboard';
import ModifyProfile from './modify-profile';
import SwitchProfile from './switch-profile';
import CreatePost from './create-post';
import Settings from './settings';
import ViewPost from './view-... |
$(document).ready(function() {
adminicaUi();
adminicaForms();
adminicaMobile();
adminicaDataTables();
adminicaCalendar();
adminicaCharts();
adminicaGallery();
adminicaWizard();
adminicaVarious();
});
$(window).load(function(){
adminicaInit();
});
function pjaxToggle() {
if ( $.cookie('pjax_on') === "tru... |
import _ from 'romanize';
const transform = (numbers) => {
if (numbers === 10) {
return "X";
}
};
const transformRomanize = (numbers) => {
return _(numbers);
}
export {
transform,
transformRomanize
} |
const arr = [];
console.log(`현재 arr : ${arr}`)
setTimeout(() => {
console.log("데이터를 1개 추가합니다. push()")
arr.push("오은하");
console.log(`현재 arr : ${arr}`)
}, 1000);
setTimeout(() => {
console.log("데이터를 1개 추가합니다. push()")
arr.push("정예림");
console.log(`현재 arr : ${arr}`)
}, 2000);
setTimeout(() => {... |
var sites = require('./shuffle.js')
var images = require('./images.js')
var menu = require('./menu.js')
var overlay = require('./overlay.js')
sites.shuffleSites()
images.handleImagesLoad()
menu.addListeners()
overlay.addListeners('[info]', '[info-button]')
|
const siteName = 'WEBNOWNG';
const phoneNumbers = ['08138754586', '07018382371'];
const email = 'info@example.com';
const address = '20 Allen Avenue, Ikeja, Lagos State.';
const social = {
facebook:'https://www.facebook.com/IBM/',
twitter: 'https://twitter.com/IBM',
instagram: 'https://www.instagram.com... |
import React, { Component, Fragment } from 'react';
//import Dropdown from 'react-dropdown';
import 'react-dropdown/style.css';
import Content from './Content';
class BodyContainer extends Component {
constructor() {
super();
this.state = {
usersData: null,
currentContainerView:''
... |
import { shallow } from 'enzyme';
import HeaderTabs from './../../../src/components/HeaderTabs';
describe('HeaderTabs-spec', () => {
// TODO add click test, add style test
describe('render', () => {
it('should render HeaderTabs', () => {
const wrapper = shallow(<HeaderTabs />);
expect(
wrap... |
goog.provide('SB.Camera');
goog.require('SB.SceneComponent');
SB.Camera = function(param)
{
param = param || {};
SB.SceneComponent.call(this, param);
this.active = param.active || false;
var position = param.position || SB.Camera.DEFAULT_POSITION;
this.position.copy(position);
}
goog.inherits(SB.Camera, S... |
function isf(imghash){
if(!imghash){
return "";
}
var s1 = imghash.slice(0,1);
var s2 = imghash.slice(1,3);
var s3 = imghash.slice(3);
var s4 = imghash.slice(32);
return "http://fuss10.elemecdn.com/"+s1+"/"+s2+"/"+s3+"."+s4;
}
function addPrefix(part){
if(!part){
return "";
}
return "//fuss10.elemecdn.co... |
import {getResourse} from "../services/services";
function cards() {
//Меню рационов
class OneMenuTabElemet {
constructor(src, menuName, menuText, prise, alt, parentSelector, ...classes) {
this.src = src;
this.menuName = menuName;
this.menuText = menuText;
... |
import React, { Component } from 'react';
import '../App.css';
class componentwillMount extends Component {
componentWillMount() {
console.log("Hey this is Ronald Namwanza, am happy to be a software Engineer")
}
render() {
return (
<div className="page">
<h1>... |
/* FASTGAP https://github.com/FastGap/FastGap */
(function (window) {
// page load object
var PageLoad = window.PageLoad = {
ajxHandle: null
};
//load ajax
PageLoad.load = function (page) {
PageLoad.ajxHandle = $.get("pages/" + page, PageLoad.success);
};
//sucess load
PageLoad.success = function (conte... |
alert("Todos estan Muertos");
var Arma = prompt("Mira, un almacen, al parecer solo hay un hacha y una pistola, rapido toma un objeto");
var numeroAlazar = Math.round(Math.random());
alert("Un Zombie salvaje aparece, rapido utiliza tu " + " " + Arma);
if(numeroAlazar === 0 ){
alert("Tu "+ Arma + " fallo y e... |
/*
You know how sometimes you write the the same word twice in a sentence, but then don't notice that it happened?
For example, you've been distracted for a second.
Did you notice that "the" is doubled in the first sentence of this description?
As as aS you can see, it's not easy to spot those errors, especially if w... |
import React, {Component} from 'react';
import style from './index.module.scss';
class Point extends Component {
render() {
const cl = [style.default];
if (this.props.active) {
cl.push(style.active);
}
return (
<div className={cl.join(` `)}>
... |
import './style.css';
import React, { useEffect, useState } from 'react';
import { db } from './../../db';
import firebase from 'firebase/app';
import validator from 'validator';
import ReCAPTCHA from 'react-google-recaptcha';
export const FormMap = () => {
const [name, setName] = useState('');
const [select, s... |
"use strict";
var React = require('react');
;
function Form(_a) {
var _b = _a.children, children = _b === void 0 ? null : _b, handleSubmit = _a.handleSubmit;
return (<form onSubmit={function (e) {
e.preventDefault();
handleSubmit();
}}>
{children}
</form>);
}
exports.__esModule = t... |
/**
*
* Created by yunge on 16/10/28.
*/
const api = '/api';
const requestPath = (entityType) => {
const values = Object.keys(entityTypeConfig).map(key => entityTypeConfig[key].value);
if (values.indexOf(entityType) === -1) {
throw new Error(`unknown entityType: ${entityType}`);
}
return `$... |
const filter = document.querySelector('.filter')
const sort = document.querySelector('.sort-box')
const box = document.querySelectorAll('.foods > .food-category')
let foodWithPrice = []
for (const item of box) {
foodWithPrice.push([item.querySelector('.food-name').innerHTML, item.querySelector('.price').innerHTML.sp... |
Page({
data: {
currentTab: 0 //预定的位置
},
//点击滑动
bindchange: function (e) {
let that = this;
that.setData({
currentTab: e.detail.current
})
},
//点击切换,滑块index赋值
clickTab: function (e) {
let that = this;
if (that.data.currentTab === e.currentTarget.dataset.current) {
return... |
module.exports = function (grunt) {
// load all grunt tasks
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
express: {
options: {},
web: {options: {script: 'app.js'}}
},
watch: {
frontend: {
... |
var VisualizarRuta = (function () {
var sesion = false;
var listaPermisos;
var Ruta = new Array();
var con = 0;
var poly;
var markers = new Array();
var poly2;
var markers2 = new Array();
var map;
var lRutas;
var recorridos;
var lEsDto;
var velocimetro =... |
const parent = document.getElementById('parent')
console.log([parent])
const children = document.querySelectorAll('.child')
console.log('children', children)
const kids = document.getElementsByClassName('child')
console.log('kids', kids)
const third = document.querySelector('.child:nth-child(3)')
console.log(third)
... |
var Nano = require('nano'),
Promise = require('bluebird'),
program = require('commander'),
fs = Promise.promisifyAll(require('fs'));
program
.version('0.0.1')
.usage('[options] <file> <database>')
.option('-U, --url <url>', 'Couchdb url eg. http://username:password@domain:port')
.option('-F... |
import React from 'react';
const defaultProps = {
name: true,
};
class Droid extends React.Component {
renderName() {
if (!this.props.name) { return <noscript />; }
return (
<p className="text-center">
<span name="droid-name" className="label label-info">
{ this.props.droid.name ... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { fetchBooks } from "../actions/booksActions";
import {
Card,
CardImg,
CardText,
CardBody,
CardTitle,
CardSubtitle,
Button
} from "reactstrap";
class FetchBooks extends Component {
... |
var num1
var rs = require('readline-sync')
num1 = rs.question('Senha de acesso?')
if (num1 != 1234){
console.log('Acesso Negado')
}
else{
console.log('Acesso Liberado')
} |
/* eslint-disable react/prop-types */
/* eslint-disable no-unused-vars */
import React from 'react';
import styled from 'styled-components';
import Social from './Social';
const AboutStyle = styled.div`
text-align:center;
`;
const AboutAvatar = styled.div`
padding: 2em 0 0 0;
`;
const AboutImage = style... |
import React, { Component } from 'react';
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import AddProductToMenu from '../AddProductToMenu';
import ShowProducts from '../ShowProducts';
import NavBar from '../NavBar';
const INITIAL_STATE ... |
import React, { useState, useEffect } from "react";
import ChallengeCard from "./challengeCard";
import Tasks from "../challenges.json";
import { Button } from "antd";
import CreateForm from "./createForm";
const List = () => {
const [list, setList] = useState(Tasks);
const [voteOrder, setVoteOrder] = useState(fal... |
import React from 'react'
const Input = ({ val, callback, keyVal, placeholder, className, id, validateThis }) => {
/**
* Handles onChange
* @param value
* @private
*/
const _onChange = ({ target: { value } }) => {
callback(value, keyVal)
}
return (
<input
type="text"
onChange=... |
$.backstretch(["https://via.placeholder.com/2000X1333//88929f/5a6270C/O https://placeholder.com/", "https://via.placeholder.com/2000X1333//88929f/5a6270C/O https://placeholder.com/", "https://via.placeholder.com/2000X1333//88929f/5a6270C/O https://placeholder.com/"], {
duration: 3000,
fade: 1000,
}); |
import React from "react"
import "./input.css"
class Input extends React.Component{
state = {number: 100}
handleSubmit = (e) =>{
e.preventDefault()
this.props.sendInput(parseInt(this.state.number))
}
componentDidMount(){
this.setState({number: parseInt(this.props.placeHolder)})
... |
export function toggle () {
return {
type: 'TEST_ACTION'
}
} |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import copy from 'copy-to-clipboard';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import cx from 'classnames';
import {
Modal as ... |
frappe.require('/assets/css/charts.css');
frappe.require('/assets/js/charts.js').then(() => {
window.chart = new frappe.Chart("#my-chart", {
'data': {
'title': 'My Awesome Data Analytics',
'labels': ['Monday', 'Tuesday', 'Wednesday', 'Thursday'],
'datasets': [
... |
var express = require('express');
var router = express.Router();
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var session = require('express-session');
var expressValidator = require('express-validator');
var cookieParser = require('cookie-parser');
var bodyParser ... |
'use strict';
describe('Airport', function(){
var airport;
var plane;
beforeEach(function(){
airport = new Airport();
plane = jasmine.createSpyObj('plane',['land']);
});
it('has no planes by default', function(){
expect(airport.hangar).toEqual([]);
});
it('can clear planes for landing', fun... |
import React from 'react';
import { View, ActivityIndicator, FlatList, Linking, TouchableHighlight } from 'react-native';
import { Text, Card } from 'react-native-elements';
const axios = require('axios');
const DIAGNOSIS = {
Burn: {
text: "Hold the burn under cool running water for several minutes. Cover... |
$('#retry-btn').mousedown(function(){
$('#retry-btn').css('width', parseFloat($('#retry-btn').css('width')) - 10 + "px");
});
$('#retry-btn').mouseup(function(){
$('#retry-btn').css('width', parseFloat($('#retry-btn').css('width')) + 10 + "px");
//setTimeout(function(){
window.location.href = "game... |
module.exports = function(dummy, anaConfig, req, res, callback) {
try {
var input = {};
var intentName = req.body.result.metadata.intentName;
var appName = req.body.result.parameters.epm_application;
if (appName == "" || appName == null)
appName = "vision";
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Auxiliary from '../../hoc/Auxiliary';
import Burger from '../../components/Food/CustomBuild/Burger/Burger';
import BuildController from '../../components/Food/CustomBuild/Burger/BuildController/BuildController';
import Modal from '... |
jest.mock('sequelize');
const Model = require('./02.04-model');
test('It should not throw when passed a model containing an empty list of meetings', () => {
const model = new Model();
model.meetings = [];
expect(model.isAvailable.bind(model, new Date(Date.now()))).not.toThrow();
});
test('It should not throw wh... |
var button = document.getElementById("button");
var expression = new Expression();
var history = {
}
button.onclick = function() {
var clickBut = event.target;
var resultValue = 0;
if (! (clickBut.nodeName === "SPAN") ) return false;
// 将点击按钮显示
var displyContent = document.getElementsByClassName("... |
(function() {
'use strict';
angular.module('yrzb')
// 银行卡、充值、还款等涉及钱的路由
.config(function($stateProvider, $urlRouterProvider) {
//Provider方法
function stateProvider(){
var args = Array.prototype.slice.call(arguments);
var state = args[0];
var noCtrl = args[1].substring(0,1) ==... |
import React from "react";
const Elevliste = () => {
return (
<div>
<button onClick={() => { window.location.assign("/") }}>Tilbake</button>
</div>
)};
export default Elevliste; |
console.log("hilo");
// eslint-disable-next-line no-undef
const $ = jQuery;
$(document).ready(function () {
const toggleShowDueBack = function (event) {
console.log(this);
console.log(this.value);
const target = $("#status")[0];
console.log(target);
console.log(target.value);
if (target.val... |
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();
exports.helloWorld = functions.https.onRequest((request, response) => {
functions.logger.info("Hello World logs!", {structuredData: true});
response.send("Hello World");
})
exports.helloWorld2 = fu... |
const Registro = (update) =>{
const formulario = $('<div class="cont-form"></div>');
const divLogo1 = $('<div class="logo-form"></div>');
const logo1 = $('<img src="img/logo.png">');
const form = $('<div class="form"></div>');
const divLogo = $('<div class="logo margin-bottom"></div>');
const logo = $('<im... |
import React, { useState, useEffect } from "react";
import List from "./List";
import ListView from "./ListView";
import db from "../firebaseConfig";
import Switch from "@material-ui/core/Switch";
import { Button, Col, Row } from "react-bootstrap";
import "../App.css";
const MainBoard = () => {
const [view, setView]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.