text
stringlengths
7
3.69M
//07.Write a function that returns the index of the first element in array that is larger than its neighbours or -1, if there’s no such element. //Use the function from the previous exercise. 'use strict'; var numbers = [1, 2, 3, 4, 6, 5, 7, 8, 9]; console.log(firstLargerThanNeighbours(numbers)); function firstLarger...
import React, { useContext } from "react"; import NavBar from "../navigation/NavBar"; import GifSearchResultList from "../components/GifSearchResultList/GifSearchResultList"; import AppContext from "../context/context"; const GifSearch = () => { const context = useContext(AppContext); const { gifSearchFunction, gi...
define(['knockout', 'jquery'], function(ko, $) { 'use strict'; //TODO nisabhar shouldn't this code be under tasksearch ? /** * KO Binding for Auto suggest. * @type {{init: ko.bindingHandlers.suggestItems.init}} */ ko.bindingHandlers.suggestItems = { init: function(element, valueA...
'use strict'; define(['jquery'], function ($) { return { init: function () { var inIframe = window != window.top; // I dont know why platform sends me those strange json incompatible value and pretends it is json... // so now I need to do some dirty work here...
({ choseVolunteer : function(cmp, event) { let volunteers = cmp.get('v.volunteers'); let idx = event.getSource().get('v.value'); let chosenVolunteer = volunteers[idx]; cmp.set('v.chosenVolunteer', chosenVolunteer); this.resetVolunteerSearch(cmp); ...
const express = require("express"); const router = express.Router(); const User = require("../models/user"); router.post("/",async(req,res)=> { // creaet user and let userToBeCreated = new User ({ username: req.body.username, emial: req.body.emial, password:req.body.password }); await u...
const dataService = require('../data.service')(); module.exports = (server) => { server.route({ method: 'GET', path:'/api/tasks', handler: (request, reply) => { dataService.getAllTasks() .then(data => reply({data})) .catch(error => reply({error}))...
function AddItem(itemId) { var addUrl = 'addItem.php?v=2&itemId=' + itemId; $('.addButton').prop('disabled', true); $.getJSON(addUrl).done(function (data) { try { if (data == -3) { if (confirm("This item has already been added to your cart. Would you like an additional one?")) { $.getJSON(addUrl + ...
import { StyleSheet, Dimensions } from "react-native"; const getWidth = Dimensions.get("screen").width; export default StyleSheet.create({ body: { flex: 1, flexDirection: "column", paddingTop: 30, paddingBottom: 20, backgroundColor: "#fff", }, mh15: { marginHorizontal: 15, }, headerSec...
const db = require('../db/dreckl') const abwesenheitDB = db.abwesenheit const getAbwesenheit = (req, res) => { abwesenheitDB.read((abwesenheit) => { res.json(abwesenheit) }) } module.exports = getAbwesenheit
const axios = require('axios'); const Response = require('../response/response'); const RESPONSE_CODE = require('../response/responseCode'); const extractor = require('../utils/extractor'); class APIcontroller { getPrices (req, res, next) { return new Promise((resolve, reject) => { axios.all([...
const should = require('should'); const supertest = require('supertest'); const _ = require('lodash'); const testUtils = require('../../utils'); const config = require('../../../core/shared/config'); const localUtils = require('./utils'); const ghost = testUtils.startGhost; describe('Admin API key authentication', fu...
Template.MyPolls.onCreated(function() { var self = this; self.autorun(function() { self.subscribe('polls'); }); }); Template.MyPolls.helpers({ polls: function() { return Polls.find({author: Meteor.userId()}); } })
var operator=null var inputValueMemo= 0// para guardar el resultado del calculo function getContentClick(event) { const value = event.target.outerText//puede se innerHTML filterAction(value) } const filterAction = value => { value === "0" ? addNumberInput(0) : null value === "1" ? addNumberInput(1) :...
import React from 'react'; import { NavLink } from 'react-router-dom' class Sidebar extends React.Component { render() { return ( <ul className="sidebar--nav"> <NavLink to="/timeline" activeClassName="active"> <li className="sidebar--nav--thumb"><i class...
import React from "react"; import BoardItem from "./BarodItem"; import "./Board.css"; import more from "../images/more.png"; import { Link } from "react-router-dom"; // import { Image, Item } from "semantic-ui-react"; function Board({ name, data, cat }) { return ( <div className="board"> <div className="board_he...
/** * 화면 초기화 - 화면 로드시 자동 호출 됨 */ function _Initialize() { // 단위화면에서 사용될 일반 전역 변수 정의 // $NC.setGlobalVar({ }); var ua = navigator.userAgent; if (ua.indexOf('Trident') != -1) { $('.print').css('position', 'static'); } } /** * 화면 리사이즈 Offset 세팅 */ function _SetResizeOffset() { } ...
/** * Created by hui.sun on 15/12/10. */ /** * 4pl Grid thead配置 * check:true //使用checkbox 注(选中后对象中增加pl4GridCheckbox.checked:true) * checkAll:true //使用全选功能 * field:’id’ //字段名(用于绑定) * name:’序号’ //表头标题名 * link:{ * url:’/aaa/{id}’ //a标签跳转 {id}为参数 (与click只存在一个) * click:’test’ //点击事件方法 参数test(index(当前索引)...
const logic = require('../../../logic') const { expect } = require('chai') const { database, models } = require('wannadog-data') const { User, Dog } = models describe('logic - retrieve favorites', () => { before(() => database.connect('mongodb://172.17.0.2/wannadog-test')) let name, name2, breed, breed2, gen...
import Boom from 'boom'; function findOneModel(request, reply) { let settings = request.route.settings.plugins.crudtacular; let model = new settings.model({ id : request.params[settings.idParam], }); let promise = model.fetch({ require : true, withRelated : settings.withRelated, }) .then(()...
var person = { name: 'suho', age:'33', phone: '010-2222-2222', eat : function(food){ console.log(this.name +' 가 '+food+' 먹는다') } }; //person.eat('사과'); //함수가 호출 되는 방법에 따라 this는 달라진다. function a() { console.log(this); } //a(); var p = { run : function () { console.log(this); } }; //p.run(); //3...
var express = require("express"), router = express.Router(), Appdata = require("../models/appdata"); var perPage = 8; //Sort by Publisher Route router.get("/sortbypublisher", function(req, res){ var pageQuerySort = parseInt(req.query.page); var pageNumberSort = pageQuerySort ? pageQuerySort : 1; ...
var fs = require('fs'); var http = require('http'); http.createServer(function(req,res){ var nF = fs.createWriteStream("temp.txt"); var fileBytes = req.headers['content-length']; var uploadedBytes=0; req.pipe(nF); req.on('data',function(chunk){ uploadedBytes+=chunk.length; var progress = (uploadedBytes/fileB...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ...
export { default } from './BtnBox4.js'
var GooglePlaces = require('node-googleplaces'); var request = require('request'); var gpKey = 'AIzaSyAC12HMebBTpRFxesa8X0CVEtq6VwE8Qjk'; const places = new GooglePlaces(gpKey); const params = { location: '41.1833, -8.6', radius: 100 }; let type = 'restaurant'; /* // Callback places.nearbySearch(query, (err,...
/** * Primitivos (imutáveis) => string, number, boolean, undefined, null, bigint, symbol - valores são copiados * Referência (mutável) => array, object, function - valores apontam pra um local na memória * */
import React from "react" const Filters = () => { return ( <div className="filters"> <h3>Category</h3> <div className="underline"></div> <form> <div className="check"> <label for="recreation"> <input className="option-recreation" value="...
import Img1 from '../img/grocery.jpg'; import Img2 from '../img/fruits_and_vegs.jpg'; import Img3 from '../img/furniture.jpg'; import Img4 from '../img/electronics.jpg'; const Sdata = [ { id:"gp", imgsrc:Img1, title:"Grocery products", text:"We provide grocery products that are fresh...
var Profile = require('./profile'); var renderer = require('./renderer'); var querystring = require('querystring'); var commonHeaders = { 'Content-Type': 'text/html'} function home(request, response) { if (request.url === '/') { if (request.method.toLowerCase() === 'get') { response.writeHead(200, commonHe...
import {pageSize, pageSizeType, paginationConfig, searchConfig} from '../../globalConfig'; const filters = [ {key: 'orderNumber', title: '运单号', type: 'text'}, {key: 'customerDelegateCode', title: '委托号', type: 'text'}, {key: 'customerId', title: '客户', type: 'search', searchType: 'customer_all'}, {key: 'supplier...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const buyerSchema = new Schema({ firstName: String, lastName: String, email: String, phoneNumber: String, password: String, googleID: String, facebookID: String, preferences: Schema.Types.ObjectId, matches: [ Sche...
// given an unsorted array of integers from 1 to N, // find the missing integer function findMissingConsecutive(nums) { var maxNum = Number.NEGATIVE_INFINITY; var size = nums.length; var sum = 0; for (var i = 0; i < size; i++) { var num = nums[i]; sum += num; if (maxNum < num) { maxNum = num;...
/** * Created by iyobo on 2016-04-24. */ /* Heap's algorithm generates all possible permutations of N objects */ function swap(array,i1, i2){ if(!Array.isArray(array)) { console.error("Not an array"+ array) return; } // console.log("swapping from "+array) var buffer = array[i1] array[i1] = array[i2] arr...
var gulp = require('gulp'), del = require('del'), gp_concat = require('gulp-concat'), gp_minify = require('gulp-minifier'), gp_cssmin = require('gulp-cssmin'); var libs = [ 'bower_components/gl-matrix/dist/gl-matrix-min.js', 'bower_components/mousetrap/mousetrap.min.js' ]; var views = [ 'public/index.html' ]; ...
var app = angular.module('movieSearch', []); var initInjector = angular.injector(['ng']); var $http = initInjector.get('$http'); //TODO: FINISH FUNCTION TO PARSE TITLE QUERIES titleParse = function(title) { var titleArr = title.split(''); for (var i = 0; i < titleArr.length; i++) { if (titleArr[i] == ' ') { ...
import React from 'react'; import { RecipeFlexCont, InnerPadding, ContainerMin } from './styles'; import { Heading, Paragraph } from '../../../Styling'; import Content from '../Content'; const TypeContent = props => ( <> <RecipeFlexCont> <InnerPadding> <ContainerMin> ...
import './ToDoTasks.css'; const ToDoTasks = (props) => { const showToDoTasks = props.values.map((prop) => { return <li key={prop.id}>{prop.task}</li>; }); return ( <div className='todo-list__container'> <div className='todo-list__controls'> <div className='todo-list__control'> <l...
import React from 'react' import PropTypes from 'prop-types' import { Modal, Form, Input, message, Col, Tag } from 'antd' import Upload from '../upload' const config = require('../../../utils/config') const { activeUrl } = config const urlObj = { upload: `${activeUrl}/api/actModel/import`, add: `${activeUrl}/api/...
module.exports = { root: true, extends: [ '@react-native-community', 'prettier', // 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/eslint-recommended' ], rules: { 'react/no-did-mount-set-state': 0, camelcase: 0, '@typescript-eslint/camel...
var delta = 0 var cubeLanes = 5 var cubeAmount = 20 var cubeSpacing = 5 var cubeGrid = { width: cubeLanes * cubeSpacing, height: cubeAmount * cubeSpacing } var cubeSpeed = 0.01 var cubeProbability = 0.2 var score = 0 // var scoreElement = document.getElementById('score') var generatingNotes ...
import React, {useEffect} from 'react' // Import Page styles import "../styles/Resource.css" // Importing Images import codecademy from "../../images/codecademy.png" import freecodecamp from "../../images/freecodecamp.png" import udemy from "../../images/udemy.jpg" import edx from "../../images/edx.jpg" import courser...
import React from 'react'; import { createStore, applyMiddleware, combineReducers } from 'redux'; import thunkMiddleware from 'redux-thunk' import { createLogger } from 'redux-logger' import { Provider } from 'react-redux'; import { Navigation } from 'react-native-navigation'; // reducers import api from 'oc/js/reducer...
import React from 'react'; import CheckBox from './CheckBox' import '../styles/App.css'; const ToggleIngredient = ({addToCart, ingredient}) => { const quantity = ingredient.quantity > 0 ? (ingredient.quantity + ' ' + ingredient.unit) : ''; return ( <div className="row" style={{marginBottom: "15px"}}> ...
import React from 'react'; import {Container} from "@material-ui/core"; import {useStyles} from "./styled"; import AuthForm from "../containers/AuthForm/AuthForm"; const AuthPage = () => { const classes = useStyles(); return ( <Container className={classes.root}> <AuthForm/> </Con...
import styled from 'styled-components'; export const List = styled.div ` height:3rem; margin-bottom:0.157rem; display:flex; text-decoration:row; box-sizing:border-box; padding:0.35rem; background:white; .ListItem-img{ flex:1; border-radius:1px; .ListItem-content_...
import React from 'react' import { shallow } from 'enzyme' import Comment from '../../../../app/components/Comment' describe('components', () => { describe('Comment', () => { const wrapper = shallow(<Comment author={'foo'}>{'bar'}</Comment>) it('should return author and comment', () => { expect(wrapper...
import './App.css'; import {BrowserRouter, Switch, Route} from 'react-router-dom'; import SearchForm from './components/SearchForm'; import DisplayPage from './components/DisplayPage'; function App() { return ( <div className="App"> <BrowserRouter> <h1>Welcome to Luke APIwalker</h1> <br /> ...
import { Editor, Mark, Raw } from '../..' import Frame from 'react-frame-component' import React from 'react' import ReactDOM from 'react-dom' import initialState from './state.json' /** * Injector to make `onSelect` work in iframes in React. */ import injector from 'react-frame-aware-selection-plugin' injector()...
const DeGiro = require('..'); const degiro = DeGiro.create({ username: 'croa98', password: 'Queteden123', }); degiro.login().then(degiro.getCashFunds) .then(console.log) .catch(console.error);
//view contains a single map var app = app || {}; app.MapView = Backbone.View.extend({ self: this, tagName: 'div', initialize: function() { this.listenTo(this.collection, 'change:displayed', this.updateLayerDisplay); }, render: function() { var self = this; //create a leaflet map this.map =...
const { prefix } = require("../config.json"); module.exports = { name: "say", description: "The bot will parrot whatever you say in a channel :)", args: true, // Include if command requires args usage: `<channel-id> <message> ex: ${prefix}say 742243914164994089 Amen!`, // Include if args is true guildOnly: t...
import { EXAMPLE_ENDPOINT } from '_Banking/api/example.endpoint' import { mockExampleEndpoint } from '_Banking/standalone/example.fixture' const { EXAMPLE } = EXAMPLE_ENDPOINT(1234) const matchExampleTable = { [EXAMPLE]: mockExampleEndpoint } export default matchExampleTable
import React from 'react' import PropTypes from 'prop-types' import { Flexbox } from '../../Layout' import { Link } from 'react-router-dom' import { Typography, Icon, Button, Divider } from '@material-ui/core' import DownloadIcon from '@material-ui/icons/CloudDownload' import YoutubeEmbed from './VideoEmbed' const get...
/** * This module contains various operations that will be * used in construction of the model Graph. */ /** * creates eskinOperations Object * @constructor * @param {String} rootElem fully qualified div selector * @param {Object} config a config object * @returns {Object} eskinOperations return eskinOperation...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsWysiwyg = { name: 'wysiwyg', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14c1.1 0 2-.9 2-2V5a2 2 0 00-2-2zm0 16H5V7h14v12zm-2-7H7v-2h10v2zm-4 4H7v-2h6v2z"/></svg>` };
define(function(require) { var Backbone = require('Backbone'); //Links are models meant to contain data for html links //{ // link: 'url/goes/here' // name: 'link-replacement //} var Link = Backbone.Model.extend({ defaults: { link: '', name: '' } }); return { ...
// TODO COMMENT // INITIAL STATE const initialState = { todos: [ { todo: "Make your first todo", checked: false }, ], }; if(localStorage.getItem('toedoe2')) { const persisted = JSON.parse(localStorage.getItem('toedoe2')); initialState.todos = [...persisted.state]; } // TYPES const ADD_TODO = "ADD_TO...
import Vue from 'vue' import toggleHeader from '../../../src/components/shared/layout/ToggleHeader' const Constructor = Vue.extend(toggleHeader) const vm = new Constructor({ propsData: { title: 'Test Header', collapsed: true, }, }).$mount() describe('toggle-header', () => { it('should ma...
var tabDict = { 0: "Home", 1: "Interests", 2: "Skills", 3: "Experience" 4: "Projects" 5: "Contact and Other" }; var numVisibleTabs = 5; class TabView extends React.Component { renderTabTopicSelector () { } renderTabContent () { } render(){ } } class TabSelector e...
const TwingNodeExpressionConstant = require('../../../../../../lib/twing/node/expression/constant').TwingNodeExpressionConstant; const TwingTestMockCompiler = require('../../../../../mock/compiler'); const TwingNodeExpressionName = require('../../../../../../lib/twing/node/expression/name').TwingNodeExpressionName; con...
import React from "react"; import Blogs from "../Blogs/Blogs"; import ContactUs from "../ContactUs/ContactUs"; import Doctors from "../Doctors/Doctors"; import Exceptional from "../Exceptional/Exceptional"; import Footer from "../../Shared/Footer/Footer"; import Header from "../Header/Header"; import Services from "../...
(function (cjs, an) { var p; // shortcut to reference prototypes var lib={};var ss={};var img={}; lib.ssMetadata = []; // symbols: // helper functions: function mc_symbol_clone() { var clone = this._cloneProps(new this.constructor(this.mode, this.startPosition, this.loop)); clone.gotoAndStop(this.currentFrame); ...
import createNode from "./createNode"; /** * @function modal * @param {HTMLElement} content */ const makeModal = (content) => { const modalNode = createNode("div", { class: "o-modal" }); modalNode.addEventListener("click", (e) => { if (e.target === modalNode) { modalNode.remove(); } }); modalN...
import React from 'react' import '../Styles/Menu.css' import { withRouter, Redirect } from 'react-router-dom' import {connect} from "react-redux"; import PropTypes from 'prop-types' import {logout} from "../actions/auth" import { useHistory } from 'react-router-dom'; const Menu = ({auth}) => { let history = useHist...
import React from "react"; import useNavigation from "../navigation/useData.hook"; import SelectingCharacterByPlayerOne from "./left/selectingCharacterByPlayerOne.presenter"; import SelectingCharacterStyleByPlayerOne from "./left/selectingCharacterStyleByPlayerOne.presenter"; import SelectingCharacterColorByPlayerOne f...
import React, { Component } from "react"; import Board from "./Board"; import "./index.css"; const tail = arr => arr[arr.length - 1]; const calculateWinner = squares => { const lines = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4...
import * as path from "path"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import rollupReplace from "@rollup/plugin-replace"; export default defineConfig({ server: { port: 3000, }, plugins: [ rollupReplace({ preventAssignment: true, values: { __DEV_...
/* eslint-env jest */ import React from 'react'; import { shallow } from 'enzyme'; import { Bio } from '../Bio'; it('renders Profile component without crashing', () => { shallow( <Bio profile={[]} avatar followers following />, ); });
import React from 'react' import { configure, shallow } from 'enzyme' import Counter from '../src/Counter' import Adapter from 'enzyme-adapter-react-16' import _ from 'lodash' configure({ adapter: new Adapter() }) test('Counter accepts initial value', () => { const wrapper = shallow(<Counter initial={123} />) exp...
module.exports = { database: "mongodb://localhost/party", secret: "Endless Sunshine in Darkness" };
// ref (nav bar idea taking from ):https://startbootstrap.com/theme/creative var navbarCollapse = function () { if ($("#mainNav").offset().top > 100) { $("#mainNav").addClass("navbar-scrolled"); } else { $("#mainNav").removeClass("navbar-scrolled"); } }; navbarCollapse(); $(window).scroll(...
import React, {Component} from 'react'; import { Text, StyleSheet, View, SafeAreaView, TextInput, TouchableOpacity, } from 'react-native'; import {Formik} from 'formik'; import * as Yup from 'yup'; const loginSchema = Yup.object().shape({ email: Yup.string() .email('Email Khong Hop le') .required(...
module.exports = ["index.md","test.md"]
$(function(){ $("#searchword").focus(function(){ $("#searchword").css("width","340px"); //$("#searchword").animate("width","340px"); }); $("#searchword").blur(function(){ $("#searchword").css("width","200px"); //$("#searchword").animate("width","200px"); }); $(".left-ul-li").click(function(){ $(".lef...
"use strict"; const dotenv = require("dotenv"); dotenv.config(); const log4js = require("log4js"); const logger = log4js.getLogger("APP.JS"); const express = require("express"); const fileupload = require("express-fileupload"); const session = require("express-session"); const http = require("http"); const path = r...
const validator = require('validator'); const bcrypt = require('bcrypt-nodejs'); var models = require('../models'); var Users = models.users; module.exports = { getUser: function (req, res, next) { var id = req.params.id; var user = req.user; if (!id) { return res.status(400).json({ success: false, messag...
Ext.Loader.setConfig({ enabled: true }); Ext.Loader.setPath('Ext.ux', '/Scripts/Ext4.0/ux'); Ext.require([ 'Ext.form.Panel', 'Ext.ux.form.MultiSelect', 'Ext.ux.form.ItemSelector' ]); var pageSize = 25; //聲明grid Ext.define('GIGADE.OrderBrandProduces', { extend: 'Ext.data.Model', fields: [ //...
(function(){ 'use strict'; angular.module('app.sedes', [ 'app.sedes.controller', 'app.sedes.services', 'app.sedes.router', 'app.sedes.directivas' ]); })();
const supertest = require('supertest'); const should = require('should'); const server = supertest.agent('http://localhost:8080'); const credentials = {username: 'supermocha', password: 'superpassword'}; const mockPost = {title: 'should', body:'supertest', author:'supermocha'}; describe('Index Route', function () { i...
import fb from 'firebase/app' class Service { constructor (title, description, imgSrc = '', promo = false, advantages, gallery, id = null) { this.title = title this.description = description this.imgSrc = imgSrc this.promo = promo this.advantages = advantages this.gallery = gallery this.i...
import { connect } from 'react-redux'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import PlayerList from './PlayerList'; import { requestPlayerReadyState } from './../../../shared/actions'; import styles from './lobby.less'; class Lobby extends Component { constructor(props) { sup...
function Kirba(game, x, y){ //constructor for main character Phaser.Sprite.call(this, game, x, y, 'kirba'); this.anchor.set(0.5, 0.5); } Kirba.prototype = Object.create(Phaser.Sprite.prototype); Kirba.prototype.constructor = Kirba; //move method Kirba.prototype.move = function (direction) { //-1 will be left, +1 is...
const express = require('express'); const Router = express.Router(); const { getAllProducts, getProduct, postProduct, putProduct, deleteProduct } = require('../controller/products'); const { uploadFile } = require('../middleware/files'); Router .get('/', getAllProducts) .get('/:id', getProduct) .post...
window.onload = function () { // window.location.assign("https://www.w3schools.com") clicked() // if(Qno > 1){ // location.replace("https://www.w3schools.com") // } }; function start(){ clicked() alert("Start") } var QScreen = document.getElementById("Question-screen"); var question = document.getElementB...
function (x, global) { // pseudo imports (avoids having to use fully qualified names) var vtkImageData = vtk.Common.DataModel.vtkImageData; var vtkActor = vtk.Rendering.Core.vtkActor; var vtkImageMarchingCubes = vtk.Filters.General.vtkImageMarchingCubes; var vtkMapper = vtk.Rendering.Core.vtkMapper; var e...
var searchData= [ ['plansza',['Plansza',['../classokienka_1_1_plansza.html',1,'okienka']]] ];
/* global describe, beforeEach, it, browser, expect */ 'use strict'; var GalleryPagePo = require('./gallery.po'); describe('Gallery page', function () { var galleryPage; beforeEach(function () { galleryPage = new GalleryPagePo(); browser.get('/#/gallery'); }); it('should say GalleryCtrl', function (...
import React from 'react'; import ReactDOM from 'react-dom' import { BrowserRouter as Router, Route, Link } from 'react-router-dom' ///HEADER import Header from './components/Header/Header' import HeaderMenuTimeline from "./components/HeaderMenu/HeaderMenuTimeline"; import HeaderMenuCash from "./compon...
import React from 'react' import ReactDOM from 'react-dom' window.React = React window.ReactDOM = ReactDOM // アプリケーション共通の名前空間を用意する window.ReactRailsSample = {} ReactRailsSample.Components = require('./components');
/** * Created by Danylo Tiahun on 25.03.2015. */ $(document).ready(function () { function verifyLogin() { if(logins.indexOf($('#users').val()) < 0 && !$('#allUsers').is(':checked')) { $('#noLoginLabel').prop('hidden', false); return false; } return true; } ...
window.bg_towards = 0; window.bg_last = 0; (() => { let lastTime = 0 const second = 1000 const frames = 60 const jumps = 20 let f = (t) => { if(window.stop_loop === true) return if((t - lastTime) >= second/frames) { let x = window.bg_last let change = (x-win...
var hooksObject = { onSubmit: function(insertDoc, updateDoc, currentDoc) { var that = this var shopper = { email: insertDoc.email, password: insertDoc.password, roles: [Mart.ROLES.GLOBAL.SHOPPER], profile: { firstName: insertDoc.firstName, lastName: insertDoc.lastName ...
export default class CrossFire { constructor(container, config) { this.container = container || document.body; this.canvas = this.createCanvas('experiment'); this.active = false; this.ctx = this.canvas.getContext('2d'); this.cfg = this.setConfigSettings(config); this.gap = {}; this.object...
import React, { useState, useContext } from "react"; import { Link } from "react-router-dom"; import empty from "../assets/empty.svg"; import all from "../assets/all.png"; import alldark from "../assets/alldark.png"; import exit from "../assets/exit.png"; import roles from "../assets/roles.png"; import branches from "....
import React, {Component} from 'react'; import {Redirect} from 'react-router-dom'; import Form from 'react-bootstrap/Form'; import Button from 'react-bootstrap/Button'; import {UserConsumer} from '../components/context/user'; import CategoriesService from '../services/categories-service'; import toastr from 'toas...
class Sun { constructor() { const geom = new THREE.SphereGeometry(50, 40, 40); const mat = new THREE.MeshPhongMaterial({ map: new THREE.TextureLoader().load("./assets/img/sun.jpg") }); this.mesh = new THREE.Mesh(geom, mat); this.mesh.castShadows = false; this.mesh.receiveShadows = fals...
function DlgSelectDataset(mapContainer,obj,options) { options=options||{}; options.rtl=(app.layout=='rtl'); options.showOKButton=false; options.cancelButtonTitle='Close'; DlgTaskBase.call(this, 'DlgSelectDataset' ,(options.title || 'Select Document') , mapContainer,obj,options); var se...
import React from 'react'; import {ViewTodo} from './viewTodo'; import {EditTodo} from './editTodo'; export class ToDo extends React.Component { constructor(props){ super(props); const todo = this.props.todo; this.state = { id : todo.id, title : todo.title, ...
(function(){ //老的写法,用加号连接,换行是不允许的 /*var roadPoem = 'Then took the other, as just as fair,nt' + 'And having perhaps the better claimnt' + 'Because it was grassy and wanted wear,nt' + 'Though as for that the passing therent' + 'Had worn them really about the same,nt' var fourAgreements = 'You...