text stringlengths 7 3.69M |
|---|
module.exports = {
// Development configuration options
ip: 'localhost',
port: 8000,
strategies: {
github: {
clientID: 'e1848f969501734e3eaa',
clientSecret: '0fa4575cee3e6ca3ee13a76ea2a56729f693052b',
callbackURL: `http://localhost:8000/auth/githu... |
import React from 'react'
import Header from '../Header/Header'
import '../../Styles/HomePage.css'
import Category from '../Category/Category'
const PageNotFound = () => {
return(
<div>
<Header title="Page Not Found" />
<Category />
<h1>Page Not Found</h1>
</div>
)
}
export default PageN... |
/*A instrução for cria um loop que consiste em três expressões
for ([inicialização]; [condição]; [expressão final])*/
const nomes = ['Sílvia', 'Hellen', 'Larissa'];
for(let i = 0; i < nomes.length; i = i + 1 ) {
console.log('[for]', nomes[i]);
} |
ScoreOption = {
tooltip : {
formatter : "{a} <br/>{b} : {c}%"
},
toolbox : {
show : false,
feature : {
mark : {
show : true
},
restore : {
show : true
},
saveAsImage : {
show : true
}
}
},
series : [{
name : '西瓜信用',
min : 300,
max : 900,
type : 'gauge',
det... |
import { ContextProvider } from "./hooks/context";
import Router from "./Router";
import { createGlobalStyle } from "styled-components";
const Global = createGlobalStyle`
body{
margin: 0;
padding: 0;
font-family: 'Rubik', sans-serif;}
`;
function App() {
return (
<>
<Global />
<ContextProvider... |
export default {
user: {
isAuthenticated: true,
role: 'admin',
},
event: {
setupComplete: false
}
}
|
import React from 'react'
import { View, Text, StyleSheet } from 'react-native'
const numberOfLines = {
ellipsizeMode: 'tail',
numberOfLines: 1
}
const ItemTile = props => {
const { place } = props
return(
<View style={styles.container}>
<View style={styles.information}>
... |
import Project from "./project.js"
class Employee{
constructor({id, name, role, department, projects}){
this.id = id;
this.name = name;
this.role = role;
this.department = department;
if(projects.length == 0){
this.projects = [];
}
else{
... |
setInterval(() => consol.log(Cyk!)100);
console.log(ziomekZbetonu);
--------------------------
heckIsbn = ()=>{
let isbn = Number(prompt('podaj 13 cyfrowy nr ISBN'));
if(!isNaN(isbn) && isbn.toString().length ===13){
return isbn;
} else {
alert('Podałeś zbyt krótki numer, lub uży... |
(function ($,X) {
/**
* 这个只针对地址的, 默认三级
*/
X.prototype.controls.widget("ComboBoxSecond",function (controlType) {
var BaseControl = X.prototype.controls.getControlClazz("BaseControl");
/**
@class ComboBox 下拉框
@constructor 构造函数
@param elem {DomNode} Dom节点
@param option {Object} 配置信息
... |
var {http, app} = require('./server');
var socketAPI = require('./server/socket');
var io = require('socket.io')(http);
var homeRouter = require('./server/router');
socketAPI(io);
http.listen(8080, function () {
console.log("On 8080...");
});
|
'use strict';
/*
lista e explicação dos Datatypes:
https://codewithhugo.com/sequelize-data-types-a-practical-guide/
*/
module.exports = (sequelize, DataTypes) => {
let Lampada = sequelize.define('Lampada',{
id_lampada: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
local: {
... |
const svg = d3.select('#svg');
let drawing = false;
function draw_point()
{
if (drawing === false)
return;
const coords = d3.mouse(this);
svg.append('circle')
.attr('cx', coords[0])
.attr('cy', coords[1])
.attr('r', 5)
.style('fill', 'black')
}
svg.on('mousedown', (... |
//we inject this function to createStore in index.js
import { combineReducers } from 'redux';
import flashMessages from './reducers/flashMessages.js'
export default combineReducers({
flashMessages
}) |
(function() {
let body = document.querySelector('body');
document.getElementById("red").addEventListener("click", function (){
body.setAttribute("style","background-color: red")
});
document.getElementById("green").addEventListener("click", function (){
body.setAttribute("style","backg... |
'use strict';
describe('ng-step', function () {
var element,
scope,
controller,
sampleData;
beforeEach(module('demo'));
beforeEach(module('planavsky.directive.ngStep'));
beforeEach(module('ng-step/views/index.html'));
beforeEach(module('mock-data/sample-data.json'));
... |
angular.module('cstudio-admin').controller('adminAccountController', ['$scope', '$http', 'toastr', function ($scope, $http, toastr) {
$scope.accounts = [];
$scope.accountTypes = {1: 'Admin', 2: 'User'};
$scope.manageAccounts = function () {
materialadmin.AppCard.addCardLoader('.card... |
import React, { Component } from "react";
class CreateDvdButton extends Component {
constructor(props) {
super(props);
}
showFormView = () => {
this.props.setHomeState({ view: "form" });
};
render() {
return (
<div id="create-dvd-button">
<button onClick={this.showFormView}>Create... |
import React, { useState, useEffect } from 'react'
import personService from './services/persons'
const Notification = ({message, isError}) => {
const notificationStyle = {
color: isError ? 'red' : 'green',
background: 'lightgrey',
fontSize: 20,
borderStyle: 'solid',
borderRadius: 5,
padding:... |
function solve(input) {
const playerResults = {};
const powers = {
J: 11,
Q: 12,
K: 13,
A: 14
}
const types = {
S:4,
H:3,
D:2,
C:1
}
for (const line of input) {
let [player, cardsArgs] = line.split(': ')... |
var KiiGatewayAgent = require('kii-gateway-agent');
KiiGatewayAgent.preinit(); |
var PRIMARY_ROADS = 3;
var PRIMARY_THICKNESS = 6;
var SECONDARY_THICKNESS = 3;
var TERTIARY_THICKNESS = 1;
var STEP_SIZE = 10;
var TLtoBR = 1;
var TtoB = 2;
var TRtoBL = 3;
var LtoR = 4;
var c = document.getElementById('citygen');
var ctx = c.getContext('2d');
var windowWidth = c.scrollWidth;
var windowHeight = c.sc... |
/* @flow */
import React, { Component } from "react";
import { View, Text, Dimensions } from "react-native";
import styled from "styled-components/native";
var { height } = Dimensions.get("window");
const Wrapper = styled.View`
flex: 1;
justify-content: center;
align-items: center;
height: ${height - height... |
import React from "react";
import ReactDOM from "react-dom";
import {
Button,
Container,
Divider,
Grid,
Header,
Image,
Menu,
Segment
} from "semantic-ui-react";
import {
BrowserRouter as Router,
Route,
Link,
Switch
} from "react-router-dom";
import PrivateRoute f... |
var jobDispatcher = require("./jobDispatcher");
var postHandler = {};
var getHandler = {};
postHandler["/build"] = function(request, response) {
var appname = request.postData.appname;
var jobDescription = {
jobname:"build",
payload:{
appname:appname
},
completeHan... |
const log = (toLog) => console.log(toLog)
const space = () => log("---")
const actPrmpt = () => {
space()
log("What will you do?")
space()
}
const parse = (toParse) => JSON.parse(toParse)
let act = {}
let items = {}
const bagInv = () => {
if (Object.keys(items).length) {
return `The bag currently holds a ... |
'use strict';
angular.
module('supprimerEleve').
component('supprimerEleve', {
templateUrl: 'supprimer-eleve/supprimer-eleve.template.html',
controller: ['$rootScope','$routeParams',
function SuprrimerEleveController($rootScope,$routeParams) {
angular.forEach( $rootScope.eleves, function(e... |
import React, { useState, useEffect, useContext } from 'react';
import { SetlistContext } from '../../contexts/SetlistContext'
import NavBar from '../../components/NavBar'
import './styles.css'
export default function EditSetlist({ match, history }) {
const { setlists } = useContext(SetlistContext)
const [setlist... |
var express = require('express')
, rp = require('request-promise');
var app = express();
app.use(express.static(__dirname + '/public'));
app.get('/', function (req, res) {
console.log('get /');
res.sendFile(__dirname + "/public/info.html", function (err) {
if (err) {
console.log(err);
}
else ... |
const RPC = require('./rpc-server');
const server = (protobufReqSchema, protobufResSchema) => new RPC({
// 解码请求包
decodeRequest(buffer) {
const seq = buffer.readUInt32BE();
return {
seq: seq,
result: protobufReqSchema.decode(buffer.slice(8))
}
},
// 编码返回包... |
import React, { Component } from 'react'
import {fetchAPI} from '../../../utility'
import moment from 'moment'
import FontAwesome from 'react-fontawesome'
import { Col, Row, Image, ButtonToolbar, DropdownButton,MenuItem } from 'react-bootstrap'
import Answer from './Answer.js'
import AnswerQuestion from './AnswerQuest... |
let msg = ["plus grand", "plus petit", "pas un nombre"]
let essais = 0;
let min = 20;
let max = 80;
let getRandom = (min, max) => {
return Math.floor(Math.random() * (max - min) + min);
}
console.log(getRandom(min, max))
let jouer = () => {
let tentative = +prompt("nombre entre 20 et 80");
console.... |
const { Op } = require("sequelize");
const db = require("../models");
const bcrypt = require('bcrypt');
const product = require("../models/product");
const Product = db.products;
const Order = db.orders;
const Category = db.categories;
const Brand = db.brands;
const SubCategory = db.sub_categories;
exports.getStock = ... |
const express = require('express');
const {check} = require('express-validator/check');
const router = express.Router();
const models = require('../db/models');
router.get('/name', [
check('name', 'Invalid Query').isLength({min: 2}),
check('limit', 'Invalid limit').optional().isInt({lt: 999}).toInt()
], (req, res)... |
const dns = require('dns')
console.log(dns.getServers())
// const search = (arr = [1, 2, 3, 4, 5, 6, 7, 8, 9], target = 2) => {
// }
// // 二分查找有序数组
// const search = (arr = [1, 2, 3, 4, 5, 6, 7, 8, 9], target = 2) => {
// const mid = Math.floor(arr.length / 2)
// console.log(arr, mid, target)
// if ... |
import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
import { Icon } from '@ant-design/react-native';
import ClassicHeader from 'react-native-classic-header';
import ActionButton from 'react-native-action-button';
import Spinner from 're... |
var paths = [
["好身材", "/question/297715922/answer/520615441"],
["好身材2", "/question/328457531/answer/733560542"],
["好身材3", "/question/297715922/answer/710626693"],
["大长腿", "/question/285321190/answer/657375937"],
["女朋友", "/question/313825759"],
["现实美", "/question/29289467/answer/72898476"],
]
let index = 5
... |
$(function() {
/*
实现三级选择器
*/
var picker = new mui.PopPicker({
layer: 3
});
picker.setData(cityData);
$("#selectedCity").on("tap", function() {
picker.show(function(selectItems) {
$("#selectedCity").val(selectItems[0].text + selectItems[1].text + selectItems[2].te... |
// const bcrypt = require('bcrypt');
// const jwt = require('jsonwebtoken');
// // sirve para filtrar los datos que quiero y por ende elimina los que noq uiero del objeto
// const _ = require('underscore');
// const User = require('./worker.model');
// exports.saveUser = (req, res) => {
// const {
// nombre, ap... |
#!/usr/bin/env node
console.log('iview-admin-jopen-cli脚手架工具');
const { program } = require('commander');
const download = require('download-git-repo')
const ora = require('ora')
const chalk = require('chalk')
const logSymbols = require('log-symbols')
program
.version('0.1.0') //输出对应的版本号
program
.command('cre... |
import { connect } from 'react-redux';
import {Navbar, Nav} from 'react-bootstrap';
import { useRouter } from 'next/router';
import Link from 'next/link';
import AuthenticatedLinks from './AuthenticatedLinks';
import UnauthenticatedLinks from './UnauthenticatedLinks';
function NavBar(props) {
const router = useRo... |
class ScriptBuilder {
Opcode_NOP() { return 0; }
// register
Opcode_MOVE() { return 1; }
Opcode_COPY() { return 2; }
Opcode_PUSH() { return 3; }
Opcode_POP() { return 4; }
Opcode_SWAP() { return 5; }
// flow
Opcode_CALL() { return 6; }
Opcode_EXTCALL() { return 7; }
Opcode_J... |
import React, { useState } from "react";
import axios from "axios";
import ListItem from "./ListItem";
import { infiniteScroll } from "../helpers/infiniteScroll";
export const RepoList = () => {
const [list, setList] = useState([]);
const [isLoading, setIsLoading] = useState(false);
const [page, setPage] = useSt... |
// 1. (* Print the first non repeated character from a string *) //
// - Split the string in to characters
// - Loop through the string and check if the characters and the string's characters are duplicated more than once. Return the character.
const firstNonRepeatedCharacter = function (string) {
let chars = string.... |
import initialSize from '../initialContent/initialSize';
import initialDetailsInput from '../initialContent/initailDetailsInput';
const initialPizzaCreatorState = {
selectedToppings: [],
selectedSize: {
sizeStyle: initialSize.sizeStyle,
price: initialSize.price,
},
detailsInput: initialDetailsInput,
... |
import express from 'express';
import dotenv from 'dotenv';
import db from './database/db.js';
import router from './api/api.js';
import bodyParser from 'body-parser';
import cors from 'cors';
const app = express();
dotenv.config();
const username = process.env.DB_USERNAME;
const password = process.env.D... |
class Stopwatch extends React.Component {
constructor(props) {
super(props);
this.state = {
laps: [],
text: '00:00:00',
running: false,
miliseconds: 0,
seconds: 0,
minutes: 0
};
this.start = this.start.bind(this);
this.stop = this.stop.bind(this);
this.rese... |
'use strict'
require('./setup')()
const assert = require('assert')
const helpers = require('./helpers')
const state = require('../sample_game/state')
describe('state', function()
{
before(helpers.boot)
describe('collections', function()
{
it('should allow a user to view a collection', function*()
{
const ... |
angular.module('shop2App')
.controller("zxx_bm", ["$scope", "$http", "$state", function($scope, $http, $state) {
//点击图片翻转
$scope.shangxia = true;
$scope.zxx_sq = function() {
$scope.zxx_ul = !$scope.zxx_ul;
if($scope.shangxia) {
$scope.shangxia = false;
} else {
$scope.shangxia = true;
}
}
... |
import React, {Component} from 'react';
import ReactDOM from "react-dom";
import "./index.css";
import {
Route,
NavLink,
BrowserRouter as Router,
Switch
} from "react-router-dom";
import App from "./App";
import Users from "./Dashboard/users";
import Contact from "./Dashboard/contact";
//import Login from "./Da... |
import React from 'react'
import Navbar from '../components/Navbar'
import ContactContent from '../components/ContactContent'
import Background from '../components/Background'
class ContactPage extends React.Component{
render(){
return(
<div id="ContactPage">
<Background/>
... |
import React from 'react';
import { Link } from 'react-router-dom';
import { createPostLinkFromImmutable } from 'helpers/links'
import { action as toggleMenu } from 'redux-burger-menu'
import store from 'store'
class LinkDescription extends React.Component {
_handleCloseMenu() {
const isOpen = false
store.d... |
module.exports = {
//1. 请求检验忽略路径
uncheckPaths:['/bus/v1.0/user/signIn','/bus/v1.0/user/signUp'],
//1. 是否开启鉴权
ifNeedAuth:true,
} |
/**
* Book list controller
*/
bookApp.controller('BookListCtrl', function ($scope, $sce, BookHttp) {
//secure books api url
var mybaseurl = $sce.trustAsResourceUrl("https://www.googleapis.com/books/v1/volumes");
//when the user click on the search button this function will be called
$scope.doSearch =... |
import 'babel-polyfill';
import jsonpointer from 'jsonpointer';
const BAD_OPEN_PATTERN = new RegExp('\\{{3,}');
const BAD_CLOSE_PATTERN = new RegExp('\\}{3,}');
const GROUP_PATTERN = new RegExp('{{([^{^}]*)}}');
const OPEN_PATTERN = new RegExp('{{');
const CLOSE_PATTERN = new RegExp('}}');
/**
* Returns key, value, ... |
let sendGrid = require('./email');
let Cache = require('./cache');
let clap = async ({body, command, ack, client, context}) => {
await ack();
console.log('command: clapping')
//console.log(body)
let text = command.text;
let text_2 = text.split(" ");
let output = ""
text_2.forEach(word => {
... |
var mongoose = require('mongoose');
var Loc = mongoose.model('Dish');
var sendJSONresponse = function(res, status, content) {
res.status(status);
res.json(content);
};
var theEarth = (function() {
var earthRadius = 6371; // km, miles is 3959
var getDistanceFromRads = function(rads) {
return parseFloat(ra... |
const _ = require('lodash')
// thanks! https://gist.github.com/ralphcrisostomo/3141412
function removeDuplicates(original) {
var compressed = [];
// make a copy of the input array
var copy = original.slice(0);
// first loop goes over every element
for (var i = 0; i < original.length; i++) {
var myCount = -1;
... |
window.alert ("Hi there!"); //pop up window with "hi there"
window.alert("Ready or not! Here I come!"); //pop up window statment "ready or not"
var A= ' this is a string'; //defines variable "A" a string
var A = A.fontcolor("red");
document.write(A)
document.write(A); //announces "A" value
window.alert ("Th... |
import apisauce from "apisauce";
import { Config } from "@app/api";
const get = (baseURL = Config.baseUrl) => {
const api = apisauce.create({ baseURL });
const user = (token) => api.get(`/getUser`, {}, { headers: { "Authorization": `Bearer ${token}` } });
const logout = (token) => api.get(`/logout`, {}, ... |
import Model from './Model';
class BranchDefinition extends Model {
url() {
return `${window.config.apiRoot}/branch/lookup?host=${this.options.host}&organization=${this.options.org}&repository=${this.options.repo}&branch=${this.options.branch}`;
}
}
export default BranchDefinition;
|
import VueRouter from 'vue-router';
import Vue from 'vue';
import App from './App';
import store from './store';
import AddressList from './components/AddressList';
import EditAddress from './components/EditAddress';
import NewAddress from './components/NewAddress';
import Vuelidate from "vuelidate";
Vue.use(VueRouter... |
/*
*各项目公用文件
* */
console.log('common.js ') //不可删除,空文件不能读取
|
import Container from "../container";
import Card from "../card";
export default function PostContent({htmlContent}){
return(
<div className="relative">
<Container>
<div className="w-full md:w-10/12">
<Card>
<div className="p-8 unreset" dangerouslySetInnerHTML={{ __html: htmlC... |
class WorldDrawer {
COLOURS = {
land: '#c17e00',
stone: '#4e4431',
grass: '#00ac17',
grazer: '#275fe2',
predator: '#9014c1',
}
constructor(data) {
this.data = data;
this.pointHeight = 10;
this.pointWidth = 10;
this.canvas = document.getElementById('world');
}
draw() {
... |
// For Player 1:
var randomNumber1 = Math.floor(Math.random() * 6) + 1; // Generates a random number between 1-6.
var ImageSource1 = "images/dice" + randomNumber1 + ".png"; //images/dice1.png - images/dice6.png.
document.querySelectorAll("img")[0].setAttribute("src", ImageSource1); // Changing the image acc t... |
/*
* @lc app=leetcode id=802 lang=javascript
*
* [802] Find Eventual Safe States
*/
// @lc code=start
/**
* @param {number[][]} graph
* @return {number[]}
*/
var eventualSafeNodes = function (graph) {
const N = graph.length;
const colors = new Array(N).fill(0);
function isSafe(i) {
... |
import React, { Component } from 'react';
import styles from './Offering.module.css';
import Container from '../../Container/Container';
import OfferingCard from './OfferingCard/OfferingCard';
import video from './video.png';
import PlayButton from './PlayButton/PlayButton';
class Offering extends Component {
render... |
angular.module('app')
.controller('FooterController', function() {
const vm = this;
var date = new Date();
vm.year = date.getFullYear();
});
|
import axios from "axios";
import React, { useState } from "react";
import { useHistory } from "react-router";
import { link } from "../../../Proxy/proxy";
import SendMail from "./SendMail";
import ShowFeedbacks from "./ShowFeedbacks";
function WaterList(props) {
const {
city,
location,
userId,
feedb... |
// 1.getArraysEqualElementsCount, которая принимает два аргумента - массивы, и возвращает количество одинаковых элементов
function getArraysEqualElementsCount(arr1, arr2) {
let length1 = arr1.length;
let result = 0;
for (let i = 0; i < length1; i++) {
if (arr1[i] === arr2[i]) {
result... |
import React from 'react';
import {connect} from 'react-redux';
import {addToCart, updateCartItem, deleteCartItem} from '../redux/actions/cartActions';
import styled from "styled-components";
import Link from 'next/link'
import { IconButton } from './buttons'
import { Table, THead, TBody, TFoot, Tr, Td, NumberColumn,... |
const { Client, Intents, Collection } = require('discord.js');
const bot = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_PRESENCES,
Intents.FLAGS.GUILD_INTEGRATIONS,
Intents.FLAGS.DIRECT_MESSAGES,
Intents.FLAGS.DIRECT_... |
var express = require('express');
//var mysql = require('mysql');
var passport = require('passport')
, LocalStrategy = require('passport-local').Strategy;
router = express.Router();
var bkfd2Password = require("pbkdf2-password");
var hasher = bkfd2Password();
var connection = require('../mydb/db')();
//세션 사용 준비
... |
/**
* @note
* @param arr
* @return {Array}
*/
export default distinct = (arr) => {
return Object.values(
arr.reduce((obj, next) => {
let key = JSON.stringify(next);
return (obj[key] = next), obj;
}, {})
)
}
|
import React, { Component } from 'react';
import './App.css';
import Comitment from './components/comitment';
import HaveServices from './components/haveServices';
import MobilePlan from './components/mobilePlan';
import axios from 'axios';
class App extends Component {
constructor(props) {
super(props);
thi... |
'use strict';
const chai = require('chai');
const assert = chai.assert;
const Promise = require('bluebird');
const accounts = require('../../routes/accounts');
const seed = require('../../lib/seed').testSeed;
const utils = require('../../lib/utils');
const constants = require('../../lib/constants/utils');
const ADMI... |
(function () {
var global = typeof window !== 'undefined' ? window : this || Function('return this')();
var nx = global.nx || require('@jswork/next');
var fetch = require('node-fetch');
var isValidUrl = require('@jswork/is-valid-url').default;
var fs = require('fs');
var util = require('util');
var fromFi... |
const authenticateReducer = (state, action) => {
switch (action.type) {
case 'AUTHENTICATE_ADMINISTRATOR':
return action.payload
case 'SET_VALIDATION':
return action.payload
default:
return typeof (state) === 'undefined' ? {} : state
}
}
export defaul... |
import React, { Component } from "react";
import ScrollableAnchor from "react-scrollable-anchor";
import { configureAnchors } from "react-scrollable-anchor";
import history from '../../history';
import "materialize-css/dist/css/materialize.min.css";
import "./main.css";
import about from "./assets/about-img.jpg";
imp... |
import { findIndex } from 'lodash'
const isWeirdTime = (timeToReceive) => {
if (!timeToReceive) return 0
if (timeToReceive <= 48) return 1
if (timeToReceive <= 51) return 2
if (timeToReceive <= 60) return 3
return 4
}
const tipsetKeyFormatter = (block) => {
return `${block.parentstateroot}-${block.height}... |
import axios from 'axios';
import * as actions from './actionTypes';
export const fetchConnections = pageNo => {
return dispatch => {
axios.get(`https://randomuser.me/api/?page=${pageNo}&results=20&seed=abc`)
.then(response => {
dispatch(listConnections(response.data.results, p... |
import React from 'react';
import PropTypes from 'prop-types';
import Container from './Container';
import Spinner from '../spinner/Spinner';
const Loading = ({ height, radius }) => (
<Container alignItems="center" justifyContent="center" height={height}>
<Spinner radius={radius} />
</Container>
);
Loading.p... |
import React from "react";
// reactstrap components
import {Component} from 'react';
function iframe () {
return (
<div>
<iframe src="https://sktm9.csb.app/"/>
</div>
)
}
export default class HackMap extends Component {
render() {
return(
<div>
<iframe ... |
var EditAddress = function() {
return {
myVariable: null,
init: function() {
alert("EditAddress_[[widgetId]].init");
// // attach an event to an HTML element
// var self = this;
// jQuery(".EditAddress .myElementClass").click(function() {
// self.myMethod();
// // do something
// ...
// ... |
var lightboxBlockerElements = document.querySelectorAll('[id*="smwoverlay"],[id*="wow-modal-overlay"],[id*="om-lightbox"],[id*="dgd_scrollbox"],[class*="snp-pop-"],[id*="ppsPopupShell"],[id*="ppsPopupBgOverlay"],.yithpopup_overlay,yithpopup_wrapper,#mkt-popup,#pdv4overlay,#pdv4wrap,#pty_pkg');
if (typeof lightboxBlock... |
import React from "react";
const VistaWeb = ({ poema }) => {
const lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
return (
<div
style={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
}}
>
<h1 ... |
import { arr, num } from 'types';
export default function pop(size) {
return function innerPop(data) {
return arr(data).slice(0, data.length - num(size));
}
};
|
/**
# Testnets
https://github.com/CryptoLions/EOS-Jungle-Testnet
Jungle chainId: `038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca`
# Mainnets
Find a trusted blockproducer (https://bloks.io/producers for example).
EOS chainId: `aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906... |
/*
Event Details Overlay
- Full screen overlay
- Slides in from bottom of the screen
- Displays all known event details
*/
import styles from './styles/events.module.css'
const Overlay = ({ details = Object }) => {
// If no rep exists, create an empty array for it.
if(!Object.key... |
'use strict';
module.exports = function(bunyan){
function ConsoleLoggerStream() {}
ConsoleLoggerStream.prototype.write = function (rec) {
// eslint-disable-next-line
console.log('[%s] %s: %s',
rec.time.toISOString(),
bunyan.nameFromLevel[rec.level],
rec.msg,
rec);
};
return new ConsoleLoggerStrea... |
export const getPurchases = async () => {
let response = await fetch("/api/history");
let history = await response.json();
return history.map(purchase => ({
...purchase,
date: new Date(purchase.date)
}));
};
export const postPurchase = async purchase => {
await fetch("/api/history"... |
$(document).delegate('a[data-toggle="slide"]', 'click', function(event) {
event.preventDefault();
var $this = $(this);
$this.toggleClass('active');
$this.closest('.message-wrapper').toggleClass('comments-open');
$($this.data('target')).slideToggle();
});
// Extending a javascript class
if (typ... |
const Compra = [12,32,32,53];
const totalCompra = Compra.map( function(Compra){
return (Compra*1.21);
});
console.log("funcional - "+totalCompra); |
import React,{Component} from 'react';
import {
Dimensions,
ListView,
ScrollView,
Image,
View,
StyleSheet,
Text,
Platform,
TouchableOpacity,
RefreshControl,
Animated,
Easing
} from 'react-native';
import { connect } from 'react-redux';
var {height, width} = Dimensions.ge... |
var kitty = {}; |
import classes from './Articles.module.css';
function Articles() {
return (
<div className={classes.Articles}>
Articles
</div>
)
}
export default Articles; |
var path = require('path');
var gulp = require('gulp');
var globule = require('globule');
var watchify = require('watchify');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('browserify', function() {
var Bundler = global.isWatching ? watchify : browserify;
var bundle... |
import React, {useEffect, useState, Fragment} from 'react';
import {useSelector, useDispatch} from 'react-redux';
import Pulse from '../loading/Pulse';
import {clearMessage} from '../../actions/messageActions';
import {addBudget, deleteBudget} from '../../actions/budgetActions';
import Alert from '../alert/Alert';
con... |
import Home from './components/home/Home.vue';
import Login from './components/login/Login.vue';
import Pagamento from './components/pagamento/Pagamento.vue'
export const routes = [
/* rotas aqui */
{ path: '/', component: Login },
{ path: '/Home',component: Home },
{ path: '/Transferencias', componen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.