text
stringlengths
7
3.69M
const dataFormatter = require('./helpers/dataFormatter') const offchain = require('./helpers/offchain') const ClaimManager = artifacts.require('ClaimManager') const ScryptVerifier = artifacts.require('ScryptVerifier') contract('ClaimManager', function (accounts) { const steps = 2050 const claimDeposit = 1 cons...
// Your server.js file should require the basic npm packages we've used in class: express, body-parser and path. var app = require("express")(); var bodyParser = require("body-parser"); var path = require("path"); var routeDir = path.join(__dirname, "app", "routing"); var apiRoutes = require( path.join(routeDir, "apiR...
var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/ninjaGold'); const gameSchema = new mongoose.schema({ logs: [{type: Schema.Types.OjbectId, ref: 'Log'}] }, {timestamps: true}); var Game = mongoose.model('game', gameSchema); const logSchema = new mongose.schema({ game: {type: Schema.T...
import React, { Component } from 'react'; import { NavLink } from 'react-router-dom'; //import '../qazy.min.js'; import './Portfolio.css'; import dummy_png from '../assets/img/dummy.png'; /** * Component: Portfolio * Props: dataImage, dataAuthor, dataCategory, dataPublished, dataExcerpt */ class Portfolio extends ...
var mongodb = require('mongodb'); var MongoClient = mongodb.MongoClient; var url = 'mongodb://localhost:27017/haohuola'; var perPageNumber=20; exports.index = function(req, res) { //首页 var home=require('../routes/home'); home.run(req,res,'home'); } exports.publish = function(req, res) { var publish=require('../rout...
// mouse = [DomObject, position, direction, memorizedMaze, directionWheel]; // function Theseus(maze, mouse){ // 1st level function function explorationStrategy(maze, mouse){ goal = false; wheel = 3; while(!goal){ // checking for directionWheel rotation (+90°) due to previous vector memorized in curre...
// 3. Agregando Webpack // Sintaxis de CommandJS // crear archivo webpack.config.js //<script src="public/js/bundle.js"></script> // Para matar un servicio en la terminal, hacer click en el tacho de basura o ctrl +c // Porque path, es para obtener la dirección actual, es decir, // C:\htmlCSSJavaScript\JavaScriptModer...
const jwt = require("jsonwebtoken"); const User = require("../Models/User"); const APP_SECRET = require("dotenv/config"); const SECRET = process.env.APP_SECRET; module.exports = async (req, res, next) => { try { const token = req.headers.authorization; if (!token) return res.status(401).json({ message: "N...
import Input from 'atoms/input' import Logo from 'molecules/logo' import Nav from 'organisms/nav' import PropTypes from 'prop-types' import React from 'react' import * as styles from './styles' const Header = ({ containerStyle, contentStyle, value, onChange, }) => { const inputId = 'header-input' return ( ...
import { LightningElement, api, track ,wire} from 'lwc'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; import ReturnPBEList from '@salesforce/apex/NewProductByDiscount.ReturnPBEList_quote'; import ReturnPBEList_search from '@salesforce/apex/NewProductByDiscount.ReturnPBEList_search'; import product...
import { combineReducers } from 'redux'; import entities, { STATE_KEY as ENTITIES_STATE_KEY } from './entities'; import rtc, { STATE_KEY as RTC_STATE_KEY } from './rtc'; import socket, { STATE_KEY as SOCKET_STATE_KEY } from './socket'; import ui, { STATE_KEY as UI_STATE_KEY } from './ui'; const rootReducer = combineR...
(function(window, $){ $(window).on('load resize', function() { var $frame = $('.bhs_parts_iframe', parent.document); var innerHeight = $frame.get(0).contentWindow.document.body.scrollHeight; var innerWidth = $frame.get(0).contentWindow.document.body.scrollWidth; $frame.attr('height', innerHeight + 'px...
({ post_page: { headline: 'Woooooow!', dateline: 'Your first enduro.js project', $text_type: 'textarea', post: 'Scroll down to see what\'s sdgsdgdsg' } })
import React, {useState} from "react"; import FeedCardStyled from "./FeedCardStyled.style"; import store from "../../redux/store"; function FeedCard(props) { const [user, setUser] = useState(store.getState()) return( <FeedCardStyled className="card mt-4"> { user.userId === props.data.authorId &...
import * as ACTIONS from '../constants/game.constants'; export function pauseGame() { return { type: ACTIONS.GAME_PAUSE }; } export function startGame() { return (dispatch, getState) => { const state = getState(); if (state.controllers.canPlay === false) { setTimeout(() => dispatch(startGame()), st...
import React, { lazy } from 'react' const TvTopRated = lazy(() => import('../Base/TvTopRated')) const TvTopRatedPage = () => { return ( <> <div className="Container-main"> <TvTopRated/> </div> </> ) } export default TvTopRatedPage
var chunkArray = require("../chunkArray"); var chai = require("chai"); var expect = chai.expect; describe ("chunkArray", function(){ it("case 1", function(){ expect(chunkArray(["a", "b", "c", "d"], 2)).to.eql([["a", "b"], ["c", "d"]]); }); it("case 2", function(){ expect(chunkArray([0,...
import chai, { expect, } from 'chai'; import chaiHttp from 'chai-http'; import app from '../app'; chai.use(chaiHttp); // ============== ENTRY API ROUTE ============ describe('GET/ test', () => { it('should return Welcome to Banka', (done) => { chai.request(app) .get('/') .end((err, res) => { ...
import App from "./App.svelte"; import "./styles/modern-normalize.css"; import "./styles/global.css"; const app = new App({ target: document.getElementById("app"), }); export default app;
const { MaxHeap } = require("./maxHeap"); let maxHeap; beforeEach(() => { maxHeap = new MaxHeap(); }); describe("MaxHeap", () => { it("should construct a MaxHeap object", () => { expect(maxHeap.priorityQueue).toEqual([]); }); describe("insert", () => { it("should insert an item", () => { maxHea...
import firebase from "firebase"; const firebaseConfig = { apiKey: "AIzaSyBi4B4SyTKinslyATWUXHF7WmwuG4KYyL8", authDomain: "ecommerce-57c95.firebaseapp.com", projectId: "ecommerce-57c95", storageBucket: "ecommerce-57c95.appspot.com", messagingSenderId: "831200733850", appId: "1:831200733850:web:328eaed86df96...
import styled from "styled-components"; export const Title = styled.div` font-size: 18px; font-weight: bold; color: #00458a; `; export const ContainerOutline = styled.div` border-top: 2px solid #00458a; padding: 5px; `; export const CardContainer = styled.div` display: inline-block; vertical-align: top...
import Game from './Game.js'; console.log("Hello") const game = new Game() console.log(game.getMoves()) game.createGameBoard()
define([ "dcl", "dojo/Deferred", "dojo/json", "dojo/promise/all", "decor/Stateful", "dojo/when" ], function ( dcl, Deferred, json, all, Stateful, when) { return dcl([Stateful], { packages: null, getDependentPackages: function (packageName) { var pkg = this.findPackage(packageName); var packag...
import { makeStyles } from '@material-ui/core/styles' export default makeStyles((theme) => ({ mainContainer: { position: 'relative', [theme.breakpoints.down('md')]: { padding: 0 } }, smMargin: { margin: theme.spacing(1) }, actionDiv: { [theme.breakpoints.down('md')]: { flexDir...
require('./models/db'); const express = require('express'); const employeeController = require('./controllers/employeeController') const path = require('path') var exphbs = require('express-handlebars'); var bodyParser = require('body-parser') const app = express(); const port = 3000; app.use(bodyParser.urlencoded({...
angular.module('app') .run(function($http, $rootScope){ $rootScope.is_authenticated = window.localStorage.getItem('IS_AUTHENTICATED'); $rootScope.username = window.localStorage.getItem('USER_NAME'); });
var mongoose=require('mongoose'); var Schema=mongoose.Schema; var itemSchema=new Schema({ email:{ type: String, required: true, unique: true }, items:[ { name:String, purchase_date: [Date], diff_days_purchase:[Number] }] }); var Item=mongoose.model('Item',itemSchema); module.e...
const StateMachine = require('javascript-state-machine') const waitForEvent = require('../util/waitForEvent') const timeout = require('../util/timeout') const calculateMidpoint = require('../util/math').calculateMidpoint const fs = require('fs') module.exports = (web3, api) => ({ run: async (cmd, claim, challenger, ...
rightFit.User = (function(){ var userAccount; return { checkLogin: function(){ var access_token = localStorage.getItem("access_token"); if(access_token && access_token != '' && access_token != undefined){ //mainView.router.loadPage('pages/dashboard.html'); rightFit.Router.goPage('dashboard.html'); ...
/** * * Cats * */ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import { compose } from 'redux'; import { makeStyles } from '@material-ui/core/styles'; import { TextField, Button } ...
import styled from 'styled-components' export const Section = styled.section` padding: ${(props) => props.theme.spacings.large}; display: block; background-image: url(${(props) => props.specialBackground}); background-repeat: repeat; @media ${(props) => props.theme.breakpoints.mobile} { padding: ${(pro...
export const style = ` <style> #extendedForm { padding: 10px; } #extendedForm .addRow { color: green; font-weight: bold; font-size: 12px; padding: .2em .4em; } #extendedForm .removeRow { color: red; font-weight: bold; font-size: 12px; ...
/** * @overview JavaScript API (Data management) for Tenken Application * @copyright Copyright 2014 FUJITSU LIMITED */ var TenkenData = {}; //============================================================================ // Common methods and valiables //=====================================================...
var editor; var html=""; var config = {}; config.width = '99%';//编辑器的宽度 config.height = 650;//编辑器的高度 config.toolbar ='Full'; //config.skin='office2003'; config.language = 'zh-cn'; config.toolbarCanCollapse=false; config.toolbarLocation='top'; config.toolbarStartupExpanded =true; config.filebrowserUp...
// Styled Components uses Stylis for CSS preprocessing const { serialize, compile, stringify } = stylis; // Used to generate a unique ID per styled component let counter = 0; // Reference to the <style> tag injected in the <head> let styleTag = null; /** * Simple hashing function, the real styled-components uses the ...
import React from "react"; import BaseInfoSection from "./details/BaseInfoSection"; import EducationSection from "./details/EducationSection"; import ValuesSection from "./details/ValuesSection"; import InterestsSection from "./details/InterestsSection"; import {accordionComponent} from "../../../decorators/@withAccord...
import { useContext, useRef } from 'react'; import { useHistory } from 'react-router'; import './NewRoomForm.css'; import Button from './../UI/Button'; import { UserContext } from './../../contexts/UserContext'; import { RoomContext } from './../../contexts/RoomContext'; const NewRoomForm = () => { const history ...
const Web3 = require('web3'); const { ClientInterface } = require('./interfaces/client'); const pLimit = require('p-limit'); const rlay = require('@rlay/web3-rlay'); const RlayEntities = require('./rlay'); const EntityMetaFactory = require('./entityMetaFactory'); const RlayOntology = require('@rlay/ontology'); const { ...
// pages/auth/auth.js import common from '../../common/common'; const app = getApp(); Page({ /** * 页面的初始数据 */ data: { url:null }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { // setTimeout(function(){ // wx.reLaunch({ // url: '../index/index', /...
import React, { Component } from 'react'; import { Page, Navbar, List, ListItem, ListInput, Toggle, BlockTitle, Row, Button, Range, Block, Icon } from 'framework7-react'; import { dict } from '../../Dict'; import ModelStore from "../../stores/ModelStore"; import * as MyActions from "../../action...
/** * Chat Area Component */ import React, { Component } from 'react'; import MessageBlock from './MessageBlock'; import { FormGroup, Input } from 'reactstrap'; import { Scrollbars } from 'react-custom-scrollbars'; import { connect } from 'react-redux'; import Button from '@material-ui/core/Button'; import IconButton...
import React from 'react' import { useSelector } from 'react-redux' const Notification = () => { console.log('graaah ', useSelector((state) => state)) const message = useSelector((state) => state.notification.message) const errorMessage = useSelector((state) => state.notification.errorMessage) return ( (me...
'use strict'; export const STORE_RATES_DATA = 'STORE_RATES_DATA'; export const STORE_APP_SETTINGS_DATA = 'STORE_APP_SETTINGS_DATA'; export const STORE_BANKS_DATA = 'STORE_BANKS_DATA';
/** * @name NitroPerksReBoot * @author Hexa */ module.exports = (() => { const config = { "info": { "name": "NitroPerksReBoot", "authors": [{ "name": "Hexa", "github_username": "ArgyleFelix" }], "version": "2.0.0", ...
/** * Created by KJain on 8/11/2016. */ var MongoClient = require('mongodb').MongoClient; var db; var connected = false; module.exports = { connect: function(url, callback){ MongoClient.connect(url, function(err, _db){ if (err) { console.log('Unable to connect to the mongoDB s...
import React from 'react'; import './WeDoCard.css'; function WeDoCard(props) { const weDoCard = props; return ( <div className={`wedocard ${weDoCard.backgroundColor}`}> <img className="wedocard-img" src={require(`../../../assets/whatwedo/${weDoCard.image}`)} alt={weDoCard.title} ...
import React from 'react' import './Team.css' import TeamArray from './TeamArray' import TeamCard from './TeamCard' function Team() { return ( <div className='team-container'> <h2 className='team-quote'>Without bonding and Coordination every project is a failure. LOOK at who makes KICKSUP great....
const bcrypt = require('bcrypt'); const express = require('express'); const UserService = require('../services/user'); const uuidv1 = require('uuid/v1'); const userPublic = express.Router(); userPublic.post('/', (req, res) => { // create user const { username, email, password } = ...
function Public() { } //返回行业value Public.prototype.returnIndustryName = function(val){ switch(val){ case "computer": return "计算机/互联网/通信/电子"; case "accounting": return "会计/金融/银行/保险"; case "trade": return "贸易/消费/制造/运营"; case "pharmacy": ...
import {canvas, createCanvas} from '../createFunctions/createCanvas'; import {STATE} from '../const/const'; import { createButtons, drawButtons, } from '../createFunctions/createButtonsForMenu'; import {activateHovering} from '../designFunctions/activateHovering'; import {choseMenu} from '../designFunctions/activ...
import React from 'react' import { db } from '../firebase' import './List.css' export default class MyList extends React.Component { state = { item: null, length: 0, } componentDidMount() { const data = db.collection('Classes'); data.get() .then(snapshot => { ...
class Restaurant { constructor(budget) { this.budgetMoney = Number(budget); this.menu = {}; this.stockProducts = {}; this.history = []; } loadProducts(products) { let result = []; for (let entry of products) { entry = entry.split(' '); ...
/** * A wrapper around a Google map. Use centerMap(latitude, longitude) to center * the map at the specified location. */ Ext.define('webapp.view.map', { extend : 'Ext.panel.Panel', //'Ext.Component', renderTo: Ext.getBody(), xtype : 'gpsmappanel', height: 500, width: 1000, config : { ...
var audio_context = window.AudioContext || window.webkitAudioContext, con = new audio_context(), osc = con.createOscillator(), lfo = con.createOscillator(), lfo_amp = con.createGain(), /* simple amplifier */ mouse_control = document.querySelector('.mouse_control'), mousecon = document.getEleme...
$(function () { var user = {} $('#chat').hide(); $('#footer').hide(); $('#warn').hide(); var socket = io(), $nameForm = $('#name-form'), $nameInput = $('#name-input'), $name = $('#name'), $chat = $('#chat'), $warn = $('#warn'), $messages = $('#messages'), $chatF...
const path = require('path'); let webpack =require('webpack'); // 插件都是一个类,所以我们命名的时候尽量用大写开头 const HtmlWebpackPlugin = require('html-webpack-plugin'); // 清理文件 const CleanWebpackPlugin = require('clean-webpack-plugin'); // Vue 插件 const VueLoaderPlugin = require('vue-loader/lib/plugin'); module.exports = { // 入口文件 e...
import {url} from './Data.js' const lineButton = document.getElementById('lineButton') const barButton = document.getElementById('barButton') const cancelLine = document.getElementById('cancelLine') const cancelBar = document.getElementById('cancelBar') const startLineChart = function(){ load().then((value)=>{value...
export default { "DateAndAuthorisation": { "New_Course_Start_Year": "2016/7", "New_Course_Start_Month": "March", "Has_Faculty_Approval_Been_Given": true, "Will_The_Course_Comply_With_The_Academic_Awards_Framework": false, }, "CourseInformation": { "Faculty": "", "Department": "", "SubjectGroup": "",...
import reflectanceImage from "url:../img/projektbeschrieb.png"; import ndviZeitreiheImage from "url:../img/ndvi_zeitreihe.png"; import useCase2Viewer from "url:../img/uc2_viewer_screenshot.jpg"; import sentinel_orbits from "url:../img/sentinel_orbits.jpg"; import sommersturm2017Image from "url:../img/sommersturm_2017.j...
angular.module('pokedex') .controller('pokemonController', function($scope, $routeParams, $http, $templateCache) { $scope.carregando = true; $http.get("https://pokeapi.co/api/v2/pokemon/" + $routeParams.name, { cache: $templateCache }). then(function(response) { ...
import React, { useState } from "react"; import { NavLink } from "react-router-dom"; import heartPng from "./heart-png.webp"; import logo from "./logo.jpeg" export default function NavBar() { const [clicked, switchClicked] = useState(false); return ( <> {window.innerHeight < window.innerWidth ? ( ...
'use strict'; module.exports = (sequelize, DataTypes) => { const User = sequelize.define('User', { id: { type:DataTypes.UUID, primaryKey:true }, display_name: DataTypes.STRING, name: DataTypes.STRING, email: DataTypes.STRING, phone: DataTypes.STRING, password: DataTypes.STR...
Ext.define('Assessmentapp.assessmentapp.shared.com.model.assessmentcontext.survey.AssessmentQuestionsExtDTOModel.AssessmentQuestionsExtDTOModel', { "extend": "Ext.data.Model", "fields": [{ "name": "questionNumber", "type": "string", "defaultValue": "" }, { "name": ...
'use strict' const tap = require('tap') const importFresh = require('import-fresh') const TypeString = require('../types/string') const Utils = require('../lib/utils') const Helper = require('./helper') tap.test('index > default singleton api', async t => { const h = Helper.get('test-index') const sywac = import...
var express = require('express'); var router = express.Router(); const fs = require("fs"); const path = require("path"); const PUBLIC_PATH = path.resolve(__dirname, '../public'); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'Express' }); }); // 文件的下载 router.get('/dow...
const chalk = require("chalk"); class Logger { constructor(obj) { this.showDebug = obj["showDebug"]; } _log(prefix, message) { (console._original && console._original.log ? console._original.log : console.log)(`${prefix} ${message}`); } info(msg) {...
const config = { url:'mongodb+srv://user1:user123@customerapp-vzzuo.mongodb.net/meanproject?retryWrites=true' } module.exports = config;
import { getAuth, signInWithPopup, GoogleAuthProvider, signOut, onAuthStateChanged, createUserWithEmailAndPassword, updateProfile, sendEmailVerification, signInWithEmailAndPassword } from "firebase/auth"; import { useEffect, useState } from "react"; import initializeAuthentication from "../Firebase/firebase.init"; init...
import clownface from 'clownface' import RDF from '@rdfjs/dataset' import ParsingClient from 'sparql-http-client/ParsingClient' import TermSet from '@rdfjs/term-set' import { shrink } from '@zazuko/rdf-vocabularies/shrink' import { tablesFromSHACL } from '@/shacl' import { rdf, schema, spex, prefixes as _prefixes } fro...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var express_1 = require("express"); var ProductController_1 = __importDefault(require("../controllers/Pr...
(function($) { $.cukeTree .attachMethod("updateReport", function(cukeTree) { return function($report) { this.trigger("cukeTree.reportUpdating", $report); }; }) .attachMethod("reportRendered", function(cukeTree) { return function($report) { this.trigger("cukeTree.reportRendered", $report); };...
//Section 1 function nearestSun(){ var now = new Date(); //Loop through every year in between 2020 to 2100 for (var year = 2020; year <= 2100; year++){ //Declare 1/1/year as Date in now variable var now = new Date(year, 0, 1); //Checking Sunday if (now.getDay() === 0){ ...
const express = require('express'); const server = express(); server.get('/', (req, res) => { var value1 = req.query.sensor1; var value2 = req.query.sensor2; const responsestr = `sensor1: ${value1}, sensor2: ${value2}`; res.status(200).send(responsestr); console.log(responsestr); }); server.listen(3000, ...
(function () { var app = angular.module('techRecycleApp', ['ngRoute', 'ngAnimate', 'ui.bootstrap']); app.service('modalService', ['$modal', '$http', function ($modal, $http) { var modalDefaults = { backdrop: true, keyboard: true, modalFade: true, te...
import red from '@material-ui/core/colors/red'; import { createMuiTheme } from '@material-ui/core'; const theme = createMuiTheme({ palette: { primary: { main: '#607d8b', dark: '#546e7a', light: '#eceff1', contrastText: '#fff', }, secondary: { main: '#009688', light: '#...
//TODO: MAKE TITLES FOR PAGES let loginButton = document.getElementById('loginButton'); loginButton.addEventListener("click",(evt)=>{ window.location.href="login.php"; console.log("clicked"); });
import React from 'react'; import { Image, StatusBar, View, Text, TouchableWithoutFeedback } from 'react-native'; import { Actions } from 'react-native-router-flux'; import { CardSection, Button } from './common'; const InitialScreen = () => { const { backgroundImage } = styles; return ( <View style={{...
function explorationStrategy(maze, mouse, initPosition, initDirection){ memorizedMaze = [ [1,0], [2,0], [3,0], [4,0], [5,0], [6,0], [7,0], [8,0], [9,0], [10,0], [11,0], [12,0], [13,0], [14,0], [15,0], [16,0], [17,0], [18,0], [19,0], [20,0], [21,0], [22,0], [2...
/** * Created by titi on 2017/8/31. */ $("#loginbtn").click(function(){ var user=document.getElementById("user").value; var password=document.getElementById("password").value; if(user===""||password==="") {alert("请输入用户名和密码")} else{ $.post("/carrots-admin-ajax/a/login",{ "na...
function enterPress(e){ //传入 event var e = e || window.event; if(e.keyCode === 13){ document.getElementById("send-btn").click(); } }
import * as types from "../Actions/actionConstant"; const initialState = []; const companyReducer = (state = initialState, action) => { switch (action.type) { case types.GET_COMPANIES: return action.payload; case types.CREATE_COMPANY: return [...state, action.payload]; case types.UPDATE_COM...
/** * search all type model */ window.NewsCategroyData=Backbone.Model.extend({ urlRoot:'/rest/news/searchAllType', fetch:function(options){ digitnexus.ajaxRequest(this.urlRoot, null, function(response) { options.success.call(options.callBackContext,response); }, ...
// Brain.js var Brain = function() { console.log('braaaains') } module.exports = Brain;
class UrlValidator { constructor() { } validate(value) { return { isValid: validator.isURL(value), message: 'Must consist of a valid URL.' }; } } export default (new UrlValidator());
import CryptoJS from "crypto-js"; export default { encryptData: data => { var encrypted = CryptoJS.AES.encrypt(data, process.env.CRYPT_KEY); return encrypted.toString(); }, decryptData: data => { var decryptedBytes = CryptoJS.AES.decrypt(data, process.env.CRYPT_KEY); var decrypted = decryptedByte...
"use strict"; exports.LockStore = function() { var that = this; that.SHARED_LOCK = 0; that.EXCLUSIVE_LOCK = 1; var m_lockMap = { }; that.lock = function(resource, lockType, lifeTimeSeconds) { // create a unique lock token var lockToken = "urn:uuid:f81d4fae-7dec-1...
var win = $(window); var DEFAULT_EDM_BACKGROUND = '#fafafa'; var DEFAULT_EDM_PADDING_TOP = '20'; var DEFAULT_EDM_PADDING_BOTTOM = '20'; var DEFAULT_EDM_PADDING_LEFT = '20'; var DEFAULT_EDM_PADDING_RIGHT = '20'; var DEFAULT_EDM_BODY_WIDTH = '600'; var DEFAULT_EDM_BODY_BACKGROUND = '#ffffff'; var DEFAULT_EDM_BODY_PADDING...
module.exports = function (str) { // TODO var reg = new RegExp(/^(0x[A-F, a-f, 0-9]{2}\s*){8}$/, "g"); return reg.test(str); }
'use strict'; angular.module('navbar'). component('navbar', { templateUrl: 'navbar/navbar.template.html', controller: function($scope){ $scope.data = new Date(); //pegar do serviço $scope.farms = ['Farm 1', 'Farm 2', 'Farm 3']; ...
import React from 'react'; class Search extends React.Component { constructor(props) { super(props); this.state = { title: '', artist: '', showPrev: false }; this.handleTitleChange = this.handleTitleChange.bind(this); this.handleArtistChange = this.handleArtistChange.bind(this);...
/** * @author Henrik */ $(document).bind('pageinit', function(){ $('#zoom-slider').slider(); });
/* @flow */ import React, { Component } from 'react'; import { Text, View, StyleSheet } from 'react-native'; import { material } from 'react-native-typography'; import withWeb3 from '../withWeb3'; class Container extends Component<{ children: *, web3: *, }> { render() { const { web3 } = this.props; return ( ...
import Component from './SliderTemplate.component' export default Component
define([ 'client/views/graph/line-set', 'client/views/graph/line', 'client/views/graph/component', 'common/collections/grouped_timeseries' ], function (LineSet, Line, Component, Collection) { describe('Line Set', function () { var lineset, graph, collection; beforeEach(function () { collectio...
import Page from './page'; import taNotFoundPaths from '../ElementsData/taNotFoundPaths.page' import CommonMethods from '../CommonMethods/CommonMethods.page'; import TextData from '../ElementsData/TextData.page'; class NotFound extends Page { open() { super.open(TextData.taNotFoundURL); // this will append `fe...
function injectFonts(typography) { const fontsStr = getFontsStr(typography) if (fontsStr) { const link = getFontsLink(fontsStr) injectLink(link) } else { // dunno if this is ideal behavior throw new Error('no fonts str') } } function injectLink(link) { const typoElt = document.getElementById(...
 /*-----------------------------------pagination-----------------------------*/ //method for creating Pagination in tables it takes 2 params table and nav ID and creates pagination for sent table data function createPagination(tableID, navID) { $('#' + tableID).after('<div id=' + navID + '></div>'); var rows...
/** * 类型检测 * Created by Dreamzhu on 2017/3/25. */ let class2type = {}; "Boolean Number String Function Array Date RegExp Object Error".split(" ").forEach(function (name) { class2type["[object " + name + "]"] = name.toLowerCase() }); export function type(obj) { return obj == null ? String(obj) : class2type[...
let animation =bodymovin.loadAnimation({ container: document.getElementById('landingPageAnimation'), path: 'assets/json/data.json', renderer: 'svg', loop: true, autoplay: true, name: "Landing Animation" })