text stringlengths 7 3.69M |
|---|
module( 'WP-API JS Client Tests' );
QUnit.test( 'API Loaded correctly', function( assert ) {
var done = assert.async();
assert.expect( 2 );
assert.ok( wp.api.loadPromise );
wp.api.loadPromise.done( function() {
assert.ok( wp.api.models );
done();
} );
} );
// Verify collections loaded.
var collectionClas... |
import React from "react"
import styled from "styled-components"
import { SetBodyText } from "../../styles/BodyText"
import TestimonialAuthorBox from "./Elements/TestimonialAuthorBox"
const TestimonialCard = ({ review, name, image }) => {
return (
<CardContainer>
<SetBodyText dangerouslySetInnerHTML={{ __... |
K = require('kefir');
_ = require('lodash');
//lazily filters
K.sequentially(1000, _.times(10))
.filter(x => x % 2)
.log();
const blinker = K.sequentially(2000, [true, false, true, false, true]);
K.sequentially(1000, _.times(10))
.filterBy(blinker)
.log('blinking');
|
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsHouse = {
name: 'house',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 9.3V4h-3v2.6L12 3 2 12h3v8h5v-6h4v6h5v-8h3l-3-2.7zm-9 .7c0-1.1.9-2 2-2s2 .9 2 2h-4z"/></svg>`
};
|
class BonkNetworking {
constructor(sockUrl) {
this.socket = io(sockUrl);
this.tsync = timesync.create({
server: this.socket,
interval: 10000,
delay: 250,
});
this.oldTimeOffset = null;
this.id = null;
this.init();
}
init() {
this.initSocket();
this.initTimeSync();... |
import React, { useState } from 'react';
import {
Button,
Modal,
ModalHeader,
ModalBody,
ModalFooter,
Form,
FormGroup,
Input,
Col,
FormText,
} from 'reactstrap';
const emptyCustomer = {
name: '',
lastName: '',
avatar: '',
email: '',
password: '',
state: '',
phone: '',
role: 'student... |
let React = require('react');
let ReactTestUtils = require('react-addons-test-utils');
let ReactDOM = require('react-dom');
let expect = require('expect');
import MasterPage from '../pages/MasterPage.js';
import Header from '../pages/Header.js';
describe('MasterPage', () => {
// let renderer, masterPage;
// be... |
/*nav li高度*/
var liH=function(){
var height=parseInt($(".head-bottom").height())-9;
$(".nav li").height(height/9);
}
var buttonSize=function(){
if(parseInt(document.body.clientWidth)<1415){
$("#foot .foot-top li button").css({
"padding":"0 5px",
"font-size":"8px"
})
$("#foot .foot-top li:nth-child(4)>div... |
import React from "react";
import {Button, Card, notification} from "antd";
const openNotification = () => {
const args = {
message: 'Notification Title',
description: 'I will never close automatically. I will be close automatically. I will never close automatically.',
duration: 0,
};
notifi... |
import { createSlice } from "@reduxjs/toolkit";
import axios from 'axios';
let initialState = {
mypages: [],
selectedMyPage: {},
errors: "",
};
const mypagesSlice=createSlice({
name: "mypages",
initialState,
reducers: {
populateMyPages(state, action) {
state.mypages = action.... |
import 'bootstrap/dist/css/bootstrap.min.css';
import { useState } from 'react';
import Tabs from './Components/Tabs.jsx'
function App() {
const labels =["Tab 1", "Tab 2", "Tab 3", "Tab 4"]
const [content, setContent] = useState(labels[0])
return (
<div className="container mt-5">
<div className="jumbo... |
import React from "react";
import styled from "styled-components/native";
import { Ionicons } from "@expo/vector-icons";
import { WIDTH, HEIGHT } from "../../../constants/layout";
const RecommenUserFriend = (props) => {
return (
<RecommendOutline>
<RecommendView>
<RecommendTextView>
<Reco... |
var doApprove = function(approveStatus) {
var form = document.paperForm;
$("#approveStatus").val(approveStatus);
form.action = "/cocotask/eapp/paper/approve";
form.method = "post";
form.submit();
}; |
../../node_modules/vis/dist/vis.js |
var moment = require('moment');
module.exports = (event) => {
return `
<html>
<body>
<div style="text-align: center;">
<h3>Thank you for joing the event!</h3>
<h4>TITLE</h4>
<p>${event.title}</p>
<h4>SCHOOL</h4>
<p>${event.school}</p>
<h4>... |
"use strict";
window.onload=function () {
if(sessionStorage.getItem("emailId")){
let emailId = sessionStorage.getItem("emailId");
$("#logAcount").empty();
let str=`<li><a href="/html/accountDetail.html"><span class="glyphicon glyphicon-user"></span> ${emailId}</a></li>`;
str+=`<li><a... |
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { FaRegAddressCard, FaPhotoVideo } from 'react-icons/fa'
import avi from '../../assets/images/avi.jpg'
import PatientHistoryCard from './PatientHistoryCard'
import { connect } from 'react-redux'
import { caseFile } from '../../store/actio... |
var express = require('express');
var router = express.Router();
//加密模块
var crypto = require('crypto');
//访问次数限制模块
const rateLimit = require("express-rate-limit");
var pass = require('../common/passport');
var user = require('../common/user');
var core = require('../common/core');
var toemail = require('..... |
import React from 'react';
// Material UI
import useStyles from './footerStyles';
import {
Box,
Typography
} from '@material-ui/core';
// Icons
import {
FaTwitter,
FaInstagram,
FaFacebookF,
FaFacebookMessenger,
FaPaw
} from 'react-icons/fa';
import { ImLocation } from 'react-icons/im... |
/*
Write a function min(a,b) which returns the least of two numbers a and b.
For instance:
min(2, 5) == 2
min(3, -1) == -1
min(1, 1) == 1
*/
let a = 5;
let b = 10;
function min(a,b){
if(a < b)
return a;
return b;
}
console.log(min(a,b));
function min(a,b){
return ((a<b)?a:b);
}
console.log(min(a,b)); |
// Ah, coordinate systems. We've got a lot of them in Obb. To help distinguish, every variable or
// function that takes coordinates will need to use a version of Apps Hungarian notation, to tell
// which coordinate system it's with respect to.
// http://www.joelonsoftware.com/articles/Wrong.html
// Game coordinates (... |
// Given an integer (signed 32 bits), write a function to check whether it is a power of 4.
//
// Example:
// Given num = 16, return true. Given num = 5, return false.
//
// Follow up: Could you solve it without loops/recursion?
/**
* @param {number} num
* @return {boolean}
*/
var isPowerOfFour = function (num) {
... |
// // -------------------------------- PLAYER2 ---------------------------------------------
// // ----------------------------PIZZA1 LOGIC-----------------------------------------
// // ---------------------------First CLICK PIZZA PLAYER2 -------------------------
// if (gameOn.pickedSquare.length ==... |
import React, { useState, useEffect } from 'react'
import logic from '../../logic'
import { Link } from 'react-router-dom'
import DogShowcase from '../DogShowcase'
import { withRouter } from 'react-router-dom'
export default withRouter(function ({ history }) {
const [myDogs, setMyDogs] = useState(undefined)
... |
const _PublisherPlatforms = {
Facebook: 'facebook',
Instagram: 'instagram',
Messenger: 'messenger',
AudienceNetwork: 'audience_network',
};
const _PublisherPlatformDefault = [
_PublisherPlatforms.Facebook,
_PublisherPlatforms.AudienceNetwork,
_PublisherPlatforms.Messenger
];
const PublisherPlatforms = {
... |
'use strict';
exports.mainController = (req, res) => {
res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8080');
res.render('index');
};
|
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
/**
* Internal dependencies
*/
import withTabInfo from '../withTabInfo'
import CleanupMediaComponent from './CleanupMediaComponent.jsx';
class ToolsTabComponent extends React.Component ... |
export default function(){
let itemSize = 3;
let geom = {
vertices: new Float32Array([
-1, -1, 0,
1, -1, 0,
-1, 1, 0,
1, 1, 0
]),
uvs: new Float32Array([
0, 0,
1, 0,
0, 1,
1, 1
]),
indices: [0, 1, 2, 3]
}
return {vertices: geom.vertices, uvs: ... |
// The entry point of the program that runs the simulation.
import * as ui from './ui.js';
import * as logic from './logic.js';
import * as table from './table.js';
/**
* Process the input text supplied by user, update robot's position
* and display output.
*
* @param {object} state Simulation state.
* @param ... |
// Setting Up Variables
let theInput = document.querySelector(".add-task input");
let theAddButton = document.querySelector(".add-task .plus");
let tasksContainer = document.querySelector(".tasks-content");
let tasksCount = document.querySelector(".tasks-count span");
// Focus On Input Field
window.onload = function (... |
"use strict";
// require the express module
const express = require("express");
// create a new Router object
const routes = express.Router();
const pool = require("./connection");
routes.get("/scores", (req, res) => {
let queryString = `SELECT * FROM scores`;
pool.query(queryString).then(response => {
... |
// AFTER LITTLE CONSIDERATION I HAVE DECIDED THAT THE CONVENTION FOR THIS GAME WILL BE
// THAT "DOWN" IS THE POSITIVE Y DIRECTION AND "UP" IS THE NEGATIVE Y DIRECTION. SO BE IT.
var WorldBound = {
draw: function (con) {
UFX.draw(con || context, "t", this.x, this.y)
},
}
var Tilts = {
init: function (A) {
this... |
import { GraphQLObjectType, GraphQLInt } from 'graphql'
import goldbergs from '../data/goldbergs'
import goldbergType from './model'
export default new GraphQLObjectType({
name: 'query',
description: 'Goldberg query',
fields: {
goldberg: {
type: goldbergType,
args: {
id: {
type:... |
import { LOAD_MDFILE } from './constants'
const INITIAL_STATE = {
user: ['testeUser'],
post: ['testePost'],
content: ['testeContent']
}
const reducer = (state = INITIAL_STATE, action) => {
switch(action.type){
case LOAD_MDFILE:
return { ...state, content: action.payload }
case 'LOAD_USER_POST':
return {... |
const mongoose = require('mongoose');
const passport = require('passport');
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const User = mongoose.model('User');
const admin = { id: 1, username: 'admin', password: 'admin', firstName: 'Admin', lastName: 'User', role: ['Admin'] };
module.export... |
function AuthLoginCtrl($scope, $http, $state, $auth) {
$scope.login = function () {
$auth.login($scope.user)
.then(() => $state.go('albumsIndex'))
.catch(err => console.log('there was an error', err));
};
}
export default AuthLoginCtrl;
|
import React from "react";
import { StyleSheet, TouchableOpacity, Text, View } from "react-native";
import { AuthContext } from "./context";
const Account = ({ navigation }) => {
const { signOut } = React.useContext(AuthContext);
return (
<View style={{
flex: 1, justifyContent: "cent... |
import React ,{useContext} from "react";
import ThemeContext from "../Context/ThemeContext"
import AppTheme from "../Color"
import ThemeToggler from "./ThemeToggler";
const Her = () => {
const theme =useContext (ThemeContext)[0]
const currentTheme =AppTheme[theme]
return(
<div
style... |
const express = require('express')
const path = require('path')
const { Pool } = require('pg')
const pool = new Pool({connectionString: "postgres://postgres:Homer4pres!@localhost:5432/postgres"})
const port = 5000
express().use(express.static(path.join(__dirname, 'public')))
.set('views', path.join(__dirname, 'views'... |
const express = require('express')
const router = express.Router()
const Record = require('../../models/record')
const Category = require('../../models/category')
router.get('/filter', async (req, res) => {
const categoryList = await Category.find().sort({ _id: 'asc' }).lean()
const { categorySelector } = req.quer... |
// See http://www.html5rocks.com/en/tutorials/file/dndfiles/
if (!window.FileReader) alert('no file reader');
function notifyUser(msg) {
document.getElementById('list').innerHTML = msg;
}
function handleFiles(files, evt) {
var output = [];
for (var i = 0, f; f = files[i]; i++) {
output.push('<li><strong... |
function repeat(arr){
if(!arr)
return 'err'
return Array.from(new Set(arr))
}
module.exports = repeat |
import Service from '@ember/service';
import { tracked } from '@glimmer/tracking';
import config from 'kredits-web/config/environment';
// Need to go through proxy for CORS headers
const bitstampBaseUrl = `${config.corsProxy}https://www.bitstamp.net/api/v2`;
async function fetchFromBitstamp(currencyPair) {
try {
... |
import '@testing-library/jest-dom';
import React from 'react';
import { render, fireEvent, screen } from '@testing-library/react';
import { intervals, toString } from '../utils/interval';
import IntervalControls from './IntervalControls';
const selectedInterval = intervals[0];
const onChange = jest.fn().mockName('on... |
import React from "react";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import Header from "./Header";
import PageBody from "./PageBody";
export default class Layout extends React.Component {
render() {
return (
<Router>
<div className="container-fluid pl-0">
... |
$('#hamburger').click(function(){
$('#leftBar').show('slide',{direction:'left',duration:'fast'});
$('#mask').show('fade',{duration:'fast'});
$('#mask').on('click.leftBar',leftBarBack);
});
$('#leftBar').hide();
|
import React from 'react';
import PropTypes from 'prop-types';
const stadiumPic = 'http://www.bluemaize.net/im/arts-crafts-sewing/astro-turf-2.jpg'
const EventListItem = ({event, onItemClick}) => (
<div style={{display: 'flex', backgroundColor: '#101820' , margin: 10, borderRadius: 8, padding: 5, justifyContent: ... |
import React from "react";
export default function PrivacyPolicy() {
return (
<div className="pdf__wrapper">
<iframe
title="TruSat privacy policy"
src="https://drive.google.com/viewerng/viewer?embedded=true&url=https://trusat-assets.s3.amazonaws.com/Privacy+Policy+for+TruSat.org+_12-19-19.p... |
import React, { Component } from 'react';
import Rating from'./rating'
const Moviecard=({movie:{title,image,years,counts}})=>{
return(
<div className="movie">
<div className="image" style={{backgroundImage :`url('${image}')`}}>
<div className='rating'><Rating count={counts} />
... |
'use strict';
var widgetModel = require('../models/widgetModel');
exports.fetchWidgets = function(req, res){
var data = {
widgets: {
1: {
type: 'GM',
position: 1,
text: 'Lina Familly',
attached: false,
id: 1,
... |
// @tag full-page
// @require F:\java ide and extjs\extjs boot camp\labs\iss\app.js
|
const gulp = require('gulp');
const nunjucksRender = require('gulp-nunjucks-render');
function nunjucks() {
//Get .html and .njk files in pages folder
return gulp.src('./deploy/stage/*.njk')
// Render template with nunjucksRender
.pipe(nunjucksRender({
path: ['./templates']
}))... |
import { Button } from "..";
import "./styles.css";
// context
import { useContextValue } from "../../useContext";
import { DELETE_FROM_CART } from "../../useContext/types";
import { addToCart } from "../../useContext/actions";
const ItemCart = ({ item }) => {
const { dispatch } = useContextValue();
const { id, name... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//article
//{
// border-radius: 50px;
// -webkit-border-radius: 50px;
// -moz-border-radius: 50px;
// -o-border-radius: 50px;
// -ms-border-radius: 50px;
//} |
import { StyleSheet, Platform } from 'react-native';
import * as colors from 'kitsu/constants/colors';
import { scenePadding } from 'kitsu/screens/Feed/constants';
export const styles = StyleSheet.create({
tabBar: {
flexDirection: 'row',
paddingTop: 20,
paddingHorizontal: scenePadding,
backgroundColo... |
/*jslint browser: true, devel: true, eqeq: true, plusplus: true, sloppy: true, vars: true, white: true*/
/*eslint-env browser*/
/*eslint 'no-console':0*/
/* categorieen openklappen */
var openKlap = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < openKlap.length; i++) {
openKlap[i].addEven... |
import React from 'react';
import { render, screen } from '@testing-library/react';
import EmployeeListing from '..';
import userEvent from '@testing-library/user-event'
jest.mock('../components/EmployeeTableHeader', () => () => <div data-testid="EmployeeTableHeader" />)
describe('EmployeeListing', () => {
it('does... |
/**
* Represents a loading icon.
*/
class Spinner {
constructor(container) {
this.container = container;
// Create the SVG image.
this.img = document.createElement('img')
this.img.src = '/static/loading.svg';
this.img.width = 200;
this.img.id = 'spinner';
// Create the container for the image.
this.img... |
import Unhide from '../helpers/unhideLauncher';
import {
getDataFromLocalStorage,
setDataToLocalStorage,
} from '../helpers/localStorage';
import { defaultValue } from './defaultValue';
const queryString = require('query-string');
const filmsListTemplate = require('../../../templates/film-card.pug');
const KEY = '... |
//by Dima
//var Changer = (function(){
//
// var pub = {},
// pr = {};
//
// pr.currency = '';
// pr.direction = '';
//
// pr.sum = 0;
// pr.course = 0;
// pr.result = 0;
//
// pr.balances = {
// balUAH: 0,
// balUSD: 0,
// balEUR: 0,
// balRUB: 0
// };
//
// ... |
import React from 'react'
import { NavLink, useHistory } from 'react-router-dom'
import Potluck from '../images/potluck.png'
import styled from 'styled-components'
// action
import { loggedInStatus } from '../store/action/eventAction'
// redux hook
import { useDispatch } from 'react-redux'
const StyledHeader = style... |
;(function(global, factory) {
if (typeof exports === 'object' && typeof module === 'object') {
module.exports = factory()
} else if (typeof define === 'function' && define.amd) {
define([], factory())
} else if (typeof exports === 'object') {
exports = factory()
} else {
global['Promise'] = fact... |
const divCan = document.querySelector('.can');
const divCanEl = document.querySelector('.canElement');
const divCanEls = document.querySelectorAll('.canElement');
const divCanElTxt = document.querySelectorAll('.canElementText');
const divTextScroll = document.querySelector('.youCanScroll');
let initialDiv = divCanElTx... |
import React from 'react';
import { Carousel, WingBlank } from 'antd-mobile';
import { WhiteSpace } from 'antd-mobile';
import { connect } from 'react-redux';
import { NavBar, Icon } from 'antd-mobile';
import { Grid } from 'antd-mobile';
import { Route, routerRedux } from 'dva/router';
import styles from '../themes/in... |
angular.module('ramalhoexpress').controller('UploadController',
// function($scope, $resource, $routeParams) {
function($http, $scope, $routeParams) {
console.log("Entrei : upload");
$scope.upload = function() {
console.log("Clicou");
var formData = new FormData();
formDat... |
/**
* Created by dell on 2016/8/24.
*/
jQuery( document ).ready(function( $ ) {
$('#search_btn').click(function(){
$.ajax({
type: "GET",
url: "/search/",
data: {
'search':$('input[name=search]').val()
},
success:function(data){
... |
import "../SpaceForCustomers/spaceForCustomers.css"
function SpaceForCustomers(){
return(
<div className="SpaceForCustomers">
<strong className="SpaceForCustomersText">
“ This is an super space for your customers qoute.
... |
export const options = {
cutoutPercentage: 70,
maintainAspectRatio: false,
responsive: true,
rotation: Math.PI * -29,
plugins: {
legend: {
position: "bottom",
labels: {
usePointStyle: true,
},
},
},
};
export const chartData = (aug) => {
let labels = [];
let dataValues... |
angular.module('regard.service', [])
.factory('regardService', function() {
return {
getRegard:function() {
var regard = localStorage.getItem('LivingRegard');
regard = JSON.parse(regard);
return regard;
}
};
}); |
(function () {
'use strict';
function HelpController() {
this.confirmationVisible = false;
this.showConfirmation = function(){
this.confirmationVisible = true;
}
}
angular.module('cbitsPrototype.controllers')
.controller('HelpController',
[HelpController]);
})();
|
const Context = require( '../../handlers/Context.js' );
const BridgeMsg = require( './BridgeMsg.js' );
let processors = new Map();
let hooks = {};
let hooks2 = new WeakMap();
let map = {};
let aliases = {};
// TODO 独立的命令处理
// let commands = {};
const getBridgeMsg = ( msg ) => {
if ( msg instanceof BridgeMsg ) {
r... |
angular.module('masterOrderForm', ['ngAnimate', 'ngSanitize','ui.bootstrap'])
.controller('MasterOrderController', ['$http','$scope', function($http, $scope) {
$scope.buttonEnabled = false;
$scope.getUsers = function(user) {
return $http.get("/users/get/" + user).then(function (response)... |
/*
* Copyright 2018 Nathan Tyler Brooks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... |
const TeamItem = () => {
return (
<div className="col-lg-4">
<div className="team">
<div className="team-img">
<img src="/img/team.jpg" alt="team" />
</div>
<div className="team-info">
<h5 className="... |
/**what are they?
*
* loops through some code for however many times you specify, or until a certain is met
*
* run them on objects and arrays
*
* for of and for in loops, while loops, do-while, for loops
*
* they have 3-4 statements:
* 1. a statement that is run before the loop starts, this is executed only o... |
import * as moksha from "moksha";
|
var app = new Vue({
el: '#app',
data: {
musicList: [],
resultString: '',
loading: false,
musicName: '',
},
methods: {
GetSongs: function(){
console.log("get here");
this.loading = true;
this.resultString = "";
this.musicList = [];
fetch('https://itunes.apple.com... |
import React from "react";
import { Box } from "@chakra-ui/layout";
import { NavigationBar } from "../NavigationBar";
import { Footer } from "../Footer";
export const PageLayout = ({ children }) => {
return (
<Box overflowX="hidden">
<NavigationBar />
{children}
<Footer />
</Box>
);
};
|
function navTop(){
return {
restrict: 'E',
replace: 'true',
templateUrl: 'app/directives/nav/navTemplate.html',
link: function($scope, element, attrs){
}
}
}
angular
.module('datavizApp')
.directive('navTop', navTop);
|
/* eslint-env node */
'use strict';
/**
* STARTPAGE GENERATOR
* Calls the given template with startpage data
*/
var Bluebird = require('bluebird'),
fileWriter = require('../tools/file-writer');
module.exports = function (pipe, template) {
var startpage = pipe.content;
if (startpage === undefined || s... |
function isPizza(element) {
if (element.classList.contains('pizza')) {
return true;
} else { return false };
}
function isBurger(element) {
if (element.classList.contains('burger')) {
return true;
} else { return false };
}
function isAllowed(element) {
if (element.classList.con... |
import { Login } from "../../loginForm"
// export const UserData={
// id:'',username:'',email:'',password:'',cellnumber:''
// // {id:2,username:'ezzah',email:'ezzah@gmail.com',password:'345678',cellnumber:'090087654'},
// // {id:3,username:'ezzah',email:'ezzah@gmail.com',password:'345678',cellnumber:'... |
/**
* Copyright (c) Benjamin Ansbach - all rights reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
let Items = {
ChangeKey: {
Operation: require('./ChangeKey/Operation'),
RawCoder: require('./ChangeKey/RawCoder'),... |
//Defines a mongoDB server
function Server(id, h, rs, s) {
this.id = id; //Server name
this.type = "mongod"; //The type of server, can be either mongod, mongos or config
this.host = h; //The host running this server
this.replicaSet = rs; //The replica set containing this server (or undefined if this ser... |
export default async function handler(req, res) {
const { email, displayName, photoURL } = req.body;
const request = await fetch(process.env.NEXT_PUBLIC_DB_URL, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${process.env.NEXT_PUBLIC_DB_AU... |
'use strict';
const anticaptcha = require('../index');
const main = async () => {
const client = anticaptcha(process.env.ANTICAPTCHA_KEY);
const image_url = 'https://files.anti-captcha.com/26/41f/c23/7c50ff19.jpg';
const assigment = 'Enter license plate number';
const fields = [
{
... |
/*
Feladat: Objektumok 10/1., ujjgyakorlatok
Az alábbi feladatok mindegyike a lenti office objektumon elvégezhető.
a) feladat: Írd ki az office objektum összes tulajdonságának nevét
(elég az első szint, a belső objektumok/tömbök nem kellenek)
b) feladat: Írd ki az összes munkatárs nev... |
const { HDPublicKey } = require('bitcore-lib');
const ec = require('elliptic').ec('secp256k1');
const Address = require('ethjs-account');
const EthereumTx = require('ethereumjs-tx');
const chai = require('chai');
const chaiHttp = require('chai-http');
chai.use(chaiHttp);
chai.should();
const BigNumber = require('bignum... |
function EntityIndex(csize) {
this.ei = {}
this.es = {} // All entities
this.max_entity_radius = 0
this.csize = csize || 1000
}
EntityIndex.prototype = {
// This is the original function, returns an [x,y] pair
indexForPos: function (pos) {
return [Math.floor(pos[0]/this.csize), Math.floor(pos[1]/this.csize)]
... |
import React from 'react'
import { connect } from 'react-redux'
import filterData from '@/utils/filterData'
import Todo from './Todo'
const TodoList = ({data}) => {
console.log( data )
return (
<ul>
{
(data && data.length)? data.map((val, index) => {
return <Todo key={index} todo={val}/>... |
import React, { useContext } from 'react';
import './pagination.css'
import {ImageContext} from '../context/CenteralStore';
const Paginate = () => {
const {PhotoPerPage,PaginateSet,totalNumberOfPhoto} = useContext(ImageContext);
const pageNumber=[];
for(let i=1; i<=Math.ceil(totalNumberOfPhoto/PhotoP... |
import * as types from '../constants/actionTypes';
export const listPictures = (pictures)=>{
return {
type: types.LIST_PICTURES,
pictures
}
}
export const getNewPicture = (picture)=>{
return {
type: types.POST_PICTURE,
picture
}
}
export const valueTag = (valueTag)=>{
... |
// Design Patterns
// Others to see what you doing
// Module Design Pattern
// The prototype Desgin Pattern // React.js
// The observer Desgin Pattern. // Angular.js
// The singleton Design Pattern
// Module Design Pattern
// var app = (function () {
// // Private
// var sendData = function (first, second) {... |
import React from "react";
import Loader from "react-loader-spinner";
function Loading() {
return (
<div
className="absolute w-full h-full z-50 flex items-center justify-center"
style={{
backgroundColor: "rgba(0,0,0,.5)",
}}
>
<Loader
type="TailSpin"
color="#25... |
var comm = function () {
return {
getDistance:function (v1 ,v2) {
var distance
if (v1 > 0) {
if(v2 > 0) {
distance = Math.abs(Math.abs(v1) - Math.abs(v2))
} else {
distance = Math.abs(v1) + Math.abs(v2)
}
... |
'use strict';
// **Github:** https://github.com/toajs/toa-router
//
// **License:** MIT
var path = require('path');
var methods = require('methods');
var Trie = require('route-trie');
module.exports = Router;
function RouterState(root) {
this.root = typeof root === 'string' ? root.replace(/(\/)+$/, '') : '';
thi... |
var gulp = require('gulp');
var less = require('gulp-less');
var fileInclude = require('gulp-file-include');
var browserSync = require('browser-sync').create();
var RevAll = require('gulp-rev-all');
var imageMin = require('gulp-imagemin');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var mi... |
import Vue from 'vue';
import Vuex from 'vuex';
import createLogger from 'vuex/dist/logger';
import createPersistedState from 'vuex-persistedstate';
//GLOBALS
import state from './state';
import actions from './actions';
import getters from './getters';
import mutations from './mutations';
//MODULES
import todos fro... |
import React from 'react'
import './noneCourse.css'
import { Link } from 'react-router-dom'
import { Result } from 'antd-mobile';
class NoneCourse extends React.Component{
render(){
return (
<div className='noneCourse'>
<div className="sub-title">提示</div>
<Result
... |
import "./Card.css"
import React from 'react';
export default props => {
return (
<div className="Card" style={{
backgroundColor: props.color || 'rgb(241, 241, 241)'
}}>
<div className="Title">{ props.titulo }</div>
{/* props.children pega o conteúdo que for... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.