text
stringlengths
7
3.69M
function Explosion(x, y) { this.pos = createVector(x, y); this.booms = 0; this.show = function() { if (this.booms < 10) { fires.push(new Fire(this.x1, this.y1, 20, 25)); // Spaw fire particles this.x1 = this.pos.x+random(-10, 10); this.y1 = this.pos.y+random(-10, 10); } this.booms+...
$(document).ready(function () { setTimeout(function () { swiper1() swiper2() },100) }) function swiper1() { var mySwiper1 = new Swiper('#topSwiper',{ direction: 'horizontal', loop : true, speed : 500, autoplay : 4000, pagination : '.swiper-paginatio...
ui.Progressbar = function() { ui.Progressbar.base.constructor.call(this); }; wr.inherit(ui.Progressbar, wr.View); ui.Progressbar.prototype.create = function() { this.node = wr.div_c("ui_progressbar"); };
var React = require('react'); var semver = require('semver'); exports.ReactBefore155 = semver.lt(React.version, "15.5.0"); exports.ReactBefore16 = semver.lt(React.version, "16.0.0");
import Moment from 'moment'; export default function TimeModifier( data ) { data.map(( item, index ) => { data[index].book_start = Moment( item.book_start ).format( 'LLL' ); data[index].book_end = Moment( item.book_end ).format( 'LLL' ); }); return data; }
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsMenu = { name: 'menu', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>` };
var split = require('split2'), stream = require('stream'), combine = require('stream-combiner'); module.exports = parseKindle; function parseKindle() { return combine( split(/==========\r\n/), parseClipping() ); } function parseClipping() { var ts = stream.Transform({ objectMode: true }); ts._...
module.exports = function(County) { };
coupons = [ {"couponId": 1, "CategoryId": 1, "amount": 0.25, "amountType":0, "requiredQuantity":0, "requiredSpend":0, "sourceType":"NewsPaper", "source":"NY Times","dateAcquired":"08-10-2013","expirationDate":"08-12-2013","barCode":"9879877987","name":"Hair Cut","description":"Get a 25% discount o...
import React, { Component } from 'react'; import moment from 'moment'; import './CommentItem.css'; import CommentLikeUnlike from './CommentLikeUnlike'; import { getCommentRating } from "../../database/dal/firebase/commentDal"; class CommentItem extends Component { constructor(props) { super(props); this....
import React,{ createContext } from 'react' import axios from 'axios' import PropTypes from 'prop-types' import config from '../config' const BLOG_API = config.backend_API export const UserContext = createContext() const UserContextProvider = ({children}) => { const addUser = async payload => { try { ...
module.exports = (sequelize, DataTypes) => { return sequelize.define('store', { 'user_id': DataTypes.INTEGER, 'good_id': DataTypes.INTEGER, 'num': DataTypes.INTEGER, }) }
/* -Do the "choose an extra ingredient" with tick boxes or radio buttons implement code in jquery to prevent user from clicking for example both caramel syrup and hazelnut syrup. */ function Coffee(size, style, ingredient, ingredient2, ingredient3, ingredient4) { //Array for ingredient objects this.size = size; th...
$(document).ready(function(){ var AppRouter = Parse.Router.extend({ routes: { "": "login", "permitapps/page/:page": "list", "permitapps/add": "addPermitApp", "home": "list", //for now, gotta finish hooking the template up, it looks very hum drum "about": "about", "previous...
import React from 'react'; import { Formik, Form, Field } from 'formik'; import * as Yup from 'yup'; import { View, Text, Button, StyleSheet, SafeAreaView, TouchableOpacity } from 'react-native'; import ImagePicker from 'react-native-image-picker' const SignupSchema = Yup.object().shape({ firstName: Yup.string(...
import { createLTTB } from "../../dist/downsample.mjs"; import {addMilliseconds} from "date-fns"; function cleanDT(ts) { // TODO: When merging data from multiple timeseries, heedy might not enforce // that there is no timestamp overlap. This function fixes the issue. for (let i = 0; i < ts.length - 1;...
import { combineReducers } from "redux"; import authReducer from "./auth-reducer"; import errorsReducer from "./errors-reducer"; import { reducer as formReducer } from "redux-form"; export default combineReducers({ auth: authReducer, form: formReducer, errors: errorsReducer });
// import React from "react" // import _ from "lodash" // import { Icon } from "@mdi/react" // const IconSvg = (props) => { // const MDIcons = require("@mdi/js") // const icon = MDIcons[props.icon] // if (!icon) { // console.error(`Could not find ${props.icon} in Material Design Icons`) // icon = MDIcon...
/* MIT License Copyright (c) 2017 Ivo Cass Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
import React from "react"; import axios from 'axios'; const WithPower = WrapperComponent => { const newPower = (props) => { console.log('userName', props.userName); console.log('userEmail', props.userEmail); const handleGitFetch = () => { axios.get(`https://github.com/${props.u...
requirejs.config({ paths: { async: 'bower_components/requirejs-plugins/src/async' } }); define(['async!http://maps.google.com/maps/api/js?v=3&sensor=false'], function() { var directionsService, origin, destination, routes, callback, travelModes; function NhMaps(pOrigin, pDest...
(global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/views/top_right_share" ], { "2fcd": function(t, n, e) { e.d(n, "b", function() { return o; }), e.d(n, "c", function() { return a; }), e.d(n, "a", function() {}); var o = function() { ...
import React from 'react' import PropTypes from 'prop-types' import { Button } from '@blueprintjs/core' import CollectionComponent from '../CollectionComponent' import RecordComponent from '../RecordComponent' class RefreshAction extends React.PureComponent { render() { const { dataSource, intent, ...
Page({ /** * 页面的初始数据 */ data: { njlist: ['1年级', '2年级', '3年级', '4年级', '5年级', '6年级'], bjlist: ['全部', '未处理', '审核通过', '审核未通过'], weeklist: ['第一周', '第二周', '第三周', '第四周', '第五周', '第六周', '第七周', '第八周', '第九周', '第十周'], nj: 0, bj: 0, week: 0, options: [{ title: '行动', img: '/img/...
'use strict'; const fs = require('fs'); const buffer = fs.readFileSync('input.txt'); const file = String(buffer); // Part 1 & 2 const SCREEN_WIDTH = 50; const SCREEN_HEIGHT = 6; function prefillScreen() { let screen = []; for (let i = 0; i < SCREEN_HEIGHT; i++) { screen[i] = []; for (let j = ...
/** * Created by JonIC on 2016-11-26. */ url = require('url'); exports.checkblock = function(req, res) { console.log(req); //var url_parts = url.parse(req.url, true); var facebookid = req.body.facebookid; var blockfacebookid = req.body.blockfacebookid; var query = "SELECT * FROM block WH...
const INITIAL_STATE = { show: false, text: "", success: true, }; export const notificationReducer = (state = INITIAL_STATE, action) => { switch (action.type) { case "DISPLAY_NOTIFICATION": return { ...state, show: true, text: action.payload.text, success: action.payload.success, }; case "...
import "babel-polyfill"; import React from "react"; import ReactDOM from "react-dom"; import { createStore } from 'redux'; import { Provider } from 'react-redux'; import './stylesheets/main.scss'; import App from './components/App'; import { reducers } from './reducers/index'; let users = []; for (let i = 1; i < 10; ...
import React, { useState, useEffect } from 'react'; import { Helmet, HelmetProvider } from 'react-helmet-async'; import axios from 'axios'; import { v4 as uuid } from 'uuid'; // Styles import './admin.scss'; // Components import Loading from '../../components/Loading/Loading'; import H2 from '../../components/HtmlTag...
import DS from 'ember-data'; import config from '../config/environment'; import { pluralize } from 'ember-inflector' export default DS.RESTAdapter.extend({ host: config.APP.host, headers: { "Accept": "application/json, text/javascript; q=0.01" }, pathForType: function(type) { var dasherized = pluralize...
import MessageCollection from 'application/entities/MessageCollection' const dependencies = { MessageCollection } const match = (action) => action.type === 'APOLLO_QUERY_RESULT' && action.operationName === 'ListMessagesQuery' const execute = (state, { result }, injection) => { const { MessageCollection} = Object.a...
var Schemas = {}; Schemas.Rankings = new SimpleSchema({ user_id: { type: String, label: "User Id" }, company_name: { type: String, label: "Company name" }, accepted: { type: Number, label: "Accepted" }, declined: { type: Number, label: "Declined" }, "_info.is_accepted": { type: Boolean, la...
let state = { profilePage : { posts : [ {id:1, message:'Hi how r u?', likesCounts: 12}, {id:2, message:'Its my first post', likesCounts:17}, {id:3, message:'Wanna die', likesCounts:1}, {id:4, message:'My bad...', likesCounts:100500}, ], }, ...
/** * Created by rs on 08/01/17. */ import React, {Component} from 'react' import CommonAddComponent from '../common/CommonAddComponent' import TextField from 'material-ui/TextField'; import AutoComplete from 'material-ui/AutoComplete' import RaisedButton from 'material-ui/RaisedButton' import {redirect} from '../ut...
var HashTable = function() { this._limit = 8; this._storage = LimitedArray(this._limit); }; HashTable.prototype.insert = function(k, v) { var index = getIndexBelowMaxForKey(k, this._limit); let tuples = this.getTuples(k); if (!tuples) { tuples = [[k, v]]; } else { const location = this.find(k)...
import React, { Component } from 'react'; import {TouchableHighlight ,StyleSheet, Button, View, TouchableNativeFeedback, Text, ScrollView, TextInput } from 'react-native'; import Auth0Lock from 'react-native-lock'; import App from '../App'; import { gql, graphql, compose } from 'react-apollo'; const lock = new Auth0Lo...
'use strict'; var gutil = require('gulp-util'); var should = require('should'); var crypto = require('crypto'); var path = require('path'); var sfv = require('..'); describe('Generate assets version hash and save as sf2 yaml loadable config file.', function () { it('generate assets.yml config file', function (do...
/************************************************** * dom-drag.js * 09.25.2001 * www.youngpup.net ************************************************** * 10.28.2001 - fixed minor bug where events * sometimes fired off the handle, not the root. **************************************************/ var Drag =...
const fs = require('fs-extra'); const less = require('less'); const path = require('path'); const {getDestDir} = require('./paths'); const reload = require('./reload'); const {createTask} = require('./task'); function getLessFiles({production}) { const dir = getDestDir({production}); return { 'src/ui/d...
import { useState, useEffect, useRef } from "react" const useMatchMedia = ({ width = 600 }) => { const [shouldShow, setShouldShow] = useState(false) const mediaQueryRef = useRef(null) useEffect(() => { if (typeof window !== undefined) { mediaQueryRef.current = window.matchMedia(`(min-width: ${width}px...
$(document).ready(function() { $('.right').hide(); $('.wrong').hide(); $('.textfield').live('keydown', function(e) { var me = $(this); var keyCode = e.keyCode || e.which; if (keyCode == 9) { var input = $(this).val(); var values = $(this).parent().children(); var numberOne = values[0].id; ...
import Web3 from 'web3' import { ADDRESS, ABI } from './constants' export function setAgreeFlag () { localStorage.setItem('agree', true) } export function readAgreeFlag () { return localStorage.getItem('agree') } export function setSeenFlag () { localStorage.setItem('seen', true) } export function readSeenFla...
import React from 'react'; import { StyleSheet, Text, View, Button } from 'react-native'; import Inicio from './Inicio'; import Body from './Body'; import Final from './Final'; export default class App extends React.Component { constructor() { super() // Ejecuta constructor del padre this.state = { //Inici...
import React from "react"; import Profile from "./screens/Profile"; import Likes from "./screens/Likes"; import Library from "./screens/Library"; import Toggle from "./components/Toggle"; import { BrowserRouter, Switch, Route } from "react-router-dom"; const App = () => { return ( <BrowserRouter> <Toggle /...
import React from 'react'; import { shallow } from 'enzyme'; import { PartiesAdmin } from '../../components/dashboard/Parties-Admin'; const props = { listParties: jest.fn(), createPartyError: 'ghgj', status: 200, errorMessage: 'jhj', parties: [], isAdmin: true, createNewParty: jest.fn() }; ...
import React from 'react'; // import { Route, Switch } from 'react-router-dom'; // commponents import App from './App'; // import Login from './components/Login'; // import Recover from './components/Login/Recover'; const AppRoutes = () => <App></App> ; export default AppRoutes;
$( document ).ready(function() { cargarUsuario(); }); function cargarUsuario(){ var user = localStorage.getItem("username"); var parametros = { opcion : "cargarUsuario", user : user }; // Realizar la petición var post = $.post( "php/mysql.php", // S...
import { requestMediaList, receiveMediaList, requestMoreMediaList, receiveMoreMediaList, noMoreMediaList, } from '../actions'; import axios from 'axios'; const API_ROOT = 'https://api.jikan.moe/v3'; export function fetchMediaDetail(mediaId, media) { return axios.get(`${API_ROOT}/${media}...
const Sequelize = require('sequelize'); module.exports = (sequelize, DataTypes) => { return inrTestTbl.init(sequelize, DataTypes); } class inrTestTbl extends Sequelize.Model { static init(sequelize, DataTypes) { super.init({ IDINR: { autoIncrement: true, type: DataTypes.INTEGER, allowNull: ...
import React, { Component } from 'react'; import Axios from 'axios'; import YouTube from 'react-youtube'; const apiUrl = 'http://www.campus-bordeaux.ovh:3002/joysticks/api/games'; export default class Trailer extends Component { constructor(props) { super(props); this.state = { game: { trailer: '' } ...
(function(){ var closingSymbol = '❌'; var lockedPostitsByUser = []; app.init = function() { app.widgets.username.init(); app.widgets.postitSelector.init(); }; app.onUsername = function() { app.widgets.postits.init(); app.websocket.init(); }; window.addEventListener('unload', function(event...
import {addEmployee, fetchEmployee} from "../../actions/EmployeeAction"; import {ACTIONS} from "../../common/constants"; import fetchMock from "fetch-mock"; import configureMockStore from 'redux-mock-store' import thunk from "redux-thunk"; const mockStore = configureMockStore([thunk]); fetchMock.restore(); it("shoul...
if(typeof (dojo)!="undefined"){ dojo.provide("Freja"); } if(typeof (Freja)=="undefined"){ Freja={}; } Freja.NAME="Freja"; Freja.VERSION="2.1.2"; Freja.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; Freja.toString=function(){ return this.__repr__(); }; Freja.Class={}; Freja.Class.extend=function(_1,_...
export const data = { name: 'Contact' }; export default data;
#!/usr/bin/env node const RateLimit = require('async-sema/rate-limit') const lim = RateLimit(5); async function f() { const n = 50; const start = process.hrtime(); for (let i = 0; i < n; i++) { await lim(); process.stdout.write('.'); } process.stdout.write('\n'); const hrt = process.hrtime(start...
module.exports = ({ name: "serverinfo", code: ` $thumbnail[$serverIcon[$guildID;2048]] $color[2f3136] $addTimestamp $footer[MAGIC.SERVERINFO] $description[Guild Name: $serverName Guild ID: $guildID Guild Region: $serverRegion Content Filter: $serverContentFilter Boost Level: $serverBoostLevel Boost Count: $serv...
/* All Header and Footer Logic goes here */ window.onload = function() { loadFile("home.html"); document.getElementById('load-character') .addEventListener('change', loadCharacterSheet, false); }; /* Page Loading Functions */ function loadDungeonLorePage() { // Show Save & Load of Character Sheet docum...
import React from 'react'; // import db from '../ConfigFirebase/FirebaseInit'; import { useMyContext } from '../Provider'; function Education() { const [myState, dispatch] = useMyContext(); // const sendFirebase = () => { // db.collection('profile').add({ // nameInstitution: myState.nameInstitution, ...
import React from 'react'; import Icon from 'react-native-vector-icons/FontAwesome'; const Images = () => { return ( <Icon name="image" size={40} color='#DFDCDC' /> ); }; export { Images };
(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/web_notice/main" ], { "60ac": function(n, e, t) { (function(n) { function e(n) { return n && n.__esModule ? n : { default: n }; } t("6cdc"), e(t("66fd")),...
/* * Module code goes here. Use 'module.exports' to export things: * module.exports.thing = 'a thing'; * * You can import it from another modules like this: * var mod = require('manager.keeperRoom'); * mod.thing == 'a thing'; // true */ var logger = require("screeps.logger"); logger = new logger("manager.keepe...
const db = { mongodb: { url: process.env.MONGO_URL || "mongodb://localhost:27017/bookmark" }, mongodbSecret: { user: "", pass: "" } }; export default db;
var net = require("net"), port = process.argv[2]; var server = net.createServer(function (socket) { var date = new Date(), month = (date.getMonth() + 1), month2 = month < 10 ? "0" + month : month, day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); var result = "" + ...
import React, {Component} from 'react'; import {Pager} from "react-bootstrap"; import APIClient from "../APIClient"; import "../styles/Paging.css"; class Paging extends Component { constructor(...args) { super(...args); this.totalPages = Math.floor(this.props.totalRecordCount / this.props.pageSize) + 1; ...
import React, { Component } from 'react' import CardList from '../components/CardList'; import SearchBox from '../components/SearchBox'; import Scroll from '../components/Scroll' import ErrorBoundry from '../components/ErrorBoundry'; import './App.css'; // const App = () => { // return ( // <div className...
describe('Unit: MainController', function() { var scope, controller, $httpBackend; var routeParams = {id: 1} // Load the module with MainController beforeEach(module('ngRoute')); beforeEach(module('appLevels')); beforeEach(function(){ROUTE='//localhost:9876/';DEBUG_PENGUIN=true;}) beforeEac...
//******Paste var config = {xxxxxxx};****** exports.config = config;
// test1 const apartment = { imgUrl: "https://via.placeholder.com/640x480", descr: "Просторная квартира в центре", rating: 4, price: 2153, tags: ["premium", "promoted", "top"], }; console.log(apartment); // test2 const apartment1 = { imgUrl: "https://via.placeholder.com/640x480", descr: "Просторная кварт...
/** * Returns a JSON stringified version of the value, safe for inclusion in an * inline <script> tag. The optional argument 'spaces' can be used for * pretty-printing. * * Output is NOT safe for inclusion in HTML! If that's what you need, use the * built-in 'dump' filter instead. */ module.exports...
let utils = { }; export default utils;
import React, { Component } from 'react'; import Column_content from './component/column_content'; import './column_text.css'; import {NavBar_in} from '../../component/AppBar_in'; class Column_1910 extends Component{ render(){ const column_1910_article = { title:['2016級 林奕辰 (Bravo AI 洽吧智能執行長)','2014級 ...
import React from 'react'; import {v4} from 'uuid'; //styles import {useStyles} from "./styled"; //utils import {minutesConvert} from "../../utils/minutesConvert"; import * as dateFns from "date-fns"; const Ticket = ({ticket}) => { const classes = useStyles(); const price = (ticket.price + '').replace...
import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { BrowserRouter as Router } from 'react-router-dom' import { Box, Heading, Container, Text } from 'rebass' import * as userActions from '../../actions/user-actions' import Flex from '../shared/flex' import Input from '../shared/inpu...
var notification = angular.module('notification.services', []); notification.factory('Notification', function () { return { notifications: new Array, errors: new Array, push: function (notification) { this.notifications.splice(0, this.notifications.length); this.er...
var matches = require('../services/matches'); var config = require('../config.json'); var dates = require('../libs/dates'); function index(req, res) { matches.getList(function (err, list) { if (err) res.render('error', { error: err }); else res.render('matchlist',...
export const SET_USER = (state, user) => { state.user = user; }; export const SET_MAPCENTER = (state, data) => { state.gMap.mapCenter.lat = data.mapCenter.lat; state.gMap.mapCenter.lng = data.mapCenter.lng; state.gMap.mapZoom = data.mapZoom; };
/** * Created by chadsfather on 15/12/15. */ exports.init = function (expressrouter, idioms) { expressrouter.get( '/:lang/plans', function (req, res) { res.render('plans', { 'footer': 0 }); }); };
const DAILY_URI_LATLON = "https://cors-anywhere.herokuapp.com/http://api.openweathermap.org/data/2.5/forecast/daily"; const CURRENT_URI_LATLON = "https://cors-anywhere.herokuapp.com/http://api.openweathermap.org/data/2.5/weather"; const API_KEY = "&APPID=4c2cb45265febf619ec70af6f2dd363c"; let UNITS = "metric"; functio...
// import React from "react"; // import { useParams } from "react-router-dom"; // import { getCursosByNombre } from "../../selector/getCursoByNombre"; // export const CursoScreen = () => { // const { cursoNombre } = useParams(); // const curso = getCursosByNombre(cursoNombre); // const { nombre, img, descripci...
import Vue from 'vue' const filters = {}; const formatNumber = function(n) { n = n.toString() return n[1] ? n : '0' + n } /** * 时间过滤器 */ filters.formatTime = (time, tpl = "YYYY/MM/DD hh:mm:ss") => { if(!time) { return '' } var date = new Date(time - 0); let year = date.getFullYear();...
import React from "react"; import { Box, Heading } from "rebass"; const Person = ({ name, setUpState, lname, nameChange, deleteClick, index, }) => { return ( <> <Box> <Heading onClick={setUpState}> {index + 1} {name} {lname} </Heading> <p onClick={deleteClick}...
/**Given a non-negative integer, * you could swap two digits at * most once to get the maximum * valued number. Return the maximum * valued number you could get. Example 1: Input: 2736 Output: 7236 Explanation: Swap the number 2 and the number 7. Example 2: Input: 9973 Output: 9973 Explanation: No swap. */ //...
const iconWrapper = { alignItems: 'center', marginTop: 10 }; const linkText = { color: '#0056b3', fontSize: 16, fontWeight: '600' }; const link = { justifyContent: 'center', alignItems: 'center', margin: 10 }; export { iconWrapper, linkText, link };
import styled from 'styled-components'; import {Reload} from '@styled-icons/ionicons-outline/Reload'; import {BurstNew} from '@styled-icons/foundation/BurstNew'; import {DoneAll} from '@styled-icons/material-outlined/DoneAll'; export const BurstNewIcon = styled(BurstNew)` width: 25px; `; export const DoneAllIcon = ...
'use strict'; var Calc = require('./chai_ex_01'); var expect = require('chai').expect; describe('Calc', () => { describe('Calc sum of two number', () => { it('the function sum return sum of two number', () => { const sum = Calc.sum(5,5); expect(sum).to.be.a('number'); ...
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ /*global define, $, brackets */ /* In Brackets, all js files are modules handled by requirejs. Leave it that way to conform to Brackets coding standards. */ define(function (require, exports, module) { 'use...
// newslatter function newslatter(e){ const modal = document.getElementById('newspai'); modal.classList.add('mostrar'); modal.addEventListener('click', (e) => { if (e.target.id == 'newspai' || e.target.id == 'fecharnews'){ modal.classList.remove('mostrar') }; }) ...
import React from 'react'; //import { render, screen } from '@testing-library/react'; import './children.css'; export default function Children(props){ return ( props.children.map(child=>{ return <div className="App-children"> <img src={child.avatar} className="avatar-children" alt={prop...
//$("form").remove(); $("article").prepend("<div>"); $("article").prepend("<div>"); $("article").prepend("<div>"); $("article").prepend("<div>"); $("article").prepend("<div>"); $("input").attr("value","Search for..."); $("input").attr("value","Search for..."); $("a").attr("href","www.codefactory.wien");
// import Users from '~/assets/datajson/users.json'; export default class UserService { constructor(axios) { this.axios = axios; } getCountClientInfo() { return this.axios.get(`/api/manager/count-client-info`); } getClientInfo(clientId) { return this.axios.get(`/api/manage...
import Link from 'next/link'; import React from 'react'; import SocialLinks from '../social-links'; const footer_contents = { shapes: ['footer/testimonial-shape-5.4.png', 'footer/team-shape-5.3.png'], title: 'Discover our collax inner system', sm_text: 'At Collax we specialize in designing, building, shipping an...
import React from 'react' import { styled } from 'twin.macro' export default function OrderedList({ children }) { return ( <ListWrapper> {React.Children.map(children, (child, index) => ( <ListItem key={index}> <div>{child.props.children}</div> </ListItem> ))} </ListWrapp...
import React from 'react'; const Toggle = () => { const toggleRole = () => { const currentRole = localStorage.getItem("role"); const newRole = currentRole === "company" ? "candidate" : "company"; localStorage.setItem("role", newRole); } return ( <button onClick={() => {tog...
function onCallbackSuccess(result) { } $(document).ready(function () { if ($(".wijmo-stylesheet-wijmo_theme")[0]) { if ($(".wijmo-stylesheet-wijmo_theme").attr("href").indexOf("WebResource") != -1) { $('#themeswitcher').val("http://cdn.wijmo.com/themes/cobalt/jquery-wijmo.css"); } els...
import './App.css'; import ArticleList from './Components/ArticleList'; function App() { return ( <div className="App"> <h1 style={{fontSize: 60}}>NEWEST ARTICLES FROM GAMERANX.COM</h1> <ArticleList /> </div> ); } export default App;
const React = require('react'); const { Component } = React; const { useState } = React; const { useRef } = React; const { useEffect } = React; const { useMemo } = React; const { useCallback } = React; const Ball = require('./Ball'); function getWinNumbers() { console.log('getWinNumbers'); const...
import React, { useState, useEffect } from 'react' //import Search from './search' import Card from './card' import axios from 'axios' import styled from 'styled-components' const ContainerDiv = styled.div` display: flex; flex-direction: row; flex-wrap: wrap; ` const FormDiv = styled.div` margin: 2% au...
///The some example of shorting the array of there... var numberArray = [40, 1, 70, 3, 2] var stringArray = ['Asad', 'Anik', 'Alien', 'Ghost'] var numaricStringArray = ['34', '23', '700', '700.0'] var mixedNumaricArray = ['12', '80', '40', '3', 2, 1, 88, 11] //A Function for comparing the 2numbers.... f...
"use strict"; var React = require("react"); var ReactPropTypes = React.PropTypes; var Modal = require("simple-react-modal"); var FoodMenu = React.createClass({ propTypes: { value: ReactPropTypes.object.isRequired, onChange: ReactPropTypes.func.isRequired, show: ReactPropTypes.bool.isRequired, onClos...
import { DAYS, DEFAULT_CITY, HOURS } from '../constants'; import { SET_APP_READY, SET_CITY, SET_DATA, SET_IS_FETCHING, SET_PRELOADER_TEXT, SET_ERROR, SET_SEARCHING_PANEL_OPENED, SET_THEME, SET_ERROR_MESSAGE, SET_FORECAST, SET_HISTORY, SET_VALUE, SET_HOURLY, SET_DAILY, } from './actions'; e...