text stringlengths 7 3.69M |
|---|
import React, { useState, useEffect } from "react";
import { withRouter } from "react-router-dom";
import { post } from "axios";
import PropTypes from "prop-types";
import MuiAlert from "@material-ui/lab/Alert";
//--------------------------------- What was used from material ui core ------------------------------------... |
import React from 'react';
import Header from "./Header/Header";
import Refresh from "./Refresh/Refresh"
const Sidebar = (props) => {
return (
<div className="side">
<Header
handleChange={props.handleChange}
handleSearch={props.handleSearch}
newTodo={props.newTodo}
editing = {... |
var fs = require('fs');
var data = JSON.parse(fs.readFile('users.json') );
console.log(data);
function addId () {
for (var i=0; i<data.length; i++)
var temp = data[i]
console.log(i);
};
|
var actions = require('../actions/index');
var initialLocationState = {name: ''};
var locationReducer = function(state, action) {
state = state || initialLocationState;
if (action.type === actions.FIND_LOCATIONS) {
return {
name: action.location
};
}
else if (action.type =... |
import React, { Component } from 'react'
import { Link} from "react-router-dom";
import {createUser,createRealUser,UniqueName} from '../store/actions/authActions'
import {connect} from 'react-redux';
import {Redirect} from 'react-router-dom'
import * as firebase from 'firebase/app';
import 'firebase/auth';
class sig... |
const btnForm = document.getElementById("btn-form");
const username = document.getElementById("username");
const password = document.getElementById("password");
const form = document.getElementById("form");
// 登入
const ClickBtnForm = (e)=>{
e.preventDefault();
//信箱驗證
const myreg = /^([a-zA-Z0-9_\.\-\+]... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Button, Card, CardBody, Col, Container, Form, Input, InputGroup, InputGroupAddon, InputGroupText, Row, FormFeedback } from 'reactstrap';
import { userActions } from '../../../actions';
import { utils } from '../../../utils';
impo... |
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
import pkg from './package.json';
import image from '@rollup/plugin-image';
import { terser } from 'rollup-plugin-terser';
import { babel } from '@rollup/plugin-babel';
... |
var cli = require("./index");
var del = require('rimraf').sync;
var assert = require('assert');
var exists = require('fs').existsSync;
var prom = require('prom-seq');
del('test/fixtures/dist');
var task = prom.create(cli.tasks);
task('', require('crossbow-ctx')()).then(function () {
assert(exists('test/f... |
// Require the testing dependencies
const chai = require('chai');
const assert = chai.assert;
// Require query function for getAllStudents check
const query = require('../../lib/utils').query;
// Require seed to reset database before each test
const seed = require('../../lib/seed').dbSeed;
// The file to be tested
c... |
var string = "Some string";
for (var i = 0; i < string.length; i++) {
console.log(string.charCodeAt(i));
}
//var string = "1928";
let num = 108;
//let string = ''+num;
let string = num.toString();
for (var i = 0; i < string.length; i++) {
console.log(string.charCodeAt(i));
}
console.log("abcd".charCodeAt(0))... |
/*
reduceLISP.js - semantic transformation to simplify LISP tokens
The MIT License (MIT)
Copyright (c) 2016 Dale Schumacher
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, ... |
import moment from 'moment'
import 'moment/locale/es';
moment.updateLocale('es', {
monthsShort : [
"ENE", "FEB", "MAR", "ABR", "MAY", "JUN",
"JUL", "AGO", "SEP", "OCT", "NOV", "DIC"
]
})
moment.locale('es')
export const momentEs = moment |
// DOM selection
// document.getElementById()
var p = document.getElementsByTagName('p');
for (let index = 0; index < p.length; index++) {
p[index].style.backgroundColor = 'lightBlue';
}
var nama = document.getElementById('judul');
const ismun = {
name: "Bangkit Juang Raharjo"
}
nama.innerHTML = ismun.name;... |
//index.js
var app = getApp()
Page({
data: {
bpm: 96,
beat: 4,
note: 4,
bar: 0,
beatArr: [],
aliquots: 0,
isPlay: null,
count: 1,
playQueue:[/*{
start: 0,
bpm: 96,
beat: 4,
note: 4
}, {
start: 10,
bpm: 96,
beat: 6,
note: 8
},... |
// Definitions
const DATAMEMBERS = 5;
const random_uId = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
const random_name = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
function DataObj () {
this['uId'] = '';
this['name'] = '';
}
function randomData (type, base) {
let valueLength = ... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Field, reduxForm } from 'redux-form';
import PropTypes from 'prop-types';
import Button from '../../common/Button';
import { updateCard } from '../../../actions/boardActions';
class EditCardDescriptionForm extends Component {
... |
Template.search.events = {
'keypress #search-box': function (evt, template) {
if (evt.which === 13) {
var selector = $('#visualizations>ul>input');
var query = template.find("#search-box").value;
query = ".*"+ query +".*$";
var result = Visualizations.findOne({"name" : {$regex ... |
// FLATTENING FUNCTION
const flatten = function(...elements) {
let newArray = [];
//if element is array create nested loop to loop over array element
for (let i = 0; i < elements.length; i++) {
if (Array.isArray(elements[i])) {
for (let j = 0; j < elements[i].length; j ++) newArray.push(elements[i][j]);... |
import React, { Component } from 'react'
import { Modal, Button, Icon, Dropdown, Table } from 'semantic-ui-react'
import { VictoryChart, VictoryLine } from 'victory'
// import { ComposableMap, ZoomableGroup, Geographies, Geography } from "react-simple-maps"
import './VisualisationModal.css'
// import worldMap from ... |
import React from 'react';
import { API } from 'aws-amplify';
const FetchDataButton = () => {
const fetchData = async () => {
let result;
try {
result = await API.get('polzeeApi', 'generateToken');
console.log('toddtest result', result);
}
catch(ex) {
... |
export const data = {
"notes": {
"note1": {
"subject": "this is a subject",
"created": 1480446094009,
"lastUpdated": 1480446094009,
"body": {
"text": "This is the body text"
}
},
"note2": {
"subject": "this is another subject",
"created": 1480446094009,
... |
import { document } from "document";
export function MicrosUI() {
this.busList = document.getElementById("busList");
this.statusText = document.getElementById("status");
}
MicrosUI.prototype.updateUI = function(state, schedule) {
} |
const productDatabase = require('../database/productDatabase').productDatabase
class Product {
constructor() {
this.productDatabase = productDatabase
}
getAllProduct() {
return this.productDatabase
}
addProduct(product) {
this.productDatabase.push(product)
retu... |
var results = [
{
"name": "#0"
},
{
"name": "+Globosat"
},
{
"name": "1+1"
},
{
"name": "13th Street Germany"
},
{
"name": "13ème rue"
},
{
"name": "1UP.com"
},
{
"name": "20th Century Fox"
},
{
"name": "24"
},
{
"name": "2be"
},
{
"name": "2... |
import * as firebase from "firebase/app";
import "firebase/auth";
import 'firebase/database';
var firebaseConfig = {
apiKey: "AIzaSyA0b0BTp5w7Cp-irDa2aDAG56OiCVwp6t4",
authDomain: "conectir-1265c.firebaseapp.com",
databaseURL: "https://conectir-1265c.firebaseio.com",
projectId: "conectir-1265c",
st... |
const elemento = document.querySelector(".jogo");
const elemParaModal = document.querySelector("#modal");
const telaNaoClicavel = document.querySelector("#tela");
let elementosClicados = [];
let cartasClicadasPorRodada = 0;
let primeiroId = 0;
let segundoId = 0;
let pontos = 0;
const numeroDePares = defineNumeroDePare... |
/**
* LINKURIOUS CONFIDENTIAL
* Copyright Linkurious SAS 2012 - 2018
*
* - Created on 2014-12-17.
*/
'use strict';
// ext libs
const Promise = require('bluebird');
// services
const LKE = require('../../../index');
const Utils = LKE.getUtils();
const Data = LKE.getData();
const Access = LKE.getAccess();
const Vi... |
'use strict';
const React = require('react');
const Link = require('react-router').Link;
const NavigationBar = () => (
<nav className='NavigationBar'>
<ul className='NavigationBar__list'>
<li className='NavigationBar__element'>
<Link to='/' className='NavigationBar__link'>Home</Link>
</li>
... |
var GrepApplication;
var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
child.... |
var sidebar_2commands_8c =
[
[ "sb_parse_whitelist", "sidebar_2commands_8c.html#a7d3a4db808135ebb02ebd2b5d2c5713a", null ],
[ "sb_parse_unwhitelist", "sidebar_2commands_8c.html#a8f2bb3b173205a5b055df25cbd59d984", null ]
]; |
const User = require('../models/user');
const Post = require('../models/post');
function usersShow(req, res) {
let user;
User
.findById(req.params.id)
.populate('favourites followers following')
.exec()
.then(userData => {
if (!userData) return res.status(404).render('error', { error: 'No user found.'}... |
var hand;
function janken(hand){
machineHand = Math.floor(Math.random()*3);
document.write('<h2>ポン!</h2>');
if(machineHand == 0){
document.write('<img src="./image/gu.jpg" alt="画像の解説文" width="200" height="200"/>');
}else if(machineHand == 1){
document.write('<img src="./image/tyoki.jpg" a... |
var a = [1,2,3];
var b= [3,2,1];
var c = [];
a.forEach(function(item){
c.push(item);
});
for(var i=0; i<b.length; i++){
c.push(b[i]);
}
c = a.concat(b); |
import http from './httpServices';
import proxy from '../config/proxy.json';
export function httpRegister(username, email, password) {
return http.post(proxy.api_register, { username, email, password });
}
export function httpLogin(email, password) {
return http.post(proxy.api_login, { email, password });
}
e... |
import verge from 'verge';
import events from 'utils/events';
class Viewport {
constructor() {
this.width = Viewport.calculateWidth();
this.height = Viewport.calculateHeight();
this.ratio = this.width / this.height;
this.bind();
}
bind() {
this.onResize = this.onResize.bind(this);
windo... |
/**
* @name CourseList
*
* @author Mario Arturo Lopez Martinez
* @author Chris Holle
*
* @overview @TODO
*
* @TODO: Add functionality for edit (link to edit form)
*/
import React from "react"
import { useQuery } from "@apollo/react-hooks"
import CourseCard from "components/cards/courseCard"
import { Mutation ... |
import moment from 'moment'
const contactsReducer = ( state = { array: [], object: {} }, action ) => {
switch( action.type ) {
case 'UPDATE_FULFILLED':
case 'GETALL_FULFILLED':
// action.payload is an array of contacts resulting from a transformed firebase call
return action.payload ? action.payload : s... |
import { createClient } from '@supabase/supabase-js'
const config = {
key: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYyMzMyMTAxOCwiZXhwIjoxOTM4ODk3MDE4fQ.YISggSEzSk6WsMNkvN2a5MHYWBVjQ84nHwWYne9sTA0',
url: 'https://tfvnrohsjcgsekfnggks.supabase.co',
}
const key = import.meta.env['VITE_SUP... |
var app = app || {};
app.Food = Backbone.Model.extend({
defaults : {
id : 1,
text : 'some text'
}
}); |
var left_width = 250;
var window_width;
var window_height;
$(document).ready(function(){
window_width = parent.g_width;
window_height = parent.g_frameheight;
$(".layout").height(window_height - 36);
$(".layout-left").height(window_height - 36);
$(".layout-center").height(window_height - 36);
$(".layout-collap... |
/*==========================================================
Author : Siva Kella
Date Created: 28 Nov 2016
Description : To handle the service for Logout module
Change Log
s.no date author description
===========================================================*/
logout.servic... |
'Use strict'
// const refs = {
// allLogins: ['Mango', 'robotGoogles', 'Poly', 'Aj4x1sBozz', 'qwerty123'],
// isLoginUnique(login) {
// if(this.allLogins.includes(login)) {
// alert('Login already exists!');
// return false;
// }else{
// return true;
// ... |
// define a variable to import the <Verifier> or <renamedVerifier> solidity contract generated by Zokrates
let Verifier = artifacts.require('Verifier');
let proof = require('../../zokrates/code/square/proof').proof
let input = require('../../zokrates/code/square/proof').input
// Test verification with correct proof
//... |
import {useEffect} from "react";
import {useRecoilState} from "recoil";
import {pageState} from "~/components/organisms/PageEditor/pageAtoms";
import ComponentRender from "../../pageComponents/ComponentRender";
import {StyledPageRender} from "./PageRender.style";
import {pageRenderState} from "./PageRenderAtom";
const... |
//$(document).ready(function () { $("input").attr("autocomplete", "off"); });
//$(document).ready(function () { $("textarea").attr("autocomplete", "off"); });
/*Search*/
$(document).ready(function () {
$("#nav-search-in-content").text("Library Resources");
$("#searchDropdownBox").change(function () {
... |
import test from "tape"
import { page } from ".."
test("page", t => {
t.deepEqual(
page()([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
"Page with default"
)
t.deepEqual(
page({ offset: 1, limit: 5 })([1, 2, 3, 4, 5, 6, 7, 8]),
[2, 3, 4, 5, 6],
"5 length page sta... |
import React, {useEffect, useCallback} from 'react';
import PropTypes from 'prop-types';
import {useParams} from 'react-router-dom';
import {connect} from 'react-redux';
import {projectFetcher} from './lib/fetchers';
import {projects} from './lib/redux-modules';
import Debug from './debug.jsx';
const {actions, select... |
import {constants} from '../actions/leftMenu';
export default (state = {visible: false}, action) => {
switch (action.type) {
case constants.OPEN_LEFT_MENU:
return {visible: true};
case constants.CLOSE_LEFT_MENU:
return {visible: false};
default:
return ... |
$(".bannerbox").slide({
titCell: ".yuandian li",
mainCell: ".bd",
autoPlay: 'true',
depayTime: 2500,
effect: 'leftLoop'
});
$(".project").slide({
mainCell: ".item",
effect: "leftLoop",
interTime:2500,
vis:4,
autoPlay: 'true',
});
|
import React , {Component} from 'react';
import Toolbar from '../../components/Toolbar/Toolbar'
import classes from './ProductDisplay.module.css'
import ProductBox from '../../components/ProductBox/ProductBox'
class ProductDisplay extends Component {
render(){
return (
<div className={classes.... |
const http = require('http');
var fs = require('fs');
const hostname = '127.0.0.1';
const port = 3000;
var ur;
var met;
var s;
const server = http.createServer((req, res) => {
ur=req.url;
console.log(ur);
met=req.method;
console.log(met);
if(req.method=='POST')
{
let data=' ';
... |
const { baseResolver } = require('../../../libaries/apollo-resolver-creator')
const isAdmin = require('../../../libaries/role-checker')
const REGISTER_MESSAGE = 'Registered in system.'
const UPDATE_TO_IDLE_MESSAGE = `Change status to "IDLE"`
const UPDATE_TO_EXPIRE_MESSAGE = `Change status to "EXPIRE"`
const ASSIGN_TO_... |
import {
CREATE_OPERATION,
DELETE_ALL_OPERATIONS
} from '../actions/actiontypes'
const operationLogs = (state = [], action) => {
switch(action.type) {
case CREATE_OPERATION:
const operationLog = {
log: action.log,
time: action.time
}
return [operationLog, ...state]
case... |
const mongoose = require('mongoose');
var SettingsSchema = new mongoose.Schema({
lang: { type: String, default: 'ru-RU' },
theme: { type: String, default: 'dark' },
storage: {
video: { type: String, default: '3' }
},
nat: {
enable: { type: Boolean, default: 'false' },
extern... |
import SvgIcon from "../vue/components/SvgIcon.js"
import svg_icon from "./index_icon.js"
document.getElementById("svg-icon").innerHTML = svg_icon
SvgIcon()
Vue.component('status-item',{
name: 'status-item',
template: '<div class="status-item"> \
<div class="con"> \
<div class="percent-circle percent-ci... |
import { readFileSync, writeFileSync } from 'fs'
import { rebuild } from './gcode.js'
const gcodeFile = process.argv[2]
console.log('processing', gcodeFile)
const gcode = readFileSync(gcodeFile, { encoding: 'utf-8' }) || ''
const outputCode = rebuild(gcode, { g1FeedRate: 100, scale: 0.001 })
writeFileSync(gcodeFile + '... |
'use strict';
const Module = require('../../../utils/Module');
class ChatEmotes extends Module {
constructor(BetterTwitchApp) {
super('chat.emotes');
this.BetterTwitchApp = BetterTwitchApp;
this.init();
}
init() {
let self = this;
this.BetterTwitchApp.on('BetterTwitchApp:Channel', (channel) => {
th... |
/**
* Copyright 2017 DataChat
* www.datachat.ai
* All rights reserved
*/
(function (context, a3) {
'use strict';
if (typeof exports === 'object') {
// CommonJS
module.exports = a3(require('d3'), require('crossfilter'));
} else {
if (typeof define === 'function' && define.amd... |
export const addColumn = columnData => {
return {
type: 'ADD_COLUMN',
columnData
}
};
export const addCard = ({columnIdx, text, color}) => {
return {
type: 'ADD_CARD',
columnIdx,
text,
color
}
};
export const removeColumn = columnIdx => {
return {
... |
import React, { Component } from 'react';
export class ShipStats extends Component {
constructor() {
super()
this.state = {
shipHP: 650,
hpChange: ''
}
this.getChange = this.getChange.bind(this)
this.shipHpDown = this.shipHpDown.bind(this)
this.shipHpUp = this.shipHpUp.bind(this)
}
shipHpDo... |
/**
* LINKURIOUS CONFIDENTIAL
* Copyright Linkurious SAS 2012 - 2018
*
* - Created on 2014-10-06.
*
* File: parsers.js
* Description : This is a library of parsing functions used to retrieve
* custom object representations from String to JS Objects
*/
'use strict';
/**
* Function that parses a ... |
import ArrowIcon from './ArrowIcon'
import ArrowDownIcon from './ArrowDownIcon'
import ArrowUpIcon from './ArrowUpIcon'
import CartIcon from './CartIcon'
import SearchIcon from './SearchIcon'
import CheckIcon from './CheckIcon'
import CheckboxIcon from './CheckboxIcon'
import CheckboxCheckedIcon from './CheckboxChecked... |
const readInput=require('./Utility/Utility');
var givenString="Hello <<UserName>>, How are you?";
do{
console.log("Enter User Name");
var username=readInput.getString();
if(username.length<3)
console.log("Username must contain atleast 3 Characters");
}while(username.length<3);
console.log(givenStri... |
const readline = require('readline');
const fs = require('fs')
const add = require('./modules/add');
const subtract = require('./modules/subtract');
const multiply = require('./modules/multiply');
const divide = require('./modules/divide');
const lessThan = require('./modules/lessThan');
const greaterThan = require('./... |
function check(){
var n = Number(document.getElementById("num").value);
var c = 0;
//for numbers 1 and 2
if(n == 1){
document.getElementById("ans").value = "Not Prime";
}
if(n == 2){
document.getElementById("ans").value = "Prime";
}
//for numbers other t... |
import dataFetch from '@/utils/request'
export default {
// 服务说明
async getServeInfo (params) {
return dataFetch('/goods/serviceDetail', params)
},
// 赔付列表
async getApplyList (params) {
return dataFetch('/reparation/applyList', params)
},
// 申请赔付
async getCheckUnusedOp () {
return dataFetch(... |
import jwt from 'jsonwebtoken';
import { findUser } from '../data-access/user.js';
import NotFoundError from '../errors/notFound.js';
export default class AuthService {
static async login({ login, password }) {
const isUserExist = !!(await findUser(login, password));
if (isUserExist) {
const token = Au... |
import React, { Component } from "react";
import "./assets/css/footer.css";
class Footer extends Component {
render() {
return (
<div className="footer">
<div className="wrapper">
<div className="info-block">
<div className="info">
<div className="field">
... |
export default [
{
path: "/",
redirect: "/app"
},
{
path: "/app",
name: "app",
meta: {
title: "应用分析"
},
component: () => import("views/App.vue")
},
{
path: "/push",
name: "push",
meta: {
title: "推送营销"
},
component: () => import("views/Push.vue")
},... |
function solution(people, limit) {
var answer = 0;
// 오름차순 정렬
people.sort((a, b) => a - b);
// 시작 Flag
let left = 0;
let right = people.length - 1;
while(left < right){
if (limit >= people[left] + people[right]){
left += 1;
right -= 1;
... |
import { reactive, toRefs } from "vue";
export const useCount = () => {
const state = reactive({
count: 0
});
return toRefs(state);
}
|
import React, { Component } from 'react';
// import { browserHistory } from 'react-router';
class CartItem extends Component {
render() {
return (<div className="column is-one-third-mobile is-one-third-tablet is-one-quarter-desktop is-offset-4 productCard">
<div className="section">
... |
import HtmlWebPackPlugin from "html-webpack-plugin";
import ExtractTextPlugin from "extract-text-webpack-plugin";
export default (env, argv) => {
return {
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: {
... |
var searchData=
[
['players',['players',['../structgame.html#a61d36a149f0d4d23b4ec8bff3a256d9f',1,'game']]]
];
|
import fili from 'fili';
import numjs from 'numjs';
export class SignalFilter {
constructor() {
this.processor = new fili.CalcCascades();
}
lowpass(signal) {
const coeffs = this.processor.lowpass({
order: 10,
characteristic: 'butterworth',
Fs: 360,
... |
import axios from 'axios';
// Custom Imports
import Constant from '../constant';
function getToken() {
let token = localStorage.getItem('token');
return token;
}
// Function to request login
function registerPractice(user) {
return axios({
data: user,
method: 'POST',
url: `${Constant.API_URL}/regis... |
const cityLetter = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
const getItem = (letter, list) => {
let arr = []
list && list.map(item => {
if (item.searchKey == letter) {
var _item = {
name: item.addressName,
code: ite... |
/* eslint-disable no-underscore-dangle */
import Phaser from 'phaser';
import api from '../config/apiconf';
import gameOpt from '../config/gameOptions';
export default class userRecord extends Phaser.Scene {
constructor() {
super({
key: 'rexUI',
});
this.count = 1;
}
preload() {
let url;
... |
import React from 'react';
import {View,Text,StyleSheet,Alert} from 'react-native';
import axios from 'axios';
export default class HomeScreen extends React.Component{
constructor(props){
super(props);
this.state={
list_data:[],
url:'http://127.0.0.1:5000/'
}
}
getData= async()=>{
... |
module.exports = {
"id": "startAppeal",
"name": "Start your appeal",
"description": "Start your appeal",
"case_id": null,
"case_fields": [
{
"id": "checklistTitle",
"label": "# Tell us about your client",
"hidden": null,
"value": null,
... |
const Homework = require('../models/homework')
const mysql = require('mysql')
const mysqlOption = require('../config/db')
const conn = mysql.createConnection(mysqlOption.mysql)
const sqlMap = require('../dao/sqlMap')
class HomeworkRepository {
constructor(){
}
listStuHomework(params, callbac... |
module.exports = {
/*
Return date string with has offset calculated from UTC,
i.e. Thu Sep 24 2015 10:29:25 GMT-0700 (PDT)
with offset -7 would give
2015-09-24T10:29
*/
convertISOToLocalTruncatedMinutes: function (dateInMillis, hourOffset) {
function pad(numbe... |
import React from 'react';
import styled from 'styled-components';
import { darken } from 'polished';
import StockLabel from '../../../../components/StockLabel';
import Input from '../../../../components/Input';
import Button from '../../../../components/Button';
import Title from '../../../../components/Title';
import... |
const embed = require("../embedCreator");
module.exports = async function setUser(Osu, Discord, msg, msgargs, db) {
var sendstr = new embed();
var osuUserName = msgargs[0]; //msgargs are seperated by ' ' so 0th arg should be name.
if (msgargs.length === 0) {
//Username to set not Specified.
sendstr.withTitle("... |
module.exports = (app) => {
const getById = (req, res) => {
app.services.accounts.findById({id: req.params.id})
.then((result) => {
if(!result) {
return res.status(400).json(`Conta de id ${req.params.id} não encontrado!`)
}
ret... |
import { useDispatch, useSelector } from "react-redux";
import * as d3 from "d3";
import slice from "../slice.js";
import { Responsive } from "./Responsive.js";
function TimelineChart({ width, height }) {
const dispatch = useDispatch();
const topics = useSelector(({ topics }) => topics);
const words = useSelecto... |
/*
Slice: it takes portion of an array to create a new array without deleting elements from the parent array
it takes stating index and the end index as parameter, where the difference between the index will return
the number of elements from parent array. The return type or output will be a array or list.
Syntax: arr... |
import React from 'react';
import PropTypes from 'prop-types';
import { Grid, Col, Row, Panel, Image } from 'react-bootstrap';
const isSearched = searchTerm => person =>
person.name.first.toLowerCase().includes(searchTerm.toLowerCase()) ||
person.name.last.toLowerCase().includes(searchTerm.toLowerCase());
const C... |
import { Header } from "./components";
import { Routes, Route } from "react-router-dom";
import { Home, Blogs, Projects, Others } from "./pages";
function App() {
return (
<div className="w-screen">
<Header />
<div className="w-11/12 sm:10/12 md:w-9/12 lg:w-8/12 mx-auto">
<Routes>
<... |
import RestfulDomainModel from '../base/RestfulDomainModel'
class Model extends RestfulDomainModel {
async syncTenant() {
return await this.post(`${this.baseUrl}/syncTenant`, {})
}
async syncVirtualDevice() {
return await this.post(`${this.baseUrl}/syncVirtualDevice`, {})
}
}
export default new Model([], '/ten... |
import chalk from 'chalk'
import FileHelper from '../helper/fileHelper.js'
import DbHelper from '../loadDatabase/dbHelper.js'
import inetHelper from '../helper/inetHelper.js'
import DateHelper from '../helper/dateHelper.js'
import Log from '../helper/logHelper.js'
if (FileHelper.isFileExists('load.log')) {
FileHelpe... |
/**
* @author Ignacio González Bullón - <nacho.gonzalez.bullon@gmail.com>
* @since 21/12/15.
*/
(function () {
'use strict';
angular.module('corestudioApp.admin')
.controller('PassTypeController', PassTypeController);
PassTypeController.$inject = ['PassType', 'Alerts', '$uibModal'];
functi... |
import React, { Component } from 'react';
import './App.css';
import './App.scss';
import { BrowserRouter as Router,Route, Switch } from 'react-router-dom';
import PhoneVertification from './components/auth/PhoneVertification';
import Register from './components/auth/Register';
import Login from './components/auth/Logi... |
import React from 'react';
import './App.css';
class App extends React.Component {
constructor(props) {
super(props);
}
// add a componentDidMount lifecycle method to fetch data from the API
render() {
return (
<div className="App">
<h1>2018 NYC Squirrel Survey Data</h1>
</div>
... |
import * as t from '../../constants/event'
export const getEvent = (payload) => ({
type: t.GET_EVENT,
payload
})
|
import { join, dirname, resolve } from 'path';
import findup from 'findup';
import dotenv from 'dotenv';
import { runServer } from './';
import { readFileSync } from 'fs';
// For some reason __dirname resolves to / on current centos
// server, but __filename is correct.
dotenv.config(
{ path: join(findup.sync(resolv... |
bridge.controller('SettingsModalController', ['$http', '$humane', '$log', '$modalInstance', '$scope', 'authService', 'formService', 'modalService',
function($http, $humane, $log, $modalInstance, $scope, authService, formService, modalService) {
formService.initScope($scope, 'settings');
$http.get... |
// Write all the Strings
const strings = {
SKILL_NAME: [
'DEFAULT SKILL NAME'
],
WELCOME: [
'Olá, bem-vindo a {SKILL_NAME}.'
],
HELP: [
'LA AYUDA DEBE SER ESPECIFICA PARA CADA SKILL Y NO DEBE OBTENERSE DEL BASE'
],
WELCOME_REPROMPT: [
'Para obter mais informaç... |
const Engine = Matter.Engine;
const World= Matter.World;
const Bodies = Matter.Bodies;
const Constraint = Matter.Constraint;
var bg;
var monster;
var superhero;
var ground;
var hero;
var fly;
var block1, block2, block3, block4, block5, block6, block7;
var block8, block9, block10, block11, block12, block13, block14;
v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.