text stringlengths 7 3.69M |
|---|
import React from 'react'
import {BsLinkedin,BsGithub,BsInstagram} from 'react-icons/bs'
const HeaderSocials = () => {
return (
<div className='header_socials'>
<a href='https://www.linkedin.com/in/amit-sagar-1a222418b/' target="_blank"><BsLinkedin/></a>
<a href='https://github.com/Amit-Sagar' t... |
Ext.ns('Cneport.ecss.goodsbills');
Cneport.ecss.goodsbills.LogisticsQuery = Ext.extend(Ext.Syis.lib.SyisQueryPanel, {
limitSize: 100,
type : null,
constructor: function(_config) {
if (_config == null) {
_config = {};
};
Ext.apply(this, _config);
var me = this;
var conditionItems = [{
layout: 'c... |
const { Schema } = require('mongoose');
const slug = require('slug');
const connection = require('../connections/mongoose/instance');
const { applyElasticPlugin, setEntityFields } = require('../elastic/mongoose');
const {
deleteablePlugin,
imagePlugin,
paginablePlugin,
pushIdPlugin,
referencePlugin,
reposit... |
import defaultSettings from './defaultSettings';
import ApiError from './ApiError';
import { contentTypes, headerNames, httpMethods, requestTypes } from './apiConsts';
const API_ACTION_FLAG = '@@API_ACTION';
const REQUEST_SUFFIX = '_REQUEST';
const REQUEST_FLAG = '@@API_REQUEST';
const SUCCESS_SUFFIX = '_SUCCESS';
c... |
/**
* Created by Administrator on 2016/6/20.
*/
var SaleHotTemplate={
SaleHotDetailTemp:function(data) {
var dom='<div class="cus_info_div">'+
'<div class="wid25 fl tc cus_name min_hei" title="'+data.nickname+'">'+data.nickname+'</div>'+
'<div class="wid20 fl tc min_hei">'+data.cre... |
/*
* 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 writing, software
* distribut... |
import React from 'react';
import './card.styles.css';
import { random } from 'node-forge';
export const Card = props => (
<div className='card-container'>
<img
alt='monster'
src={`https://robohash.org/${props.monster.id + 2}?set=set4&size=180x180`}
// src={`https://robohash.org/$... |
const {Router} = require('express');
const {check} = require('express-validator');
const { validateJWT,validateFields } = require('../middlewares');
const { existPublicationById, existUserById } = require('../helpers/database-validate');
const { getPublications,createPublication, getPublication, updatePublication, del... |
/*
* jquery scroll text js v1.0
* Copyright (c) 2015 fy98.com
* 实现文字跑马灯效果
*/
// 1、定义作用域:为插件定义私有作用域,外部代码不能直接访问插件内部的代码,插件内部的代码不污染全局变量
// 2、为jQuery扩展一个插件:为jQuery的实例添加一个扩展方法。该扩展方法可以接收一些参数。
// 3、设置默认值:为扩展方法设置默认值,一般会将默认属性对象定义为defaults。
// 使用$.extend(defaults,options)将默认值和传入的参数进行合并
// 4、支持jQuery的链式调用:循环把每个元素返回。
(funct... |
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import h from '../h';
import UserFollowBtn from './user-follow-btn';
import userVM from '../vms/user-vm';
const projectContributorCard = {
oninit: function(vnode) {
const userDetails = prop({}),
user_id = vn... |
$(document).ready(function() {
$('#letter-a a').click(function() {
$('#dictionary').load('a.html');
return false;
});
});
|
'use strict'
const bill = document.querySelector('.input--bill')
const numberOfPeople = document.querySelector('.input--people')
const tipAmount = document.querySelector('.tip-amount')
const total = document.querySelector('.total')
const resetBtn = document.querySelector('.btn--reset')
const buttons = document.querySe... |
const express = require('express');
const routes = express.Router();
const { User } = require('../model/personClass');
routes.get('/', (req, res) => {
res.render('index.html');
})
routes.get('/shedule', (req, res) => {
console.log(req.body);
res.render('shedule.html');
})
routes.post('/shedule', (req, res)... |
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom';
import axios from 'axios';
export class addPlayerLooking extends Component {
state = {
firstName: '',
lastName: '',
gender: '',
age: 0,
email: '',
phone: '',
ratingMixed: '... |
/**
*
* @description : car diagnostic system
* @link : http://sample.ir
* @author { Mahdi Imani }
* @email : imani.mahdi[a]gmail.com
* @copyright 'xxx Co., Ltd.'
*
*
* @version {1.0.0} - 2017/09/07 18:15
* @version {1.0.1} - 2017/09/12 09:30
*
*
*/
// =====| requirment |============... |
import React from "react";
import { Component } from "react";
import Major from "./UnrelatedMajor.js"
const stuff = [
{
name: "Computing",
rank: 15,
salary: 12,
desc: "COMP This is the description of this major. It does stuff, stuff, stuff, stuff, stuff, stuff, stuff, stuff, yes, yes, and yes.",
jobs: ["J... |
const urlParams = new URLSearchParams(window.location.search);
const artist = urlParams.get("country");
const url = `https://keadata-ece4.restdb.io/rest/golden-ratio-database?sort=country&q={"$distinct": "country"}`;
// API key
const key = { headers: { "x-apikey": "6151ddb6dfa7346e2f9690b9" } };
fetch(url, key)
.t... |
const express = require('express')
, router = express.Router()
, config = require('../config')
, users = require('../model/users')
;
/* GET users listing. */
router.get('/', function (req, res, next) {
users.selectAll (function (err, rows) {
if (err) next (err);
else res.render ... |
export const SET_SIGNUP_TYPE = 'SET_SIGNUP_TYPE';
export const SET_HOST_NAME = 'SET_HOST_NAME';
export const SET_HOST_NAME_BLURRED = 'SET_HOST_NAME_BLURRED';
export const SET_HOST_AGE = 'SET_HOST_AGE';
export const SET_HOST_AGE_BLURRED = 'SET_HOST_AGE_BLURRED';
export const SET_HOST_SEX = 'SET_HOST_SEX';
export const S... |
import DivisionDetails from './DivisionDetails';
export default DivisionDetails;
|
import cookieUtils from '@utils/cookie'
export default {
active: 1,
oneShow: false,
twoShow: false,
courseIdSign: '',
threeList: [],
allTeacher: [],
allCourseTeacherList: [],
courseStudyProgress: [],
courseStudyProgressSaccomplish: [],
activeShow: 1,
}
|
import React from 'react'
import { Card, Col } from 'antd'
function GridCards(props) {
return (
// 한 행에 최대 24개
<Col lg={6} md={8} xs={24}>
{/* <Card title={props.goodClsf} extra={<a ref="#">More</a>} style={{width: 300}} bordered={false}>
<p>{props.goodAbnm}</p>
... |
/**
* Created by diakabanab on 10/26/2016.
*/
define(["jquery", "chord/Positions"], function($, Positions) {
var Interface = function(container) {
this.element = $("<div>", {
"id": "Interaction"
}).appendTo(container);
this.element.on("mousedown", this.mouseup.bind(this));
... |
import React from 'react';
import { Link } from 'react-router-dom';
const Navbar = () => {
return (
<nav className="flex justify-between items-center h-16 bg-white text-black shadow-sm font-mono font-bold">
<Link to="/" className="pl-8">EGG</Link>
<div className="px-4 cursor-pointe... |
exports.m09 = (id, A187, tampilTanggal, whatsapp, youtube, tampilWaktu, instagram, nomer, aktif) => {
return `
❉──────────❉
*${A187}*
❉──────────❉
📆 *${tampilTanggal}*
📌STATUS BOT MK: *${aktif}*
━━━━━━━━━━━━━━━━━━━━━
╔══════════════╗
✯ MK MODS ✯
╚═══════════... |
$('#alert-message button.close').click(function() {
$('#alert-message').slideUp(200);
});
$('form .btn-submit').click(function() {
$.ajax({
url:$(this).parent().attr('action'),
type:'POST',
dataType:'json',
data:$(this).parent().serialize(),
success:function(data) {
if (data.status) {
$('#alert-mess... |
/**
* fetch 网络请求的header,可自定义header 内容
* @type {{Accept: string, Content-Type: string, accessToken: *}}
*/
import {Toast,Loading} from "./loading"
import NetInfo from "@react-native-community/netinfo"
import {Alert} from "react-native";
import CONF from "../conf/"
import User from "../conf/user";
const Ip=CONF['FETC... |
/* THE CANVAS HAS 400x200(x,y) PIXELS... EACH PIXEL EQUALS TO 1.75px*/
/* DECLARATIONS */
var minutes = 0;
var seconds = 0;
var wave = 0;
var start = false;
/* GAME EVENTS begin */
window.onload = function() {
// Called once at beggining
/*;
CreateEntity("enemy2", 100, 185);
randomizeColo... |
'use strict';
const _ = require('lodash');
const CliModule = require('../CliModule');
const Jira = require('../../jira/Jira');
const JiraInstanceDetails = require('../../jira/JiraInstanceDetails');
const Git = require('../../git/Git');
class jiraCliModule extends CliModule{
constructor(vorpal){
super(vorpal);
thi... |
import React from 'react';
import Icon from 'react-native-vector-icons/FontAwesome5';
import {View, Text} from 'native-base';
import PropTypes from 'prop-types';
import {percentage, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../Variables';
const IconList = ({name}) => {
const Fonts = percentage(SCREEN_WIDTH, 50);
const... |
import React from 'react'
import { StyleSheet, Platform, Image, Text, View } from 'react-native'
import Navigation from './navigation/Navigation'
import Firebase from './Helpers/Firebase'
import {Font} from 'expo'
export default class App extends React.Component {
constructor()
{
super()
}
componentWillMo... |
exports.sectionMutations = `
updateSectionDetails(courseId: String!, sectionIndex: Float!, sectionInput: SectionInput): Course
deleteSection(courseId: String!, sectionIndex: Float!): Course
addSectionToCourse(courseId: String!): Course
`;
|
app.controller('dashboardController', ['$scope', 'userFactory','topicFactory', "$location", function($scope, userFactory, topicFactory, $location){
$scope.newTop = {}
//creates a new Topic
$scope.newTopic = function(){
$scope.newTop.username = $scope.currentUser.name
$scope.newTop._user = $scope.currentUser... |
import { useState, useEffect } from "react";
import uuid from "react-uuid";
import Sidebar from "./components/Sidebar";
import Main from "./components/Main";
function App() {
const [notes, SetNote] = useState(localStorage.getItem('notes') ? JSON.parse(localStorage.getItem('notes')) : []);
const [activeNote, setAct... |
var status_8c =
[
[ "MenuStatusLineData", "structMenuStatusLineData.html", "structMenuStatusLineData" ],
[ "get_sort_str", "status_8c.html#ac8156953ab9d8f697ac86866bcd3b876", null ],
[ "status_format_str", "status_8c.html#a687a918a49621a9f1bef52801def2308", null ],
[ "menu_status_line", "status_8c.html#... |
const main = document.querySelector("main");
const voiceSelect = document.getElementById("voice");
const textarea = document.getElementById("text");
const readBtn = document.getElementById("read");
const toggleBtn = document.getElementById("toggle");
const closeBtn = document.getElementById("close");
const message =... |
var repeatTime = 0;
function func() {
}
function start(){
console.log("Timer start");
}
function stop(){
}
|
//alert("Check your zipper!");
//For asking a yes or no
//confirm("Are you sure that you want to proceed?");
//to capture the response
//var userResp = confirm("Are you sure that you want to proceed?");
//console.log(userResp);
var userResp = prompt("What is your name?");
console.log(userResp);
//Also correct =
//v... |
import React, { Component } from "react";
class Country extends Component {
state = {
title: this.props.title,
};
render() {
var cssClass = this.props.className + " btn btn-danger btn-sm";
return (
<button
onClick={() => this.props.onGuess(this.state.title)}
className={cssClass}... |
module.exports = (bh) => {
bh.match('title', (ctx) => {
ctx.tag('h1');
});
};
|
import { api } from './ApiConfig'
export const getAllPods = async () => {
try {
const response = await api.get('/pods')
return response.data
} catch (error) {
throw error
}
}
|
export function isEmpty(string) {
return string === null || string === "" || string === undefined;
}
export function isNotEmpty(string) {
return !isEmpty(string);
}
export function formatDate(date) {
let processDate = new Date(date),
month = "" + (processDate.getMonth() + 1),
day = "" + processDate.getD... |
//FlickrSwipe Takes photos from Flickr and pushes them into the DOM
var api_key = '[YOUR API KEY HERE]';
var photoset_id = '[YOUR PHOTO ALBUM ID HERE]';
var user_id = '[YOUR USER ID HERE]';
var url_photoset = 'https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=' + api_key + '&photoset_i... |
require('dotenv').config({ path: '../.env' })
const express = require('express');
const router = express.Router();
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const Joi = require('joi');
const Cloudant = require('@cloudant/cloudant');
const nanoid = require('nanoid');
const { validate_studen... |
var User = require('../models/User');
var userController = {
/*
Expects an object with the following format:
{
email: 'john@doe.com',
password: 'mypassword',
deviceToken: 'fadsiuahebasgndoidszdaioewfnroawen'
}
*/
create: function(body, cb) {
var user = new User({
email:... |
Ext.define('HSF.model.Speakers', {
extend: 'Ext.data.Model',
config: {
fields: ['firstName', 'lastName', 'img', 'shortDesc', 'description']
}
}) |
/**
* 命令式编程:将数组元素变成3倍
* @param {*} arr
*/
const triple = (arr) => {
let results = []
for (let i = 0; i < arr.length; i++) {
results.push(arr[i] * 3)
}
return results
}
/**
* 声明式编程:将数组元素变成3倍
* @param {*} arr
*/
const triple2 = (arr) => arr.map((currentItem) => currentItem * 3)
console.l... |
import React, { useState, useContext } from 'react';
import { GlobalContext } from './Context/GlobalState'
export const Add = () => {
const [text, setText] = useState('');
const [amount, setAmount] = useState(0);
const { Add } = useContext(GlobalContext)
const AddBokk = e => {
e.preventDefault()... |
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
* Time Complexity : O(n) -> Have to traverse through all nodes once to get the sum.
* Space Complexity: Max stack depth is O(D), where D is the depth of the tree.
*/
/**
* @param {... |
const Like = {
like: async function (userId, attachedId, type) {
return {
userId,
attachedId,
type,
}
},
LIKE_TYPES: {
TOPIC: 'topic',
REPLY: 'reply',
USER: 'user'
}
}
module.exports = Like
|
import React from 'react'
const Overlay = props => {
return (
<div className="overlay" style={props.canEdit ? { opacity: '1', zIndex: '1' } : null}>
{props.children}
</div>
)
}
export default Overlay
|
import React from 'react';
const Header = props => {
return (
<div className="navbar" id="navbar">
<div className="header-title">Robofriends</div>
{props.children}
</div>
);
};
export default Header;
|
export default {
'CODE_ERR_NETWORK': -1,
'CODE_OK': 0,
'CODE_ERR_APP': 1000,
'CODE_ERR_MSG': 1001,
'CODE_ERR_PARAM': 1002,
'CODE_ERR_NO_PRIV': 1003,
} |
import React from 'react'
import PhotoHeader from '../PhotoHeader'
import "./style.css"
const Profile = (props) => (
<div>
<PhotoHeader photo={props.photo} />
<h1 className="display-2">{props.petName}</h1>
<hr />
<br />
<h3>Birthday: 2008-07-31</h3>
<h3>Breed: Mix</h3>
<h3>Col... |
import { withRouter } from "react-router";
import React from "react";
import "../CSS/Store-fin.css";
class Storefin extends React.Component {
handleToHomePage = () => {
this.props.history.push("/");
};
render() {
return (
<div className="storefin">
<h1>出品完了しました</h1>
<button class... |
// const n = 5;
// const lost = [2, 4];
// const reserve = [1, 3, 5];
const n = 5;
const lost = [2, 4];
const reserve = [3];
// const n = 3;
// const lost = [3];
// const reserve = [1];
function solution(n, lost, reserve) {
let answer = 0;
let arr = [];
arr[0] = 0;
for (let i = 1; i <= n; i++) {
arr[i] =... |
import * as action from '../../src/redux/cars/actions'
import * as api from '../../src/networkservices/cars'
import {getCars} from '../../src/redux/cars/saga'
import MockData from '../../MockData'
// we can do saga testing without "redux-saga-test-plan" lib, but its really
// good libarary for end to end saga testing. ... |
'use strict';
module.exports.hello = async (event, context) => {
// OR include configuration options
const mysql = require('serverless-mysql')({
backoff: 'decorrelated',
base: 5,
cap: 200
})
mysql.config({
host : process.env.ENDPOINT,
database : process.env.DATABASE,
user : process.... |
module.exports = {
apps: [
{
name: "Nuvem42",
script: "./src/bin/www",
watch: true,
instances: 2,
},
],
};
|
/// <reference path="../Lib/phaser.d.ts"/>
var MonkeyRun;
(function (MonkeyRun) {
var Emitter = /** @class */ (function () {
function Emitter(game, width, gravity, keys) {
this.game = game;
this.emitter = this.game.add.emitter(0, 0, 20);
this.emitter.width = width;
... |
import React from "react";
import {
Textarea,
Card,
Input,
InputGroup,
CardStack,
Button,
Intent,
Notice
} from "amino-ui";
import { useInput } from "react-hanger";
import { useDispatch } from "react-redux";
import { push } from "connected-react-router";
export const AdminSetup = () => {
const name =... |
var quotes = [{
'author': '- Yoda',
'quote': 'When 900 years old, you reach… Look as good, you will not.'
}, {
'author': '- Senator palpatine',
'quote': 'The Dark Side of the Force is the pathway to many abilities some consider to be.. Unnatural.'
}, {
'author': '- Count Dooku',
'quote': 'I sense great fea... |
const {router} = require('../../../config/expressconfig')
const Review = require('../../models/review')
let updateReview = router.patch('/update-review/:id',async (req,res)=>{
const id = req.params.id
const data =await Review.findByIdAndUpdate(id,req.body)
if(data && data.length != 0){
return res.... |
import { getOrderDetails, getRecoverList, updateApirec, cancelOrder } from '@/api/orderMan'
import { Message } from 'element-ui'
export default {
data() {
return {
topData: {},
count: 0,
count1: 0,
list: [],
cancelReasonName: '',
cancelOrder: false,
assign: true,
as... |
import {StyleSheet} from 'react-native';
import theme from '../../theme.style';
export default StyleSheet.create({
container: {
flex: 1,
marginLeft: theme.HMARGINS,
marginRight: theme.HMARGINS,
},
greetingContainer: {
marginTop: theme.VMARGINS * 2,
},
greeting: {
...theme.HEADER,
},
n... |
/**
* 取引履歴検索サンプル
* @ignore
*/
const moment = require('moment');
const pecorino = require('../');
async function main() {
await pecorino.mongoose.connect(process.env.MONGOLAB_URI);
const actionRepo = new pecorino.repository.Action(pecorino.mongoose.connection);
const actions = await pecorino.service.ac... |
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var packager = require('electron-packager');
gulp.task('download:font', function (done) {
var urls = [
"http://mplus-fonts.osdn.jp/webfonts/mplus-2m-regular.ttf",
"http://mplus-fonts.osdn.jp/webfonts/mplus-2p-regular.ttf",
];
var fs = require(... |
import React from 'react'
import { connect } from 'react-redux'
function CompB(props) {
const {count} = props
return (
<p>{count}</p>
)
}
const mapStateToProps = state=> {
return state
}
export default connect(mapStateToProps)(CompB) |
module.exports = {
Closet: require("./closet"),
User: require("./User"),
UserSession: require("./UserSession")
};
|
/**
* Up Korean Medicine table.
*
* @param {object} knex
*
*/
exports.up = function(knex) {
console.log('generating korean medicine table');
return knex.schema.createTable('korean_medicine', table => {
table.increments('id').primary().unsigned();
table.string('Title').notNullable();
... |
/*
*var arr=[1,2,3]
*media = 2
*tamanho = 3
*somatorio = 6
*desvioMedioAbsoluto resultado esperado = 0.6667
*/
'use strict'
var media = require('./mediaAritmetica.js')
var tamanho = require('./tamanho.js')
function desvioMedioAbsoluto (arr) {
return (1 / tamanho(arr)) * (arr.map((elemen) => {
... |
import React, { useState } from "react";
import LogoutModal from "../logout/modal";
import { darkGray } from "../../../styles/color";
import { Link } from "react-router-dom";
const UserMenuModal = () => {
const [isModalShown, toggleModal] = useState(false);
return (
<div className="menuContainer">
<p>no... |
import request from '../utils/request';
//添加用户
export function add_User(params) {
return request.post('/user', params);
}
//更新用户
export function updata_User(params) {
return request.put('/user/user', params);
}
//获取所有身份ID
export function get_Id(params) {
return request.get('/user/user', params);
}
//获取所有身份ID(1)
e... |
const router = require('express').Router();
const clientController = require('../controllers/client.controller');
const { auth } = require('../utils/auth');
const { formData } = require('../utils/formData');
router.route('/').get(auth, clientController.show);
router.route('/').post(clientController.signup);
router.rou... |
/*
* configurePlace.js requires oauth2client.js to provide the Oauth2ServerFlow function
*
* The following html is required for configurePlace.js to work
*
<div id="j-card-authentication" class="j-card" >
<p>The remote systems (Jive & GitHub) require you to grant access before proceeding.</p>
<div>
... |
import React from 'react'
import App, { Container } from 'next/app'
import Router from 'next/router'
import Link from 'next/link'
Router.events.on('routeChangeStart', url => {
console.log('Navigating to:', url)
})
Router.events.on('routeChangeComplete', url => {
console.log('Completed navigation to: ', url)
})
e... |
$(document).ready(function () {
$.get('https://swapi-api.hbtn.io/api/films/?format=json', function (data) {
const list = $('UL#list_movies');
data.results.forEach(movie => {
list.append('<LI>' + movie.title + '</LI>');
});
});
});
|
'use strict'
var user = require("./UserController")
var tweet = require("./TweetController");
const { use } = require("../routes/userRoutes");
function commands(req, res){
var command = req.body.command.split(' ');
switch(command[0].toLowerCase()){
case 'add_tweet':
//return res.send({ mes... |
import { Link } from "react-router-dom";
import './Menu.css';
import{useState}from 'react'
<meta name="viewport" content="width=device-width, initial-scale=1"></meta>
function Menu(){
return(
<div className="col-6 col-s-9 Menu">
<div className="Menu-header">
<div className="Menu... |
const assert = require('assert');
const { callbackify } = require('util');
const net = require('net');
const urlParse = u => {
assert(typeof u === 'string');
const parts = {};
const o = u.split(':');
if (o.length > 1) {
parts.port = parseInt(o.pop());
} else {
parts.port = 80;
}
parts.hostname = ... |
const mongoose=require('mongoose')
const blogSchema=new mongoose.Schema({
blogImageOriginalName:{
type:String,
required:true
},
blogImageName:{
type:String,
required:true
},
blogImageURL:{
type:String,
required:true
},
blogTitle:{
type... |
import React, { Component } from "react";
import MyIcon from "../common/MyIcon/MyIcon";
import s from "./NavBar.module.scss";
import { connect } from "react-redux";
import { showNewGameForm } from "../../actions/modalActions";
import LinkButton from "../common/LinkButton";
class NavBar extends Component {
render... |
// const { date } = require("joi");
/* Global Variables */
const baseUrl = 'http://api.openweathermap.org/data/2.5/weather?zip=';
const apiKey = '&APPID=a99947cad1fc2318badc6cdaa7bd2b03&units=imperial';
// Create a new date instance dynamically with JS
let d = new Date();
let newDate = (d.getMonth()+1) +'.'+ d.getDa... |
var stage, counter = 0;
var text, pause;
function init () {
stage = new createjs.Stage("canvas");
stage.on("mouseleave", function (evt) {
if(!isEndOfGame){
createjs.Ticker.paused = true;
pause = new createjs.Shape();
pause.graphics.beginFill("#e2895f").dr... |
(function() {
'use strict';
angular
.module('app.chat')
.directive('tzMessageList', tzMessageList);
function tzMessageList($window, $timeout, storeService, selectorsService, _) {
return {
restrict: 'A',
link: tzMessageListLinker
};
function tzMessageListLinker(scope, element) {
... |
/* Batch variable that holds the
*
*
*/
import { vehicleAdd } from "./actions";
let updateStack = {
set addUpdate(item) {
this.test++
if (this.updatingVehicles.includes(item.id)) {
//Item is already in stack
this.modified++
this.actions[item.id] = {
... |
$document.ready(function() {
$('.colorpicker').simpleColor({
cellWidth: 9,
cellHeight: 9,
border: '1px solid #333333'
});
}); |
import React, { useState } from 'react';
import NavMenu from './components/NavMenu/NavMenu.js';
import About from '/Users/l/my-react-website/src/components/NavMenu/About.js';
import Contact from './/components/NavMenu/Contact';
import Projects from '/Users/l/my-react-website/src/components/NavMenu/Projects.js';
import ... |
import React,{Component} from 'react';
import Icon from 'react-native-vector-icons/Ionicons';
import {View, Text, ScrollView,TouchableOpacity,TextInput,Dimensions} from 'react-native';
var {height, width} = Dimensions.get('window');
export default class SearchScreen extends Component{
render(){
return(
<Scr... |
import React, { useState, useEffect } from "react";
import "../../styles/Light.css";
function Light() {
const [active1, setactive1] = useState(" ");
const [active2, setactive2] = useState(" ");
const [active3, setactive3] = useState(" ");
///function OnLight (event)
const OnLight = event => {
if (event.target.... |
module.exports = {
get_user : 'SELECT * FROM USER WHERE email=?',
create_user :'INSERT INTO USER(user, email, password) VALUES(?,?,?)',
get_comments :'SELECT USER.user, COMMENTS.comment FROM COMMENTS INNER JOIN USER ON USER.id = COMMENTS.user',
create_comment : 'INSERT INTO COMMENTS(user, comment) VALUE... |
'use strict';
angular.module('mean.system').controller('HeaderController', ['$scope', 'Global', function ($scope, Global) {
$scope.global = Global;
var MenuItem = function(title, link) {
this.title = title;
this.link = link;
};
$scope.menu = [
new MenuItem('Articles', 'article... |
export let initialState={
isError:false,
message:'',
course:'',
chapterId:'',
subjectId:'',
}; |
// Exports function for creating a new template.
var Crypto = require("crypto");
var execFile = require("child_process").execFile;
var File = require("fs");
var Path = require("path");
var Zip = require("./zip");
// Template will have accessor methods for these fields.
var TEMPLATE = [... |
import React from "react";
import { act, render, fireEvent } from "@testing-library/react";
import { CastTableRow } from "../CastTableRow";
jest.mock("react-router-dom", () => ({
useHistory: () => ({
push: jest.fn(),
}),
}));
describe("CastTableRow", () => {
let props;
beforeEach(() => {
props = {
... |
var express = require('express');
var router = express.Router();
//message array
const message=[
{
text:"Hi",
user:"root",
added:new Date()
},
{
text:"Heyy",
user:"user",
added:new Date()
}
];
/* GET home page. */
//root path that will render the index file from the view
router.get('/',... |
var logger = require('../utils/logger');
exports.handleStatusCallback = function(publisher) {
return function(request, response) {
logger.info('status callback: CallSid: ' + request.body.CallSid + ', From: ' + request.body.From + ', To: ' + request.body.To + ', Direction: ' + request.body.Direction + '... |
import _ from 'lodash';
import { Strategy as LocalStrategy } from 'passport-local';
import { User, Status } from '../../model';
export default new LocalStrategy({
usernameField: 'email',
passwordField: 'password',
passReqToCallback: false,
}, (email, password, done) => {
new User({ email }).fetch().then((user)... |
const webpack = require('webpack')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const { merge } = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
// DEV config
const devWebpackConfig = merge(baseWebpackConfig, {
mode: 'development',
devtool: 'eval-cheap-source-... |
// src/components/Form.js
import { useEffect, useState } from "react";
import Ingredient from "./Ingredient";
function Form() {
var [list, setList] = useState(3);
function submitForm(event) {
event.preventDefault();
var ingredients = [];
event.target["ingredients[]"].forEach(ingredient => ingredients.push(i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.