text stringlengths 7 3.69M |
|---|
const mongoose = require('mongoose');
const { EloCalculator } = require('toefungi-elo-calculator');
const db = require('./models');
const eloCalculator = new EloCalculator();
exports.addPlayer = function(name) {
db.Player.create({ name }).then(function() {
mongoose.connection.close();
});
};
async function u... |
import React from 'react';
import Box from "@material-ui/core/Box";
import '../assets/styles/pagination.css';
const SwiperComponent = () => {
return (
<Box className="pagination__content" boxShadow={2}>
<video width="580" height="255" controls >
<source src="/videos/tutorial-edi... |
const func = (t,y) => (((2*t-5)/Math.pow(t,2)*y)+5);
function koshi_explicit(){
let y0=4;
let h=0.05;
let t0=2;
let i=0;
do{
let y1=y0+h*func(t0,y0);
console.log(`i=${i} t=${t0} y=${y1} || difference between y= ${Math.abs(y1-y0)}\n`);
y0=y1;
t0+=h;
i++;
}
wh... |
import React, {Component} from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
Keyboard,
AsyncStorage,
FlatList,
NativeModules,
TextInput,
BackHandler,
Alert,
Modal,
ActivityIndicator,
} from 'react-native';
import AntIcon from 'react-native-vector-icons/AntDesign';
import... |
"use strict"
var EventEmitter = require('events').EventEmitter,
f = require('util').format,
ERRORS = require('../../mongodb/errors');
// Connection Id
var id = 0;
class Connection extends EventEmitter {
constructor(url, server, handlers) {
super();
var self = this;
this.handlers = handlers;
thi... |
/**
* @license
* Copyright 2016 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 ... |
var app = angular.module('userProfiles');
app.service('mainService', function ($http, $q) {
this.getUsers = function () {
var deferred = $q.defer();
$http({
method: 'GET',
url: 'http://reqr.es/api/users?page=1'
}).then(function(result){
result = result.da... |
"use strict";
exports.__esModule = true;
console.clear();
var auto_1 = require("./auto");
var auto1 = new auto_1["default"]("Fiat", 2018);
var auto2 = new auto_1["default"]("Chevrolet", 2017);
var auto3 = new auto_1["default"]("Ford", 2019);
auto1.imprimirAuto();
console.log(auto1);
auto2.imprimirAuto();
cons... |
// Chapter 1 Task 1
// alert("Welcome to my site");
// Chapter 1 Task 2
// alert("Error ! Please enter a valid password");
// Chapter 1 Task 3
// alert("Welcome to JS Land\nHappy Coding ");
// Chapter 1 Task 4
// alert("Welcome to JS Land");
// alert("Happy coding");
// Chapter 1 Task 5
// Done
// Chapter 1 Task 6
// D... |
const mongoose = require('mongoose');
const joi = require('joi');
joi.objectId = require('joi-objectid')(joi);
const joigoose = require('joigoose')(mongoose);
// Allowed OS values for 'model'
// It must be a REGEX because joi's force uppercase only proccess after the expressions
const MODELS = /^ANDROID|IOS$/;
const ... |
import React, { useState, useEffect } from "react";
import Head from "next/head";
import { getTokens } from "../functions/UIStateFunctions.js";
import Hero from "../components/Hero";
import CardRow from "../components/CardRow";
import CardRowHeader from "../components/CardRowHeader";
import Loader from "../components/L... |
import logo from './logo.svg';
import './App.css';
import { useEffect, useState } from 'react';
function App() {
return (
<div className="App">
<Countries></Countries>
</div>
);
}
function Countries() {
const [countries, setCountries] = useState([]);
useEffect(() => {
}, [])
return (
... |
console.log("FUNZIONAAAA :)");
|
/**
* Created by kunnisser on 2017/1/20.
* 场景stage切换
*/
import Graphics from '../utils/Graphics';
import Configer from '../config/Configer';
class StateTransition extends Phaser.Plugin{
constructor (game) {
super(game, game.stage);
let blackRect = Graphics.createRectTexture(game, 1, 1, '#0000... |
// var name = ""
let today = new Date();
let year = today.getFullYear();
let month = ('0' + (today.getMonth() + 1)).slice(-2);
let day = ('0' + today.getDate()).slice(-2);
let hours = ('0' + today.getHours()).slice(-2);
let minutes = ('0' + today.getMinutes()).slice(-2);
let date = year + '-' + month + '-' + day + '... |
const db = require("../models");
const product = require("../models/product");
const Product = db.products;
exports.addProduct = function (req, res) {
// Validate request
if (!req.body.name || !req.body.price || !req.body.description || !req.body.stock || !req.body.published || !req.body.color) {
res.s... |
import React, { useState, useEffect } from 'react'
import { useParams } from 'react-router-dom'
import firebase from 'firebase'
import 'bootstrap/dist/css/bootstrap.min.css'
const NewsLink = () => {
const db = firebase.firestore()
const [inform, setInform] = useState({})
const [term,setTerm] =useState('eve... |
exports.defaults = {
production: {
server: "https://updates.push.services.mozilla.com/push/",
connectTimeout: 1000
},
testmode: {
server: "http://localhost",
connectTimeout: 1000
}
};
exports.check = function(options) {
for (let prop i... |
import React, { Component } from "react";
import { Link } from "react-router-dom";
import socketEvent from "./socket";
class EmployeeList extends Component {
constructor() {
super();
this.state = {
empData: null,
};
}
componentDidMount() {
socketEvent.initEmpData(this.getData);
}
getDat... |
import $ from '../../../core/renderer';
import { isDefined } from '../../../core/utils/type';
import { WIDGET_CLASS, FIELD_ITEM_LABEL_CONTENT_CLASS, FIELD_ITEM_LABEL_CLASS } from '../constants'; // TODO: exported for tests only
export var GET_LABEL_WIDTH_BY_TEXT_CLASS = 'dx-layout-manager-hidden-label';
export var FIE... |
Pokedex.Views = {}
Pokedex.Views.PokemonIndex = Backbone.View.extend({
events: {
"click li": "selectPokemonFromList"
},
initialize: function (options) {
this.listenTo(this.collection, "sync", this.render);
},
addPokemonToList: function (pokemon) {
this.$el.append(JST['pokemonListItem']({ pokemo... |
import React from "react";
import { MDBCol, MDBContainer, MDBRow, MDBFooter } from "mdbreact";
import {Container} from "react-bootstrap";
import { Link } from "react-router-dom";
import { MDBIcon, MDBBtn } from 'mdbreact';
const FooterPagePro = () => {
return (
<Container fluid style={{ backgroundColor: ... |
// Code your solution in this file!
function distanceFromHqInBlocks(address){
if(address > 42){
return address - 42
}else{
return 42-address
}
}
function distanceFromHqInFeet(n){
return distanceFromHqInBlocks(n) * 264
}
function distanceTravelledInFeet(start, end){
if (end > start){
let distan... |
const { execSync } = require("child_process");
const fs = require("fs");
const files = fs.readdirSync(process.cwd());
const vpkfiles = files.filter(file => file.endsWith('.vpk'));
const matches = [];
for (const file of vpkfiles) {
const stdout = execSync('vpk -l ' + file)
if (stdout.includes(process.argv[2])) ... |
(function(){
var navigation = Array.prototype.slice.call(document.querySelectorAll('ul#navigation li'));
var sections = Array.prototype.slice.call(document.querySelectorAll('section'));
var hideAllSections = function() {
sections.forEach(function(section) {
section.classList.remove('active');
});
navigatio... |
/**
* HELPER
*
* console.log wrap
*
* @param params
*/
const chalk = require('chalk');
let helper = function (params) {
let self = this;
self.print_level = 1; // > default print out to console [error]
self.method = 4; // default method console[log]
self.module_name = params && params.module_name || "logg... |
$(document).ready(function() {
Checkout.signUpToggle();
Session.create("#sign-in", "#sign-in-container", true);
Checkout.confirmAdress("#adress-confirmation");
// CALLING AJAX FUNTION TO FETCH RESULT OF STRIPE SCRIPT
const stripeSecret = "<?php echo STRIPE_PUBLISHABLE_KEY ?>";
const appStr... |
import React from 'react'
import './style.css'
export default function Avatar({contact}) {
const firstLetter = contact.first_name.charAt(0).toUpperCase();
const secondLetter = contact.last_name.charAt(0).toUpperCase();
return (
<div className="d-flex align-items-center justify-content-center... |
import {combineReducers, createStore, applyMiddleware} from 'redux'
import thunk from 'redux-thunk';
import {dataReducer} from './modules/dataReducer.js'
import {changeProjectReducer} from './modules/changeProject.js'
import {loginReducer} from './modules/loginReducer.js'
const reducer = combineReducers({
dataRedu... |
describe('VglPointsMaterial:', function suite() {
const { VglPointsMaterial, VglNamespace } = VueGL;
it('without properties', function test(done) {
const vm = new Vue({
template: '<vgl-namespace><vgl-points-material ref="m" /></vgl-namespace>',
components: { VglPointsMaterial, VglNamespace },
})... |
/*
* ScanLoginPage
*
*/
import React from 'react'
import { injectIntl } from 'react-intl'
import PropTypes from 'prop-types'
import { Form, Alert, Button, Input, message, Modal } from 'antd'
import { connect } from 'react-redux'
import { createStructuredSelector } from 'reselect'
import { makeSelectNetwork } from '... |
import React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import Button from '@material-ui/core/Button';
import Container from '@material-ui/core/Container';
import TextField from '@material-ui/core/TextField';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-... |
function largestSequenceInGrid(grid, seqLength) {
const gridRows = grid.length, gridCols = grid[0].length;
const largestHoriz = largestInLine(grid, (r,c) => [r, c + 1]);
const largestVert = largestInLine(grid, (r,c) => [r + 1, c]);
const largestDiag = largestInLine(grid, (r,c) => [r + 1, c + 1]);
co... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import {removeFromCart, getCart, getCartItems, getCartInfo} from "../../store/reducers/actions/cartActions";
import CartItems from './checkout/CartItems.jsx';
class Cart extends Component {
componentDidMount() {
if(!this.prop... |
import { createStore, applyMiddleware} from 'redux';
import reducer from '../reducer/index';
import thunk from 'redux-thunk';
const enhanser = applyMiddleware(thunk);
const store = createStore(reducer, {}, enhanser);
//dev only
window.store = store;
export default store
|
import {useRecoilState} from "recoil";
import ComponentSelector from "~/components/organisms/DynamicTextBuilder_bak/components/ComponentSelector/ComponentSelector";
import TagExpander from "~/components/pageComponents/tagExpander/TagExpander";
import {pageRenderState} from "../templates/pageRender/PageRenderAtom";
impo... |
Ext.define('ESSM.controller.sys.UserController', {
extend : 'Ext.app.Controller',
requires : ['Ext.ux.TreePicker'],
views : ['sys.UserView','sys.UserForm'],
stores : ['sys.UserStore','sys.RoleStore'],
models : ['sys.User'],
refs : [{
ref : 'form',
selector : 'userForm'
},{
ref : 'grid',
selector : 'user... |
import flux from 'flux-react';
import actions from '../actions/actions.js';
var NavBarStore = flux.createStore({
status : {
buttonVisible : false
},
actions: [
actions.showBackButton,
actions.hideBackButton
],
showBackButton : function(){
this.status.buttonVisible = ... |
import { LightningElement, wire } from "lwc";
import fetchAttachment from "@salesforce/apex/FileUploader.fetchAttachment";
export default class PdfGenerate extends LightningElement {
pdfData;
@wire(fetchAttachment)
wiredAttachment({ error, data }) {
if (data) {
this.pdfData = data;
this.onLoad()... |
angular.module('jobzz')
.controller('ProfileEmployeeCtrl', ['$scope', 'profileService', function ($scope, profileService) {
profileService.getFullAccount('/employee/account/full').then(function (response) {
$scope.employee = response;
});
profileService.getAllReview('/employee/... |
import React from 'react'
import Image from './illustration.png'
import './CSS/illustration.css'
function Illustration({text}) {
return (
<div className="illustration-main">
<div className="illustration-main-image">
<img src={Image}></img>
</div>
<div cla... |
"use strict";
require("./core");
/* global DevExpress */
/* eslint-disable import/no-commonjs */
module.exports = DevExpress.renovation = {}; |
import React from "react";
import hero from "./../images/illustration-hero.svg";
import "./index.css";
const Header = () => {
return (
<div className="header">
<div className="description">
<h1>A Simple Bookmark Manager</h1>
<p>
A clean and simple interface to organize your favouri... |
//variable declarations
var express = require('express'),
mongoose = require('mongoose'),
router = new express.Router(),
isLoggedIn = require("../isLoggedIn.js"),
request = require("request");
//mongoose connections
var Video = require("../models/video");
var Locati... |
(function() {
var Main;
Main = (function() {
function Main(name) {
this.name = name;
this.hello;
}
Main.prototype.hello = function() {
return alert(this.name);
};
return Main;
})();
document.Main = new Main("sammy");
}).call(this);
|
import angular from "/ui/web_modules/angular.js";
import {MnElementCargoComponent,
MnElementDepotComponent} from "/ui/app/mn.element.crane.js";
import {downgradeComponent} from "/ui/web_modules/@angular/upgrade/static.js";
export default "mnElementCrane";
angular
.module('mnElementCrane', [])
.directive... |
import { Router } from 'express';
import MenuController from '../controllers/menu.controller';
import CheckAuth from '../middleware/check-auth';
const router = Router();
router.get('/', MenuController.fetchMenu);
router.post('/', CheckAuth.caterer, MenuController.addMeal);
router.delete('/', CheckAuth.caterer, MenuCon... |
function printError(elemId, hintMsg) {
document.getElementById(elemId).innerHTML = hintMsg;
}
function validateForm() {
var name = document.contactForm.name.value;
var email = document.contactForm.email.value;
var password = document.contactForm.password.value;
var gender = document.contact... |
import { getFirebase } from 'react-redux-firebase';
export default function fetchHosEnded(countryCode) {
const firebase = getFirebase();
return firebase.unWatchEvent('value', countryCode);
}
|
import React from "react";
import { url } from "./constants";
import { setChannels } from "./actions";
import { connect } from "react-redux";
import Routes from "./components/Routes";
class App extends React.Component {
source = new EventSource(`${url}/stream`);
componentDidMount() {
this.source.onmessage = ev... |
import { getUser } from './get-user';
describe('When everything is OK', () => {
test('should return a response', async () => {
const result = await getUser();
expect(result).toEqual({id: "1", name: "Paula"});
});
}); |
var path = require('path');
var View = require('./completion_rate');
var templatePath = path.resolve(__dirname, '../../templates/modules/user-satisfaction-graph.html');
module.exports = View.extend({
templatePath: templatePath,
templateContext: function () {
return {
hasBarChart: this.model.get('paren... |
var noneCheck = false;
$(document).ready(function(){
$('.questions').jScrollPane();
$("input:checkbox").change(function(){
processCheckboxEvent($(this));
});
$("input:checkbox").each(function(){
var noneFlag = $(this).attr("noneFlag");
if(noneFlag == "true" && $(this).is(':checked')){
noneCheck ... |
$(function () {
massageObjects = [{
name : "Sports Massage",
description : "A massage specific to athletes and the muscles they use in their particular sport.\
<br><br>\
Sports massages help to prevent injury and maintain a healthy body that performs at the optimum level.\
The focus is on stret... |
import {useContext} from 'react';
import {Link} from 'react-router-dom';
import {AppContext} from '../../context-provider/App-Context';
import classes from './MainHeader.module.css';
function MainHeader() {
const context = useContext(AppContext);
return (
<header className={classes.header}>
... |
(function() {
angular
.module('loc8rApp')
.service('pharmaReport', pharmaReport);
pharmaReport.$inject = ['$http'];
function pharmaReport ($http) {
var getPharmaReportSummary = function (profile_id, offset, limit) {
return $http.get('/api/getPharmacogenomicReport?profile_id=' + profile_id... |
module.exports.home = (req,res,next)=>{
var fs = require('fs');
var names = fs.readdirSync('public/images/');
var paths = [];
for (var i = 0, len = names.length; i < len; i++) {
var s ='images/'+names[i];
paths.push(s);
};
res.render('gallery', { imgs: paths, layout:false});
};
|
import "./index.scss";
const change = msg => {
document.querySelector("body").innerText = msg;
};
document.querySelector("body").innerText = "Hello, World!";
setTimeout(() => {
change("Deferred hello world!");
}, 3000);
|
var mn = mn || {};
mn.components = mn.components || {};
mn.components.MnBucketsItemDetails =
(function (Rx) {
"use strict";
mn.core.extend(MnBucketsItemDetails, mn.core.MnEventableComponent);
MnBucketsItemDetails.annotations = [
new ng.core.Component({
selector: "mn-buckets-item-details",
... |
/**
* Defines user agent for browser instances
*
* @type {{desktop: {name: string, userAgent: string, viewport: {width: number, height: number}}}}
*/
module.exports = {
desktop: {
'name': 'Desktop',
'userAgent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.22... |
$(document).ready(function ()
{
/*
|--------------------------------------------------------------------------
| CHANGING PASSWORD FUNCTION
|--------------------------------------------------------------------------
| WHEN THE ADD CURRENCY FORM SUBMIT BUTTON IS CLICKED
|------------------------------------------------... |
'user strict'
module.exports = (sequelize, DataTypes) => {
const Bookmark = sequelize.define('bookmark', {
active: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true
}
}, {
paranoid: true
});
return Bookmark
}
|
// Tags in double mustaches automatically escape HTML:
{{ contents }} |
/*
* 解析body
* eg:post来传递表单,json数据,或者上传文件
* (xml数据没办法通过koa-bodyparse解析,有另一个中间件koa-xml-body)
*/
const bodyParser = require("koa-bodyparser");
// 用来处理跨域的中间件
const cors = require("kcors");
// 静态资源请求中间件
const serve = require("koa-static");
const path = require("path");
const requestBodyParser = bodyParser({
enableTypes: ... |
class Paddle extends GameObject {
constructor(x, y) {
super(x, y);
this._paddleSpeed = 10;
this.width = 15;
this.height = 100;
this.view = new PaddleView(this);
}
get paddleSpeed() { return this._paddleSpeed; }
goUp() {
if (this.positio... |
import React from 'react';
import BlogPost from '../BlogPost/BlogPost';
import tony from '../../../images/bloger.png';
import './Blogs.css'
const blogData = [
{
title : 'Troubleshooting Anti-Lock Brakes',
description : 'The brakes on your vehicle work hard every time you drive. When you slow down ... |
//============ LetsUpgrade JavaScript DAY 2 Assignment ==================
//============================== Program 1 ==============================
//Program to search for a particular character in a string
function search_character(str) {
return str.search("Developer")
}
console.log(search_character("I a... |
import React from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import TopbarVilla from "../topbar/villa/TopbarVilla";
import SidebarVilla from "../sidebar/dashboard/villa/SidebarVilla";
const MainVilla = (props)=> {
return(
<div className={'site-villa'}>
<Topba... |
var _=require("lodash");
var worker =function getActiveUsers(users){
return _.where (users, active:true);
};
module.exports=worker; |
"use strict";
//Very simple module that handles mouse position based parallax
//Could easily be expanded to include more layers
app.parallax = (function() {
let a = app;
function update() {
let sp = a.state.parallax;
if (!sp.enabled)
return;
let mouse = a.keys.mouse();
... |
import {
REQUEST_POSTS,
requestPosts
} from '../actions'
describe("actions", () => {
it("creates an action to update isFetching", () => {
const sub = 'reactjs'
const expectedAction = {
type: REQUEST_POSTS,
sub
}
expect(requestPosts('reactjs')).toEqual(expectedAction)
})
}) |
import React, { useContext, useEffect } from "react";
import { Link as RouterLink } from "react-router-dom";
import {
Button,
Divider,
Grid,
IconButton,
Link,
Typography,
} from "@mui/material";
import { Box } from "@mui/system";
import { GlobalContext } from "../../context/GlobalState";
import EditIcon fro... |
$(document).ready(function () {
$('.ee-search-block-2 .last-queries span').click(function () {
$('.ee-search-block-2 .form-text').val($(this).text());
});
$('.ee-search-block-2 .last-queries .expand-toggle').click(function () {
$(this).parent().addClass('-expanded');
});
});
|
const test = require('tape');
const isMap = require('./isMap.js');
test('Testing isMap', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof isMap === 'function', 'isMap is a Function');
//t.deepEqual(isMap(args..), 'Expected');
/... |
import db from '../../models'
const config = require('../../config').config
import RESPONSES from '../../utils/responses'
import { Sequelize } from '../../models'
import * as bcrypt from 'bcryptjs'
import * as jwt from 'jsonwebtoken'
class AuthController {
static async Login(req, res) {
const { body } = req
... |
var BaseModel = require('./base_model')
var db = require('../db')
class PricingModel extends BaseModel {
static table = 'pricings'
// constructor () {
// super('pricings')
// }
static prices (id) {
const sql = `select prices.id, prices.price, prices.name, prices.value from prices
join pricing_price... |
app.controller('blogCtrl', ['$scope', function($scope){
$scope.blogs = [];
$scope.title = [];
$scope.getTitle = function(index){
return $scope.title[index];
};
$scope.init = function(){
$scope.title = ['Book','Movie','Review','Tech','Travel']
$scope.blogs = [
{
Name:"ไอสไตน์ กล่าวไว้ !",
Con... |
'use strict';
module.exports = (sequelize, DataTypes) => {
const Questions = sequelize.define(
'questions',
{
title: DataTypes.STRING,
content: DataTypes.STRING,
users_id: DataTypes.INTEGER,
categories_id: DataTypes.INTEGER
},
{}
);
Questions.associate = function(models) {
// associations can b... |
function Header(){
return (
<header>
<h1>Borgers R Us</h1>
</header>
)
}
export default Header |
"use strict"
let userName = prompt("whos`s there?", "");
if(userName === "Admin"){
let pass = prompt("Password?", "");
if(pass === "TheMaster"){
alert("Welcome");
}else if(pass === "" || pass === null){
alert("cancelled");
}else {
alert("Wrong Password");
}
}else if(userN... |
const Showcase = () => {
return (
<div id="showcase" className="ptb_100">
<img src="show-case.png" className="full-image" width="100%" alt="Showcase"></img>
</div>
)
}
export default Showcase |
module.exports = (db) => {
return {
async createUsers(users) {
await db.collection('users').insertMany(users)
return users
},
}
}
|
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { hashMemo } from '@/utils/hashData';
import injectStyles from '@/utils/injectStyles';
import { CHART_TYPE } from './constants';
import Fill from './elements/Fill';
import FillVertical from './elements/FillVertical';
import Stacked f... |
import React from 'react';
function ChannelPeoples({display}) {
return (
display ?
<div className='channelPage-peopleList-right'>
<div className='channelPage_channelUsers'>
<div className='channelPage_userGroup'>
<p className='peopleList-roleTitle'>Admin - 1</p>
<div classNa... |
const mongoose = require('mongoose')
const Schema = mongoose.Schema
const questionSchema = new Schema({
title: {
type: String,
required: [true, 'cannot post blank title question']
},
body: {
type: String,
required: [true, 'cannot post blank body question']
},
userId: {
type: Schema.Type... |
Ext.ns('App', 'App.locale');
App.init = function() {
Ext.QuickTips.init();
App.security.createLoginWindow();
App.security.checkLogin();
App.accordion = App.createAccordion();
App.viewProcessDefinition = App.createViewProcessDefinition();
App.processDefinitions.store.load();
App... |
import basefunction from "../reusable/orgBaseFunctions";
import customerBaseFunction from "../reusable/cstBaseFunctions01";
import adminPage from "../pageObject/cypMailPage";
import cstBaseFunction2 from "../reusable/cstBaseFunctions02";
import orgPg from "../pageObject/solePage";
describe("organization admin operatio... |
import React from 'react'
import htmlImage from '../../../assets/images/html.png';
import cssImage from '../../../assets/images/css.png';
import jsImage from '../../../assets/images/js.png';
import nodeImage from '../../../assets/images/node.png';
import webpackImage from '../../../assets/images/webpack.png';
import r... |
import createReducer from '../helpers/createReducer';
import { NavigationActions } from 'react-navigation';
import { AppNavigator } from '../../navigators/AppNavigator';
import { StatusBar } from 'react-native';
const firstAction = AppNavigator.router.getActionForPathAndParams('LoggedIn');
const initialNavState = AppN... |
// @flow
import Protobuf from 'pbf'
export type Projection = 'vector' | 'll' | 'uv' | 'st'
export default class VectorTileFeature {
properties: Object = {}
extent: number
type: number = 0
scheme: number = 0
_pbf: Protobuf
_projection: number = 1
_geometry: number = -1
_keys: Array<string>
_values: A... |
/*
* Kita
*
* cookies.js
*
* A handy helper to CRUD client side cookies
*
* Shann McNicholl (@shannmcnicholl)
*
* License Pending
*/
define(
["../src/is"],
function(is) {
if(!is(document, "htmldocument") || !is(document.cookie, "string")) return false;
return {
/*
* getAll
... |
import { getDateId } from '../utils'
const day0 = new Date()
const y = day0.getFullYear()
const m = day0.getMonth()
const d = day0.getDate()
const day0Id = getDateId(day0)
const activityDataInit = {
list: ['1','2','3','4','5'],
schedule: ['3','4'],
data: {
'1': {
id: '1',
t... |
/*
Write a function allConstruct(target, wordBank)
the function should return a 2d array containing all of the ways that the target can be constructed by concatenating elements of the wordBank array.
Each element of the 2D array should represent one combination that constructs the target
You may reuse elements
*/
c... |
var elixir = require('laravel-elixir');
require('laravel-elixir-vueify');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some b... |
(function () {
'use strict';
angular.module('itemModule')
.controller('ItemDetailController', [
'$scope',
'$stateParams',
'Items',
function ($scope, $stateParams, Items) {
var vm = this;
Items.get({ id: $stateParams.id }, function (item) {
vm.item = item;
});
}
]);
})(); |
import React from 'react';
import Review from './Review'
let ramenData = require('../data/ramen.json')
class Ramen extends React.Component {
state = {
country: ramenData[0]["country"],
ramen_brand: ramenData[0]["brand"],
ramen_variety: ramenData[0]["variety"],
review_score: ramenDat... |
import React, { useRef, useEffect } from 'react';
import { BrowserRouter as Router, } from "react-router-dom";
import Wrapper from "./components/Wrapper"
import Footer from "./components/Footer"
import Home from "./components/Home"
import About from "./components/About"
import RecentProjects from "./components/RecentPr... |
import Vue from 'vue'
import Vuex from 'vuex'
import { deleteToken } from '../common/jwt.storage'
import { API_SERVICE } from '../common/api'
import * as games from '@/store/modules/games.module'
import * as players from '@/store/modules/players.module'
import * as tournament from '@/store/modules/tournament.module'
i... |
var admin = require('firebase-admin');
var serviceAccount = require('./credentials.js');
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://cohesive-79cd9.firebaseio.com"
});
console.log('Application initiliazed');
var db = admin.database();
var ref = db.ref("Test"... |
/**
* create time 2017/03/01
* author cash
* */
import {updateCtrl} from '../js/service/updateVersion/updateVersionCtrl';
function JsBridge (fnName, data, callback, f7){
const handler = (fnName, data, callback) => {
window.WebViewJavascriptBridge.callHandler(
fnName,
data,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.