text stringlengths 7 3.69M |
|---|
var area_Produtos = document.querySelector("#areaProdutos");
var requestURL = 'https://gist.githubusercontent.com/mapreuss/cccf0781ba848648d9d8a6510201a027/raw/74b72ac19728a92306b296863b5a81c8a0b3d8d7/test.json';
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'text';... |
import React, { Component } from "react";
import ColorContext from "../../../contexts/ColorContext";
class Parent extends Component {
constructor(props) {
super(props);
this.state = {
color: "blue",
};
}
changeColor = (color) => {
this.setState({ color: color });
};
render() {
re... |
// example.test.js is configurable but by default testing looks for .test.js
// no need to use testing library
// import { render, screen } from '@testing-library/react';
import App from './App';
// to Configure
import Enzyme, {shallow} from 'enzyme'
// adaptor to expect code
import EnzymeAdapter from 'enzyme-adapte... |
import React from 'react';
import PropTypes from 'prop-types';
import { Switch, Route, withRouter } from 'react-router-dom';
import { Redirect } from 'react-router';
import { connect } from 'react-redux';
import Home from '../../views/home';
import NotFound from '../../views/not-found';
function PrivateRoute({ compon... |
import React from 'react';
import { useState } from 'react';
import './style.css';
import mapImage from './img/map.svg';
import CityOptions from './CityOptions/index';
import DatesOptions from './DatesOptions/index';
import { useEffect } from 'react';
const JourneyPicker = ({ onJourneyChange }) => {
const [fromCity,... |
import fs from "fs";
import path from "path";
import matter from "gray-matter";
import { getAllFilesRecursively } from "../lib/files";
import { markdownToHtml } from "./markdownToHtml";
const root = process.cwd();
const postDirectoryName = `posts`;
/** 日付の降順でソート */
function dateSortDesc(date1, date2) {
if (date1 > ... |
import {useState} from 'react';
import axios from 'axios';
import Button from './button-default';
import theme from './theme';
export default function Contact() {
const [values, setValues] = useState({
email: "",
firstName: "",
lastName: "",
message: ""
});
const [loadStat... |
const EventEmitter = require('events');
exports.Db = class Db extends EventEmitter {
constructor() {
super();
this.logs = new Map();
this.init();
}
init() {
this.on('data', function (data) {
this.logs.set(new Date().toISOString(), data);
console.log('this.logs', this.logs);
});
}
} |
use test;
db.players.insertMany([{
_id: 123,
userName: "petesampras",
country: "US",
titles: 64
},
{
_id: 124,
userName: "bjornborg",
country: "SE",
titles: 63
}
]);
db.players.aggregate([
{ $match: { country: "SE" } },
{ $group: {
_id: "$country",
count: { $sum: "$... |
/* From:
https://github.com/Cortexelus/Polyphonic-Binaural-Beats
*/
function BiBeat() {
let oscillators = [];
function start(){
oscillators.forEach(o=>o.start());
}
function stop(){
oscillators.forEach(o=>o.stop());
}
function init(){
let ctx = new (window.AudioContext ... |
window.onload = function () {
// Vueとinspectorの相性が悪いみたい
// Vueと何らかの要素がリンクしているとinspectorでの視点移動ができなくなる
// さらに恐らくVueとリンクすると謎の要素が追加されているみたい
const app = new Vue({
// el: '#scene',
data: {
cameraPosition: '',
grip: false,
selectedEl: null,
},
... |
/// <reference path="ContentsWindowHead.ts" />
var Contents;
(function (Contents) {
var ContentsWindow = /** @class */ (function () {
function ContentsWindow(Obj, Parent, FinishFunction) {
if (FinishFunction === void 0) { FinishFunction = function () { }; }
this.Obj = Obj;
... |
import React from 'react';
import './searchFormAdditional.scss';
const SearchForm = () => <div className="ge-search-form__additional">sfsdfdsf
</div>;
export default SearchForm; |
/**
* Created by Indexyz on 2016/7/14.
*/
'use strict';
const event = require("./Event");
module.exports = function (task, timeOut) {
let streams = 0;
let total = 0;
let getData = 0;
return function (res, url, cb) {
let tTask = task;
let timeout_wrapper = function (res) {
... |
/* A organização de um código em Java Script é dividido em:
* Sentença de código (Uma linha de comando) => console.log("Olá Mundo")
* Blocos (Um grupo de sentenças) => { }
*/
{
console.log("Olá")
console.log("Mundo!")
} |
//等待页面加载完成(所有资源)
window.addEventListener('DOMContentLoaded',function () {
//获取dom元素
var liNodes = document.querySelectorAll('.nav li');
var arrowNode = document.querySelector('.arrow');
var upNodes = document.querySelectorAll('.up');
var contentUlNode = document.querySelector('.content-main');... |
// requires node.js, twit, jquery and json
// do this periodically
setInterval(function () {
'use strict';
// set up the twitter auth
var Twit = require('twit');
var T = new Twit({
consumer_key: 'VC5JsVXtVRYuW2iKSCdBdQ'
, consumer_secret: 'KaopBi8BNp0V5mKzJzbW2iISR6TxSa5tIpijAnbEHc'
, access_token: '2... |
var searchData=
[
['masterdata',['masterData',['../interface_c1_connector_session_response_public.html#ac607472e82ae4b44c4c1e2d321e8b555',1,'C1ConnectorSessionResponsePublic']]],
['maxcount',['maxCount',['../interface_c1_connector_track_event_response.html#aac22f087cf5463ac84ef8e60978dd879',1,'C1ConnectorTrackEvent... |
import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/Login.vue'
import Home from '@/components/home/Home.vue'
import TestValue from '@/components/TestValue.vue'
import Detail from '@/components/detail/Detail.vue'
import AuthAuthentic from '@/components/auth/Authentic.vue'
import A... |
var React = require('react');
var connectToStores = require('alt/utils/connectToStores');
var ConfirmDeleteDialog = require('./utils/ConfirmDeleteDialog');
var Router = require('react-router');
var getDeletePurchaseOrderRow = function(PurchaseOrderActions, PurchaseOrderStore, TitleStore) {
var deletePurchaseOrder... |
import React from 'react';
const StudentDetail = props => (
<div className="col s12">
<div className="card horizontal">
<div className="card-image">
<img src={props.imageUrl} />
</div>
<div className="card-stacked">
<div className="card-content">
<ul>
<li>
... |
var _ = require('lodash');
var React = require('react');
var ReactBootstrap = require('react-bootstrap');
var Alert = ReactBootstrap.Alert;
var ErrorMessages = React.createClass({
propTypes: {
messages: React.PropTypes.arrayOf(React.PropTypes.string),
},
getDefaultProps: function() {
return {
mess... |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
path: {
closure: 'node_modules/obvious-closure-library/',
src: 'src',
tmp: 'tmp'
},
gjslint: {
options: {
flags: [
//'--disable 220' //ignore error code 220 from ... |
'use strict';
const expect = require('chai').expect;
const protobuf = require("protobufjs");
const root = protobuf.Root.fromJSON(require("../lib/bundle.json"));
const common = require('./common');
const BroadcastMessageRequest = root.lookupType("bboxapi.BroadcastMessageRequest");
const PingRequest = root.lookupType("... |
/**
* @purpose :contains all methods which are require frequently in different module
* @author :sangita awaghad
* @since :21-08-2019
**********************************************************************************/
const readInput = require('readline-sync');
let permute = [];
let count = 0;
module.exports = {... |
import Subscription from './Subscription';
export{Subscription}; |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
//Material imports
import { withStyles } from "@material-ui/core/styles";
import { Paper, Button } from "@material-ui/core";
import MobileStepper from "@material-ui/core/MobileStepper";
import Q... |
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
flowName: "Untitled flow_1",
};
const cardSlice = createSlice({
initialState,
name: "flowState",
reducers: {
SetFlowName: (state, action) => {
if (action.payload === "") {
state.flowName = "Untitled flow_1";
} else ... |
// @ts-check
/* eslint-disable react/prefer-stateless-function */
import React from 'react';
// BEGIN (write your solution here)
class Card extends React.Component {
static defaultProps = {
title: null,
text: null,
};
render() {
const { title, text } = this.props;
return (
<... |
//Loading effect
$(window).on('load',function() {
$("body").removeClass("preload");
});
//Table sort button
$(document).ready(function(){
$('table').addClass('tablesorter');
$('table').tablesorter({
// theme: 'blue',
headers: {
// set initial sort order by column, this head... |
({
'bold': 'Negrito',
'copy': 'Copiar',
'cut': 'Cortar',
'delete': 'Eliminar',
'indent': 'Indentar',
'insertHorizontalRule': 'Régua horizontal',
'insertOrderedList': 'Lista numerada',
'insertUnorderedList': 'Lista marcada',
'italic': 'Itálico',
'justifyCenter': 'Alinhar ao centro',
'justifyFull': 'Justificar... |
const request = require('request');
const zlib = require('zlib');
const readLogs = require('./readLogs');
const date = process.argv[2];
main();
function main() {
const url = `https://storage.googleapis.com/anvyl-interview-challenge/${date}-orders-access.log.gz`;
request(url, {encoding: null}, function(err, ... |
const { v4: uuidv4 } = require("uuid");
const { Activity } = require("../models/activity");
const getAllActivities = async (req, res, next) => {
let activities = [];
try {
activities = res.user.activities;
res.activities = activities;
} catch (err) {
res.activities = activities;
return res.statu... |
const sortItem = [
{
display:"Name: A - Z",
value: {_sort:'name', _order:'asc'}
},
{
display:"Name: Z - A",
value: {_sort:'name', _order:'desc'}
},
{
display:"Price: Low to High",
value: {_sort:'price', _order:'asc'}
},
{
display:"Pric... |
import Joi from "joi";
const ValidateDTO = class ValidateDTO {
static postOrder(params) {
const schema = Joi.object({
user: Joi.string().required(),
product: Joi.string().required(),
});
return schema.validate(params);
}
};
export default ValidateDTO;
|
const Customer = require('../models/Customer')
const mongoose = require('mongoose')
const Account = require('../models/Account')
String.prototype.insert = function(index, string) {
if (index > 0) {
return this.substring(0, index) + string + this.substr(index);
}
return string + this;
}
module.exports = {
... |
function Mouse(color, weight)
{
this.color = color;
this.weight = weight;
this.isDead = false;
}
Mouse.prototype.sleep = function() {
console.log('Zzzz ...');
};
Mouse.prototype.die = function() {
this.isDead = true;
}
Mouse.prototype.run = function() {
console.log('Run ...');
}
module.exports = Mouse; |
import axios from 'axios';
import network from '../../core/network';
import { showError } from '../../core/utils/UserFeedback';
import events from '../../core/events';
import { refreshCurrentBoard } from '../../board/actions/boardActions';
export const ACTION_RETRIEVE_USER = 'ACTION_RETRIEVE_USER';
export const ACTIO... |
import shortid from 'shortid';
import { FormElement, FormGroup, Input, Label } from '../../Styles';
export const Filter = ({ value, onFilterInput }) => {
const inputFilterId = shortid.generate();
return (
<FormElement>
<FormGroup>
<Label htmlFor={inputFilterId}>Filter</Label>
<Input
id={inputFilter... |
/**
* 给easyui tabs绑定双击事件
*/
$.extend($.fn.tabs.methods, {
/**
* 绑定双击事件
* @param {Object} jq
* @param {Object} caller 绑定的事件处理程序
*/
bindDblclick: function(jq, caller){
return jq.each(function(){
var that = this;
$(this).children("div.tabs-header").... |
isc.ClassFactory.defineClass('IRAppFrame', isc.VLayout); |
myApp.config(function($routeProvider) {
$routeProvider
.when('/:role/:topic', {
templateUrl: 'pages/page.html',
controller: function($http, $scope, $routeParams, $timeout) {
//get the correct JSON topic file based on the URL
$http.get('json/' + $routeParams.topic + '.json', {cache:true}).success(function(d... |
import '../../../../scripts/common/app'
import AppRoutes from '../../../../configs/AppRoutes'
import formItems from './table/form-item'
import ImageText from '../../../../models/matter/imageText'
import View from '../../../../views/domain/page.vue'
new Vue({
el: '#app',
render: h => {
const v = h(View, {
props:... |
const Syntax = require('jsdoc/src/syntax').Syntax;
// 添加对 TypeScipt interface 的支持
Syntax.TSInterfaceDeclaration = 'TSInterfaceDeclaration';
Syntax.TSInterfaceBody = 'TSInterfaceBody';
Syntax.TSMethodSignature = 'TSMethodSignature';
Syntax.TSModuleDeclaration = 'TSModuleDeclaration';
Syntax.TSPropertySignature = 'TSProp... |
var searchData=
[
['lu_5fdecomp_21',['lu_Decomp',['../ludecomp_8h.html#a5f9664591deea4acaa4f0193f29305d9',1,'ludecomp.h']]],
['ludecomp_2eh_22',['ludecomp.h',['../ludecomp_8h.html',1,'']]]
];
|
/*
idea is to not have one large gulp file, rather each file will
handle a specific gulp task.
to create a new task, add a new "taskName.js" to the task directory
*/
var requireDirectory = require('require-dir');
// require tasks from the task directory and subdirectorys
requireDirectory('./tasks', {recur... |
var width = 1000, height = 500;
var colors = d3.scaleOrdinal(d3.schemeDark2);
var svg = d3.select("body").append("svg")
.attr("width", width).attr("height", height)
.style("background", "pink")
var newData = d3.json("newData.json");
var details = [{Party:"NUR-OTAN", number:73},{Party:"AK-ZHOL", number:8},{P... |
Ext.define('Layouts.model.Content', {
extend: 'Ext.data.Model',
config: {
fields: [
'nid', 'title', 'icon1', 'icon2',
]
},
/*sectionData: function(){
var d = this.data,
taxonomy = [
d.tid, d.term
];
return taxonomy.join(" ");
}*/
}); |
$("#slideshow > div:gt(0)").hide();
setInterval(function() {
$('#slideshow > div:first')
.fadeOut(1000)
.next()
.fadeIn(1000)
.end()
.appendTo('#slideshow');
}, 3000);
//gor google maps on about page
function initMap() {
// accessed map and set the location
var mapDiv = document.getElement... |
var Junjianxiada = new Vue({
el : '#Junjianxiada',
data :{
adminId : $("#adminid").val(),
deptId : $("#deptid").val(),
xiangmutext:'',
xiangmu : {},
xiangmulist : [],
leibielist:[],
danweilist:[],
excelxiangmulist:[],//批量导入
xiangmuId:'',... |
class Background {
constructor(){
this.x=0;
this.y=0;
this.width=$canvas.width;
this.height=$canvas.height;
this.img=new Image();
this.img.src="/images/classic_city.png"
this.img.onload = () => {
this.draw()
}
}
draw(){
th... |
import { properties } from "../attrs";
import personel from "../personel";
import SimCreate from "./components/SimCreate";
import jenis_pengajuan_sim from "../jenis_pengajuan_sim";
import gol_sim from "../gol_sim";
import SimList from "./components/SimList";
import SimEdit from "./components/SimEdit";
const fields = {... |
/Users/jezrel_mx/Documents/Titanium_Studio_Workspace/ejemplo 1/Resources/app.js |
export * as PhoneBookAction from './PhoneBook-action';
export * as PhoneBookOperations from './PhoneBook-operations';
export * as PhoneBookSelectors from './PhoneBook-selectors';
|
var server = require('net').createServer();
var port = 8081;
// The next line sets the on to listen and it therefore will listen on port 8081
server.on('listening', function()
{
console.log('Server is listening on port', port);
});
// The next line sets the on to connect and to receiv... |
import {UserRbacFactory} from "../../src/services/RbacService";
const mongoHandler = require('../utils/mongo-handler');
import {
initAdminRole,
initOperatorRole,
initSupervisorRole,
initPermissions,
initRootUser,
initSupervisorUser,
initOperatorUser
} from "../../src/services/InitService";... |
import withSplitting from 'lib/withSplitting';
export const EditorView = withSplitting(() => import('./EditorView'));
|
var express = require('express');
var router = express.Router();
var items = require('../controllers/cart');
router.get('/', items.list);
router.get("/new", items.newPage);
router.get("/:id/edit", items.getEdit);
router.post("/", items.new);
router.put("/:id", items.editPost);
router.delete("/:id", items.deletePost);... |
import React, {useState, useEffect} from 'react'
import {ApiService} from '../../../services/apiService'
import { connect } from "react-redux";
import { withRouter } from "react-router-dom";
import { setProduct } from "../../../redux/actions";
const symbolMainAssets = {
'BTCTRY' : 'BTC',
'BTCUSDT' : 'BTC',... |
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Modal,
Button,
Linking,
AlertIOS,
ScrollView,
Dimensions,
TouchableHighlight
} from 'react-native';
import fonts from '../fonts';
import Font from './Font';
export default class App extends Component {
constructor() {
... |
({
doInIt : function(component,event) {
var action = component.get("c.getUserDetails");
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
var user = response.getReturnValue();
var salesA... |
import React from 'react';
export default class Chart extends React.PureComponent {
shouldComponentUpdate() {
return false;
}
render() {
return (
<svg
width={this.props.width}
height={this.props.height}
>
{this.props.children}
</svg>
);
}
}
Chart.propType... |
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import FormGasto from "../animals/FormGasto";
import {Link} from 'react-router-dom'
import {Select, Form, message, Divider, Card, List} from 'antd';
import MainLoader from "../../common/Main Loader";
i... |
import React from 'react'
import PropTypes from 'prop-types'
import { Input } from 'antd'
import DateRange from '../components/DateRange'
import { StyledHeader } from '../styled'
import { placeholders } from '../constants'
export default function Header ({ onChange, selectedRange }) {
const handleSearchChange = ... |
export const getProfesores = () => ({ type: 'GETPROFESORES' });
export const getProfesor = (profesor) => ({ type: 'GETPROFESOR', payload: { profesor } });
export const saveComment = (comentario, profesor) => ({ type: 'SAVECOMMENT', payload: { comentario, profesor } });
|
import { cloudwatchevents } from '../lib/aws_clients';
function getJobRuleTargetInputTransformer({
async,
exclusive,
guid,
invocationTarget,
invocationType,
jobName,
payload,
schedule,
serviceName,
ttlSeconds,
}) {
const inputPathsMap = {
// can define a max of 10 of these...
id: '$.id',
... |
import React from "react"
import { Box, Container, Grid, Typography } from "@material-ui/core"
import { makeStyles } from "@material-ui/core/styles"
import GridColorBar from "./../components/GridColorBar"
import Layout from "./../components/layout"
import Section from "./../components/Section"
import BackgroundVideo ... |
$(function() {
/*
* @author huangyi
* @memberOf {TypeName}
*
*/
var h = $('#link').attr('href');
var hs = h.split('_');
var name = hs[1].split('.')[0];
$('#issueNo').change(function() {
var issueNo = $(this).val();
location = "/award/award_" + name + ".htm?issueNo=" + issueNo;
})
$('#fromDate').fo... |
import React from "react";
import { MdDone, MdClose } from "react-icons/md";
import { Button, Form } from "react-bootstrap";
export default function EditForm({
parent,
text,
editToDo,
hideEdit,
editSubToDo
}) {
const [value, setValue] = React.useState(text);
let updateToDo = (parent, text, ... |
var mongoose = require('./MongoDB.js'),
Schema = mongoose.Schema;
var AisSchema = new Schema({
AISVersion: {type:Number},
AgeMinutes: {type:Number},
BandFlag: {type:Number},
Callsign: {type:String},
DTE: {type:Number},
Destination: {type:String},
Draught: {type:Number},
ETA: //{type... |
class UserApiData{
constructor() {
this.sessionUsers = []
}
sendResponse(req,res, apiMethod, defaultResponseCallback){
const response = this.getUserData(req.headers.authorization, apiMethod)
if (response) {
res.send(response)
} else {
r... |
$(document).ready(function(){
$('#group-stage').removeClass('active');
$('#knockout-stage').addClass('active');
// Get knockout stage matches and bets for the user
var round16matches = new Vue({
el: "#round16",
data: {
matches: [
]
},
meth... |
import util from './util';
// deepCopy
function deepCopy(data) {
var t = util.typeOf(data);
var o;
if (t === 'array') {
o = [];
} else if (t === 'object') {
o = {};
} else {
return data;
}
if (t === 'array') {
for (var i = 0; i < data.length; i++) {
... |
import types from 'Actions/types';
import { initialGenreState } from './initialState'
const {
SET_GENRES,
ADD_GENRE
} = types;
const genres = (state = initialGenreState, action) => {
switch (action.type) {
case SET_GENRES:
return {
...state,
genres: acti... |
export { default } from './simple-dialog'
|
var locals = {
'env':{
'database': {
dbname:'users',
username: 'user1',
password: '1234',
host: 'localhost'
},
'twilio':{
accountSid: 'AC1166a0e35f94351b7613aa1da30e3c17',
authToken: 'bf05e3c2da151f645b089bc952c0db22'
... |
// Dependencies
import React from 'react'
import { graphql } from 'react-apollo'
import PropTypes from 'prop-types'
import ReactGA from 'react-ga'
// Queries
import query from '../queries/getWatchlistItemByTitle'
// App Components
import EmptyList from './EmptyList/EmptyList'
import Loader from './Loader/Loader'
impo... |
import { expect, sinon } from '../../test-helper'
import positionRepository from '../../../src/domain/repositories/position-repository'
import { Newposition } from '../../../src/domain/models/index'
describe('Unit | Repository | position-repository', () => {
const position = {
lastNewposition: 'Mexico',
id: ... |
import React from "react"
import {
View,
Image,
ImageBackground,
TouchableOpacity,
Text,
Button,
Switch,
TextInput,
StyleSheet,
ScrollView
} from "react-native"
import Icon from "react-native-vector-icons/FontAwesome"
import { CheckBox } from "react-native-elements"
import { connect } from "react-re... |
var express = require("express");
var router = express.Router();
var burger = require("../models/burger.js");
// creating the base route which will render index
router.get("/", function(req, res){
burger.selectAll(function(burger_data){
var handlebarsObject = {
burgers: burger_data
};
... |
(function () {
"use strict";
describe("SoapInterceptor", function () {
var $httpBackend,
$rootScope,
wsdl,
envConfig,
soapInterceptor;
beforeEach(function () {
inject(function (_$injector_) {
$httpBackend = _$injector_.get("$httpBackend");
$rootScope =... |
canvas = document.getElementById('mycanvas');
ctx = canvas.getContext("2d");
img_image = "car2.png";
background_image = "parkingLot.jpg";
canvas_width = 900;
canvas_height = 700;
car_width = 115;
car_height = 175;
car_x = 10;
car_y = 375;
function add(){
//alert("I am called");
img_back = ... |
import React from "react";
import "./index.css";
import Active from "../Active";
import Done from "../Done";
import { Tabs } from 'antd';
const TabPane = Tabs.TabPane;
export default class Home extends React.Component {
render() {
return (
<div>
<Tabs defaultActiveKey="1">
... |
// components/Boop.jsx
import React from "react"
import { animated } from "react-spring"
import useBoop from "../hooks/useBoop"
const Boop = ({ children, ...boopConfig }) => {
const [style, trigger] = useBoop(boopConfig)
return (
<animated.span onMouseEnter={trigger} style={style}>
{children}
</anima... |
// format = [time at the start stop] or
// [time, other] or
// [time, start_stop, end_stop, other]
STSP_red_main_stop_name = ["Park 17<br />商場","璞園<br />宿舍","馨園<br />宿舍","南科<br />實中","民生<br />水塔","臺鐵<br />南科站","南科<br />實中","社區<br />中心","晶圓<br />S1廠","東捷<br />科技","應材製<br />造中心","廣停3","南科健康<br />生活館","台灣<br />康寧","住華<br ... |
"use strict";
var dinnerApp = angular.module(
'starter',
[
'ionic',
'ngResource',
'environment',
'ui.calendar',
'rzModule',
'angularPayments',
'auth0',
'angular-storage',
'angular-jwt',
'ngCordova'
]);
dinnerApp.run(function($ionicPlatform) {
$ionicPlatform.ready(functio... |
import React, { useEffect, useState } from "react";
import * as mapActions from "../store/actions/map";
import { useDispatch, useSelector } from "react-redux";
import { Layout, Button, Input, Card } from "antd";
import GoogleMapReact from "google-map-react";
import ReactDOM from "react-dom";
import mapboxgl from "map... |
const handleChangePassword = async function(event) {
event.preventDefault();
event.stopImmediatePropagation();
$("#password-message").html('');
let password = document.getElementById('password').value;
let confirmPassword = document.getElementById('confirm-password').value;
if (password == ""... |
// Object.keys, values, entries
// + 1. Сумма свойств объекта
// describe("sumSalaries", function () {
// it("returns sum of salaries", function () {
// let salaries = {
// "John": 100,
// "Pete": 300,
// "Mary": 250
// };
// assert.equal(sumSalaries(sa... |
new Vue({
el : "#root",
data:{
artikli:[
{ naziv: "Meri Popins", cena: 4850 },
{ naziv: "Džoker", cena: 5130 },
{ naziv: "Bel", cena: 4250 },
{ naziv: "Luj XVI", cena: 4860 },
{ naziv: "Grdana", cena: 5320 },
... |
import React from 'react'
// Manual updating process
class ForceUpdate extends React.Component {
constructor() {
super();
this.forceUpdateHandler1 = this.forceUpdateHandler.bind(this);
};
forceUpdateHandler() {
this.forceUpdate();
};
render() {
return (
<div>
... |
import React from 'react';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import Pagination from '@material-ui/lab/Pagination';
const useStyles = makeStyles(theme => ({
root: {
display: 'flex',
justifyContent: 'center',
marginTop: theme.spacing(2),
marginBo... |
import React, { useEffect, useState } from 'react';
import { Container, Content, InternalContent } from './styles';
import HeaderRestaurant from "../../../../components/HeaderRestaurant";
import MenuRestaurant from "../../../../components/MenuRestaurant";
import FooterComponent from "../../../../components/Footer";
imp... |
import { createLogger } from 'redux-logger'
import { applyMiddleware, combineReducers, createStore } from 'redux'
import thunk from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
export const buildStore = reducers => {
const loggerMiddleware = createLogger({ collapsed: true })
const c... |
// Maria plays college basketball and wants to go pro. Each season she maintains a record of her play. She tabulates the number of times she breaks her season record for most points and least points in a game. Points scored in the first game establish her record for the season, and she begins counting from there.
// G... |
'use strict';
import React from 'react';
import { Link } from 'react-router';
export default (props) => {
return (
<div id="cart-line-item" className="container">
<div className="panel panel-success">
<div className="panel-heading">
<div className="row">
<div className="col-sm-10 col-xs-9">
... |
import React, { Component } from 'react'
import { Link } from 'react-router'
import 'normalize.css'
import './style.scss'
export default class App extends Component {
render() {
return (
<div className="app">
<div className="menu">
<div>
<a className="logo" href=""></a>
... |
//const {SHA256} = require('crypto-js');
const jwt = require('jsonwebtoken');
// var message = "hey its me akash";
// var hash = SHA256(message).toString();
// console.log(message , hash)
var data = {
id: 10
};
var token = jwt.sign(data, '123');
var decode = jwt.verify(token, '123');
console.log(decode); |
/*
* Module code goes here. Use 'module.exports' to export things:
* module.exports.thing = 'a thing';
*
* You can import it from another modules like this:
* var mod = require('class.spawn');
* mod.thing == 'a thing'; // true
*/
var classSpawn = {
run: function(spawn){
var fleas = _.filter(Game.cree... |
import store from "../../../store";
export default {
notify(path, events, params, options) {
if (params) {
// 测试时暂时这么写。
store.dispatch({
type: "NOTICE_ADD",
notice: {
path, events, params, options
}
})
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.