text stringlengths 7 3.69M |
|---|
// Get the walker image:
var walker = document.getElementById('walker');
var movingRight = false;
// Configure motion params:
var leftBorder = 0;
var rightBorder = window.innerWidth - walker.offsetWidth;
// Have the stick figure start at the right border and start walking left
// When he crosses the left border, have... |
import test from 'ava'
import React from 'react'
import { create as render } from 'react-test-renderer'
import { StaticRouter } from 'react-router-dom'
// components
import Library from '../src/Library'
import Responsive from '../src/Responsive'
const renderJSON = el => render(el).toJSON()
const routes = [
{
k... |
const redis = require('./redis')();
module.exports = (io) => {
io.on('connect', (socket) => {
function broadcastEmit(data) {
socket.broadcast.emit(data.type, data);
}
const loginEvent = {
type: 'login',
datetime: new Date().toISOString(),
eventData: {
session: socket.id,
... |
import { url } from "./../utils/config";
import { staticAssetsUrl } from "./../utils/config";
import axios from "axios";
// axios.defaults.withCredentials = true;
// import "js-cookie";
import "bootstrap";
import $ from "jquery";
import "../scss/main.scss";
import { showAlert } from "../utils/showAlert";
import "../... |
import * as actionTypes from '../constants/action-types'
function setFetchingResult(fetching) {
return {
type: actionTypes.PAGE_LAYOUT_FETCHING,
fetching,
}
}
function resetPageStateResult() {
return {
type: actionTypes.PAGE_LAYOUT_RESET,
}
}
function setErrorResult(error) {
return {
type: ... |
import React from 'react'
import ReactDom from 'react-dom'
import api from '../api';
import {useState} from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
export default function EditPage() {
const [title, setTitle] = useState('new expense');
const [description, setDescription] = useState('expense deta... |
/**
* ChatAwayButton.js
* @file Adds "Away" button to chat, isolated functionality from ChatHacks
* @author Eizen <dev.wikia.com/wiki/User_talk:Eizen>
* @external "mediawiki.util"
* @external "wikia.window"
* @external "jQuery"
* @external "mw"
*/
/*jslint browser, this:true */
/*global mw,jQuery,window,requir... |
import styled from "styled-components";
import _ from 'lodash'
import faker from 'faker'
import React, { Component ,useState,useEffect} from 'react'
import { Search, Grid, Header, Segment } from 'semantic-ui-react'
export default class extends React.Component {
constructor(props) {
super(props);
}
state =... |
function getType(a, b, c){
var score = a + b + c;
var cl;
if(score >= 0 && score <= 5){
cl = 'calme';
}
else if(score >5 && score <= 10){
cl = 'tranquille';
}
else if(score >10 && score <= 15){
cl = 'ambiance';
}
else if(score >15 && score <= 20){
cl = 'dejante';
}
return cl;
}
|
const mqtt = require('mqtt');
const {MQTTMessageHandler} = require('../src/mqtt_service/MQTTMessageHandler.js')
require("dotenv").config();
const options =
{
host: process.env.MQTT_HOST,
clientId: "garbage",
username: process.env.MQTT_USER,
password: process.env.MQTT_PASSWORD,
port: process.env.MQ... |
function dgfunct(action){
if(action==10){
$('#dg').datagrid("acceptChanges");
var datastr = '';
var rows = $('#dg').datagrid("getRows");
for(var i=0,j=0; i<rows.length; i++){
//console.log(dgold[i].order_id);
if(rows[i].order_id!=dgold[i].order_id ){
if(j==0){
datastr += rows[i].id + ':'... |
import { momentIsBetween } from '../../../helpers/moment-between';
import { module, test } from 'qunit';
import moment from 'moment';
module('Unit | Helper | moment between');
// Replace this with your real tests.
test('it works', function(assert) {
let date = moment('March 14, 2016');
let start = moment('March 1... |
var arr=[11,32,5,1,67,82,35];
var even=[];
var odd=[];
for (item of arr){
if(item%2==0){
even.push(item);
}
else{
odd.push(item);
}
}
console.log("Even array : "+even)
console.log("Odd array : "+odd)
|
(function() {
var x = 100;
var b = function() {
// I'm private!
console.log('x old val ' + x)
x++
console.log('x new val ' + x)
}
setTimeout(b, 1000)
setTimeout(b, 2000)
}())
|
import React, {Component} from 'react'
import {Modal, ModalHeader, Form, ModalFooter, Button, ModalBody} from 'reactstrap'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import RecipeForm from '../components/recipeForm'
import * as recipesActions from '../actions/recipesActions'
import his... |
module.exports = {
apps: [
{
name: "AccountShop",
script: "./dist/main.js",
exec_mode: "cluster_mode",
instances: 2,
autorestart: true,
},
],
};
|
exports.getPicture = function(_params){
var dialog = Titanium.UI.createOptionDialog({
options: ['Camera','Gallery','Cancel'],
cancel:2
});
dialog.show();
dialog.addEventListener('click',function(e){
if(e.index == 0){
Titanium.Media.showCamera({
success... |
export function aaaaa() {}
|
'use strict';
/*
* twig pattern engine for patternlab-node - v0.15.1 - 2015
*
* Geoffrey Pursell, Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
*
* Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice.
*
*/
/*
* ENGINE SUPPORT LEVEL:
*
* Full. P... |
import Vue from 'vue';
import App from './App.vue';
import Router from './Router';
import Store from './stores/Store';
import ServicePlugin from './services/Services';
import PlainLayout from './layouts/PlainLayout'
import MenuLayout from './layouts/MenuLayout'
// vue global config
Vue.config.productionTip = false;... |
app.template = (function(window, document, $, self, undefined){
self.before = function(){
//$('body').find('*').unbind().off();
};
self.parse = function(data){
$('#header .toggle.active').trigger('click');
$('#header .active').removeClass('active');
$('#header a[href="'+data.url+'"]').addClass('... |
var socket_c = io('http://localhost:3000', { transports: ['polling'] });
// var game = 'test1'
$(function () {
var Upper = function(str) {
if (!str || typeof str !== 'string') return str;
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
};
//未使用
// $('#message_form').... |
import React from "react";
const BookCard = function(props) {
return (
<div className="card m-4 rounded justify-content-center bg-light" key={props.id}>
<div className="row no-gutters justify-content-center">
<div className="col-md-4">
... |
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
import Search from './components/Search.jsx';
import RepoList from './components/RepoList.jsx';
import RepoListEntry from './components/repoListEntry.jsx';
class App extends React.Component {
constructor(props) {
super(props);
... |
Session.setDefault("toEdit", []);
Template.EditMenuDay.onCreated(function() {
let template = Template.instance();
// slice needed because it set reference
template.tempRecipes = new ReactiveVar(this.data.recipes.slice(0));
});
Template.EditMenuDay.events({
'submit #edit-day-form': function(event, template) {
ev... |
import React, {useState} from "react";
import {View, StyleSheet, Image} from 'react-native'
import {BigTitle} from "../ui/BigTitle";
import StrainInput from "../components/StrainInput";
import {AppButton} from "../ui/AppButton";
import {DateInput} from "../components/DateInput";
import {useDispatch, useSelector} from "... |
import React from 'react';
import { Route ,Switch} from 'react-router';
import './App.css';
import Header from './component/header';
import Choose from './component/choose';
import Mylist from './component/mylist';
import Detailed from './page/detailed';
function App() {
return (
<div>
<Header />
<Sw... |
var run = function (timingProvider) {
// timing object
var to = new TIMINGSRC.TimingObject({provider:timingProvider, range:[0,100]});
var vel05 = 0.5;
var vel2 = 2.0;
var vel3 = 3.0;
var justplay = 0;
var buttonsElem = document.getElementById("buttons");
buttonsElem.onclick = fu... |
import Vue from 'vue';
import router from './router'; // 路由
import store from './store/index'; // 状态管理
import ElementUI from 'element-ui'; // element-ui
import 'element-ui/lib/theme-chalk/index.css'; // element-ui 样式
Vue.use(ElementUI); // 引用element
import '../src/assets/css/base.css'; // 初始化样式
import { currency } f... |
/** write a method that takes in a string
* and replace all spaces in a string with '%20'.
* assume string has sufficient space at the end
*
* input: 'Mr John Smith'
* output: 'Mr%20Jon%20Smith'*/
function urlify(str) {
return str.split(' ').join('%20')
}
console.log(urlify('Mr John Smith')) //Mr%20John%20Smit... |
import Control from '../control';
const ProgressBar = Control.extend({
props: {
from: {
type: Number,
default: 0,
},
to: {
type: Number,
default: 0,
},
value: {
type: Object,
default: () => ({}),
},
},
computed: {
position() {
return 0;
}... |
const filenamify = require('filenamify');
const ytdl = require('ytdl-core');
module.exports = class LinkCache {
constructor() {
this.linkList = [];
}
addLink(url) {
return new Promise(resolve => {
if (!ytdl.validateURL(url)) return resolve(false);
const videoId = y... |
/* eslint-disable indent */
import request from '@/utils/request'
const API_BASE_URL = 'http://localhost:8080/api'
export function fetchList() {
return request({
url: '/org/list',
method: 'get',
baseURL: API_BASE_URL
})
}
export function getOpt() {
return request({
url: '/... |
'use strict';
const gulp = require("gulp"),
fontmin = require("gulp-fontmin"),
imagemin = require("gulp-imagemin"),
stylus = require("gulp-stylus"),
svgmin = require("gulp-svgmin"),
watch = require("gulp-watch"),
concat = require("gulp-concat"),
sourcemaps = require("gulp-sourcemaps");
gulp.task("minif... |
import React, { Component } from "react";
import { Col, Row } from "react-bootstrap";
import { FaTimes } from "react-icons/fa";
import ShowTask from "./ShowTask";
class Task extends Component {
constructor(props) {
super(props);
this.state = {
displayTask: false,
};
}
onClickTrash = (task) ... |
//Javascript for setting up the server
//set up the require statements
var http = require('http');
var fs = require('fs');
var url = require('url');
var mysql = require('mysql');
//For making sure things remain in scope
var solution;
var jsonArray;
//Connect to the database
var con = mysql.createConnection({
... |
import React from "react"
const Age = props => {
const handleValueChange = e => props.onValueChange(e.target.value)
const { placeholder, value, reportType } = props
const getRanges = () => {
let ranges;
if (reportType === "criminal") {
ranges = [
{ value: "under-18", label: "Under 18 yrs... |
/*
* @Author: heinan
* @Date: 2020-09-09 09:32:42
* @Last Modified by: heinan
* @Last Modified time: 2020-10-13 09:27:41
*/
import React from 'react';
import RouterMap from './map';
import Routes from './routes';
const RouterView = function (props) {
const routes = props.routes ? props.routes : Routes;
retu... |
export const zh_register = {
'title': '注册',
'success_register': '成功注册',
'form': {
'username': '用户名',
'email': '邮箱',
'email_confirmation': '确认邮箱',
'password': '密码',
'password_confirmation': '确认密码',
'recaptcha': 'recaptcha'
},
'terms': '注册即表示您同意我们的使用条款和隐私政策.',
'has_login': '你已经有一个账号?'
... |
/**
* 创建时间:2018-08-29 14:44:39
* 作者:sufei Xerath
* 邮箱:fei.su@gemii.cc
* 版本号:1.0
* @版权所有
**/
import React, { Component } from 'react'
import IptLimit from "../../shareComponent/IptLimit";
import AccurateBlock from "../accurateModule/AccurateBlock";
import AccuratePhone from "../accurateModule/AccuratePhone";
imp... |
// const mongoose = require('mongoose');
// const productSchema = new mongoose.Schema({
// name: {
// type: String,
// required: true,
// maxlength: 32
// },
// product_img: {
// type: String,
// required: true
// },
// hotels: {
// type: [Object],
/... |
// @flow
export default function applyClasses(obj: any): string {
return Object.keys(obj)
.map((key: string) => {
return obj[key] ? key : '';
})
.filter((item: string) => item !== '')
.join(' ')
.trim();
}
|
// @flow
import * as React from "react";
import { useState, useEffect } from "react";
import ReactTable from "react-table";
import checkboxHOC from "react-table/lib/hoc/selectTable";
import type { SourceObject } from "../DistributionAnalysisEstimations.jsx";
import { stringToNumber } from "lk/components/util/stringT... |
// @flow
import React from 'react';
import styles from './Profile.scss';
import type { GithubUser } from './../../types';
type Props = {
data: GithubUser
};
const Profile = ({ data }: Props) => (
<div className={`${styles.container} profile`}>
<a href={data.html_url} target="_blank">
<img
classN... |
/**
* @Copyright (c) 2019-present, Zabo & Modular, Inc. All rights reserved.
*
* 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
*
* Unl... |
$(document).ready(function(){
// Hides text and button when 'starta quiz'-button is clicked
$("#show").hide();
$("#hide").click(function(){
$("#show").show();
$("#hide").hide();
$("#hide-text").hide();
var startTime = new Date();
});
var i = 0;
var rightAnswer = 0;
var ... |
const express = require('express')
const webpack = require('webpack')
const path = require('path')
const http = require('http')
const { dist } = require('./config')
/** webpack comiler */
const config = require('./webpack.config')
const compiler = webpack(config)
/** express instance */
const app = express()
const s... |
import http from "../http-common";
class ProductService {
//fetch all groups
getAll() {
return http.get("/groups");
}
//get categories for each group
getCategoriesByGroupId(id){
return http.get(`/categories/${id}`)
}
//get items mapped to a group for certain category
... |
module.exports.post = function(req,res){
res.end('hello post is working');
}; |
//CRUD가 정보시스템에서는 굉장히 중요하다.
var arr = ["A", "B", "C", "D"];
console.log(arr.length);
arr[2] = "c";
console.log(arr);
arr.push("Z");
console.log(arr);
|
import React from 'react'
import './HelloWorld.scss'
export default function HelloWorld(props) {
return <div className="beautiful">hello {props.name}</div>
} |
var app = {};
app.init = function () {
app.physics = new Physics();
app.particles = [];
app.mouse = { x: app.halfWidth, y: app.halfHeight };
app.TRACE = false;
app.VIEWSHIFT = {x: -50, y: 0, z: 0, zoom: 0};
app.GO = true;
app.FOLLOW = 0;
app.CLOCK = {ticks: 0};
app.SHOWCLOCK = false;
app.realTime =... |
const express= require('express')
const app = express()
// ALT CODE
//const apiRouter = require('./routes/noLongerIndex')
// you don't have to put index because it is defaulted
// this could also be called app.js
// app.use('/api/tweets', apiRouter)
app.use(express.json())
require('dotenv').config()
const userRouter... |
import React from 'react';
import { Block, Page, Navbar, NavRight, BlockTitle, Chip, Icon, Link, List, ListItem } from 'framework7-react';
import FileUploader from 'file-uploader-js';
import events from '../components/events';
export default class extends React.Component {
constructor() {
super();
this.st... |
import PathologiesActionTypes from "./PathologiesActionTypes";
const INITIAL_STATE = { pathologiesList: [], showPathologyDialog: false }
export default (state = INITIAL_STATE, action) => {
switch (action.type) {
case PathologiesActionTypes.GET_ALL_PATHOLOGIES:
return {
...state... |
import Emitter from 'eventemitter3';
var windowWidth, windowHeight;
class Mouse extends Emitter {
constructor(){
super();
this.x = 0;
this.y = 0;
this.screenX = 0;
this.screenY = 0;
this.down = false;
this.onMouseMove = this._onMouseMove.bind(this);
this.... |
import 'dotenv/config';
import argon2 from 'argon2';
import jwt from 'jsonwebtoken';
import { validationResult } from 'express-validator';
import { User } from '../models';
const register = async(req, res) => {
try{
const results = validationResult(req);
// console.log('results: ', JSON.stringify(results));... |
import React, { Component } from 'react'
class Home extends Component {
constructor (props) {
super(props)
}
render () {
return (
<div style={styles}>
<h1>Welcome to React Bootstrap</h1>
</div>
)
}
}
const styles = {
position: 'absolute',
top: '40%',
left: '50%',
trans... |
import { Header } from './Header/Header';
import { NavDrawer } from './NavDrawer/NavDrawer';
import { ComponentRouter } from './ComponentRouter/ComponentRouter';
import AppRouter from './AppRouter/AppRouter';
import PageWrapper from './PageWrapper/PageWrapper';
import { SeasonBox } from './SeasonBox/SeasonBox';
import ... |
export default {
loginLayout: {
display: 'flex',
width: '100%',
height: '100vh',
alignItems: 'center',
justifyContent: 'center'
},
loginWrapper: {
padding: '10px 0',
textAlign: 'center'
},
h4: {
fontSize: 24
}
} |
import React from 'react';
import { shallow } from 'enzyme';
import Response from './Response';
describe('Response component', () => {
it('renders Response', () => {
const wrapper = shallow(<Response />);
expect(wrapper).toMatchSnapshot();
});
});
|
import React from 'react'
import renderer from 'react-test-renderer'
import { shallow } from 'enzyme'
import 'jest-styled-components'
import CardRow from './CardRow'
describe('CardRow', () => {
it('renders correctly', () => {
const component = renderer.create(
<CardRow label="label text">children text</Ca... |
var colors = ["blue", "orange", "yellow", "purple", "black"];
//var koreanColors = ["blue", "orange", "yellow", "purple"];
var koreanColors = ["파란색", "주황색", "노란색", "보라색", "검정색"];
var counter = 0;
var skipCounter = 0;
var score = 0;
var playerName = "";
var highScore = 0;
var seco... |
import React from 'react';
import data from '../data';
import classes from './<%= pascalEntityName %>.scss';
/**
* React component implementation.
*
* @author dfilipovic
* @namespace ReactApp
* @class <%= pascalEntityName %>
* @extends ReactApp
*/
export class <%= pascalEntityName %> extends React.Component {
... |
const csv = require('csv-parser');
const fs = require('fs');
const results = [];
// List all categories and condition to match that in below array
var CATEGORIES = [
{
CATEGORY_NAME: "CAPSULES",
CATEGORY_CONDITIONS: ["CAPS ", " CAPS"],
MEDICINES: []
},
{
CATEGORY_NAME: "TAB... |
//I could not figure out how to move to a new word. So I just made a one time play game.
//I know how to add a score to an array and into the html but just simply could not solve the new word generator.
var words = [
"luke",
"leia",
"yoda",
"vader",
"chewy",
"lightsaber",
"han",
... |
'use strict';
//define scope, add arrays watchers, async tasks, postdigest tasks and current phase
function Myscope() {
this.$$arrayWatchers = [];
this.$$arrayAsyncTask = [];
this.$$arrayPostDigestTast = [];
this.$$phase = null;
}
//implement watch function
Myscope.prototype.$watch = function(watchFn, listenerFn,... |
console.log("I got a rainbow!");
console.log("And an extension called indent-rainbow");
console.log("I got colored Bracket");
console.log("And an extension called Bracket Pair Colorizer");
|
// Author of the project - SAYANI SASHA
// ---------- Урок № 9 - Циклы ----------
// Цыклы (loops) - вид инстуркций , нужны для многократного повторения каких-то отдельных инстуркций
// в js есть 4 вида цыклов
// Цыкл for
// имеет такой синтаксис
// for(выражение;выражение;выражение) инстуркция
// первое выр... |
import riot from 'riot';
import store from '../../redux/root';
import votercomponent from '../../components/voter/voter.component';
import { updateVote } from '../../redux/modules/voter';
class voterController {
constructor() {
this.mountTag();
this.listen();
};
mountTag() {
this.... |
const UI = (() => {
const boardPlayer1 = document.getElementById('board-player-1');
const boardPlayer2 = document.getElementById('board-player-2');
const renderInitialBoards = (player, gameBoard) => {
let divRender;
if (player.type === 'H') {
divRender = boardPlayer1;
} else {
divRender =... |
import Mock from 'mockjs';
import $store from '../../../store/index.js'
const pieChart_staffUrl = $store.state.mock.url.pieChart_staffUrl;
const pieChart_staff = {
'success': true,
data: {
title: {
text: '在职人员架构缩略图',
},
legend: {
data: [
'纺织工、物料裁... |
import React from 'react'
export const Project = ({id, name}) => (
<div className="Project">
<h2>#{id} - {name}</h2>
</div>
)
|
import React from 'react';
import { Grid, Container, Typography, Paper, Link } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import ArrowRight from './ArrowRight'
const useStyles = makeStyles(theme => ({
cardContent: {
borderTop:"1px solid #C1C4C5",
position: "ab... |
class Persona {
// Constructor de la clase persona
// edad con valor por defecto 0
constructor( nombre, peso, edad = 0){
this.edad = edad;
this.nombre = nombre;
this.peso = peso;
}
saluda(){
console.log('Hola soy', this.getNombre(), 'y tengo', this.edad);
}
... |
jQuery(document).ready(iniciar);
function iniciar()
{
window.tabla_BD = jQuery('#tabla-registros').DataTable(
{
"aaSorting":[[0,"desc"]],
"oLanguage": {
"sLengthMenu": "Mostrando _MENU_ filas",
"sSearch": "",
"sProcessing": "Procesando...",
"sLengthMenu... |
exports.signUp = function (session, userMap) {
return function (request, response) {
let result = {}
var data;
result.version = 1;
let bodyParameter = request.body;
// TO DO : identify bad request
if (bodyParameter.userName == null || bodyParameter.userName === '' || bodyParameter.userName == undefined) ... |
import React from 'react';
import renderer from 'react-test-renderer';
import Profile from '../Profile';
import {findById} from "../functions/findByID";
it('renders correctly', () => {
const tree = renderer
.create(<Profile page="Validation">TLA</Profile>)
.toJSON();
expect(tree).toMatchSnapsho... |
const passwordControl = (req, res, next) => {
const { password } = req.body;
const special = /\W|_/g; // special characters and spaces
const specialChar = password.match(special);
const lowerCase = /[a-z]/g;
const lowerCaseLetter = password.match(lowerCase);
const numbers = /[0-9]/g;
const numberIncl... |
/**
* Created by DELL on 2017/11/1.
*/
// Page module
define(["app", "controllers/base/page"],
function (app, BasePage) {
var Page = {};
Page.View = BasePage.View.extend({
beforeRender: function () {
// prevPage = currentPage;
// currentPage = "... |
const materialID = {none:0, transparent:1, solid:2, halfBlock:3, item:4, air:0, liquid:1};
const materialTransparent = [true, true, false, true, true];
const textureID = {stone:0, grass:1, dirt:2, cobblestone:3, planks:4, sapling:5, bedrock:6,
water:7, lava:8, sand:9, gravel:10, "gold ore":11, "iron ore":12, "coal":13... |
import React from 'react';
const Search = ({value, onSearch}) => (
<div>
<label htmlFor="searchInput">Search: </label>
<input id="searchInput"
type="text"
value={value}
onChange={onSearch} />
</div>
);
export default Search; |
import React from 'react';
// here set up the default of one option, 12 oz, no 4 oz
// allow subsequent options to be 4 oz (the top one should never be able to be removed)
// have a + icon at the bottom to add another line
// this should update something temporary, it's not their cart yet, but it shoud be tied to the ... |
(function (data) {
data = JSON.parse(data);
Object.keys(data).forEach(function (key) {
var val = data[key];
$.state.put(key, val);
if (key === "threads") $.util.storageSet(key, val);
})
})
|
var getLanguage = require('../lib/languages').getLanguage;
exports["CSS comment types"] = function(test) {
var lang = getLanguage('foo.css');
test.equal(lang.checkType('/* ** FOO bar -- **'), 'multistart');
test.equal(lang.checkType(' /* Foo'), 'code', "Ignore comments not at start of line");
test.equal(lang.c... |
import {
HemisphereLight,
SpotLight,
} from 'three';
import renderEvents from 'utils/render';
export default function factory() {
return (/* dispatch, getState */) => {
let spotLight;
const selfie = {
start() {
const startTime = Date.now();
renderEvents.onRender(() => {
co... |
/**
* Description:
* Author: jiangfeng (jiangfeng@tomstaff.com)
* Update: 2013-06-28 16:03
*/
$(document).ready(function(){
/**
* input切换显示退换货原因区块
*/
function Changelayer(){
var _self = this;
this._setlayer = function( obj, fn){
// var layer = obj.parents('tr').next();
... |
import React from 'react'
import ReactDOM from "react-dom"
import styles from './colorlist.css'
export const Color = (props) => {
return (
<ColorList addFilter={props.addFilter} removeFilter={props.removeFilter} colorlist={props.colorlist} />
)
}
export const ColorList = (props) => {
... |
import { connect } from 'react-redux';
import Area from './Area';
import {EnhanceLoading} from '../../../components/Enhance';
import {fetchJson, showError, postOption} from '../../../common/common';
import {fetchDictionary, setDictionary, getDictionaryNames} from '../../../common/dictionary';
import {dealActions} from ... |
import React, { Component } from "react";
import { Button } from "../../components";
import "./Profile.scss";
export default class Profile extends Component {
render() {
return (
<div className="Profile">
<h1>Cadastre-se</h1>
<p>
Duis vel scelerisque justo. Aliquam ut risus in qua... |
/** @format */
import React, { useState, useContext } from 'react';
import './Results.css';
import BarChart from '../charts/BarChart';
import Table from './Table';
const Switcher = ({ setContext, context }) => {
return (
<div className='tab_switcher__content'>
<span
className={context === 'barchart' ? 'acti... |
window.onload = () => {
let max_depth = 0;
let draw = _ => {
let p0 = {
x: chaos.width * 0.1,
y: chaos.height * 0.7
}
let p1 = {
x: chaos.width * 0.9,
y: chaos.height * 0.7
}
chaos.clear();
chaos.context.lin... |
'use strict';
const _ = require('lodash');
const pusher = require('../../lib/pusher');
module.exports = results => new Promise(resolve => {
// Bail if we do not have pusher
if (!pusher) return resolve(results);
// Decide which pusher channel to push over
let channel = /\.(gif|jpg|jpeg|tiff|png)$/i.test(result... |
exports.SubjectList = function () {
// if(!(this instanceof SubjectList)) return new SubjectList();
var self = this;
self.items = [{subject: 'aiueo'}];
riot.observable(this);
this.on('remove', function(item){
self.items.some(function (value, index) {
if (value === item) {
... |
import React, { useContext } from 'react';
import { View, StyleSheet } from 'react-native';
import MacroElement from './MacroElement';
import Calories from './Calories';
import { AppContext } from './AppContext';
const HomeScreen = () => {
const {
proteins,
fats,
carbos,
eatenCarbos,
eatenProtein... |
import React, { Component } from 'react';
import Modal from 'react-modal';
import RequestService from '../../Services/RequestService';
import ReactQuill from 'react-quill';
/**
* Component class for the Note editor screen
*/
class Editor extends Component {
constructor(props) {
super(props);
t... |
const axios = require('axios');
import conf from '../settings'
const { API_URL } = conf
function AgentServ(){
const serv = axios.create({
baseURL: API_URL + 'client',
timeout: 100000,
});
this.getUserProfile = async () => {
let res = await serv.get('/profile');
if(res){
return res.data
}
return ... |
module.exports = {
'btn-border-radius-base': '4px'
}
|
const initState = {
isTransitionAllowed: false
};
export default function transitionInfo (state = initState, action) {
switch(action.type) {
case 'DISABLE_TRANSITION':
return {
...state,
isTransitionAllowed: false
}
case 'ENABLE_TRANSITION... |
export const getProductList = (categoryId) => {
return categoryId === 'hot-tub-covers'
? {
category: {
name: 'Hot Tub Covers',
subname: 'available on ALL MODELS',
subnameSpec: 'FREE UPGRADES'
},
products: [
{
title: 'Classic Cover',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.