text stringlengths 7 3.69M |
|---|
/*
For an integer k rearrange all the elements of the given array in such way, that:
all elements that are less than k are placed before elements that are not less than k;
all elements that are less than k remain in the same order with respect to each other;
all elements that are not less than k remain in the same or... |
var num1 = '99.5';
var num2 = 15;
console.log(num1 + num2);
var i =0;
for (var i = 0; i <= 10; i++){
console.log(i);
}
var name = 'false';
console.log(typeof name);
// current time
var today = new Date;
var today = today.getHours() + '' + today.getMinutes() + ':' + today.getSeconds() + ':'
console.log(today); |
// Copyright 2017 Google 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 law or agreed to in ... |
const axios = require('axios');
const cheerio = require('cheerio');
const path = require('path');
const fs = require('fs');
const sanitizeFileNameLibrary = require('sanitize-filename');
const HOST = 'https://docs.mongodb.com';
const INDEX = `${HOST}/manual/`;
const CSS_URL = `${HOST}/manual/docs-tools/mongodb-docs.css... |
const Tasks = require('./models')
const mongoose = require('mongoose');
const bp = require('body-parser');
module.exports = {
readAll: function(req, res) {
Tasks.find({}, function(err, data) {
res.json(data);
})
},
readOne: function(req, res) {
Tasks.findOne({_id: req.pa... |
function player() {
this.Img=new Image();
this.Img.src="img/player.png";
this.x=225;
this.y=420;
this.health=3;
};
player.prototype.update=function(){
if ((keys[37] || keys[65])&& this.x>0) this.x -= 5;
if ((keys[39] || keys[68])&& this.x<450) this.x += 5;
} |
import React from "react";
import Home from "./Home";
test("renders Home component successfully", () => {
<div>
<Home />
</div>;
});
Home;
|
import Hooks from './Hooks';
import Context from './Context';
export const Snippets = [
{ name: 'Hooks', snippets: Hooks },
{ name: 'Context', snippets: Context }
]; |
const reverse = word => {
let reversed = "";
for (i = word.length; i > 0; i--) {
reversed += word[i - 1];
}
console.log(reversed);
};
const reverseAllWords = data => {
words = data.slice(2);
for (const word of words) {
reverse(word);
}
return;
};
reverseAllWords(process.argv);
|
const RouteCheck = require("./route-check");
const Read = require("./read");
const Deserialize = require("./deserialize");
const Check = require("./check");
const Validate = require("./validate");
const Write = require("./write");
const Serialize = require("./serialize");
const Respond = require("./respond");
module.e... |
import React from 'react';
import { Page, FilmBox, FilmInfo, FilmLabel, FilmLabelBox, FilmPoster} from './Film.styles.js';
const Film = ({data}) => (
<Page>
<div>
{
data!=null ?
data.Response === 'True' ?
(
<FilmBox>
{
data.Poster !== 'N/A' ?
<FilmPoster src={data.Poster}... |
console.log('hello,parcel')
console.log('hello,world')
console.log('hello,dh') |
//1
let recup = document.querySelectorAll("#object *");
console.log(recup);
//2
let obj = {
nom: "Cam",
age: 24
}
console.log(Object.keys(obj));
//3
for (let elem in obj){
console.log(elem);
}
//4
for (let elem in obj) {
console.log(obj[elem])
};
//5
let table = Object.values(object);
table.forEach(... |
const express = require ('express');
const app = express();
app.get('/',(req,res) => res.json ('API is work'));
const PORT = process.env.PORT || 5000;
app.listen(PORT,() => console.log(`Server running on PORT ${PORT}`)); |
// ================================================================================
//
// Copyright: M.Nelson - technische Informatik
// Die Software darf unter den Bedingungen
// der APGL ( Affero Gnu Public Licence ) genutzt werden
//
// weblet: warehouse/purchase/delivery/detail... |
$( function() {
$( "#tabs" ).tabs();
$("#clearThisCalendar").click(function() {
for(var j=0; j<4; j++)
for(var i=0; i<7; i++) {
$('#catalog_chk_'+j+"_"+i).attr('checked', false);
}
$("#durationHour").val("0");
$("#durationHour").val("0");
$("#startHour").val("0");
$("#startMinute").val("0"... |
import React, { useState } from 'react';
import Nav from 'react-bootstrap/Nav';
import styled from "styled-components";
import { Login } from './Login';
import { Register } from './Register';
import cookieCutter from 'cookie-cutter';
import axios from "axios";
// var a=function(){
// console.log('hello');
// }
// v... |
export default {
now: 'Ahora',
seconds: '%ds',
minutes: '%dmin',
hours: '%dh',
days: 'D MMM.',
years: 'D MMM. YYYY'
} |
/**
MODULOS EXPRESS
**/
let logger = require(process.cwd() + '/utils/logger.js'); //gerador de logs
let express = require('express');
let Router = express.Router();
let utilsFunctions = require('../utils/functions');
/**
CONEXAO DB
**/
let db = require('../config/connect');
let mysql = require('mysql');
let Connectio... |
const designs = [{
name: 'Simple Homepage',
folder: 'simple-homepage1'
}] |
export class Categories {
constructor(categoriesConfig) {
this.categoriesConfig = categoriesConfig;
const params = new URLSearchParams(window.location.search);
const category = params.get('category');
const subCategory = params.get('sub-category');
this.selectedCategory = category;
this.sel... |
import Layout from "../../components/Layout";
import Head from "next/head";
import Property from "../../components/Property";
import NextButton from "../../components/NextButton";
import CodeDisplay from "../../components/CodeDisplay";
import App from './codeSamples/step-03/App.txt';
import AppView from... |
const MongoClient = require('mongodb').MongoClient;
const Logger = require('mongodb').Logger;
const assert = require('assert');
let db;
let URL;
if (process.env.NODE_ENV !== 'development') {
URL = `mongodb://${process.env.DB_USER}:${process.env.DB_PASS}${process.env.DB_HOST}${process.env.DB_NAME}`;
} else {
URL =... |
var fs = require('fs');
var path = require('path');
var os = require('os');
var execSync = require('child_process').execSync;
var pattern = process.argv[2];
var directories = fs.readdirSync(path.join(process.cwd(), 'test'))
.filter(name => !path.extname(name));
if (pattern) {
directories = directori... |
/*global define*/
define([
'jquery',
'underscore',
'backbone',
'app',
'marionette',
'bootstrap'
], function ($, _, Backbone) {
'use strict';
var AdminOperationItemView = Backbone.Marionette.ItemView.extend({
tagName: 'tr',
template: 'admin-operation-item'
});
... |
const user = new APIManager
const renderer = new Renderer
$("#load").on("click", () => {
user.userData()
user.kanye()
user.meat()
user.users()
})
$("#display").on("click", () => {
renderer.renderUserData(user.data.userInfo)
renderer.renderKanye(user.data.kq)
renderer.renderMeat(user.data.m... |
import axios from "axios";
export const GET_ALL_TRIPS_REQUEST = "GET_ALL_TRIPS_REQUEST";
export const GET_ALL_TRIPS_SUCCESS = "GET_ALL_TRIPS_SUCCESS";
export const GET_ALL_TRIPS_ERROR = "GET_ALL_TRIPS_ERROR";
export const ADD_TRIP_REQUEST = "ADD_TRIP_REQUEST";
export const ADD_TRIP_SUCCESS = "ADD_TRIP_SUCCESS";
expor... |
let a = r;
|
var switchList = localStorage.getItem('switchList-ms'); //记录switch开关状态(数组)
var alarmTypeList = []; //记录开关为true时的报警类型值
var currentFreshTime = localStorage.getItem('currentFreshTime'); //默认刷新时长
//console.log(switchList);
mui.init({
swipeBack:false
});
mui.ready(function(){
if(!switchList){
switchList = [... |
const Users = require('./users.js');
const Posts = require('./posts.js');
class App {
constructor() {
this.users = new Users();
this.users.getUsers().then(data => {
data.forEach(this.card, this)
}, this);
}
card(item) {
var el = document.createElement('li');
el.setAttribute('id', item... |
let isDragging = false;
document.addEventListener('mousedown', function (event) {
let dragElement = event.target.closest('.draggable');
if (!dragElement) return;
event.preventDefault();
dragElement.ondragstart = function () {
return false;
};
let coords, shiftX, shiftY;
startD... |
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
import firebase from '../../firebase';
export const verifyAuthStatus = createAsyncThunk('user/verifyAuthStatus', async () => {
const user = await firebase.verifyAuth();
return {
email: user?.email,
id: user?.uid,
};
});
const userSlice ... |
//Faça um programa que calcule a média simples (aritmética) de 3 valores quaisquer.
var assert = require('assert')
function media( firstNumber, secondNumber, thirthNumber){
let media = (firstNumber + secondNumber + thirthNumber) / 3
return media;
}
try {
assert.equal(7, media(6, 7, 8), "deve retornar a mé... |
if (process.env.NODE_ENV !== 'production') {
require('dotenv').config();
}
const express = require('express');
const nodemailer = require('nodemailer');
const router = express.Router();
// Contact form
router.post('/', async (req, res) => {
try {
const { contactName, contactEmail, contactMsg } = req.body;
... |
/*
* Mpchannel Routes
*
* This contains defalut Mpchannel Route for the API.
*/
import { Router } from 'express';
import * as MpchannelController from './controller';
const MpchannelRouter = new Router();
// Get all Mpchannels
MpchannelRouter.route('/mpchannels').get(MpchannelController.getMpchannel);
// Get one Mp... |
import React from 'react';
import renderer from 'react-test-renderer';
import SearchParams from '../../Containers/SearchParams';
test('should correctly render SearchParams', () => {
const component = renderer.create(<SearchParams />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
|
// using the ++ to go up by 1 and the -- to go down by 1
let gainedDollar = 3;
let lostDollar = 50;
gainedDollar ++;
console.log(gainedDollar) //should display 4
lostDollar --;
console.log(lostDollar) //should display 49
|
const express = require('express');
const apiRoutes = express.Router();
//Traemos el modelo
const c_clientes = require('./api.model');
apiRoutes.route('/add-clientes').post(function (req, res) {
let cliente = new c_clientes(req.body);
cliente.save()
.then(cliente => {
res.status(200).json(... |
(function() {
// 这些变量和函数的说明,请参考 rdk/app/example/web/scripts/main.js 的注释
var imports = [
'rd.services.MenuService'
];
var extraModules = [ ];
var controllerDefination = ['$scope', 'MenuService', 'EventService', 'EventTypes', main];
function main(scope, MenuService, EventService, Ev... |
import React, { Component } from 'react';
import './App.css';
import Footer from './components/footer';
import Header from './components/header';
import User from './components/user';
class App extends Component {
constructor() {
super();
this.state = {
data: [],
};
}
componentDidMount() {
... |
/**
* Created by rs on 08/01/17.
*/
import React, {Component} from 'react'
import CommonAddComponent from '../common/CommonAddComponent'
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton'
import {redirect} from '../utils'
import {ListItem} from 'material-ui/List'
impor... |
import { BOOK_DBSEARCH_REQUEST, BOOK_DBSEARCH_SUCCESS, BOOK_DBSEARCH_FAILURE } from "./constants";
import { BOOK_DBDELETE_REQUEST, BOOK_DBDELETE_SUCCESS, BOOK_DBDELETE_FAILURE } from "./constants";
import { BOOK_DBADD_REQUEST, BOOK_DBADD_SUCCESS, BOOK_DBADD_FAILURE } from "./constants";
import { BOOK_GAPI_SEARCH_REQUES... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsTextRotationNone = {
name: 'text_rotation_none',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.75 3h-1.5L6.5 14h2.1l.9-2.2h5l.9 2.2h2.1L12.75 3zm-2.62 7L12 4.98 13.87 10h-3.74zm10.37 8l-3-3v2H5v2h12.5v2l3-3z"/></... |
export const BASE_URL = 'http://www.omdbapi.com/';
//ENDPOINT
export const SEARCH_MOVIES = BASE_URL + '?type=movie&apikey=a1b5f9ec&s=';
|
// 基本用法
/**
* 参数是一个函数;
* 参数函数的参数有两个,第一个是用来触发 fulfilled 的 resolve 函数, 一个是用来触发 rejected 的 reject 函数;
*
* 这两个方法传参:
* resolve 方法传递成功的结果
* reject 方法传递 error 对象
*
* 返回一个 promise 对象,通过 then 方法来监听结果响应,第一个参数是响应 fulfilled 的方法, 第二个参数是响应 rejected 的方法;
*/
const isSuccess = true; // false
const p = new Promise(function... |
module.exports = () => {
const videos = document.querySelectorAll("video");
const audios = document.querySelectorAll("audio");
return [...videos, ...audios].map(el => el.src);
};
|
import React from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
const Suspense = React.Suspense;
//Lazy Component
const LazyLogIn = React.lazy( ()=> import('../Auth/LogIn/LogInComponent') )
const LazyRegister = React.lazy( ()=> import('../Auth/Register/RegisterComponent') )
const MainLazyC... |
import PropTypes from 'prop-types';
import { ImageGalleryList, ImageGalleryListItem } from './ImageGallery.styled';
import ImageGalleryItem from 'components/ImageGalleryItem';
const ImageGallery = ({ photos, onSelect }) => {
return (
<>
<ImageGalleryList>
{photos.map(({ id, largeImageURL, tags, we... |
import { storiesOf } from '@storybook/vue'
import { Alert, AlertIcon, AlertTitle, AlertDescription } from '..'
storiesOf('UI | Alert', module)
.add('Default Alert', () => ({
components: { Alert },
template: `
<div>
<Alert>Kiwi is the best Vue component library</Alert>
</div>
`
}))
... |
"use strict";
const hipri = require('./hipriext'),
lopri = require('./lowpriext'),
request = require('request');
lopri(request);
hipri(request);
request.get('http://google.com', function (err, resp, body) {});
|
const db = require("../data/db-config")
module.exports = {
find,
findByProjectId,
add
}
//GET
function find() {
return db("resources")
}
function findByProjectId(id) {
return db("resources")
.join()
.where({project_id:id})
}
function add(resource) {
return db("resources")
.insert(... |
export * from './BannerAnimation';
|
(function() {
//这是本控制器的ID,非常重要,不要和已有的控制器重名
var controllerName = 'NameEditorController';
//参考 main.js 中同名变量的说明
var imports = [
'rd.controls.BasicSelector',
];
var extraModules = [ ];
var controllerDefination = ['$scope', 'EventService', main];
function main(scope, Eve... |
'use strict';
const _MEASUREMENT_TYPE_METHOD_ENUM = [
'cost',
'systems',
'projects',
'modules',
'linesOfCode',
'other'
];
const _RELEASE_STATUS_ENUM = [
'Ideation',
'Development',
'Alpha',
'Beta',
'Release Candidate',
'Production',
'Archival'
];
class Validator {
checkEnum (validList, ... |
import Nominations from "../components/Nominations";
import SearchBox from "../components/SearchBox";
import Footer from "../components/Footer";
export default function Home() {
return (
<>
<head>
<title>Shoppie Awards</title>
</head>
<div className="container mx-auto p-10 w-full min-h-... |
//////////////////////////////////////////////////////////////////////////////////
// Initialisation
//////////////////////////////////////////////////////////////////////////////////
var renderer = new THREE.WebGLRenderer({
antialias: false,
});
renderer.setClearColor(new THREE.Color('#0c0c0c'), 1);
renderer.se... |
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import replace from 'rollup-plugin-replace';
import nodeResolve from 'rollup-plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import filesize from 'rollup-plugin-filesize';
const pkg = require('./package.json');... |
import React, { useState, useEffect } from 'react';
import { Container, Button, Jumbotron } from 'react-bootstrap';
import './landing.css'
function Landing({ updateStep }) {
useEffect(() => {
updateStep(0);
}
)
return (
<div className="Landing">
<Container>
<Jumbotron>
<h1 cl... |
// Declaration
class Car {
constructor(make,model,year){
this.make = make;
this.model = model;
this.year = year;
}
print(){
console.log(`${this.make} ${this.model} ${this.year}`);
}
}
let myCar = new Car('BMW', '751li', 2010);
myCar.print();
class SportsCar e... |
var $input = $("#input");
var $result = $("#result");
var keyups = Rx.Observable.fromEvent($input,"keyup").map(e => e.target.value).filter(text => text.length > 2);
var throttled = keyups.throttle(500);
var distinct = throttled.distinctUntilChanged();
|
var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.render('post', { title: 'Post' });
});
router.post('/', function (req, res, next) {
const data = req.body.entry;
const user = req.locals.user;
const username = us... |
import Application from "./core/Application.js";
import roomEvents from "./listeners/room.listener.js";
import mainRoutes from "./routes/main.js"
const application = new Application({
name: "Supervisor",
port: 3000,
version: 0.1,
created: () => {
application.registerIoListeners(roomEvents);
},
routes... |
//import anime class
const anime = new Anime;
//import UI
const ui = new UI;
// const searchCategory = document.getElementById('categories')
// const page = documen.getElementById('pages')
const selectInputs = document.querySelectorAll('select')
const paginate = document.querySelector('#pages');
selectInputs.forEach(... |
$(document).ready (function() {
});
$('button').on('click', function () {
var ingredient = $(this).attr("ingredient");
var queryURL = "https://tasty.p.rapidapi.com/recipes/detail/search?q=" +
ingredient + "&api_key=ac032b7765msh7b7ea8d251892bbp18630ejsnfccfef5696ae";
$.ajax({
url: queryURL,
met... |
var goods = {
regType: function () {
},
regDelete: function (e) {
$(e).parents('tr').remove();
},
newGoodsAdd: function (type) {
var goodsName = $('#goodsName');
var goodsPlace = $('#goodsPlace');
var goodsAmount = $('#amount');
if (goodsName.val() == "") {
alert("상품명을 입력해주세요");
goodsNa... |
import React, { Component } from 'react';
import NavBar from '../NavBar';
import ShowOrders from '../ShowOrders';
//bootstrap style imports
import Tabs from 'react-bootstrap/Tabs';
import Tab from 'react-bootstrap/Tab';
class Kitchen extends Component {
constructor() {
super();
this.state = {
... |
'use strict';
/*
* MIDDLEWARE: Get Existing User
*/
module.exports = function getExistingUserMiddleware (database, sharedLogger) {
// The actual middleware.
return async (message, adapter, _recUser, next/* , stop */) => { // _recUser will be undefined as this is the first middleware in the chain.
// Check if ... |
var Confidence = require('confidence');
var glob = require("glob")
var manifest = {
server: {
debug: {
request: ['error']
}
},
connections: [{
host: process.env.IP,
port: process.env.PORT || 8081,
labels: ['api']
}
],
plugins: []
}
var baseP... |
$(document).ready(function() {
$(".carousel").jCarouselLite({
auto: 3000,
speed: 1000,
});
});
|
const footerHtml =
`
<footer class="footer fixed-bottom py-3">
<div class="w-100 row">
<div class="mx-3 col">
<button class="btn btn-light align-middle mx-2" id="ghbutton">
Find me on <b>GitHub</b>
<img src="images/GitHub.png" height="20px"/>
</button>... |
(function() {
return function(request, script) {
//服务的第一行代码写在这里!
log('extra data:', request.extra);
var lib = require("app/example/server/mylib.js");
lib.hello(request.toWho);
//为了演示blockUI的效果,这里故意延迟返回
sleep(500);
return i18n('greetings', !!request.crossDomai... |
const twoSum = (arr, sum) => {
for (let i = 0; i < arr.length; i++) {
for (let x = i + 1; x < arr.length; x++) {
if (arr[i] + arr[x] === sum) return [i, x]
}
}
}
console.log(twoSum([1,2,3,4,5,6,7], 10)) |
// What if we need the length of the words separated by a space to be added at the end of that same word and have it returned as an array?
// Example(Input --> Output)
// "apple ban" --> ["apple 5", "ban 3"]
// "you will win" -->["you 3", "will 4", "win 3"]
// Your task is to write a function that takes a String and ... |
var DS_PO, DS_PO_Con, DS_PO_ChiTiet, DS_BangKe, DS_BangKe_Cap2;;
var PO_ID;
var detail_PO_Con_e;
var Path;
$(document).ready(function () {
document.oncontextmenu = function () { return false; }
$('#files_upload').kendoUpload({
async: {
autoUpload: false,
saveUrl: 'UploadFileV... |
Ext.define('Gvsu.modules.orgs.view.OrgsViewForm', {
extend: 'Gvsu.modules.orgs.view.OrgsForm'
}) |
import { describe, beforeEach, it } from "mocha";
import { assert, expect } from "chai";
import { window } from "./../../window";
import { Model } from "./../../../src/models/model.model";
describe("Model", () => {
let model;
beforeEach(() => {
model = new Model({
foo: null
});
... |
import React from "react";
import { Link } from "react-router-dom";
import AppContainer from "./AppContainer";
import Pie from "./pieChart";
import api from "../api";
import { useEffect, useState } from "react";
// import ReactSvgPieChart from "react-svg-piechart"
import { PieChart } from "react-minimal-pie-chart";
ex... |
/**
* Created by joffrey on 21/01/2016.
*/
$().ready(function () {
console.log(window.location.href);
var key = $.url('?idKey');
$.get('/details', {idKey: key})
.success(function(data){
$("#planTitle").text(data['plan']['propertyMap']['pTitle']);
$.each(data['exercises'], function(... |
var pageSize = 30;
var startDate = "";
var endDate = "";
var docWidth = 0;
var docHeight = 0;
Ext.define('GIGADE.ERRORLOG', {
extend: 'Ext.data.Model',
fields: [
{ name: 'rowid', type: 'int' },
{ name: 'log_date', type: 'string' },
{ name: 'Thread', type: 'string' },
{ name: 'Level'... |
import React from 'react';
import PropTypes from 'prop-types';
import labeled from './labeled';
function ArrayWidget(props) {
function renderChild(child, index) {
return (
<div>
<button
onClick={function remove() {
props.onChildRemove(index);
}}
>
-... |
import axios from 'axios';
export const fetchUser = (username) => {
return axios.get(`https://api.github.com/users/${username}`)
.catch(function (error) {
console.log(error);
})
};
export const fetchRepos = async (username) => {
return await axios.get(`https://api.github.com/users/${username}/repo... |
import React, { Component } from 'react';
import './Team.css';
import {NavBar} from "../component/AppBar"
import Team_member from "../component/Team_member"
import b06_1 from '../images/contributors/B06_1.png';
import b06_2 from '../images/contributors/B06_2.png';
import abroad_1 from '../images/contributors/abroad_1.p... |
import React, { PropTypes } from 'react';
const Framework = ({abbreviation, name, dragstart}) => (
<div draggable="true" onDragStart={dragstart} title={name}>
<svg width="50" height="50">
<g>
<circle cx="25" cy="25" r="20" fill="#00aede" stroke="#292c3e" />
<text x="25" y="30" fill="wh... |
const LineAPI = require('./api');
const { Message, OpType, Location } = require('../curve-thrift/line_types');
let exec = require('child_process').exec;
const myBot = ['u17102931d9ba9bb2cc0940d774cce06f','ucb0022613a97ff32657ebdea72b0dc56','uf649c932b1c25523ded0199b2d5d7e63','ua8d7ef4d1ad106fbf7625f3cb154c815'];
func... |
import React from "react";
import gsap from "gsap";
function Title(){
// title btn
const mouseEnterBtn = () => {
gsap.to('.box1__btn__hover', { x: '0' });
}
const mouseLeaveBtn = () => {
gsap.to('.box1__btn__hover', { x: '-100%' });
}
const mouseEnterBox2 = () => {
gsap.to('.box2__yellowDiv', { y: '0', ... |
import React from "react";
export default class ClassBasedComponent extends React.Component {
constructor() {
super();
this.state = {
timer: `${new Date().getHours()} : ${new Date().getMinutes()} : ${new Date().getSeconds()}`
}
setInterval(() => {
this.setSt... |
import React from "react";
import { func, bool } from "prop-types";
import { connect } from "react-redux";
import PopupMenu from "../middleComponents/PopupMenu";
import { positionType, defaultPosition } from "../propTypes";
import { hide } from "../actionCreators/userSettingPopup";
import { show, setup as setupModal } ... |
/**
* Created by doctorjj on 2017. 4. 23..
*/
//할당
var ab = function (test) {
console.log("123");
}
//인자
function aa(func) {
func("aa");
}
aa(function (e) {
console.log("콜백 함수");
console.log(e);
});
// //반환
function cc() {
return function () {
console.log('반환 함수 실행');
}
};... |
'use strict';
var _ = require('lodash');
var __ = require('hamjest');
var express = require('express');
var bodyParser = require('body-parser');
var LIBNAME = require('./library-name.js');
var fastcall = require('fastcall');
var path = require('path');
var ArrayType = fastcall.ArrayType
var Library = fastcall.Library... |
export const DescriptionContainer = {
data: function() {
return {
charLimit: 163,
charLength: 0,
showShadow: true,
nonRevealedStyle: {
height: '150px',
},
revealedStyle: {
height: 'auto',
}
... |
import React, {Component, Fragment} from 'react';
import './App.css';
import {BrowserRouter as Router, Switch, Route} from "react-router-dom"
import SingInRequired from "./pages/sing-in-required/sing-in-required"
import AccountDetails from "./pages/account-details/account-details"
import SingUpFirst from "./pages/sign-... |
import React, { useRef, useEffect, useState } from "react";
import { useSelector } from "react-redux";
import VideoPreviewModal from "../../CallDialogs/VideoPreviewModal";
const RemoteVideoPreview = () => {
const remoteVideoRef = useRef();
const { remoteStream } = useSelector((state) => state.call);
const [showMo... |
module.exports = {listeners: [
{
type: "startsWith",
query: ".clear",
callback: cls
}, {
type: "regex",
query: /^\.?cls/i,
callback: cls
}, {
type: "startsWith",
query: ".nest",
callback: cls
}
]};
function cls(reply, message){
var small_space = String.fromCharCode(65279, 32);
var big_space = String.fromCha... |
import { Col, Divider, Row } from "antd";
import Link from "next/link";
import * as React from "react";
import { FEATURE_IDS } from "../../common/defines";
import Container from "../other/Container";
export default function Banners({ containerType }) {
const [adsBanners, setAdsBanners] = React.useState([]);... |
// import $ from 'jquery';
// window.jQuery = $;
(function($) {
// Site title
if (wp && wp.customize) {
wp.customize('blogname', function(value) {
value.bind(function(to) {
$('.header-logo, .footer-logo').text(to);
});
});
wp.customize('header_logo', function(value) {
value.bi... |
(function(exports) {
var assert = {
isTrue: function(assertionToCheck) {
if (!assertionToCheck) {
throw new Error("Assertion failed: expected" + assertionToCheck + " to be true but got false");
} else {
console.log(" %c Assertion passed!: ",
'background: green; color: #b... |
var boggle = require('./src').boggle;
var Trie = require('./src/trie.js').Trie;
var expect = require('chai').expect;
describe("boggle", function () {
it("should find all major word kinds", function () {
expect(boggle([
['e', 'e', 'l'],
['m', 'l', 'b'],
['t', 'i', 'e'],
])).to.include.member... |
import { connect } from 'react-redux';
import ConfirmDialog from '../../../components/ConfirmDialog';
import {fetchJson, showSuccessMsg, showError} from '../../../common/common';
import {Action} from '../../../action-reducer/action';
import {getPathValue} from '../../../action-reducer/helper';
import {search} from '../... |
import React from 'react';
const Showcase = () => {
return (
<div>Showcase</div>
)
}
export default Showcase; |
var app = angular.module("tema1", []);
app.controller("lista", function($scope) {
$scope.pokemons = [
{
nome: 'Pikachu',
tipo: 'Eletrico '
},
{
nome: 'Mankey',
tipo: 'Lutador'
},
{
nome: 'Ekans',
tipo: 'Veneno'
},
{
nome: 'Pidgey',
tipo: 'Voador'
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.