text stringlengths 7 3.69M |
|---|
import { connect } from 'react-redux';
import {Action} from '../../../../action-reducer/action';
import {getPathValue} from '../../../../action-reducer/helper';
import helper from '../../../../common/common';
import ChangeDialog from './ChangeDialog';
import showPopup from '../../../../standard-business/showPopup';
imp... |
import Marca from "../models/marca.model.js";
async function insertMarca(marca) {
try {
return await Marca.create(marca);
} catch(err) {
throw err;
}
}
async function updateMarca(marca) {
try {
return await Marca.update(marca, {
where: {
marcaId: m... |
const BugBounty = artifacts.require("SolidifiedBugBounty");
const SolidifiedProxy = artifacts.require("SolidifiedProxy");
const Dai = artifacts.require("MockDai");
module.exports = function(deployer) {
// deployer
// .deploy(Dai)
// .then(instance => {
// return deployer.deploy(BugBounty, instance.addr... |
function Platform(ability)
{
this.x = random(0, width); //Platform's x position
this.y = height; //Platform starts at the bottom of the screen
this.color = 'blue'; //Color of platform, default is blue for the normal platform
this.type = 0; //Type is ability of the platform, 0 meaning normal, 1 meaning j... |
import React from 'react';
import { Home, About, Projects, Techs } from './pages';
import './App.css';
import { Menu } from './components';
function App() {
return (
<div className="app-container">
<Menu />
<div name="home" className="app-section" id="home">
<Home />
</div>
<div n... |
function getGame(games, gameId){
for(let i =0; i < games.length; i++){
if(games[i].id === gameId){
return games[i];
}
}
return null;
}
var seed = new Date().getTime();
function random() {
let x = Math.sin(seed++) * 10000;
return x - Math.floor(x);
}
function getRandomC... |
import React from 'react'
import { connect } from 'react-redux'
import { NavLink } from 'react-router-dom'
import { addDemon } from '../../../actions/demonActions'
import DemonFinderForm from '../../demon-finder/forms/DemonFinderForm'
class AddDemonPage extends React.Component {
handleAddOnSubmit = (demon) => {
... |
const fs = require('fs')
const pReadFile = url => {
return new Promise((resolve, reject) => {
fs.readFile(url, 'utf8', (err, data) => {
if (err) {
reject(err)
} else {
resolve(data)
}
})
})
}
const pa = pReadFile('../a.txt').then(data => data).catch(err=>err)
const pb =... |
import logo from './logo.svg';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import { Component } from 'react';
//import Login from './pages/Login';
//import Login from './pages/Login';
//import VistaPrincipal from './pages/vistaPrincipal';
import Router from './Router';
//import firebase from './A... |
import React, {Component} from 'react';
import {MDBSelectOption} from 'mdbreact';
import SkillCard from './SkillCard/SkillCard';
import classes from './Skill.module.css';
import {getAsync} from '../../../../../tool/api-helper';
import {languageHelper} from '../../../../../tool/language-helper';
import addIcon from '..... |
// Default settings
var myColumns = 4;
var mySearchString = '';
var myCatImages = {};
// Remove all row and graph divs
var clearDashboards = function() {
$('div.dashboards div.row').remove();
}
// Grab configuration blob and construct our graph urls
var renderDashboards = function(owner) {
var myUrl = '';
if (w... |
function validate()
{
// var book = document.forms["myForm"]["ISBN"].value;
console.log($('#ISBN').val());
var book = $('#ISBN').val();
if(isNaN(book))
{
console.log("Not a number");
alert("Entered ISBN is not a number.");
}else{
if (book.length == 10 || book.length == 13 ) {
loadData();
... |
const mongoose = require("mongoose");
const schema = mongoose.Schema;
const roomSchema = schema({
index: Number,
namespace: { type: schema.Types.ObjectId, ref: "namespace" },
title: String,
});
const Room = mongoose.model("room", roomSchema);
module.exports = Room; |
gulp.task('markdown', function() {
getMarkdownContent()
return gulp.src('src/posts/*.md')
.pipe(gulp.dest('public'))
})
// gulp.task('default', gulp.series('')) |
function Footer(){
return(
<>
<div className="pb-2 bg-white sm:w-full">
<div className="container flex flex-col items-center justify-center pt-4 mt-24 ">
<div className="flex flex-col items-center mt-24 border-t-2 border-gray-300">
<div className="py-6 text-center s... |
import { Review, Item } from "../../models";
export const createReview = async (req, res, next) => {
try {
const item = await Item.findById(req.params.item_id);
const review = await Review.create(req.body.review);
item.reviews.push(review);
await item.save();
const populate... |
import { connect } from 'react-redux';
// Du composant qui a besoin de data ou d'actions
// eslint-disable-next-line import/no-unresolved
import Register from 'src/components/Register';
// Action Creators
import { changeValue, register, getErrorMessage } from '../actions/auth';
// == Data / state
// Notre composant ... |
import DS from 'ember-data';
export default DS.Model.extend({
airport: DS.attr(),
city: DS.attr(),
class: DS.attr(),
comment: DS.attr(),
dateAdded: DS.attr(),
ident: DS.attr(),
manufacturer: DS.attr(),
model: DS.attr(),
name: DS.attr(),
photo: DS.attr(),
street: DS.attr(),
type: DS.... |
module.exports = {
extends: 'eslint-config-airbnb',
parserOptions: {
// This is to avoid eslint complaining:
// 'use strict' is unnecessary inside of modules
// we need 'use strict' on node4 because only in strict mode do
// block-scoped let/const operate.
sourceType: 'script',
},
rule... |
import React from "react";
import "./style.css";
import NavBar from "./Navbar.js";
import TopSection from "./Section.js";
import Buttom from "./Buttom";
const App = () => {
return (
<div>
<NavBar />
<TopSection />
<Buttom />
</div>
);
};
export default App;
|
const request = require('supertest')
const server = require('../../Server/server.js')
const db = require('../../data/dbConfig.js')
afterEach(async () => {
return await db('users').truncate();
});
describe('REGISTER ROUTE', () => {
it('should return 201 w/ CORRECT shape', async () => {
const mock_newU... |
/**
* Created by Oleksandr Lapchuk
*/
define(['./../module'], function (services) {
services.factory('CustomResponse', ['ErrorMessages', function (ErrMsg) {
"use strict";
var self = this;
this.do = function (response, callback) {
response.
success(function (da... |
// for convention we put first the name of the module SLASH and the name of the action
// action-types names
// are string that are going to describe the action that we will execute
// en mvc seria como el nombre del controlador
const INCREMENTAR = 'CONTADOR/INCREMENTAR'
const DECREMENTAR = 'CONTADOR/DECREMENTAR'
const... |
const { test } = require("..")
const { Safe } = require('../safe')
test('Testando o teste', ({ task }) => {
task('Um \"teste\" deve ser um \"teste\"', ({ expect }) => {
expect("teste").to.equal("teste")
})
task('Finalizando os trabalhos', ({ expect, finishIf }) => {
const valorEsperado = null
expect(Safe(va... |
const express = require('express');
const app = express();
const routers = require('./routers')
const bodyParser = require('body-parser');
const port = process.env.PORT || 8080;
app.set('view engine', 'ejs');
app.use(express.static(__dirname + '/public'));
app.use(bodyParser.urlencoded({ extended: false }))
app.use(... |
//API KEY's should virtually always be hidden by a config var or within an ignored config file, in this case we are not
export default class Config{
constructor(){
this.API_KEY = '032393f752702efbd93f839f09666d46'
}
getKey(){
return this.API_KEY;
}
}
|
import React, { Component } from 'react';
import { Divider } from 'antd';
import 'antd/dist/antd.css';
import EditableCommitteeTable from './EditableCommitteeTable';
import AddMemberAssignment from './AddMemberAssignment';
export default class CommitteesTable extends Component {
constructor(props) {
super(props)... |
const data = new Date(2020, 09, 17);
console.log(data.getFullYear());
// let data = new Date();
// data.setYear('2020');
// data.setMonth('09');
// data.setDate('17');
// console.log(data);
|
/***
* Class dhtmlxPagination
* Author Lucas Tiago de Moraes
* Class create pagination to dhtmlx
***/
var dhtmlxPagination = {
cell: null, // cell layout
parent: 'pagination', // id of HTML element which will be used as parent (or object itself), mandatory
icon_path: null, // {string} defines an... |
$(document).ready(function () {
initSavedJobSkillScoreCalculation();
});
function getJobSeekerAppliedJobs() {
var apiUrlJobSeekerAppliedJobs = GetWebAPIURL() + '/api/JobSeekerAppliedJobs/';
var dataObjJobSeekerAppliedJobs;
$.ajax({
url: apiUrlJobSeekerAppliedJobs,
type: 'GET',
... |
var map, marker;
var geocoder = new google.maps.Geocoder();
var streetInp, houseInp;
var addBtn;
var address;
var updateTimeout, busy = false;
$(document).ready(function() {
map = initializeMap({
maxZoom: 17,
zoom: 15,
center: new google.maps.LatLng(55.752819, 37.623018)
});
streetInp = $('input[name="street... |
import { useState } from "react";
import { connect } from "react-redux";
import _dateToString from "../utils/_dateToString";
import _generateId from "../utils/_generateId";
import { addTodo } from "../actions/todoActions";
import Description from "./Description";
import { Input, DatePicker, Badge, Popover, notificati... |
// JavaScript source code
var methods = [];
var numGuideChannels = 1;
const settings = require("../settings/settings.json");
var client;
var guild;
var anonMembers = [];
methods.init = function (c, guildIn, anonMembersIn) {
client = c;
guild = guildIn;
anonMembers = anonMembersIn;
}
methods.addMember =... |
var ModalView = Backbone.View.extend({
template: App.templates.modal_form,
attributes: {
"class" : "modal"
},
events: {
"click" : "cancelItem",
"click .mark_completed" : 'complete',
"submit .new_form" : "newTodo",
"submit .update_form" : "updateTodo"
},
newTodo: function(e) {
e.preve... |
const CrypVideo = artifacts.require("CrypVideo");
module.exports = function(deployer) {
deployer.deploy(CrypVideo);
};
|
import React,{Component} from 'react';
import two from './2.png';
import ReactDOM from 'react-dom'
import Build from './build'
import swal from 'sweetalert';
import firebase from 'firebase';
import loginImg from './loginImg.jpg';
import SignUp from './signUp'
import NavbarWithDropDown from './navbarWithDropDown'
requir... |
var express = require("express");
var morgan = require("morgan");
var consign = require("consign");//serve para organizar os endpoints
const app = express();
app.use(morgan("dev"));
consign()
.include("libs/config.js")
.then("db.js")
.then("libs/middlewares.js")
.then("routes")
... |
// The museum of incredible dull things
// The museum of incredible dull things wants to get rid of some exhibitions. Miriam, the interior architect, comes up with a plan to remove the most boring exhibitions. She gives them a rating, and then removes the one with the lowest rating.
// However, just as she finished ra... |
$("document").ready(function() {
/*Meniu */
$(".drop1").hide();
$(".drop2").hide();
var timeOutStire;
var timeOutCampioni;
$("#stire").mouseenter(function(){
clearTimeout(timeOutStire);
$(".drop2").hide();
$(".drop1").show();
});
$("#stire").mouseleave(function(){
timeOutStire=setTimeout(function(){$(".drop1").hid... |
import React, { useContext, useState } from "react";
import { Redirect } from "react-router";
import registerUser from "../../api-calls/requests/registerUser";
import { GlobalContext } from "../../context/GlobalContext";
export default function Register() {
const { setAlertMessages } = useContext(GlobalContext);
c... |
import Button from "./Components/Button/Button";
const App = () => {
const colors = ["blue", "red", "yellow"];
return <Button data= {colors}/>
}
export default App; |
// @ts-check
import { useConnect as useConn } from "reshow-flux";
import MemoReturn from "../organisms/MemoReturn";
import connectOptions from "../../connectOptions";
import * as React from "react";
/**
* @typedef {object} GetReturnOptions
* @property {string} [displayName]
* @property {function} [useConnect]
* @p... |
var express = require('express');
var router = express.Router();
let user = require('../models/User');
let correo = require('../models/Mail');
let rutas = require('../models/Rutas');
/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
router.post('/createuser... |
import styles from "./businessPanel.module.css"
import Image from 'next/image'
import { useEffect, useState } from "react"
const BusinessPanel=({text,picture}) =>{
const [active,setActive] = useState("1")
const [visible,setVisible] = useState(false)
const handleClick = (e) => {
setActive(e.target.id)
}
retu... |
//search-box component
import React from "react";
import './search-box.style.css';
export const Searchbox = ({placeholder, handleChange}) => {
return <input className="searchBox"
type="search" size="30"
placeholder = {placeholder}
onChange = {handleChange}
/>
} |
let findTheOldest = function(people) {
let res = 0;
let oldest = 0;
people.forEach((person, index) => {
if (getAge(person) > oldest) {
oldest = getAge(person);
res = index;
}
});
return people[res]
}
function getAge(person) {
let yod = new Date().getFullY... |
// polyfill
if (!Object.create) {
Object.create = function (o) {
if (arguments.length > 1) {
throw new Error('Object.create implementation'
+ ' only accepts the first parameter.');
}
function F() {}
F.prototype = o;
return new F();
};
}
var person = {
firstname: 'D... |
//logs.js
let util = require('../../utils/util.js');
let wechat = require("../../utils/wechat");
let amap = require("../../utils/amap");
var app = getApp();
Page({
data: {
loading:false,
cindex: "0",
types: ["getDrivingRoute", "getWalkingRoute", "getTransitRoute", "getRidingRoute"],
markers: [],
p... |
// Call the dataTables jQuery plugin
$(document).ready(function()
{
var t = $('#deliveredTable').DataTable();
$.ajax(
{
type : "POST",
url : './php/get-data.php',
data : {stat : true},
dataType : "json",
success : function(data)
{
var datas = data;
var length = datas.length;
... |
/*
* Copyright (C) 2013 salesforce.com, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... |
const path = require('path');
let config = {};
// production mode
config.PROD = true;
// enable or disable admin api
config.ADMIN_ENABLED = true;
// the key used to verify admin stuff
config.ADMIN_PKEY = process.env.MONITOR_ADMIN_KEY || "EOS5WJtphnj2KfsPL3mxNqgsGcdGqwSBPpVjgPGYrJTiKsQGKrsQj";
// mongo uri and optio... |
import { createStore, applyMiddleware, compose, combineReducers } from "redux";
import thunk from "redux-thunk";
import logger from "redux-logger";
import authReducers from "../reducers/authReducers";
import friendsReducer from "../reducers/friendsReducer";
const reducers = combineReducers({
friends: friendsReducer,... |
"use strict";
// console.log('I'm awesome');
console.log("'I'm awesome"); |
import React, { PureComponent } from 'react'
import { View, Button, StyleSheet, Dimensions } from 'react-native'
export default class MenuScreen extends PureComponent {
static navigationOptions = {
header: null
}
render() {
return (
<View style={{
flex: 1,
... |
P.views.workouts.schedule = {}; |
const express = require('express');
const app = express();
import { setupApp } from './app';
//Setup the db's if not setup.
import { initDB, truncateTables } from './db-init.js';
initDB();
truncateTables();
//configure the app.
setupApp(app);
app.listen(process.env.PORT || 3000, function () {
console.log('listeni... |
const connection = require('../database/connection')
module.exports = {
async index(page = 1) {
const [countPage] = await connection('incidents').count()
const result = await connection('incidents')
.join('ongs', 'ongs.id', '=', 'incidents.ong_id')
.limit(5)
.o... |
module.exports = {
extends: [
"plugin:flowtype/recommended",
"airbnb",
"prettier",
"prettier/flowtype",
"prettier/react"
],
plugins: ["flowtype"],
rules: {
"class-methods-use-this": 0,
"react/destructuring-assignment": 0,
"react/sort-comp": 0,
"react/jsx-filename-extension": ... |
var cheerio = require('cheerio');
var request = require('request');
var redis = require('redis');
var client = redis.createClient();
var bnspowerurl = 'http://bns.power.plaync.com/tag/list?object=채집제작&category=';
request({
method: 'GET',
url: bnspowerurl + '약왕원'
}, function(err, response, body) {
if (err)... |
function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
}
function loadScore() ... |
$('.burger').click(function(){
$(this).toggleClass('burger-clc');
$('.menu a').toggleClass('menu-move');
$('.line-1').toggleClass('line-1-clc');
$('.line-2').toggleClass('line-2-clc');
$('.line-3').toggleClass('line-3-clc');
if ($('.line-1').hasClass('line-1-clc')) {
var noneClass = function(){
$('.burger'... |
jest.mock("../src/request-handler", () => jest.fn());
|
import randomInt from '../utils.js';
import playGame from '../index.js';
const gameRules = 'Find the greatest common divisor of given numbers.';
const gcd = (a, b) => {
if (b) {
return gcd(b, a % b);
}
return Math.abs(a);
};
const genRound = () => {
const num1 = randomInt(0, 100);
const num2 = randomIn... |
import uuid from 'uuid/v4';
import {
oauth,
oauth_base_urls,
api_base_urls,
providers,
} from '../../lib/config';
import request from '../../lib/http';
const { github, bitbucket, gitlab } = oauth;
export async function requestGithubUserProfile(token) {
try {
const baseUrl = api_base_urls.GITHUB;
co... |
import Vue from "../../dist/vue.mjs";
// import api from "../../util.mjs";
export default {
state: {
visualizationTypes: {},
types: {}
},
mutations: {
addTSVisualizationType(state, v) {
Vue.set(state.visualizationTypes, v.key, v.component);
},
addTSType(state, v) {
Vue.set(state.t... |
import React, { Component } from 'react'
import styled from 'styled-components'
import Card from '../Card'
import Heading, { HeadingSmall } from '../Heading'
/**
* In this very basic component, display a list of data
* contained in the provided `content` variable below.
*
* Don't overthink it, this is super basic... |
const os = require('os')
const utils = {
/**
* Gets the version of Windows
* @param {string} [version=os.release()] Release value to test
*
* @returns {number} Major & minor of Windows (8.0, 8.1, 10)
*/
getWindowsVersion (version = os.release()) {
let match = version.match(/^(\d+).?(\d+).?(\*|\d... |
let Parent = {
name:'parent',
share: [1,2,3],
log:function () {
return this.name
}
}
let child = Object.create(Parent)
|
function palenumber(number) {
var myNum = number;
var stringNum = number.toString();
var stringRev = stringNum.split('');
stringRev = stringRev.reverse()
stringRev = stringRev.join('');
console.log(stringNum);
if (stringNum != stringRev) {
palenumber(number+1);
}
}
palenumber(1234);
|
import Vue from 'vue';
export class ModelIndex {
constructor(internal) {
this.internal = internal;
}
column() {
return this;
}
data() {
return this;
}
isValid() {
return this;
}
model() {
return this;
}
parent() {
return this;
}
row() {
return this;
}
si... |
/*
* Programming Quiz: Facebook Friends
*
Directions:
Create an object called facebookProfile. The object should have 3 properties:
your name
the number of friends you have, and
an array of messages you've posted (as strings)
The object should also have 4 methods:
postMessage(message) - adds a new message string t... |
// public/scripts/mailingController.js
(function() {
'use strict';
var MailingController = [
'$scope',
'$anchorScroll',
'$uibModal',
'modalService',
'mailingService',
'spinnerService',
function MailingController(
$scope,
$anchorScroll,
... |
import React, { PureComponent } from "react";
import {
Input,
Button,
Snackbar,
Grid,
withStyles,
Typography,
Paper
} from "@material-ui/core";
import Papa from "papaparse";
import { uploadStyle } from "./dashboardStyle";
class UploadData extends PureComponent {
constructor(props) {
super(props);
... |
define({
name: 'four'
});
|
'use strict'
const stampit = require('stampit')
const URI = require('urijs')
const plugin = require('@nihiliad/janus/uri-factory/plugin')
const worldcat = stampit()
.methods({
fields () {
return {
author: 'au',
title: 'ti',
subject: 'kw'
}
},
baseUri () {
return... |
const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const TerserWebpackPlugin = require("terser-webpack-plugin");
const OptimizeCssAssetsWebpackPlugin = re... |
/* Job status
After a conversion/compilation begins, the client receives a unique
job ID. When the processing has finished the traslation/compilation
output (artifacts) and logs are accessible via the ID of the job for
some arbitrary cleanup timeout (e.g. 1 hour, or a day).
The client can request information, current... |
goog.provide('morning.parallax.ui.ImageElement');
goog.require('goog.net.ImageLoader');
goog.require('goog.style');
goog.require('goog.ui.registry');
goog.require('goog.uri.utils');
goog.require('morning.parallax.ui.Element');
/**
* @constructor
* @extends {morning.parallax.ui.Element}
*/
morning.parallax.ui.Image... |
var express = require('express'),
router = express.Router();
var crypto = require('crypto');
var uid = "0952752498";
var pwd = "";
router.put('/session', function (req, res) {
var mysqlQuery = req.mysqlQuery;
var Account = req.body['account'],
token = req.body['token'];
var AccountNo = parseIn... |
function Animal(name) {
this.name = name;
this.speed = 0;
}
Animal.prototype.run = function() {
console.log(this.name + " is run");
};
function Rabbit(name) {
Animal.apply(this, arguments);
}
Rabbit.prototype = Object.create(Animal.prototype);
Rabbit.prototype.constructor = Rabbit;
Rabbit.prototype.... |
var util = require('util');
var fs = require('fs');
module.exports = function (file) {
var imgObj = {
url : "",
info : {}
};
log.info("file" + util.inspect(file));
imgObj.url = "/uploads/" + file.name;
imgObj.info = file;
if (file.size === 0) {
log.in... |
/*
* @lc app=leetcode.cn id=482 lang=javascript
*
* [482] 密钥格式化
*/
// @lc code=start
/**
* @param {string} s
* @param {number} k
* @return {string}
*/
var licenseKeyFormatting = function(s, k) {
s = s.toUpperCase().split('-').join('');
var arr = [];
while (s.length--) {
if (s.length > k) {
... |
import React from 'react';
import { connect } from 'react-redux';
import { addCountry } from '../../actions/countries';
import { clearResults } from '../../actions/search';
import { formatTime } from '../../services/formatting';
import { Card, Button, Image, Transition } from 'semantic-ui-react';
class SearchItem exte... |
$(window).scroll( function(){
$('.fadeIn').each(function(i) {
var bottom_of_object = $(this).offset().top + $(this).outerHeight() - 200 ;
var bottom_of_window = $(window).scrollTop() + $(window).height();
var result = (bottom_of_object - bottom_of_window) ;
if( result < 0 ){
... |
import React, { useContext } from 'react';
import { ScrollView, StyleSheet } from 'react-native';
import { Text } from '../../common';
import { translate } from '../../i18n';
import { ThemeContext } from '../../theme';
const DetailScreen = ({ route, navigation }) => {
const { theme } = useContext(ThemeContext);
re... |
import actionTypes from 'constants/action-types';
import reducer from './notifications';
const initialState = [
{
id: 1,
text: 'Notification 1'
},
{
id: 2,
text: 'Notification 2'
},
{
id: 3,
text: 'Notification 3'
}
];
describe('Notification reducer', () => {
it('should return th... |
// ==========================================================================
// Project: SRCHR - mainPage
// Copyright: ©2011 jphpsf
// ==========================================================================
// This page describes the main user interface for this application.
SRCHR.mainPage = SC.Page.design({
... |
import React, { Component } from 'react';
import '../css/PrintableComponent.css';
class PrintableComponent extends Component {
render () {
return (
<div>
<p>This will be printed</p>
<a href="https://github.com/mmarotti">Cool github profile</a>
</div>
)
}
}
export default Printa... |
/*编写自定义的JavaScript函数maskingKeyboard(),
在该函数中屏蔽键盘的回车键、退格键、F5键、Ctrl+N组合键、Shift+F10组合键*/
function maskingKeyboard(){
var keyCode = event.keyCode ? event.keyCode
: event.which ? event.which : event.charCode;
if(keyCode==8){
//判断是否为退格键
event.KeyCode=0;
event.returnValue=false;
... |
import React from 'react';
import styled from 'styled-components';
import { HEADER_ONE_FONT_SIZE, HEADER_TWO_FONT_SIZE, COLOR_ZOLAR_BLUE, HEADER_CUSTOM_FONT_SIZE } from "./Theme";
const CustomHeader = styled.span`
font-size: ${HEADER_CUSTOM_FONT_SIZE};
font-weight: ${props => props.fontWeight ? props.fontWeigh... |
/*global ODSA */
// Inseh1234 slideshow
$(document).ready(function() {
"use strict";
var av_name = "ProofOfStake";
var av = new JSAV(av_name);
var topMargin = 50;
var leftMargin = 390;
let leftAdding = 54;
var blocktop = 17;
var graph = av.ds.graph({visible: true, left: -10, top: blocktop, height: 3... |
$(document).ready(function() {
$('#cssmenu ul li a').each( function() {
if( $(this).attr('href') == window.location.pathname ) {
$(this).addClass('active')
}
});
$('#cssmenu ul li a').mouseenter( function() {
$(this).addClass('hover');
});
$('#cssmenu ul li a').mouseleave( function() {
$(this).removeCla... |
import React, { useEffect, useCallback } from 'react';
import qs from 'query-string';
import styled from 'styled-components';
import Selection from './components/Selection';
import { scrollTo } from '../utils';
import ScreenshotProvider from './context/ScreenshotContext';
import { WIDGET_HIDE } from '../constants';
co... |
/********************************************************************
* Handler for image/label (element) requests.
*
* Note: cwd is '..' for this '../lib/script'...
*/
// console.log(`\nmodule = %o`, module)
// console.log(`module.exports = %o`, module.exports)
// console.log(`exports = %o`, exports)
// console.... |
/**
* Created by krinjadl on 2016-07-01.
*/
import { INCREMENT,DECREMENT,SET_DIFF,ADDMESSAGE,UPDATEMESSAGESTATE,DELETEMSG,ITEMSELECTED} from '../actions';
import { combineReducers } from 'redux';
import { routerReducer} from 'react-router-redux';
const initialState = {
messageList: [],
newMessage:"",
se... |
//Импортировали данные
import React, { Component } from 'react';
//AppRegistry импортируем всегда, а виджет Image ипортируем по надобности
import { AppRegistry, Image } from 'react-native';
//Создали компонент, это кирпичик из которого строим программу.
export default class Bananas extends Component {
// Функция re... |
document.onkeyup = (event) => {
let key = event.key;
if ([1, 2, 3].indexOf(Number(key)) > -1) {
const audio = document.querySelector(`#audio${key}`);
if (audio.paused) {
audio.play();
} else {
var fadeInterval = setInterval(function(){fadeOut(audio) },300);
... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "c4d928206c7dc01ada44b60ee488307f",
"url": "/index.html"
},
{
"revision": "a1f5f04a2ff09f4822a6",
"url": "/static/js/2.0fd1f235.chunk.js"
},
{
"revision": "dcceb77afec6303e7501",
"url": "/static/js/main.ef... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = _default;
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _asyncToGenerator2 = _interopRequi... |
if (process.env.NODE_ENV !== 'production') {
require('dotenv').config();
}
const uuidv4 = require('uuid/v4');
const bcrypt = require('bcrypt');
class Users {
constructor(db) {
this.db = db;
this._users = db.use('_users');
this._session = db.use('_session');
}
async auth(usern... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.