text
stringlengths
7
3.69M
import posed from 'react-pose'; export default { Container: posed.ol({ active: { beforeChildren: false, delayChildren: 200, staggerChildren: 50, opacity: 1, }, inactive: { beforeChildren: false, delayChildren: 200, staggerChildren: 50, delay: 180, opa...
//var main_series_object = { // // color: color or number // // data: data, // color: 3, // label: "responding", // // lines: specific lines options // // bars: specific bars options // // points: specific points options // // xaxis: number // // yaxis: number // // clickable: true, // ...
var http = require("http"), moduleStatic = require("node-static"), file = new moduleStatic.Server("."), LISTEN_PORT = 8081; //<!--<script src="bower_components/requirejs/require.js" data-main="/app/main"></script>--> // http.createServer(function(req, res) { // if (req.url == "/") { // file.serve(req, res); ...
import { useEffect, useState } from 'react' import Head from 'next/head' // import Image from 'next/image' import { Container, Row, Col, ButtonGroup, Button, Image, Form, Alert, Modal } from 'react-bootstrap'; import { PersonPlusFill, Award, UpcScan } from 'react-bootstrap-icons'; import Reward from './reward' import ...
import React from "react"; import { FiExternalLink } from "react-icons/fi"; import img3 from "../../images/conig.png"; const Conig = () => { return ( <div className="modal"> <div className="modal-image-container"> <img src={img3} alt="img1" className="modal-img" /> </div> <div classNam...
/* * @lc app=leetcode.cn id=448 lang=javascript * * [448] 找到所有数组中消失的数字 */ // @lc code=start /** * @param {number[]} nums * @return {number[]} */ var findDisappearedNumbers = function(nums) { var res = []; var n = nums.length for (const num of nums) { var x = (num - 1) % n; nums[x] +=...
import __initBottom from '../__init/bottom' import '../../js/load-background-img' import makeClassGetter from '../__mcg' const renameMaps = { } __initBottom() import { Component, render, h } from '@externs/preact' import { makeIo, init, start } from '../__competent-lib' import Comments from '../../../articles/componen...
phantom.injectJs('chance.min.js'); var casper = require('casper').create(); casper.start("http://google.com/", function() { this.echo('random: ' + chance.phone()); }); casper.run();
const path = require("path"); const express = require("express"); const helmet = require('helmet'); const mongoose = require("mongoose"); const compression = require('compression'); const app = express(); const routes = require("./routes"); // refactored to use helmet set security-related HTTP response headers app.us...
console.log("hello world :o"); var info; $.getJSON('/info/', function(body) { //console.log(body); info = body; }).fail(function( jqxhr, textStatus, error ) { var err = textStatus + ", " + error; //console.log("Text: " + jqxhr.responseText); console.log( "Request Failed: " + err ); }); let answers = {}...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import fetchPosts, { thumbnailDefault } from '../actions/FetchPosts'; import Pagination from './Pagination'; class PostsList extends Component { constructor(props) { super(props); this.state = { paginationCount: 25 } ...
const { Stream: $ } = require('xstream') const Cycle = require('component') const dropRepeats = require('xstream/extra/dropRepeats').default const Factory = require('utilities/factory') const WithFocusable = (options = {}) => { const { key = 'isFocused', getFocusEvent$ = (sinks, sources) => sources.DOM.eve...
$(document).ready(function() { "use strict"; var av_name = "RegExConvertCON"; var av = new JSAV(av_name, {animationMode: "none"}); var url1 = "../../../AV/VisFormalLang/Regular/Machines/RegExCon1.jff"; var url2 = "../../../AV/VisFormalLang/Regular/Machines/RegExCon2.jff"; new av.ds.FA({left: 0, url: url1});...
import axios from "axios"; const createAccount = async (username, password) => { try { return await axios.post( "/api/createAccount", { username, password, }, { headers: { "Content-Type": "application/json", }, } ); } catch (err) { ...
function VerifForm(form) { var nomPrenom = document.getElementById('form').nomPrenom.value; var codeClient = document.getElementById('form').codeClient.value; var adresse = document.getElementById('form').adresse.value; if (codeClient == "") { document.getElementById('msg_erreur_code'...
import React, {useState} from 'react'; import styled from 'styled-components' // Test git branch // =============== const theme = { green: { default: '#21D19F', hover: '#45B69C' } } const Container = styled.div` display: flex; justify-content: center; width:100%; ` const Button = styled.button` ...
app.controller('LogoutController', ['$scope','$location', 'LoginService', function($scope, $location, LoginService){ localStorage.removeItem('player'); $location.path("/login"); }]);
/** * CSS unicode-bidi property * No description available. * @see This feature comes from MDN: https://developer.mozilla.org/en-US/search?q=CSS+unicode-bidi+property */ /** * @type {import('../features').Feature} */ export default { 'unicode-bidi': true, };
const imATOM = artifacts.require('IMATOM'); module.exports = function (deployer) { deployer.deploy(imATOM); };
import { useState, useEffect } from "react"; import axios from "axios"; function useFetch() { const [data, setData] = useState([]); const fetchData = async () => { const { data } = await axios.get("http://localhost:3001/cars"); setData(data); }; useEffect(() => { fetchData(); }, []); return [...data]; }...
import ZUser from "./user.vue" const zUser = { install:function(Vue){ Vue.component("zUser",ZUser) } } export default zUser;
'use strict'; angular.module('projetCineFilms') .factory('NewUser', function ($location, authRef) { function createnewuser (email, password) { console.log(authRef); authRef.$createUser({ email: email, password: password }).then(function(userData) { console.log('Use...
import "./index.css" import React from "react"; import ReactDOM from "react-dom"; import Header from "../header/header.js"; import Nav from "../nav/nav.js"; import Main from "../main/main.js" class App extends React.Component{ constructor(props){ super(props); this.state = { filter: nul...
import styled from 'styled-components' const Text = styled.p` font-size: ${({fontSize}) => fontSize}; font-weight: ${({fontWeight}) => fontWeight}; text-transform: ${({textTransform}) => textTransform}; padding: ${({padding}) => padding}; margin: ${({margin}) => margin}; ` Text.defaultProps = { fontSize: ...
import React from 'react'; import Avatar from '@material-ui/core/Avatar'; import CheckCircleOutlinedIcon from '@material-ui/icons/CheckCircleOutlined'; import './chnnelRow.css'; function ChnnelRow({image,chnnel,verifed,subs,numofvideos,description}) { return ( <div className="chnnel_row"> <Avat...
var pageSize = 20; /**********************************************************************群組管理主頁面**************************************************************************************/ //群組管理Model Ext.define('gigade.WCT4', { extend: 'Ext.data.Model', fields: [ { name: "content_id", type: "int" }, ...
import FeedPreviewTable from './FeedPreviewTable'; export default FeedPreviewTable;
// Requires jQuery and jQuery Color // Extend jQuery object, requires jQuery Color: $.fn.animateBGColor = function(color, duration) { var prevBGColor = this.css('backgroundColor'); this.stop().css('background-color', color). animate({backgroundColor: prevBGColor }, duration); }; $(document).ready(function() ...
angular.module('app.controller',['app.service']) .controller('postController',function($scope,Service){ $scope.posts={}; //função para pega os dados da APIs function GetAllPosts() { var getPostsData = Service.getPosts(); getPostsData.then(function (post) { $scope.posts = post.d...
import React from 'react'; import ReactDOM from 'react-dom'; import PersonManager from './PersonManager'; // import TestManager from './TestManager'; import './index.css'; import './styles/borders.css'; import './styles/colors.css'; import './styles/fonts.css'; import './styles/heights.css'; import './styles/margins....
let http = require("request") function getZingMp3URL(id) { http.get({ "headers": { "Sec-Fetch-Site": "cross-site", "Sec-Fetch-Mode": "cors", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "vi-VN,vi;q=0.9,fr-FR;q=0.8,fr;q=0.7,e...
$(window).scroll(function() { if($(window).scrollTop() == $(document).height() - $(window).height()) { // ajax call get data from server and append to the div $(".container").append(" <p>Appended text</p>."); } });
import React from 'react' import { storiesOf } from '@kadira/storybook' import Task from './index' const users = [ { name: 'Faizaan', picture: 'https://placehold.it/64x64' }, { name: 'Faizaan', picture: 'https://placehold.it/64x64' } ] let assignee, assigner assignee ...
import React from "react"; import styled from "styled-components"; const BackgroundImage = ({ src, alt }) => { return ( <div> <Image src={ src } alt={ alt } filter="true"/> </div> ); } const Image = styled.img ` z-index: -1; width: 100%; height: 100%; position: absolu...
/** * INTEGRATION TESTS - SETUP FILE FOR MOCHA * Runs before any *.int.spec.js file as long as one level above other *.int.spec.js files */ const mongoose = require('mongoose'); const cors = require('cors'); // Define app for supertest const express = require('express'); const app = express(); // Middleware app.u...
import React from 'react'; import { Fragment } from 'react'; import { OverlayTrigger, Tooltip } from 'react-bootstrap'; const MovieWatchlink = ({ watchlinks }) => { return ( <Fragment> <div className="mt-3 ml-5 mr-5"> <span className="pl-3"> Where to watch?{' '} <a href={watchli...
Engine.Utilities.PreloadedImage = function(src){ this.image = new Image(); this.imageReady = false; var me = this; this.image.addEventListener("load", function(){ me.imageReady = true; }); this.image.src = src; }; Engine.Utilities.ImageLoader = { images: {}, Load: function Load(...
import React, { useState } from 'react'; import Dropdown from './components/dropdown/dropdown'; import Slider from './components/slider/slider'; import './App.css'; const options = [ { value: 1000, text: 'Option 1' }, { value: 1001, text: 'Option 2' }, { value: 1002, text: 'Option 3' }, { value: 1003, text: '...
const { ethers } = require("hardhat"); const { expect } = require("chai"); describe("Vault", () => { before(async function () { this.VaultFactory = await ethers.getContractFactory("Vault"); }); beforeEach(async function () { this.vaultContract = await this.VaultFactory.deploy( ethers.utils.formatB...
/** * Created by debal on 27.02.2016. */ var React = require('react'); var Actions = require('../../actions/user'); var UserInfo = require('./info-instagram'); var AuthInstagram = require('./auth-instagram'); var UserMenu = React.createClass({ contextTypes: { store: React.PropTypes.object.isRequired ...
var files________________3________8js____8js__8js_8js = [ [ "files________3____8js__8js_8js", "files________________3________8js____8js__8js_8js.html#af29ba3c2c85449822718166be61b26fe", null ] ];
'use strict'; var isUint32Array = require( './../lib' ); console.log( isUint32Array( new Uint32Array( 10 ) ) ); // returns true console.log( isUint32Array( new Int8Array( 10 ) ) ); // returns false console.log( isUint32Array( new Uint8Array( 10 ) ) ); // returns false console.log( isUint32Array( new Uint8ClampedAr...
var mySocket = function (server) { // const io = require('socket.io')(server); // io.on('connection', function(socket){ // //本次连接的socket发消息 // socket.emit('news', { "meg": 'hello' }); // // //接受消息 // socket.on('news2', function (data) { // console.log(data); // //给除了自己以外的所有连接的socket发广播消息 // socket...
/*global define */ (function() { "use strict"; var jsav, // The JSAV object answerArr = [], // The (internal) array that stores the correct answer listArr = [], // status = 0, // Nothing is currently selected, status = 0; // Data area...
import Image from "next/image"; import { signIn, signOut, useSession } from 'next-auth/client' import { FlagIcon, SearchIcon,PlayIcon,ShoppingCartIcon } from "@heroicons/react/outline"; function Login() { return ( <div className="grid place-items-center"> <Image src="https://links.papareact.co...
const crypto = require('crypto'); const connection = require('../database/connection'); module.exports = { async store(req, res) { const { name, email, wpp, cnpj, city, uf } = req.body; const id = crypto.randomBytes(4).toString('HEX'); await connection('enterprises').insert({ id, name, ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Tests; (function (Tests) { var Main = /** @class */ (function () { function Main(id) { this.currentTestId = id; this.testRoot = $('#testRoot'); this.loadForm(); } Main.prototy...
(function() { 'use strict'; angular .module('traveltotemApp') .controller('TransferDialogController', TransferDialogController); TransferDialogController.$inject = ['$timeout', '$scope', '$stateParams', '$uibModalInstance', 'entity', 'Transfer', 'User', 'Totem']; function TransferDial...
const customError = require("../domain/customError"); const fs = require("fs"); const User = require("../domain/user");//not used anymore? todo:check if we still want domain classes since nodejs lose the stronlytyped properties const SessionModule = require('../modules/sessionModule'); const log = require('../modules/l...
$(function(){ $('#search').click(function(e){ var query = $('search-box').text; var jqxhr = $.get('http://search.twitter.com/search.json/',{'q': query}); jqxhr.success(function(response){ }); }); });
import React, { useState, useEffect, useRef } from "react"; import { useDispatch } from "react-redux"; import { setTextFilter, setTypeFilter } from "../store/app/actions"; import { getEventTypesArray } from "../utilities/time"; /** * Event Type filter drop down component. * @param {string} prop.className Class name ...
// Creación de la tabla para comentarios // // Estructura de la tabla: // // ------------------------ // | id | texto | // ------------------------ // module.exports = function(sequelize, DataTypes) { return sequelize.define( 'Comment', { texto: { type: DataTypes.STRING, validate: { notEmpty: {m...
var devicon = angular.module('devicon', ['ngSanitize', 'ngAnimate']); /* ||============================================================== || Devicons controller ||============================================================== */ devicon.controller('IconListCtrl', function($scope, $http, $compile) { // Determinatio...
Ext.define('Gvsu.modules.orgs.model.OrgsModel', { extend: "Core.data.DataModel" ,collection: 'gvsu_orgs' ,fields: [{ name: '_id', type: 'ObjectID', visable: true },{ name: 'active', type: 'boolean', filterable: true, editable: true, ...
var resultGrid = null; var resultGridSortColumn = ''; var resultGridColumnFilters = {}; $(function() { $('#searchInput').focus() .keypress(function (e) { if(e.keyCode == 13){ search(); } }); }); search = function() { $.ajax({ type: 'POST', url: '/search', dataType: 'json', data: {...
const Footnote = ({ unlinkedText, linkedText, onClickLink }) => ( <div className="flex flex-row mt-1"> <p className="text-xs text-gray-400">{unlinkedText}</p> <p className="text-xs text-gray-400 underline ml-1 cursor-pointer" onClick={onClickLink} > {linkedText} </p> </div> ); expo...
import {renderElement, appendElement} from '../utils'; import GameHeaderView from './items/game-header-view'; import AnswersHistoryView from './items/answers-history'; import {globalGameData, GameType} from '../data/game-data'; import TwoOfTwoGameView from './two-of-two-game-view'; import OneOfOneGameView from './one-o...
import React from 'react'; import { Form, Select } from 'antd'; import { uuid } from 'utils'; const Option = Select.Option; @Form.create() class ConSelect extends React.Component { render() { const { formItemLayout = { labelCol: { sm: { span: 6 } }, wrapperCol: { sm: { span: 18 } }, ...
//call set all note-category callAllMenu().then(result => { setAllNoteCategory(result); })
document.querySelector('[data-hook="pick"]').innerHTML = '<a><img data-hook="img-swap" src="https://xplatform.org/ext/lorempixel/200/300/nightlife"/></a>'; let images = ['https://xplatform.org/ext/lorempixel/200/300/nightlife/', 'https://xplatform.org/ext/lorempixel/200/300/cats/']; document.querySelector('[data-ho...
(function () { angular .module('myApp') .controller('TextViewController', TextViewController) TextViewController.$inject = ['$state', '$scope', '$rootScope', '$sce']; function TextViewController($state, $scope, $rootScope, $sce) { $rootScope.setData('showMenubar', true); $...
const express = require('express'); const app = express(); const UsersRoute = require('./UsersRoute'); app.use('/users', UsersRoute); module.exports = app;
export { FETCH_INVENTORY, ADD_ITEM, ADD_CATEGORY, EDIT_NAME, EDIT_DESCRIPTION, DELETE_ITEM, FETCH_CATEGORIES, FETCH_ITEM, DELETE_CATEGORY, } from "./actions";
const $ = jQuery = jquery = require ("jquery") const switchElement = require ("cloudflare/generic/switch") $(document).on ( "cloudflare.ssl_tls.certificate_transparency_monitoring.initialize", switchElement.initializeCustom ( "enabled", true ) ) $(document).on ( "cloudflare.ssl_tls.certificate_transparency_monitoring....
// Ex 1 Classe console.log("Exercice 1"); let codingSchool17 = []; let ajout = (nom) => { console.log(`${nom}, rentre dans la classe`); return (codingSchool17.push(nom)); }; let retrait = (nom) => { console.log(`${nom}, sort dans la classe`); return (codingSchool17.splice(codingSchool17.indexOf(nom), ...
import {StyleSheet} from 'react-native'; import {colors} from '../../const/colors'; export default style = StyleSheet.create({ blurWrapper: { flex: 1, backgroundColor: '#C0C0C030', }, wrapper: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#ffffff00', }, ...
var num1 = Number(prompt("Enter First Number")); var num2 = Number(prompt("Enter Second Number")); var op = prompt("Enter Operator (+,-,*,/,%"); var sum = 0; if (op === "+") { sum = eval(num1 + op + num2); document.write(num1 + " + " + num2 + " = " + sum); } else if (op == "-") { sum = eval(num1 + op + num2); ...
import { colors } from "../styles/main"; import { dependencies as Mods } from "../../package"; export default { isExpo() { return !!Mods.expo; }, getElementStyles(props, baseStyle) { const elStyle = { ...props, style: [baseStyle], }; if (!!props.customStyle) { elStyle.style.push...
var all________________1________8js____8js__8js_8js = [ [ "all________1____8js__8js_8js", "all________________1________8js____8js__8js_8js.html#a879bdbf16d71c43f8ea0ccc750afa5df", null ] ];
'use strict'; import React, { Component } from 'react' import { connect } from 'react-redux' import { PageNavigator, actions } from 'kn-react-native-router' import * as types from '../../router' import LoginContainer from './login' import RegisterContainer from './register' const { navigationPop, navigation...
export const FETCH_EXPERIENCE = 'FETCH_EXPERIENCE'; export const FETCH_EXPERIENCES = 'FETCH_EXPERIENCES'; export const REQUEST_LOADING_EXPERIENCE = 'REQUEST_LOADING_EXPERIENCE'; export const REQUEST_REJECTED_EXPERIENCE = 'REQUEST_REJECTED_EXPERIENCE';
(function () { 'use strict'; // intersection observer var observerOptions = { root: null, rootMargin: "0px", threshold: .1 }; var condition = false var callback = function (entries, observer) { entries.forEach(function (entry) { if (entry.intersectionRatio > 0) { // entry.targe...
'use strict'; const {DateRestrict} = require(`~/constants`); const {getRandomInt} = require(`.`); const getDate = () => { const date = new Date(); const year = date.getFullYear(); const monthI = date.getMonth() + 1 - getRandomInt(DateRestrict.MIN, DateRestrict.MAX - 1); const month = (monthI < 10 && `0`)...
require("dotenv").config(); // PACKAGES const express = require("express"), app = express(), mongoose = require("mongoose"), bodyParser = require("body-parser"), methodOverride = require("method-override"), expressSanitizer = require("express-sanitizer"), session = require("express-session"), c...
module.exports = async function () { console.log('enter dapp init') console.log('calling dept contract') app.registerContract(1330, 'department.department'); console.log('calling employee contract') app.registerContract(1551, 'employee.employee'); console.log('employee contract registered'); console.log...
// [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55] /* 3rd = 2nd + 1st 4th = 3rd + 2nd 5th = 4th + 3rd 16th = 15th + 14th nth = (n-1)th + (n-2)th ith = (i-1)th + (n-2)th */ /* function fibonacci(n){ if(n < 0 || typeof n != 'number'){ return 'Give a valid number greater than 2' } if (n < 2 && n >= 0){ ...
const kedi_btn = document.getElementById('kedi_btn'); const köpek_btn = document.getElementById('köpek_btn'); const kedi_sonucu = document.getElementById('kedi_sonucu'); const köpek_sonucu = document.getElementById('köpek_sonucu'); kedi_btn.addEventListener('click', getRandomCat); köpek_btn.addEventListener('click', g...
self.__precacheManifest = (self.__precacheManifest || []).concat([ { "revision": "3ce67189bd2cffb7bee6fc9be1bc21da", "url": "./index.html" }, { "revision": "8beb05bff9d522ef41c9", "url": "./static/css/main.b3146071.chunk.css" }, { "revision": "0e18444e9bb3e9b1c405", "url": "./static/js...
import React from 'react' import { Button, Spinner } from './custom-button.styles' const CustomButton = ({ children, loading, ...props }) => { return <Button {...props}>{loading ? <Spinner /> : children}</Button> } export default CustomButton
"use strict"; var server = require("./servers/server"); //Gør server modulet tilgængeligt for resten var router = require("./routers/router"); // Router modulet required, sådan så den altid tjekker om routing er gjort rigtigt server.start(router); // start server...
import express from 'express' import path from 'path' import {requestTime, logger} from './middlewares.js' const __dirname = path.resolve() const PORT = process.env.PORT ?? 3000 const app = express() app.use(express.static(path.resolve(__dirname, 'static'))) app.use(requestTime) app.use(logger) // app.get('/', (req,...
const Web3 = require("web3"); const ethers = require("ethers"); const ethProvider = require("eth-provider"); tokenAddress = "0x68ea056d4fb87147a9a237c028b6b1476bf7b367"; const run = async () => { // we use 'eth-provider' so frame works as expected // unfortunatly it returns an web3 provider so we wrap this again ...
import React from 'react'; import ReactDOM from 'react-dom'; import {BrowserRouter as Router, Switch, Route, NavLink, Redirect} from "react-router-dom"; import Home from './pages/Home'; import Search from './pages/Search'; import List from './pages/List'; import './css/main.min.css'; class App extends React.Componen...
import Vue from 'vue' import VueResource from 'vue-resource' import ElementUi from 'element-ui' //ElementUi 组件库 import 'element-ui/lib/theme-chalk/index.css' //ElementUi 组件样式 import LvlPlugin from './plugins/lvlPlugin' Vue.use(ElementUi,{size:'small'}) //使用ElementUi Vue.use(VueResource) ...
/* eslint-disable no-console */ const pm2 = require("pm2"); const instances = process.env.WEB_CONCURRENCY || -1; const maxMemory = process.env.WEB_MEMORY || 512; pm2.connect(() => { pm2.start( { script: "index.js", instances: instances, max_memory_restart: `${maxMemory}M`, env: { ...
/* eslint-disable @typescript-eslint/no-var-requires */ const { readdirSync } = require('fs'); const { fork } = require('child_process'); const { build } = require('esbuild'); const { notify } = require('node-notifier'); const pkg = require('./package.json'); async function bootstrap() { const configFiles = readdir...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const globalVars_1 = require("../core/globalVars"); const app_1 = __importDefault(require("./config/app"...
var Settings : GUIStyle; function OnGUI() { GUI.Label(new Rect (Screen.width / 2 - 90, Screen.height / 2 - 250, 200, 200), "Settings", Settings); GUI.BeginGroup (new Rect (Screen.width / 2 - 100, Screen.height / 2 - 200, 200, 600)); if(GUI.Button (new Rect (10,30,180,30), "Fastest")) QualitySettings.curr...
import { combineResolvers } from "graphql-resolvers"; import bcrypt from "bcrypt"; import mongoose from "mongoose"; import { isAdmin } from "./authorization"; import redis from "../redis"; import sendEmail from "../utils/sendEmail"; import { confirmUserPrefix, forgotPasswordPrefix } from "../constants/redisPrefixe...
require('http').createServer(function (request, response) { if (request.method !== 'POST') return response.end('favor enviar un POST!\n') request.pipe(require('through2-map')(function (chunk) { return chunk.toString().toUpperCase() })).pipe(response) }).listen(process.argv[2] | 0) /* var http = requir...
const worker = require("./test.worker.js") worker.run("sayHelloWorld", "hello", "world") .then(res => { console.log(res) })
var pathRX = new RegExp(/\/[^\/]+$/) , locationPath = location.pathname.replace(pathRX, '/'); dojoConfig = { parseOnLoad: false, async: true, tlmSiblingOfDojo: false, locale: "zh-cn", has: { 'extend-esri': 1 }, paths:{ "echarts": locationPath + "../libs/echart/ech...
$(function() { $(document).ready(function() { var mobileAnchor = $('#mobile-anchor'), mobileNav = $('#header'); mobileAnchor.click(function(e) { mobileNav.toggleClass('visible'); }); }); });
var baseURL = "/_fasheholic/"; var apiURL = "/_fasheholic/api/"; var img_base64 = ""; var filename = ""; // var file_extension = ""; // you can do this once in a page, and this function will appear in all your files File.prototype.convertToBase64 = function(callback){ var FR = new FileReader(); FR.onload = functio...
QUnit.test( "implicitly skipped test", function( assert ) { assert.true( false, "test should be skipped" ); } ); QUnit.only( "run this test", function( assert ) { assert.true( true, "only this test should run" ); } ); QUnit.test( "another implicitly skipped test", function( assert ) { assert.true( false, "test sho...
'use strict'; const userDao = require('../dao/user'); const produtoDao = require('../dao/product'); module.exports = { getDashboard: async (req, res) => { if (req.session.loggedin) { let dados = req.session; let produtos = await produtoDao.getAllProducts(); let chartReti...
import React from 'react'; export default class Class extends React.Component { render() { return ( <div className="well well-sm" onClick={this.onItemClick} > <h4>id : {this.props.item.id}</h4> <h4>Name : {this.props.it...
const Instruments = require('../Instruments'); function Pick(itemId) { Instruments.apply(this, new Array(15, 'INSTRUMENTS', itemId, 100)); this.usableObjId = new Array (8, 9, 10); } Pick.prototype = Object.create(Instruments.prototype); Pick.prototype.create = function (itemId) { return new Pick(itemId); }; modul...
$( document ).ready(function() { $('.leftmenutrigger').on('click', function(e) { $('.side-nav').toggleClass("open"); e.preventDefault(); }); }); // With JQuery //$("#ex2").slider({}); // Without JQuery var slider = new Slider('#ex2', {});
import { getAttribute } from './_get_attribute'; describe('getAttribute', () => { it('should get the integer value', () => { const mockElement = { style: { width: '10px', }, }; expect(getAttribute(mockElement, 'width')).toBe(10); }); });