text stringlengths 7 3.69M |
|---|
var messageContainer;
var pseudo = "";
var soundOn = true;
var autoplayOn = true;
var msgSound = new Audio('/msgSound.wav');
// Init
$(function() {
messageContainer = $('#messageInput');
window.setInterval(time, 1000*10);
$("#alertPseudo").hide();
$('#modalPseudo').addClass('active');
$('#pseudoInput').focus()... |
let icon=document.querySelector("#emoji-icon");
let emoji=document.querySelector(".emoji");
let smiley=document.querySelector(".smiley");
let laugh=document.querySelector(".laugh");
let angry=document.querySelector(".angry");
let dizzy=document.querySelector(".dizzy");
let flushed=document.querySelector(".flushed");
l... |
eventCSV = "Event,Date,Cost,Total\nTotal,9/1/2014,0,1000\nFirst GRT meeting,9/2/2014,50,950\nBoard Game Night,9/27/2014,46,904\nIce Cream,10/14/2014,75,829\nHalloween Party,10/29/2014,105,724\nSimmons-Next-McCormick Formal,11/15/2014,61,663\nChancellor Visiting Dining,11/24/2014,0,663\nFinal Projects Last Push,12/4/201... |
function slotMachine(quarters) {
var won = false;
while (quarters > 0 && won === false) {
quarters = quarters - 1;
randomNumber = Math.floor((Math.random() * 100));
if (randomNumber === 22) {
var winnings = Math.floor(Math.random() * 50) + 51;
quarters = quarters + winnings;
won = tru... |
// ================================================================================
//
// Copyright: M.Nelson - technische Informatik
// Die Software darf unter den Bedingungen
// der APGL ( Affero Gnu Public Licence ) genutzt werden
//
// weblet: allg/rte/standalone
// ===========... |
import axios from "axios";
import headerConfig from "../helpers/headerConfig";
export const postSubreddit = async (name) => {
const body = JSON.stringify({ name });
try {
const headers = await headerConfig();
const response = await axios.post(`/api/subreddit/`, body, headers);
return response.data;
... |
/* eslint-env node */
'use strict';
// dependencies
// ======================================================================
var express = require('express');
var app = module.exports = express();
var server = null;
// express set up
// ======================================================================
requir... |
Vue.component('card', {
template: //html
`
<div class="card col-md-3">
<img :data-src="preview" class="card-img-top" :alt="title">
<div class="card-body">
<h5 class="card-title">{{title}}</h5>
<p class="card-text">{{desc}}</p>
<a :href="href" class="bt... |
import React, { Component } from 'react';
import { getDemoRequest } from '../../redux/actions/demoActions';
import { connect } from 'react-redux'
import User from '../../components/User';
import PropTypes from 'prop-types'
class Home extends Component {
componentWillMount() {
this.props.getDemoRequest('hey');
}
r... |
export const loadPosts = (posts) => ({
type: "loadPosts",
posts: posts,
});
|
export default (state = { time: [], leftPrice: [], rightPrice: [] }, action) => {
switch (action.type) {
case "FETCH_VERSUS_CHART_1":
return {
time: action.payload[0].data.prices.map((time) => {
const tempDate = new Date(time[0]);
return te... |
require(['../main'], function() {
requirejs(['logout']);
} |
module.exports = {
entry: {
app: './src/lib.ts'
},
output: {
library: 'lib',
libraryTarget: 'umd'
}
}
|
let arrShortMenu=[
{title:"Авто",
color:"blue-color"},
{title:"Нерухомість",
color:"orange-color"},
{title:"Робота",
color:"green-color"},
]; |
function countingValleys(n, s) {
let elevation = 0;
let numValleys = 0;
for(let i=0; i<n ; i++){
if(s[i] === "D"){
--elevation ;
}else if(s[i]==="U") {
elevation++;
if(elevation === 0) numValleys++;
}
}
return numValleys;
}
co... |
function getID() {
return $("#input_rule_name").val();
}
function getDescription() {
return $("#input_rule_descr").val();
}
/*****************
*
* SENSOR GETTER
*
*****************/
function getSensorIDs() {
return $.map($('.sensor_list'), function(n, i) { return $(n).attr('id'); });
}
function getSensorNa... |
import "../../AlertifyJS-master/css/alertify.min.css";
import "../../AlertifyJS-master/css/themes/custom.css";
import {state} from '../index';
import {elements, pets,apartments} from '../views/base';
import { pizzaPrice, drinkPrice, partyPrice, foodPrice} from '../models/prices';
import {maxHours, standardTime} from '.... |
/**
* S-expression parser
*
* Recursive descent parser of a simplified sub-set of s-expressions.
*
* NOTE: the format of the programs is used in the "Essentials of interpretation"
* course: https://github.com/DmitrySoshnikov/Essentials-of-interpretation
*
* Grammar:
*
* s-exp : atom
* | list
*
* ... |
function cmddc1 () {}
// Behringer CMD DC-1 Midi interface script for Mixxx Software
// Author : Tiger <[email protected]> / Tiger #[email protected]
// Version : 0.1.0
// Default channel of this device
// We substitute 1 because count starts from 0 (See MIDI specs)
cmddc1.defch = 6-1;
cmddc1.LEDCmd = 0x90; //... |
import User from '../models/user.model'
import extend from 'lodash/extend'
import errorHandler from './error.controller'
const create = async (req, res) => {
const user = new User(req.body)
try {
await user.save()
return res.status(200).json({
message: "Successfully signed up!"
})
} catch (e... |
import { CHANGE_IMAGE, SAVE_USER, SIGN_OUT } from '../actions/type';
const initialState = {
currentUser: null,
isLoading: false,
};
export default function user(state = initialState, action) {
switch (action.type) {
case SAVE_USER:
return {
...state,
currentUser: action.payload,
... |
'use strict';
const net = require('net');
const EE = require('events');
const Chat = require('./model/chat.js');
const PORT = process.env.PORT || 3000;
const server = net.createServer();
const ee = new EE();
const allUsers = [];
ee.on('@dm', function(chat, string) {
let message = string.split(' ').slice(1).join(' ... |
$(document).ready(function(e){
// $(".checksheet_table tr").live('click',function(){
// contextMenuCheeksheet();
// });
$(".checksheet_table tr").mousedown(function(e){
var object = $(this);
switch(e.which){
case 3:
$(".contextMenu .see_FCS").children('a').attr("href","/capturas/capturar/id/" + object.... |
import React, { Component } from 'react'
import Layout from '@primitives/layout'
import defaultFilterStyle from './defaultFilterStyle'
import Mesh from './Mesh'
import View from './View'
class Grid extends Component {
constructor() {
super()
this.rootElement = undefined
this.state = {
rootRect: {... |
importClass(java.io.File);
importClass(java.io.FileReader);
importClass(org.apache.tools.ant.util.FileUtils);
/**
* Rhino is just getting support for common.js modules (1.7R3),
* but until this gets released on the JDK, this is necessary.
*
* Reads the specified file and eval it, returning anything it specified on... |
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('UiBookmark', {
bookmark_id: {
autoIncrement: true,
type: DataTypes.INTEGER.UNSIGNED,
allowNull: false,
primaryKey: true,
comment: "Bookmark identifier"
},
user_i... |
/* Services */
angular.module('freeItEbooksServices', [
'ngResource'
]
)
.factory('EbookSearchFactory',
function($resource){
return $resource(
'http://it-ebooks-api.info/v1/search/:query',
{},
{
query :
... |
import {
GetCalls, NewCall, GetCall, UpdateCall,
} from '../services/calls';
import { Emitter, ErrorEmitter } from '../../../helpers/emitter';
class CallsController {
/**
* @description Pega todos as ligações do banco.
* @param {Object} req
* @param {Object} res
*/
static async Get(req, res) {
Ob... |
/**
* Created by Administrator on 2017/5/25.
*/
app.service("pageChange", function(){
return function($scope){
//数据总长度
$scope.Pageall = $scope.alldata.length;
//总页码
$scope.bars = Math.ceil($scope.Pageall/$scope.bar);
$scope.arr = [];
$scope.bools=false;
if(!$scop... |
import { css } from "react-emotion";
const style = css`
.ui.dropdown {
cursor: pointer;
position: relative;
display: inline-block;
outline: none;
text-align: left;
-webkit-transition: width 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: width 0.1s ease, -webkit-box-shadow 0.1s ease;... |
import React, { Component } from 'react'
import About from '../About/About'
import Contact from '../Contact/Contact'
import {
BrowserRouter as Router,
Switch,
Route,
Link,
NavLink
} from "react-router-dom";
export default class Header extends Component {
render() {
return (
<Route... |
import React, { useContext} from 'react';
import * as S from './styled';
import Context from '../../context';
import { filterOptions, orderOptions } from './filterOption';
const FilterBar = () => {
const { filter, setFilter } = useContext(Context);
const { name, type, orderBy } = filter;
const handleChange = ({... |
function switchSectionOfPage(x) {
let users = document.getElementById("users-div");
let productsDigital = document.getElementById("productsDigital-div");
let productsPhysical = document.getElementById("productsPhysical-div");
let categories = document.getElementById("categories-div");
let tags = doc... |
var $button = $("a.download-button"); //finding the matching buttons on the DOM
$button.on('click', function() { // adding click event handler to the buttons
var $clickedButton = $(this); // storing the current button so we can reference to it later in timeout fn
var $href = $(this).attr("href");
$clickedB... |
import { createStore } from 'vuex'
import cart from './cart'
import product from './product'
import nav from './nav'
export default createStore({
namespaced: true,
modules: {
nav,
cart,
product,
}
}) |
/*
* Copyright (c) 2014.
*
* @Author Andy Tang
*/
(function whereIt(it, LinkedHashMap) {
'use strict';
function executeTest(description, test, matchedArguments) {
var args = extractArguments(matchedArguments);
it(createTestDescription(description, args), function executeTest() {
... |
import React from 'react';
import {View, Image, Text, Dimensions} from 'react-native';
let {width, height} = Dimensions.get('window');
const Header = (props) => {
console.log(props)
return (
<View
display={props.display ? 'flex' : 'none'}
style={{
width: width,
... |
import {HOME_PAGE} from './actionTypes';
const initialState = {
pages: {},
};
export default (state = initialState, action) => {
switch(action.type) {
case HOME_PAGE:
return {
...state,
pages: action.pages
}
default:
return sta... |
import React from 'react';
import { useSelector, } from 'react-redux'
const Recap = (props) => {
const cart = useSelector(state => state.panier.cart);
const handleRedirect = () => {
props.history.push('/payment')
}
return (
<>
<div className="corps">
... |
const express = require('express');
const router = express.Router();
const bcrypt = require('bcryptjs');
const { COOKIE_USER_TOKEN, JWT_SECRET } = require('../../config/config');
const jwt = require('jsonwebtoken');
const auth = require('../../middleware/authentication');
const {
loginRateLimiter,
loginSlowDown,
... |
const STYLE = require('./assets/css/style.scss')
console.log(STYLE)
console.log('hello world')
|
var _App;
Glagol.events.once('changed', function () {
console.debug('edited workspace updater');
if (_App) _App.API('Workspace/Refresh');
});
module.exports = function (App, newState) {
_App = App;
console.debug("updating workspace:", newState);
var newFrames = []
, userId = __.Auth.model().UserId... |
import React, { Component } from 'react';
import { Switch, BrowserRouter, Route, browserHistory, Link } from 'react-router-dom';
import { Container, Panel } from '@extjs/ext-react';
Ext.require('layout.fit')
class App extends Component {
render() {
return (
<BrowserRouter>
<Con... |
var pcetiq, escpag
var rs = require('readline-sync')
var pcetiq = rs.questionInt('Qual o preco do produto? ')
console.log('ATENCAO! TEMOS AS SEGUINTES FORMAS DE PAGAMENTO, ESCOLHA UMA:')
console.log('1 - A vista em dinheiro ou cheque - 10% DE DESCONTO')
console.log('2 - A vista no cartao de credito - 15% DE DESCONTO'... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { dispatchAddTodo } from '../store/todos'
import "../firestore"
import * as firebase from "firebase"
class DisconnectedTodoForm extends Component {
constructor(props) {
super(props)
this.state = {
co... |
import {
camelCaseObjectProperties, camelCaseArrayItems, convertToCamelCase,
capitalize
} from './stringUtils';
describe('capitalize', () => {
it('capitalizes a string', () => {
expect(capitalize('hello')).toEqual('Hello');
})
});
describe('convertToCamelCase', () => {
it('converts a string formatted wi... |
const pactum = require('../../src/index');
describe('Interaction', () => {
it('Stores - Path Params', async () => {
await pactum.spec()
.useInteraction({
request: {
method: 'GET',
path: '/api/projects/{id}',
pathParams: {
id: '101'
}
},
... |
const { mailGenerator, transporter } = require('../config/mail');
const { APP_URL, BASE_PATH } = require('../config/env');
const base = `${APP_URL}${BASE_PATH}`;
/**
* Send a verification mail to this user on signup
* used at: user-controller
*/
exports.sendVerificationMail = async (user, token) => {
// send mai... |
/*
We now write addrof using fl_read from step1 (We already got an address in step1, we're just making it into a function),
and fakeobj using fl_write. We test fl_write by putting a real object in the place of another in an array,
and then use fakeobj to make an object where a real object lives as another t... |
import React, {useState} from 'react';
import {View, Image} from 'react-native';
import {SvgXml} from 'react-native-svg';
import TextInputWithLabel from '@aaua/components/common/Inputs/TextInputWithLabel';
import okGreen from '@aaua/assets/ok_green';
import okGrey from '@aaua/assets/ok_grey';
import styles from './s... |
"use strict";
jQuery(function ($) {
var show_num = [];
draw(show_num);
var $autologin = $("#autologin");
var cook_uname = Cookie.getCookie("uname");
var cook_upsd = Cookie.getCookie("upsd");
console.log(cook_uname, cook_upsd);
if (cook_uname) {
$.ajax({
type: "POST",
... |
var searchData=
[
['neighbors',['neighbors',['../classlsd__slam_1_1_frame.html#ac0beb1665cd6caecfef8f6103203c147',1,'lsd_slam::Frame']]],
['nextstereoframeminid',['nextStereoFrameMinID',['../classlsd__slam_1_1_depth_map_pixel_hypothesis.html#a6de9a990e0a4cbbd2ce810503996f76c',1,'lsd_slam::DepthMapPixelHypothesis']]... |
../../../../shared/src/App/sagas.js |
if (!window.sap) window.sap = {};
//TODO temporary workaround for missing console log in child window
if (!window.iab) {
window.iab = {};
}
if (!iab.log) {
iab.log = function (message) {
//interferes with parent/child communication
//triggerEvent('LOG', JSON.stringify({msg:mes... |
const UserBox = require('./schema_user');
const mongoose = require('mongoose');
mongoose.Promise = require('bluebird');
mongoose.connect('mongodb://localhost:27017/SnippetOrgan');
function handleSuccess(){
console.log('Your user has been created and saved!');
};
function handleError(err){
console.log(err)
};
Us... |
let delay = 500
export default {
bind: function (el, binding, vNode) {
if (typeof binding.value !== 'function') {
// eslint-disable-line
const compName = vNode.context.name
let warn = `[longclick:] provided expression '${binding.expression}' is not a function, but has to... |
// 将错误码作为一个文件模块,该文件模块中包含错误码,错误码对应的错误信息,以及日志对应的模块信息
//error num
var ERR_NUM={
'RET_SUCC' : '0',
'RET_ERR' : '-1'
}
// error message
var ERR_MSG={
'0' : 'success',
'-1' : 'error'
}
// controller
var LOG_CONTR={
'SERVER' : 'server',
'API' : 'api',
'CONTR' : 'controller',
'DB' : 'database'
}
function getMsg(er... |
var net = require('net');
var strftime = require('strftime');
var server = net.createServer(function(socket){
var time = new Date();
var write = strftime('%F %H:%M', time);
socket.write(write);
socket.end('\n');
})
server.listen(process.argv[2]);
|
import React from 'react'
import { connectStateResults } from 'react-instantsearch-dom'
const CustomResults = connectStateResults(
({ searchState, searchResults, children }) => {
if (Object.keys(searchState).length === 0 || searchState.query === '') {
return null
}
let content = (<div>No results h... |
import Sequelize from "sequelize";
import { sequelize } from "../../services/sequelize";
import UserModel from "../user/db_model";
export default class FriendModel extends Sequelize.Model {
static async approveRequestQuery(user_id, friend_id) {
return sequelize.query(`
START TRANSACTION;
DELETE FROM "r... |
var functions________________3________8js____8js__8js_8js =
[
[ "functions________3____8js__8js_8js", "functions________________3________8js____8js__8js_8js.html#a27cd65e77677225ee94d0e862ebf43ef", null ]
]; |
const ModelResponses = require('../app/model/modelresponses');
const config = require('config');
const Error = ModelResponses.Error;
const jwt = require('jsonwebtoken') // ใช้งาน jwt module
const fs = require('fs') // ใช้งาน file system module ของ nodejs
// สร้าง middleware ฟังก์ชั่นสำหรับ verification token
const ... |
import React from 'react';
import {Header} from '../components/header/Header';
import {Container} from '../templates/container/Container';
import {Link, graphql} from 'gatsby';
import styles from '../styles/global.module.scss';
import blogStyles from './blog.module.scss';
import Footer from '../components/footer/Footer... |
/**
* Returns the intersection of two arrays
*
* @param {*} array1
* @param {*} array2
*/
const intersectionOf = (array1, array2) => {
return array1.filter((element) => array2.includes(element))
}
module.exports = {
intersectionOf: intersectionOf
} |
/*
* @Author: Waylon
* @Date: 2019-05-26 16:01:12
* @Last Modified by: Waylon
* @Last Modified time: 2019-05-26 16:20:23
*/
// 基本定义和生成实例
{
class Parent{
constructor(name='mukewang'){
this.name=name;
}
}
let v_parent=new Parent('v');
console.log('构造函数和实例',v_parent)//构造函数和... |
import React, { Component } from 'react';
import './column_section.css';
class Column_section extends Component{
constructor(props){
super(props);
this.state = {
bigtitle : this.props.sections.bigtitle,
sections : this.props.sections.sections,
id : this.props.id
... |
import React from 'react';
import PropTypes from 'prop-types';
import DescriptionEntry from './descriptionEntry';
const DescriptionList = ({ descriptions }) => (
<div>
<ul className="unordered-list spacing-none">
{descriptions.map(description =>
(<DescriptionEntry
description={description... |
/*
* @lc app=leetcode.cn id=337 lang=javascript
*
* [337] 打家劫舍 III
*/
// @lc code=start
/**
* Definition for a binary tree node.
* function TreeNode(val, left, right) {
* this.val = (val===undefined ? 0 : val)
* this.left = (left===undefined ? null : left)
* this.right = (right===undefined ? null ... |
function carregaInfo(){
// recupero do localStorage arquilo que eu armazenei
var strUser = localStorage.getItem("userHE");
// vou converter essa string para um objeto e manipulá-lo
var objUser =JSON.parse(strUser);
var img = `<img src="${objUser.linkfoto}" width="100%">`;
var info = `Nome:... |
import React from "react";
import { storiesOf } from "@storybook/react";
import "../src/css/tailwind.css";
import { Breadcrumb } from "../src/index";
import { withInfo } from "@storybook/addon-info";
const stories = storiesOf("Breadcrumb", module).addDecorator(withInfo);
const data = [{ text: "hello", link: "http://g... |
import dotenv from "dotenv";
dotenv.load({silent: true});
export const MONGODB_URL = process.env.MONGODB_URL || "mongodb://localhost:27017/test";
export const SENSORS_COLLECTION = process.env.SENSORS_COLLECTION || "sensors";
export const LOG_LEVEL = process.env.LOG_LEVEL || "info";
|
function getFiles(container, callback) {
$.get('http://conv2.punchy.com:9123/container/' + container + '/list', function(data) {
callback(data);
});
}
function selectedFile(file) {
var $el = $(".file-" + file.id);
var $size = $el.find(".filesize"),
$actionbar = $el.find(".fileaction");
}
function showAddFile(... |
/**
* 促销管理/选择商品或品类
*/
import React, { Component, PureComponent } from 'react';
import {
StyleSheet,
Dimensions,
View,
Text,
Button,
Image,
TouchableOpacity,
ScrollView
} from 'react-native';
import { connect } from 'rn-dva';
import Header from '../../components/Header';
import Co... |
function Socket(url, name, userId, type) {
var connection = null;
var user = { nickname: name, id: userId, type: type };
this.connect = function (callback) {
connection = io.connect(url);
connection.on('connect', function () {
if (callback)
callback();
... |
import React from 'react';
import initialData from './initial-data';
import Column from './innerComponents/Column';
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
import styled from 'styled-components';
const Columns = styled.div`
background-color: skyblue;
padding: 20px;
`;
class BDnD extends Re... |
/*
============================================
; Title: Discussion 5.1
; Author: Sarah Kovar
; Date: 12 January 2020
; Modified By Micah Connelly
; Description: This program utilizes an array
; that contains two errors.
;===========================================
*/
// import
const header = require('../week-2/header... |
/**
* Created by kyle on 2016-07-20.
*/
$(document).ready(function () {
$('#SMPC-fig1').highcharts({
chart: {
type: 'column',
},
title: {
text: 'SMPC Historical Perspective' // TITLE
},
plotOptions: {
column: {
stacking: '... |
import React, { useState } from "react";
export default function WeatherTemperature(props) {
const [unit, setUnit] = useState("celsius")
function convertFahrenheit(event) {
event.preventDefault();
setUnit("fahrenheit");
}
function convertCelsius(event) {
event.preventDefault();
... |
import React from "react";
import axios from "axios";
import SideListContent from "../SideListContent";
class SideList extends React.Component {
constructor(props) {
super(props);
}
render() {
const dumList = this.props.projectData;
console.log("dumList", dumList);
const probList = dumList.filte... |
const inquirer = require("inquirer");
const SQLmain = require('./SQLmain.js');
const clear = require("clear");
const {table} = require('table');
let run = new SQLmain();
/**
* Supervisors prototype that runs the query to display in a table the PRODUCT SALES sorted by DEPARTMENT.
*/
SQLmain.prototype.getPSales = fun... |
var express = require('express');
var router = express.Router();
var userModel = require('../model/users')
var jwt = require('../utils/jwt')
var md5 = require('md5');
//用户注册
router.post('/regist', function (req, res, next) {
// var username = req.body.username
// var password = req.body.password
var { username... |
var app = {
mode: null,
initialize: function() {
this.bindEvents();
},
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
onDeviceReady: function() {
window.plugins.insomnia.keepAwake();
app.updateStatus('Checking if wifi is tu... |
// Given an integer numRows, return the first numRows of Pascal's triangle.
// In Pascal's triangle, each number is the sum of the two numbers directly above it as shown:
// Input: numRows = 5
// Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]
// Input: numRows = 1
// Output: [[1]]
var generate = function(numRows... |
import AethonDOM from 'aethon-dom'
import Aethon from 'aethon'
import App from './App.js'
AethonDOM.render( < App / > , document.getElementById('root')) |
const assert = require('assert');
let x = 0;
let y = 0;
function foo() {
return x++ < 10;
}
while (foo()) {
if (y++ > 10) {
assert(false);
}
}
assert.equal(x, 11);
|
import { useRef, useState, useEffect } from 'react';
import classNames from 'classnames';
import { Transition } from 'react-transition-group';
import Footer from 'components/Footer';
import Divider from 'components/Divider';
import { numToMs, msToNum } from 'utils/style';
import { useWindowSize, useScrollRestore } from... |
import React from 'react'
import '../css/myInfo.scss'
import avatar from '../static/home/头像.png'
import touxian from '../static/home/小图标/头衔.png'
class MyInfo extends React.Component{
render() {
return(
<div id={'myInfo'}>
<img className={'avatar'} src={avatar} alt={'ssf'}... |
module.exports = function(config) {
config.set({
browsers: ['PhantomJS'],
frameworks: [
'jasmine-jquery',
'jasmine',
'browserify',
],
files: [
//'src/scripts/**/*.js',
//'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'test/**/*.spec.js',
{
pattern: 'test/client/fixtures/*.h... |
"use strict";
var _mongoose = _interopRequireWildcard(require("mongoose"));
var _bcrypt = _interopRequireDefault(require("bcrypt"));
var _Error = _interopRequireDefault(require("../helpers/Error.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequ... |
// setTimeout 일정 시간이 지난 후 함수를 실행
setTimeout(function fn3sec(){
console.log(3)
}, 3000)
function showName(name){
console.log(name);
}
setTimeout(showName, 2000, 'Mike')
// setInterval 일정시간 간격으로 함수를 반복
const tId = setInterval(showName, 1000, 'Drake')
clearInterval(tId);
// clearTimeout(); 중단
let num = 0;
functi... |
window.sberCareChat.init({
startForm: 'Bot', // 'Chat' | 'Icon' | 'Bot' | 'Elena' | 'Conversations'
conversations: ['Bot'], //каждый должен быть описан в конфиге | 'Elena'
applicationName: 'sberCareChat', // для вызова публичных методов
mainBundlePath: 'https://sbchat.netlify.app/dist/latest/',// путь д... |
angular.module('starter.controllers', [])
.controller('AppCtrl', function($scope, $ionicModal, $timeout) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page is active (for example, to refres... |
$(function() {
$('.delete').click(function() {
confirm("Are you sure to delete it?");
});
var checks = document.getElementsByTagName("paper-checkbox");
var flag = false;
checks[0].onclick = function () {
if (!flag) {
for (var i = 1; i < checks.length; i++) {
checks[i].checked = true;
flag = true;
... |
var cloudinary=require('cloudinary').v2;
cloudinary.config({
cloud_name:'eaa04168',
api_key:'272569683349881',
api_secret:'Cdqg4M48LO5NrKHU3c-wcXZ669A'
});
exports.uploadImageToCloudinary=async(file,err)=>{
// console.log('hhhhhhhhhhhs')
var result= await cloudinary.uploader.upload(file);
return result;
} |
import Vue from 'vue'
import VueRouter from 'vue-router'
import search from '../components/search.vue'
import weather from '../components/weather.vue'
import details from '../components/details.vue'
Vue.use(VueRouter)
var router = new VueRouter({
routes: [
{
path: '/',
component: we... |
const options = {
name: 'test',
width: 1024,
height: 2048,
colors: {
border: 'black',
bg: 'red'
},
makeTest: function(){
console.log("Testo");
}
};
options.makeTest();
const {border, bg} = options.colors;
console.log(bg);
console.log(Object.keys(options).length);
for (let key in optio... |
import { createGlobalStyle } from 'styled-components'
export const GlobalStyles = createGlobalStyle`
html {
scroll-behavior: smooth;
--ranColor: ${({colorHex}) => colorHex};
}
/* font-family: 'Spectral', serif;
font-family: 'Work Sans', sans-serif; */
* {
box-sizing: borde... |
import React, { Component } from 'react'
import Loadable from 'react-loadable'
import { HashRouter as Router, Route } from 'react-router-dom'
import { hot } from 'react-hot-loader'
const Home = Loadable({
loader: () => import('./pages/Home'),
loading: () => null
})
const About = Loadable({
loader: () => import(... |
import React from 'react';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
import 'react-tabs/style/react-tabs.css';
import { Main, OnHold, Active, Inactive, Resigned } from '../admin/tabs'
const Admin = () => {
return (
<Tabs>
<TabList>
<Tab>Main</Tab>
<Tab>On Hold</Tab>
... |
export { default as EditTemplate } from './EditTemplate';
export { default as EditTemplateInfo } from './section/EditTemplateInfo';
export { default as EditTemplateTag } from './section/EditTemplateTag';
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.