text stringlengths 7 3.69M |
|---|
import React from "react";
import {
AppBar,
Button,
Toolbar,
Typography
} from "@material-ui/core";
import styled from "styled-components";
const StyledAppBar = styled(AppBar)`
flex-grow: 1;
& button {
margin: 0.5em;
}
`;
const StyledTitle = styled(Typography)`
flex-grow: 1;
`;
export default (p... |
#!/usr/bin/env node
let child = require('child_process');
const task = process.argv[process.argv.length - 2]
const param = process.argv[process.argv.length - 1]
if (task === 'init' && !!param) {
const teskDir = process.cwd()
const localDir = __dirname
child.exec(`cp -r ${localDir}/demo ${teskDir}/$... |
'use strict';
app.controller('EmployeeDetails', function($http, $rootScope, $scope, $state) {
var id = sessionStorage.getItem("id");
if(!id){
$scope.return();
}
$http({
url: app.url.employee.api.edit,
data: {
id: id
},
method: 'POST'
}).then(function(dt) {
... |
import React from 'react';
import Select from 'react-select';
import { categories as categoryData } from '../../helpers/cmsCustomData';
export default class CategoryFilter extends React.Component {
static defaultProps = {
multiSelect: false,
placeholder: 'Select categories',
selected: []
};
state =... |
import React from "react"
import { connect } from "react-redux";
import * as actions from '../../store/actions/general';
import Router from 'next/router'
import StreamData from "./StreamData"
import Channels from "./Channels"
import Videos from "./Videos"
import Movies from "./Movies"
import Playlists from "./Playlist... |
import { call, put, takeEvery } from 'redux-saga/effects';
import * as Toastr from 'toastr';
import HttpHelper from '../../utils/http-helper';
import { ADD_CALL_LOGS_URL } from '../../utils/urls';
import { ADD_CALL_LOGS_REQUEST } from './profile-constants';
import { addCallLogsSuccess, addCallLogsFailure } from './add... |
const Router = require('koa-router')
const router = new Router()
router.use('/account', require('./account'))
router.use('/info', require('./info'))
module.exports = router.routes()
|
document.write('<script src="/common/frontia/src/base/frontia.js">\x3C/script>');
document.write('<script src="/common/frontia/src/base/error.js">\x3C/script>');
document.write('<script src="/common/frontia/src/base/gzip.js">\x3C/script>');
document.write('<script src="/common/frontia/src/base/util.js">\x3C/script>')... |
const screen = document.querySelector('#screen');
const guide = document.querySelector('#guide');
const result = document.querySelector('#result');
const startGame = document.querySelector('#startGame');
let startTime = 0;
let endTime = 0;
let 기록 = [];
let timeOut;
let stopflag = 0;
let count = 0;
let newGame = false;
... |
import React, { useState }from 'react';
import Header from './Components/Header';
import Hero from './Components/Hero';
import Tab from './Components/Tab'
import "./App.css";
import Planets from './Components/Planets';
import Favourite from './Components/Favourite';
const App = () => {
const [tab,settab] = useState... |
/**
* Common database helper functions.
*/
//import idb from 'idb';
class DBHelper {
/**
* Database URL.
* Change this to restaurants.json file location on your server.
*/
static get DATABASE_URL() {
const port = 1337; // Change this to your server port
return `http://localhost:${port}/`;
}
static Ope... |
// The only reason we need a React depencency here is because the base class
// provides the this.setState method.
import { Component } from "react";
// We can inline a named export call.
export class Button extends Component {
// Prop types are defined using built-in language support using a TypeScript
// compat... |
import React from "react";
import EmployeeFrom from "./component/EmployeeFrom";
function AddEmployee() {
return (
<div className="container mt-4">
<h1>Add Employee</h1>
<EmployeeFrom mode="add" />
</div>
);
}
export default AddEmployee;
|
var widgetConfig = {
title: 'My Diamond Story',
pages: [
{
title: 'Light',
code: 'light',
enableStoryline: true
},
{
title: 'Report',
code: 'report'
}
]
};
|
import React, { useState, useEffect, useCallback } from 'react';
import classes from './dailyGraphs.module.css';
import axios from 'axios';
import configureDailyGraphsStore from '../DailyAndProfileData/dailyGraphs-store';
import { useStore } from '../../Store/store';
import { DAILY_GRAPHS } from '../../constants';
imp... |
/*
src 参照元を指定
dest 出力さきを指定
watch ファイル監視
series(直列処理)とparallel(並列処理)
*/
const { src, dest, watch, series, parallel } = require('gulp');
// プラグインを呼び出し
const sass = require('gulp-sass');
const postcss = require("gulp-postcss"); // PostCSS利用
const cssnext = require("postcss-preset-env");
const sourcemaps = require("gulp... |
import { isEmpty } from 'underscore';
import { getAllCareersApi, getAllDepartmentsApi } from 'apis';
import {
LOAD_CAREERS_SUCCESS,
LOAD_CAREERS_FAILURE,
UPDATE_CAREERS_LOADER_SUCCESS,
UPDATE_CAREERS_LOADER_FAILURE,
LOAD_DEPARTMENTS_SUCCESS,
LOAD_DEPARTMENTS_FAILURE,
} from './actions';
import { transformAr... |
const crypto = require('crypto');
exports.login = function(con, username, password, callback) {
const hash = crypto.createHash('sha256');
hash.update(con.escape(escapeHtml(password)));
var username = con.escape(escapeHtml(username));
var cryptedPass = con.escape(escapeHtml(hash.digest('hex')));
var sql = "... |
"use strict";
var Dispatcher = require('../dispatcher/appDispatcher');
var ActionTypes = require('../constants/actionTypes');
var EventEmitter = require('events').EventEmitter;
var assign = require('object-assign');
var _ = require('lodash');
var CHANGE_EVENT = 'change';
var _fintracimports = [];
var FintracStore = ... |
(function () {
"use strict";
document.addEventListener( 'deviceready', onDeviceReady.bind( this ), false );
function onDeviceReady() {
document.addEventListener( 'pause', onPause.bind( this ), false );
document.addEventListener( 'resume', onResume.bind( this ), false );
function onPause() {
// TO... |
/**
* Created by SG0222865 on 4/11/2017.
*/
import {StyleSheet} from 'react-native';
export default StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
backgroundColor: '#1D7CA7'
},
titleText: {
justifyContent: 'center',
top: 0,
textAlig... |
const mongoose = require('mongoose');
const Recipe = require('./models/Recipe'); // Import of the model Recipe from './models/Recipe'
const data = require('./data.js'); // Import of the data from './data.js'
// Connection to the database "recipeApp"
mongoose.connect('mongodb://localhost/recipeApp', { useNewUrlParser:... |
import { Entry } from './entry'
export class Migration extends Entry {
name
async getByName(name) {
const sql = `SELECT * FROM ${this.tableName} WHERE ${this.tableName}.name = ?;`
return await this.query(sql, [name])
}
get tableName() {
return 'migration'
}
}
|
mui.init({
keyEventBind : {
backbutton : false,
menubutton : false
}
});
mui.plusReady(function(){
// var list = $('#hisList');
// for(var i=0;i<d.length;i++){
// var li = '<li class="mui-table-view-cell mui-collapse"><a class="mui-navigate-right" href="#">'+d[i].psid+'</a></li>';
// $li = $(li);
// $li.ap... |
$('document').ready(function() {
//If cookies are not enabled, then nothis is loaded
if (!navigator.cookieEnabled)
$('#box').html('Sorry, your browser seems to have Cookies disabled.');
else {
//Load the Header component
$.ajax({
url: "components/header.php",
success: function(result) {
let parsed ... |
const express = require('express');
const router = express.Router();
const db = require('../models');
router.get('/list', async (req, res) => { //그룹 리스트
if (!req.user) {
return res.redirect('/');
}
const pageing = 1;
const group_list_gaci = await db.Group_list_gaci.findAll({
order: [['c... |
import _ from 'lodash';
const PLAYER_1_TOKEN = 'O';
const PLAYER_2_TOKEN = 'X';
class XOBoard {
constructor() {
this.reset()
}
eachCell(callback) {
_.forEach(this.board, (arr, row) => {
_.forEach(arr, (value, col) => {
callback(value, row, col);
});
});
}
reset() {
thi... |
viewport = [-2, -2, 2, 2];
var w = 3, h = 3, tiles;
function make_tile(x, y) {
var tile = please.access('tile.jta').instance();
tiles.push(tile);
tile.location = [x - 1, y - 1, 0];
graph.add(tile);
// Set selectable to true to make it respond to pointer click events.
tile.selectable = true;
// The on_click func... |
'use strict'
module.exports = function (str) {
var parts = str.split(':')
var ms = 0
var mod = 3600000
while (parts.length > 0) {
ms += mod * parseInt(parts.shift(), 10)
mod /= 60
}
return ms
}
|
/**
* jQuery mCarousel plugin
* @version 1.1.2
*
* @author Timur R Mingaliev <timur@mingaliev.com>
*/
/*global jQuery*/
/*jslint browser: true, devel: true, vars: true, todo: true*/
(function ($) {
"use strict";
// TODO: Access to methods from $(element).mCarousel("method", "methodName", [arguments]);
... |
import React from 'react';
import $ from 'jquery'
import ResultsTable from './ResultsTable.js'
import firebase from 'firebase';
import './Add.css';
// var movieDBURL = 'https://api.themoviedb.org/3/search/movie?api_key=aadd317edcf7fded06137442eb497be2&query=';
// var movieDBImageURL = 'https://image.tmdb.org/t/p/w500/... |
import GenericHtmlBlock from '../../Html/GenericHtmlBlock';
const Small = GenericHtmlBlock('small');
export default Small;
|
"use strict";
var user = require('./routes/user');
var match = require('./routes/match');
var steamServer = require('./routes/steam-proxy');
var matchmakingStats = require('./routes/matchmaking-stats');
var steamAuth = require('./routes/steam-auth');
module.exports = function(app) {
app.use('/api/current-user', u... |
"use strict";
class BubbleSort {
constructor(array) {
this.array = array;
}
sort() {
const length = this.array.length - 1;
for (let i = 0; i < length; i++) {
for(let j = 0; j < length; j++) {
if (this.array[j] > this.array[j + 1]) {
let swap = this.array[j];
this.array[j] = this.array[j + 1... |
/**我的優惠券 */
import React,{Component} from 'react'
import{
View,Text,TouchableOpacity,
StyleSheet,FlatList
} from 'react-native'
import NormalHead from '@/components/tabbar/NormalHead'
import SplitView from '@/components/SplitView'
import {width, scale, colors} from '@/utils/device'
import TopView from './TopView'
c... |
var bodyParser = require('body-parser');
const omise = require('omise')({
'publicKey': "pkey_test_57vo88hrxzcpzuhzzrg",
'secretKey': "skey_test_57vo88hs85r8478o4oh"
})
const express = require('express')
const app = express()
app.use(function (req, res, next) {
res.setHeader('Access-Control-Allow-Origin',... |
function doNavigate(pstrWhere, pintTot) {
var strTmp;
var intPg;
strTmp = document.frmMain.txtCurr.value;
intPg = parseInt(strTmp);
if (isNaN(intPg)) {
intPg = 1;
}
if ((pstrWhere == "F" || pstrWhere == "P") && intPg == 1) {
alert("You are already viewing first page!");
return;
} else {
if ((pstrWhere =... |
const rootCas = require('ssl-root-cas').create()
const https = require('https')
const http = require('http')
// const openssl = require('openssl-nodejs')
const fs = require('fs');
const { v4: uuidv4 } = require('uuid');
const openssl = require('./openssl')
const { Certificate } = require('@fidm/x509')
const { URL } = r... |
import dotenv from 'dotenv';
dotenv.config();
const artists = [
{
fbId: '4eYUL2dx05ZI53zXzOR0igMm6n62',
name: 'Wiley Ross',
initials: 'WR',
email: 'wross@example.com',
displayEmail: true,
city: 'Austin',
state: 'TX',
country: 'USA',
tags: [],
aboutMe: "I'm a painter, muralist ... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchRestaurant } from '../../actions/firebase_actions';
import { Link } from 'react-router';
class RestaurantShow extends Component {
componentWillMount() {
this.props.fetchRest... |
exports.up = function(knex) {
return knex.schema
.createTable('users', (table) => {
table.increments('id').primary();
table.string('name').notNullable();
table.string('email').notNullable();
table.string('bio').notNullable();
table.string('postal').notNullable();
table.strin... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseController = void 0;
const service_1 = require("../../../app/persistance/common/service");
const BaseService_1 = require("../../../app/services/interfaces/base/BaseService");
class BaseController {
constructor(schemaModel) {
... |
function redirectOnClick( element ){
if ( $(element).attr("data-url") != undefined ){
var form = $('<form>',
{ 'action':$(element).attr("data-url"),
'method':'post'}
);
form.appendTo('body');
form.submit().remove();
}
} |
function i18n(token) {
return token;
}
Handlebars.registerHelper('i18n', i18n);
Handlebars.registerHelper('link', i18n);
Handlebars.registerHelper('url', i18n);
|
// @flow strict
import * as React from 'react';
import { Translation } from '@kiwicom/mobile-localization';
import { Text, StyleSheet, Price } from '@kiwicom/mobile-shared';
import { defaultTokens } from '@kiwicom/mobile-orbit';
import { View } from 'react-native';
import {
withHotelDetailScreenContext,
type Hote... |
import Ember from 'ember';
export default Ember.Component.extend({
//elementId: 'regions_div',
didInsertElement: function(){
"use strict";
google.load("visualization", "1", {packages:["geochart"]});
google.setOnLoadCallback(function () {
//var data = google.visualization.arrayToDataTable([
... |
$(document).on('ready', function(){
$('.translate').on('submit', function(e){
e.preventDefault();
var findWord = {
start: $('[name="startLanguage"]').val(),
end: $('[name="endLanguage"]').val(),
word: $('[name="word"]').val()
};
console.log(findWord);
//dataFromServer represents the content of t... |
import en from './en.json';
import cn from './cn.json';
export const dictionaryList = { en, cn };
export const languageOptions = {
en: 'English',
cn: '中文',
};
|
import {arr, num} from 'types';
export default function inc(increment = 1) {
return function innerInc(n) {
return num(n) + num(increment);
};
};
|
import Vue from 'vue'
import Vuex from 'vuex'
import WidgetModule from '@/store/modules/widget.module'
Vue.use(Vuex)
Vue.config.devtools = true
export default new Vuex.Store({
modules: {
WidgetModule,
}
});
|
/**********************************************************************************************
* Copyright (C) 2013 - 2015
* United Services Automobile Association
* All Rights Reserved
*
* File: HealthIns_ToolRebrand.js
**************************************************************************************... |
import * as glext from "./../../GLExt/GLExt.js"
import * as sys from "./../../System/sys.js"
import * as vMath from "./../../glMatrix/gl-matrix.js";
/*
command pattern
every (user) interaction needs to be recorded into "command" object
"command" object holds info about:
- which photo document (by document ... |
const input = require("fs").readFileSync("/dev/stdin", "utf8").split("\n");
const firstLine = input[0].split(' ').map(item => parseInt(item))
const N = firstLine[0]
const Y = firstLine[1]
result = '-1 -1 -1'
for (i = 0; i <= N; i++) {
for (j = 0; j <= N - i; j++) {
for (k = N - (i + j); k <= N - (i + j); ... |
module.exports = (sequelize, DataTypes) => {
const User = sequelize.define('User', {
email: {
type: DataTypes.STRING,
allowNull: false
},
password: {
type: DataTypes.STRING,
allowNull: false
},
admin: {
type: DataTypes.BOOLEAN,
allowNull: false
},
isEmailVerified: {
type: DataTypes.B... |
import { useRetailers } from "./RetailerDataProvider.js"
import { retailerHTML } from "./retailer.js"
import { useDistributors } from "../flowerDistributors/DistributorDataProvider.js"
const contentTarget = document.querySelector('.retailerContainer')
export const renderRetailerList = () => {
const distribut... |
/**
* Created by chandan on 11/6/16.
*/
var fs = require('fs');
module.exports = {
readDataFromJsonFile: readDataFromJsonFile
};
function readDataFromJsonFile(fileName){
var allProcessedRequest=new Array();
try{
var jsonData=require(fileName);
var interestedParams=new Array("headers","url... |
"use strict";
define(['service/logger'], function (logger) {
logger.debug('Common error module has initialized');
var errorLvl = {
high: 100,
medium: 50,
low: 25
};
function buildError(name, lvl, msg) {
return {
name: name,
level: lvl,
... |
"use strict";
function Time() {
this.startTime =
this.lastUpdate = Date.now();
this.allTime = 0;
};
Time.prototype.Update = function () {
this.now = Date.now();
this.allTime = (this.now - this.startTime) / 1000;
this.deltaTime = (this.now - this.lastUpdate) / 1000;
this.lastUpdate = this.now... |
import React, { Component } from 'react';
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux';
import { Link } from 'react-router';
import Tab from '../../components/tab/tab';
import * as tabActions from '../../actions/tabAction';
function mapStateToProps(state) {
return {
index: sta... |
;(function () {
'use strict';
var ServiceCalculatorDataManager = MINI.ServiceCalculatorDataManager = (function () {
function ServiceCalculatorDataManager(scope){
this.data = [] || [];
this.dataPlus = [] || [];
this.scope = scope;
this.init();
}
ServiceCalculatorDataManager.prot... |
// Author: Luis Souza
// REMEMBRALL App - just a simple app that saves
// reminders and shows them using Local Notifications
let app = {
pages: [],
init: function () {
document.addEventListener('deviceready', app.ready, false);
},
ready: function () {
app.addListeners();
},
ftw: function () {
c... |
const express = require('express')
const bodyParser = require('body-parser')
const massive = require('massive')
require('dotenv').config();
const app = express()
app.use( express.static( `${__dirname}/../build` ) );
app.use(bodyParser.json())
app.use(express.static('/../public/build'))
// massive(process.env.CONNECTI... |
import validator from 'validator'
class Utils {
static check = (input, newValue, fields) => {
if(input === 'address') return {
address: {
value: newValue,
error: Utils.checkStandard(newValue)
}
};
else if (input === 'city') return {
... |
// "devDependencies": {
// "@babel/preset-env": "^7.4.5",
// "@babel/preset-react": "^7.0.0",
// "babel-cli": "^6.26.0",
// "babel-core": "^6.23.1",
// "babel-jest": "^24.8.0",
// "babel-loader": "^6.3.2",
// "babel-preset-env": "^1.7.0",
// "babel-preset-es2015": "^6.22.1",
// "babel-preset-react": "... |
(function() {
var IRacing,
__slice = [].slice;
window.IRacing = IRacing = (function() {
function IRacing(requestParams, requestParamsOnce, fps, readIbt, server) {
this.requestParams = requestParams != null ? requestParams : [];
this.requestParamsOnce = requestParamsOnce != null ? requestParamsO... |
const AnnonceController = require("../controleur/annonceDB");
const MiddlewareId = require("../Middleware/Authorization");
const MiddlewareAuth = require("../Middleware/jwtAuth");
const Router = require("express-promise-router");
const router = new Router;
/**
* @swagger
* /annonce/{id}:
* get:
* ... |
(function () {
"use strict";
describe("AllCtrl", function () {
/* global $q, $httpBackend, $scope, mockModalInstance*/
var ctrl,
$state,
$modal,
deferred,
ContentsService,
AlertsService,
ResultsHandlerService;
beforeEach(function () {
inject(functi... |
import React from "react"
import styles from "./catalog-card.module.scss"
import Image from "gatsby-image"
const CatalogCard = ({ image, title, subtitle, pdf, onClick, index }) => {
return (
<div className={styles.container} onClick={() => onClick(subtitle, index)}>
<div className={styles.conte... |
import validator from 'validator';
import {isEmpty as isEmptyLodash} from 'lodash';
export default function validateInput(inputs) {
let errors = {};
// console.log(inputs)
if (validator.isEmpty(inputs.firstName)) {
errors.firstName = 'This field is required';
}
if (validator.isEmpty(inputs.lastName)) {
... |
import { AiFillCaretDown,AiFillCaretUp } from "react-icons/ai";
const SortIcon = ({down}) => {
const Icon = down ? AiFillCaretDown : AiFillCaretUp;
return (
<Icon size = '1rem' color = 'white'/>
);
}
export default SortIcon; |
import styled from 'styled-components/native';
export const Card = styled.View`
width: 152px;
height: 188px;
background: #1E8B85;
border-radius: 15px;
margin-top: 20px;
margin-left: 12px;
margin-right: 12px;
shadow-opacity: 0.75;
shadow-radius: 5px;
shadow-offset: 15px 15px;
... |
$("table tbody").delegate(".del1","click",function(){
var number = $(this).attr("data_num");
var cont={"email":number};
$.ajax({
method:"post",
url:"/removes",
data:cont
}).done(function(data){
show(data)
})
});
$(".texts").blur(function () {
console.log("hhhh")
... |
//Gestion des sessions
module.exports = {
//définit l'utilisateur comme authentifié en session
authenticate : function(req, res, user){
req.session.user = user;
req.session.authenticated = true;
console.log("authentification");
console.log("utilisateur : " + JSON.stringify(req.session.user));
console.log... |
var News=artifacts.require("./News.sol");
module.exports =function(deployer,network,accounts){
deployer.deploy(News);
} |
$(function() {
//表格增加事件处理
$('#dg').datagrid({
onLoadSuccess : function(data) {
if (data.total == 0 && data.ERROR == 'No Login!') {
var user_id = localStorage.getItem('user_id');
var user_pwd = localStorage.getItem('user_pwd');
if(user_id==''||!user_id||user_pwd==''||!user_pwd){
$.messa... |
module.exports = [
// API V1 routes
// [/\/v1\/org\/(\w+)/, '/api/v1/org/public?action=:1', 'rest'],
// [/\/v1\/org(?:\/(\d+))?/, '/api/v1/org/public?orgId=:1', 'rest'],
// 机构管理 api
// 2 appid + 2 api + 3 postid + 4 action + status
// [/\/v1\/app\/(\w+)\/posts\/(\d+)\/(\w+)\/replies\/(\w+)?/, '/api/v1/app/p... |
$(function() {
var firstRunResults = true;
var results = {};
$("#navBar a").click(function() {
var contentKey = $(this).attr("data-contentkey");
var contentPath = "ui/pages/" + contentKey + "Content.html";
$("#home .ui-content").load(contentPath, function() {
if (conten... |
/*
* Copyright (c) 2015 Boucher, Antoni <bouanto@zoho.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy,... |
import React, { Component } from 'react';
import Data from "./Data";
import Dashboard from "./Dashboard";
import RetailAnalysis from "./RetailAnalysis";
import {Container, TabContent, TabPane, Nav, NavItem, NavLink} from 'reactstrap';
import classnames from 'classnames';
class Header extends Component {
construct... |
var metricsCellTmpl = '<div class="ui-grid-cell-contents"><div class="status-block {{row.entity.metrics.class}}"><div class="progress-bar" style="width: {{row.entity.metrics.progress}}%"></div></div></div>';
var buildCellTmpl = '<div class="ui-grid-cell-contents"><div class="status-block {{row.entity.build.class}}"><di... |
/*
* File: app/view/StoreAreaPanel.js
*
* This file was generated by Sencha Architect version 3.2.0.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Ext JS 4.2.x library, under independent license.
* License of Sencha Architect does not include license for Ext JS 4.2.x. For more
* ... |
import NivelJudete from './NivelJudete';
export default NivelJudete;
|
const { interfaceUser } = require('./ui');
interfaceUser();
|
import React from 'react'
import PropTypes from 'prop-types'
class List extends React.Component {
constructor(props) {
super(props)
this.state = {
}
}
render() {
const { title, merchantName, addressdetail, p0, p1 } = this.props
return (
<div>
... |
import React from 'react';
// import ReactDOM from 'react-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import DatePicker from 'material-ui/DatePicker';
import { Button } from 'reactstrap';
import './index.css';
const DatePickerExampleSimple = () => (
<div>
<DatePicker hintTe... |
const sqlite3 = require('sqlite3');
const db = new sqlite3.Database('db.sqlite3');
db.serialize(() => {
if(process.env.ID <= 0) {
console.log('Invalid argument `ID`')
return false;
}
const stmt = db.prepare('UPDATE users SET canceled_at = DATETIME("now", "localtime") WHERE id = ?');
stm... |
"use strict";
const superstatic = require( 'superstatic' );
const connect = require( 'connect' );
const app = connect().use( superstatic() );
app.listen( 8080, function () {
console.log( 'Server started. http://localhost:8080/' );
} );
|
import React, { useState } from 'react';
import axios from 'axios';
import './AddBook.css'
import { ToastContainer, toast } from 'react-toastify';
function AddBook(props){
const url_saveBook = "http://localhost:8080/bookapi/saveBook";
const [book, setBook] = useState({});
/*
const getTitle = (event)... |
const mysql = require('mysql');
const CrudProvider = require('./crudProvider');
const DataProvider = {};
let database = mysql.createConnection({
host: 'oege.ie.hva.nl',
user: 'jansenj031',
password: 'kKy+tS.GzMIP6e',
database: 'zjansenj031'
});
database.connect((err) => {
if (err) {
consol... |
import { gql } from "apollo-server";
export const typeDef = gql`
extend type Query {
getAllNotifications: Notification
getNotifications(user: String!): [Notification]
}
extend type Mutation {
newNotifiaction(user: String!, notification: NotiInput): Notification
}
type Notification {
user: S... |
const sqlite3 = require('sqlite3');
const db = new sqlite3.Database('db.sqlite3');
module.exports = (parkingId) => {
return new Promise((resolve, reject) => {
if(!parkingId) {
reject({ code: 'missing_argument' });
}
else {
db.serialize(() => {
const s... |
sap.ui.define([
"sap/ui/core/util/MockServer"
], function(MockServer){
return {
init: function(){
var oMockServer= new MockServer({
rootUri: "http://services.odata.org/Northwind/Northwind.svc/"
});
var _sMetadataPath = "sap/ui/demo/misha/localService/m... |
import { TimelineMax } from "gsap";
import { loader, Rectangle } from "pixi.js";
import Button from "../../PixiUtility/Button";
export default class PlayButton extends Button {
constructor(onClickCallback) {
super(loader.resources.play_button.texture, onClickCallback);
}
onClick() {
const... |
import React, { Component } from "react";
import styles from "./Browse.scss";
export default class Browse extends Component {
render() {
return (
<div className="browse-wrapper">
<p className="title">Browse By Genres <span id="show-more"><a href="#">Show more</a></span></p>
<d... |
//Change the distance dropdown to default 100 miles, not Countrywide
$('.distance-dropdown option#radius_4').prop('selected', true);
|
import {FETCH_LESSONS_TEACHER, FETCH_LESSONS_TEACHER_SUCCESS, FETCH_LESSONS_TEACHER_FAIL} from "../actions/types";
const defaultState = {
lessons: [],
loading: true,
error: null,
}
export default function(state = defaultState, action) {
switch(action.type) {
case FETCH_LESSONS_TEACHER:
return {
...state... |
/**
* Created by natete on 02/11/15.
*/
(function () {
'use strict';
angular.module('corestudioApp.client')
.controller('ClientController', ClientController);
ClientController.$inject = ['Client'];
function ClientController(Client) {
var vm = this;
vm.data = {};
v... |
import React, { Component } from 'react';
class LeaveRecords extends Component {
render() {
return(
<div className="container-fluid">
<main className="adjust-top">
<h4 className="text-size">Leave Records</h4>
<div className="card shadow p-... |
import React from 'react';
const MainPage = React.lazy(() => import('./views/pages/MainPage'));
const Film = React.lazy(() => import('./views/pages/Film'));
const LoginPage = React.lazy(() => import('./views/pages/LoginPage'));
const RegisterPage = React.lazy(() => import('./views/pages/RegisterPage'));
const ResetPas... |
const videoElement = document.getElementById('video');
const button = document.getElementById('button');
// Prompt to select media stream, pass to video element, then play
async function selectMediaStream() {
try {
//will hold our mediaStream data, we are waiting until the user has selected which screen or... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.