text
stringlengths
7
3.69M
'use strict'; angular.module('myApp.selectedList', ['ngRoute']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/selectedList', { templateUrl: 'selectedList/selectedList.html', controller: 'SelectedListCtrl' }); }]) .controller('SelectedListCtrl', function($scope, $http, $rootS...
import * as MyTaxiRulesActionType from '../actiontypes/myTaxi'; const INITIAL_STATE = { ids: [], content: {}, }; function normalize(taxiesList) { const ids = []; const content = {}; taxiesList.poiList.forEach((taxi) => { ids.push(taxi.id); content[taxi.id] = taxi; }); return { ids, conte...
const fs = require('fs') const storage_path = base+'Storage/'; function putAs(path,fileName, fileBuffer){ save(path+'/'+fileName, fileBuffer) } function put(path, fileBuffer) { save(realPath(path)+uniqueString(), fileBuffer) } function save(path,fileBuffer) { try { fs.writeFile(realPath(path), f...
import React, { Component } from 'react' import { Container, Row, Col } from 'react-bootstrap'; import ButtonGr from '../Elements/ButtonGr'; class CallOut extends Component { render() { return ( <div className="call-out-sec"> <Container> <Row> <Col...
/* Not a *real* interface, as JS doesn't support them! The Provider's service.js file should have all of the below functions held in a global Video object attached to the Window **This file WILL NOT WORK as a Javascript file** */ // loads the video into the given DIV element Video.embedVideo(videoId, elementI...
console.log(Number("555")); console.log(typeof(Number("555"))); console.log(String(2345)); console.log(typeof(String(2345))); console.log(Boolean(1)); console.log(typeof(Boolean(1))); console.log(""); console.log(!!4); console.log(!!0); console.log(typeof(453 + "")); console.log(typeof(+ "453")); var number = 15; cons...
const addResult = document.querySelector(".add-result"); let addressUser = (user) => { addResult.addEventListener("click", () => { if (user == "") alert("Vui lòng đăng nhập để sử dụng tính năng này"); else { (async (id) => { let addressCollection = await db.collection("Addresses").doc(id); ...
import React from 'react' import DetailPostContainer from '../containers/DetailPostContainer' function DetailPost() { return ( <div> <DetailPostContainer /> </div> ) } export default DetailPost
const express = require('express'), router = express.Router(), Cinema = require('../models/cinema'); router.get('/', function(req, res){ Cinema.find({}, function(err, cinemaLists){ if(err){ req.flash('error', 'Something went wrong.'); res.redirect('/'); }else{ ...
// Copyright (c) 2016-2018, BuckyCloud, Inc. and other BDT contributors. // The BDT project is supported by the GeekChain Foundation. // All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // ...
import * as React from 'react'; const injectProp = WrappedComponent => props => <WrappedComponent {...props} injected={42} />; const MyComponent = (shouldBePassed, injected) => shouldBePassed.toFixed() + injected.toFixed(); const MyEnhancedComponent = injectProp(MyComponent); export const Usage = () => ( <div> ...
// Configure paths for vendor libraries require.config({ paths: { jquery: '/vendor/require-jquery.js', underscore: '/vendor/underscore-min.js', backbone: '/vendor/backbone-min.js', } }); require(['app'], function(App) { App.initialize(); })
angular.module("shop2App").controller('zyqj', ['$scope','$http','$stateParams', function($scope,$http,$stateParams){ $scope.zybool=true; $scope.zy_img="images/zy-1.jpg" $scope.zy_xiala=function(){ if ($scope.zybool) { $scope.zy_img="images/zy-2.png" $scope.zybool=false; }el...
import { isString } from 'lodash' import { toUnit, toPrecision } from 'Utilities/convert' const createStatus = (code, label, labelClass) => (detailsCode, details) => ({ code, label, labelClass, detailsCode, details }) const statusPending = createStatus('pending', 'Processing', 'text-primary') const statusFailed = cr...
import React, { PureComponent } from 'react'; import Head from 'next/head'; import Router from 'next/router'; import Masthead from 'molecules/masthead'; import MainNav from 'organisms/main-nav'; import Fonts from 'util/fonts.js'; import stylesheet from 'styles/style.scss'; class Header extends PureComponent { async c...
import Welcome from "../containers/Welcome/Welcome"; import Today from "../containers/Today/Today"; import Login from "../containers/Login/Login"; var dashRoutes = [ { path: "/welcome", name: "Welcome", icon: "ui-1_bell-53", component: Welcome }, { path: "/dashboard", name: "Today", i...
$(function() { function Contenido(num){ var Botones =` <div class="btn-group" role="group" aria-label="..."> <button type="button" id="Binomial" class="btn btn-primary">Binomial</button> <button type="button" id="Poisson" class="btn btn-primary">Poisson</button> <button type="button" id="N...
import React, { Component } from 'react'; import logo from './logo.svg'; import parseData from './helperFunctions'; import './App.css'; var config = require('./config.json'); class App extends Component { state = { isDragged: false, img : "", text: [] } componentDidMount(){ } handleImage(read...
import React from 'react'; import { render, } from '@testing-library/react-native'; import App from '../App'; let component; describe('<App />', () => { beforeEach(() => { component = render(<App />); }); it('It should render correctly', () => { expect(component).toBeDefined(); }); it('it should r...
import React from "react"; import { mount } from "enzyme"; import App from "../App"; import SearchBar from "../SearchBar"; import Root from "../../Root"; let wrapped; beforeEach(() => { wrapped = mount( <Root> <App /> </Root> ); }); it("shows a search bar", () => { expect(wrapped...
import React from 'react'; import bootstrap from 'bootstrap/scss/bootstrap.scss'; import classes from './HeadingTitle.scss'; import Aux from '../../../hoc/Aux/Aux'; import { CURRENT_MESES } from '../../../scripts/config'; const HeadeingTitle = ({ title, date, detailsHead, categDetails }) => { let details; if (de...
18 gid=1329781531 17 uid=183816338 20 ctime=1441138964 20 atime=1441138971 23 SCHILY.dev=16777221 23 SCHILY.ino=32546114 18 SCHILY.nlink=1
class Player { constructor(ctx) { this.ctx = ctx; this.x = 500; this.y = 420; this.width = 40; this.height = 40; this.distance = 15; this.direction = 'right'; } goRight() { this.x += this.distance; if (this.x > 900) { ...
import $ from '../../core/renderer'; import { extend } from '../../core/utils/extend'; import eventsEngine from '../../events/core/events_engine'; import { addNamespace } from '../../events/utils/index'; import { name as clickEventName } from '../../events/click'; import { getImageContainer } from '../../core/utils/ico...
input = [20, 0, 1, 11, 6, 3] function elfMemoryGame(starting, target) { let memory = new Map(); starting.forEach((num, idx) => { memory.set(num, idx + 1); }) let turn = starting.length + 1; let currNum = 0; while (turn <= target) { if (turn === target) { break; ...
import React, { useState, useEffect } from "react"; import { connect } from "react-redux"; import api from "../../utils/api"; //START Charlie import { editClass } from "../../actions/classes"; import { deleteClass } from "../../actions/classes"; import ClassCard from "./ClassCard"; //END Charlie const CardsList = pr...
export default (sequelize, DataTypes) => { const Category = sequelize.define('Category', { id: { type:DataTypes.STRING, primaryKey:true, unique:true, }, name: { type:DataTypes.STRING, unique:true } }); Category.associate = function(model...
export default [ { prop: 'name', label: '规格名称', rule: { required: true, message: '请输入规格名称' }, render(h) { return <i-input v-model={this.model} placeholder='请输入规格名称'></i-input> } }, { prop: 'value', label: '规格值', rule: { required: true, message: '请输入规格值' }, render(h) { h = this.$root.$createE...
import support from "./support.js"; // import Draggable from "./Draggable.js"; import "./polyfills/polyfill"; // перетаскивание плеера import HLSPlayer from "./players/hls/HLSPlayer.js"; import SLDPPlayer from "./players/sldp/SLDPPlayer.js"; import Na...
/** * Socket.io configuration */ 'use strict'; module.exports = config; import _ from 'lodash'; // const statusSocket = require('../api/status/status.socket'); const remoteCommandsSocket = require('../api/remoteCommands/remoteCommands.socket'); const sockData = require('../components/sockData'); const session = r...
const mongoose = require('mongoose'); const printerSchema = mongoose.Schema({ _id: mongoose.Schema.Types.ObjectId, type: {type: String}, models : {type: String}, marque: {type:String}, paper: {type: String}, }); module.exports = mongoose.model('Printer', printerSchema);
var async = require('async'); var MongoClient = require('mongodb').MongoClient , assert = require('assert'); // var url = 'mongodb://localhost:27017/myproject'; var crudFunctions = []; var allResults = {}; module.exports = function(app, url) { app.get('/testseed', function(req, res) { // setup ...
// classes class Artist{ constructor(name){ // constructor is a reserved keyword this.name = name; } perform(){ console.log(`${this.name} is perfroming on stage tonight`); } } const artist = new Artist('Madan'); console.log(artist); artist.perform(); // Inheritance class Dancer ext...
import React, { Component } from 'react'; import './Card3.css'; class Card3 extends Component { render() { return ( <div className="cardBg" style={{ height: 480, }} ></div> ); } } export default Card3;
angular.module('starter') .factory('remoteStorage', ['$q','$http', function($q, $http) { var localStorage = {}; return { set: function(key, value) { return $q(function (resolve, reject) { resolve(localStorage[key] = JSON.stringify(value)); resolve(); ...
/** * Created by Administrator on 2017/7/10 0010. */ const URLPATH1 = "http://192.168.10.228:8080/jad-saas-mgmt/api/"; const URLPATH="src/assets/js/api/"; // const URLPATH1="http://192.168.132.134:8080/jad-saas-mgmt/api/"; // const URLPATH1="http://127.0.0.1:8080/jad-saas-mgmt/api/"; // const URLPATH1="http://127....
export default { newValue({ commit }, { value, operation }) { if (operation == 'buy') commit('set_new_minor_value', value) else commit('set_new_higher_value', value) } }
export default function betterContrastColor(hex) { let threshold = 130; // about 256/2 - lower values results into darker text on dark background let colorBrightness = (hexToRed(hex) * 299 + hexToGreen(hex) * 587 + hexToBlue(hex) * 114) / 1000; function cleanHex(h) { return h.charAt(0) == "#" ? h.substri...
// ParkMe // spot.js // Apoorva Sharma - September 2014 // Class to represent one parking spot. Holds the information of // var EventEmitter = require("events").EventEmitter; var EventSource = require('eventsource'); // spot_id: Unique-in-lot id of this spot // device_id: Spark core id // device_sensor_index: int...
/// <reference path="../libs/jquery-1.10.2.js" /> /// <reference path="../libs/jquery-ui-1.10.3.js" /> /// <reference path="guidemanager.js" /> /// <reference path="TranslationsJs.js" /> /// <reference path="ui.js" /> /// <reference path="tabmanager.js" /> /// <reference path="utils.js" /> /// <reference path="validat...
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; import Button from '@material-ui/core/Button'; const useStyles = makeStyles((theme) => ({ root: { '& > *': { marginBottom: theme.spacing(1), width: ...
import React from 'react'; function BigButton (props) { return ( <svg width='100' height='50' onClick={props.onClick}> <rect width='100' height='50' rx='25' ry='25' stroke='black' fill='black'/> <rect x='2' y='2' width='96' height='46' rx='23' ry='23' stroke='black' fill='white'/> <text x='50' ...
let pokemonRepository = (function () { let pokemonContainer = []; let apiUrl = "https://pokeapi.co/api/v2/pokemon/?limit=150"; //adds pokemon name and type from apiUrl function add(pokemon) { if (typeof pokemon === "object" && "name" in pokemon && "type") { pokemonContainer.push(pokemon); } else ...
import React from 'react' import { Link } from 'react-router-dom' import './Header.scss' const Header = () => { return ( <header className="portfolio-header"> <Link to={'/'}> <h1>Lucas Vocos</h1> </Link> <Link to='/contact'> Info </Link>...
app.filter('isMine', function() { 'use strict'; return function(input) { switch (input) { case false: return "img/false.png"; case true: return "img/true.png"; } }; });
Scoped.define("module:VideoRecorder.Dynamics.Controlbar", [ "dynamics:Dynamic", "module:Templates", "module:Assets", "base:Timers.Timer" ], [ "dynamics:Partials.ShowPartial", "dynamics:Partials.RepeatPartial" ], function (Class, Templates, Assets, Timer, scoped) { return Class.extend({scoped: scoped...
'use strict'; const sql = require('mssql'); var config = { user: 'dboBI', password: 'UserSQL', server: '172.10.1.4', database: 'DWH_BI' }; sql.connect( config, function (err, result ) { if (err){ return console.log(err); } new sql.Request().query('SELECT * FROM DI...
/** * Created by wei.shen on 2015/12/6. */ metaApp.controller('DetailCtrl',function($scope,$resource,restfulService) { $scope.tableId = parserUrl("mid"); var model = restfulService.model.query({tableId:$scope.tableId}); model.$promise.then(function(data) { $scope.model = data.model; },functi...
console.log("Blog"); Ochs.pageType = "blog"; $("a[name='top']").css("display", "none !important");
myApp= angular.module('myApp',[]); myApp.controller("MyConTroller",['$scope',function($scope){ $scope.name="Troy is here!!!! yay!!!"; }]);
var myMap = L.map('myMap').setView([34.419201, -119.698634], 12); L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imager...
import React, {Component} from 'react'; import {Jumbotron,Button,Media } from 'reactstrap'; export default class Content extends Component { render() { return( <Jumbotron> <h1 className="display-6">«ОНА»: как мы придумали образы искусственного интеллекта</h1> <p...
import axios from 'axios' const baseUrl = '/api/login' const login = async credentials => { try { const response = await axios.post(baseUrl, credentials) return response.data }catch(error){ console.log(error) } } // eslint-disable-next-line import/no-anonymous-default-export expo...
var replaceWords = function(dict, sentence) { let h = {}; dict.forEach(word => { h[word] = true; }) let newS = sentence.split(" ").map(word => { for (let i = 1; i <= word.length; i++) { if (h[word.slice(0,i)]) { return word.slice(0,i) } } return word }) return...
import test from "ava"; import TemplateLayout from "../src/TemplateLayout"; test("Layout", t => { t.is( new TemplateLayout("default", "./test/stubs").getFileName(), "default.ejs" ); }); test("Layout already has extension", t => { t.is( new TemplateLayout("default.ejs", "./test/stubs").getFileName(),...
import { Modal, Button } from 'antd'; import { useState } from 'react'; import ColumnDiagram from './ColumnDiagram'; function ColumnHeader({ title, colKey }) { const [isModalVisible, setIsModalVisible] = useState(false); const showModal = () => { setIsModalVisible(true); }; const handleOk = () => { s...
/** * @author Amazzing * @copyright Amazzing * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* */ $(document).ready(function(){ if ($('.gbwa_posts.home_carousel, .gbwa_posts.col_carousel').length > 0){ $('head').append('<script src="'+carousel_js+'"></script>'); $...
import Vue from "vue"; export default function create(Component, props) { // const vm = new Vue({ // render(h) { // return h(Component, {props}); // } // }).$mount(); // document.body.appendChild(vm.$el); // const comp = vm.$children[0]; // comp.remove = () => { // document.body.removeChild(vm.$el); // ...
const express = require('express'); const server = express(); const bodyParser = require('body-parser'); server.use(bodyParser.urlencoded({ extended: true })); server.get('/', (req, res) => { res.status(200).json({ msg: 'OK' }); }); // client POST localhost/data x-www-form-urlencoded // value=223 // see correspon...
new Vue({ el: '#app', data: { number: null, max: 12, results: [], }, methods: { times: function() { this.results = []; if (! this.number || this.number === "0") { return; } for (var i = 1; i <= this.max; ...
import { connect } from "react-redux"; import withStyles from "@material-ui/core/styles/withStyles"; import BlogComponent from "../../views/Blog/blog"; import { fetchBlogs, postBlogDetails, putBlogDetails, deleteBlog } from "../../actions/actions_vendor_blog"; import { postImage } from "../../actions/actions_imageuploa...
import 'regenerator-runtime/runtime'; import { createBrowserHistory } from 'history'; import { applyMiddleware, compose, createStore } from 'redux'; import { routerMiddleware } from 'connected-react-router'; import createSagaMiddleware from 'redux-saga'; import createRootReducer from './reducers'; import { persistStore...
const { performance } = require('perf_hooks') function addUpto(num) { let sum = 0 for (let i = 1; i < num; i++) { sum += i } return sum } const t1 = performance.now() console.log(addUpto(100000000)) const t2 = performance.now() console.log(`Time: __${t2 - t1}__`) // HOW THE RUN TIME OF FUNCTION GROWS AS...
import React from 'react' import ReactDom from 'react-dom' import MainPanel from './components/main_panel' import MDSpinner from "react-md-spinner"; let urlencode = require('urlencode'); let iconv = require('iconv-lite'); let axios = require('axios'); let api = require('./constants/api'); class Icon extends React.Comp...
import React from "react"; import {StyledHeaderUserName} from "../../../layout/header/user/StyledHeaderUserName"; class HeaderUserName extends React.Component { render () { return <StyledHeaderUserName> Alessandro Gonzales </StyledHeaderUserName> } } export default HeaderUserName
// Calculate median given an array and length of the array module.exports = { calculate: function(dataArray, len) { var lowerIndex = Math.floor((len-1)/2); var upperIndex = Math.ceil((len-1)/2); var median; if((len) % 2 != 0) median = dataArray[lowerIndex]; else median = (dataArray[low...
"use strict"; exports.themeReadyCallback = void 0; var _callbacks = _interopRequireDefault(require("../core/utils/callbacks")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var themeReadyCallback = new _callbacks.default(); exports.themeReadyCallback = themeReadyCa...
const jwt = require('json-web-token'); const PosterModel = require('../MongoDB/PosterModel'); class PosterService { constructor() { } async newPost(body) { return { "aa": "aaa" }; } } module.exports = new PosterService();
const app = require('app'); const logger = require('services/logger'); const port = process.env.EXPRESS_PORT; app.listen(port, () => { logger.info('Server running on port: ' + port); });
"use strict"; const serialize = obj => { var str = [] for(let p in obj) if (obj.hasOwnProperty(p) && obj[p]) { str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p])) } return str.join('&') } const requiredObjParams = (obj, required) => { return (req, res, next) =>{ // Check if ob...
var map; var markers=[]; function initmap(){ map=new google.maps.Map(document.getElementById('map'),{ center: {lat: 40.7413549, lng: -73.9980244}, zoom:13, styles:[{elementType: 'geometry', stylers: [{color: '#242f3e'}]}, {elementType: 'labels.text.stroke', stylers: [{color: '#242f...
import Counter from './Counter' import Todos from './Todos' const Api = { Counter, Todos, } export { Counter, Todos, } export default Api
import UserApikey from "./UserApikey"; export {UserApikey} export default UserApikey
function activate(id, id_class_object) { sendData({ url:'modules/activateObject.php', statbox:'status', method:'POST', data: { id_object: id, id_class_object: id_class_object }, success:function(data) ...
/* * Copyright (C) 2021 Radix IoT LLC. All rights reserved. */ PageFactory.$inject = ['maJsonStore', 'MA_UI_PAGES_XID', 'maUtil', '$q', 'maDialogHelper', 'maUser']; function PageFactory(JsonStore, MA_UI_PAGES_XID, Util, $q, maDialogHelper, maUser) { class Page { getPages() { return JsonStore...
function index(req, res){ res.json( { message: "Available Endpoints for Asset Management Tool - updated 30Jul2019", documentation_url: "https://github.com/rccacho/asset_management_tool", base_url: "localhost:3000", endpoints: [ { method: "GET", path: "/api", ...
ricoApp.controller('CustomerSearchControll', function($scope, $uibModal, PeristentFactory,IndexedDb){ $scope.search={customerOrNo:""}; $scope.customersShortList=[]; $scope.searchCompany=function(){ if($scope.search.customerOrNo.length>=0){ $scope.customersShortList=[]; PeristentFactory.search($scope.sear...
// const localStorage = window.localStorage export function getStorageByKey(key) { return localStorage.getItem(key) } export function setStorageByKey(key, data) { return localStorage.setItem(key, data) }
const express = require('express'); const router = express.Router(); const {register,login,getUser,logout,imageUpload,forgotPassword,resetPassword,editDetails} = require('../contorllers/auth'); const {getAccessToRoute} = require('../middlewares/authorization/auth'); const profileİmage = require('../middlewares/li...
import React from "react"; import Page from "../components/layouts/main"; import Head from "next/head"; export default () => ( <Page activePath="contact" title="Contact" description="Een afspraak maken bij kinesitherapeut Kevin Bal te Kontich kan telefonisch of online" > <Head> <link rel="can...
/** * @param {} options */ module.exports = (function(Tsunaruts) { return Tsunaruts.Model.extend({ schema : { uuid : { type : String, index: true }, region : { type : String, index: true }, mstUserId : { type : String, index: true }, name : String, accountId : String, stat...
import React, { useState, useEffect } from "react"; import Button from "../styledComponents/Button"; import styled from "styled-components"; const BtnContainer = styled.div` display: flex; flex-direction: row; justify-content: space-around; align-items: center; width: 90%; margin: auto; gap: 30px; `; c...
/** * Plugin wrapper. * @param {Object} config_opts configuration options * @constructor */ annotorious.plugin.PolygonSelector = function(config_opts) { if (config_opts) this._activate = config_opts.activate; } /** * Attach a new selector onInitAnnotator. */ annotorious.plugin.PolygonSelector.prototype.on...
import React from 'react'; import { Redirect } from 'react-router-dom'; import { Grid, Row, Col, Button } from 'react-bootstrap'; import { PageWrapper } from '../../constants/constants'; import PrimaryMenu from '../menus/PrimaryMenu'; export default class HomePage extends React.Component { render = () => { if (...
import React, { Component } from 'react' import {BrowserRouter, Route, Switch} from 'react-router-dom' import {connect} from 'react-redux' import {keepLogin} from '../actions' import HomePage from './HomePage' import Register from './Register' import Login from './Login' import Welcome from './Welcome' import Header f...
import React from 'react' import R from 'ramda' import autobind from 'autobind-decorator' import type { HandleSubmitType, DispatchType, UserType } from 'flow/types' import { Field, reduxForm } from 'redux-form' import validator, { required, passwordLength } from 'src/lib/validator' import { connectWithRequests } from '...
import React, { Component } from 'react'; import Table from './components/Table'; import Toolbar from './components/Toolbar'; import Icon from './components/Icon'; import data from './model'; class App extends Component { constructor(props) { super(props); this.updateTableState = this.updateTableState.bind(t...
class PubSubHandler { constructor (){ this.eventPool = new Map() } off (name){ this.eventPool.delete(name) } trigger (name, ...args){ this.eventPool.get(name) && this.eventPool.get(name).forEach(callback => callback(...args)); } on (name, callback){ let topic = this.eventPool.get(na...
const VSHADER_SOURCE = ` uniform float u_time; void main() { gl_Position = vec4(fract(sin(u_time)), 0.0, 0.0, 1.0); gl_PointSize = 10.0; } `; const FSHADER_SOURCE = ` void main() { gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0); } ` function main() { const canvas = document.querySelector("#canvas");...
import React from "react"; import TextInput from "../../forms/inputs/text"; import TextareaInput from "../../forms/inputs/textarea"; import RadioInput from "../../forms/inputs/radio"; import CheckboxInput from "../../forms/inputs/checkbox"; //import SelectInput from "../../forms/inputs/select"; class Options extends Re...
class DataManager { /** * l'adresse du serveur * @type {String|null} */ src = null; /** * l'ensemble des produits * @type {Array|null} */ products = null; constructor() { this.src = "http://localhost:3000/api/teddies/"; } /** *permet de récupére...
import React from 'react' import * as booksActions from '../../state/ducks/booksDuck' import * as booksSelectors from '../../state/selectors/booksSelectors' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { Row, Col } from 'antd' import styled from 'styled-components' import Book...
const questions = [ ['How many planets are in the Solar System?', '8'], ['How many continents are there?', '7'], ['How many legs does an insect have?', '6'], ['What year was JavaScript created?', '1995'] ]; // This stores the correct questions const correct = []; const inncorrect = []; let correctAnswers = 0...
import add from "./add"; console.log(add(3, 5));
/* * Copyright (C) 2021 Radix IoT LLC. All rights reserved. */ applyThemeDirective.$inject = ['maTheming']; function applyThemeDirective(maTheming) { class ApplyThemeController { static get $$ngIsClass() { return true; } static get $inject() { return ['$element']; } ...
import { atom } from 'jotai'; export const userData = atom({}); export const logged = atom(false);
class Drop{ constructor(x,y){ this.x = x; this.y = y; var options = { friction: 0.001, restitution:0.1 } this.drop = Bodies.circle(x,y,3, options) World.add(world,this.drop) this.radius = 10 this.image = lo...
angular .module('djapp') .factory('offersCountService', function () { var self = this; self.NewOffersCount = 0; self.offers = []; self.getNewOffersCount = function () { self.NewOffersCount = 0; angular.forEach(self.offers, function(offerItem) { ...
const { errorManager } = require('./errorManager.js'); const { readFileSync } = require('fs'); const { assert } = require('./utility.js'); function isDigit(c) { return c >= '0' && c <= '9'; } function isLetter(c) { return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); } const puncts = ['==', '!=', '>=', '...
import debug from 'debug'; const logger = debug('sdmx:data'); const init = context => { // eslint-disable-line const promise = new Promise(resolve => { logger('Data loaded'); resolve(context); }); return promise; }; export default init;