This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import java.nio.file.*; | |
import java.io.*; | |
class CalculateAverage { | |
public static void main(String args[]) throws FileNotFoundException { | |
// Use these later | |
String inLocation, outLocation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gql | |
import ( | |
"context" | |
"github.com/czbaker/go-loginsystem/models" | |
) | |
// Resolver is our root resolver | |
type Resolver struct{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<h2>Vuex Example:</h2> | |
<button type="button" @click="decrement(5)">Subtract 5</button> | |
<button type="button">Subtract 1</button> | |
<input type="text" disabled v-model="counter"/> | |
<button type="button">Add 1</button> | |
<button type="button">Add 5</button> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from 'path'; | |
import express from 'express'; | |
import webpack from 'webpack'; | |
import webpackDevMiddleware from 'webpack-dev-middleware'; | |
import webpackHotMiddleware from 'webpack-hot-middleware'; | |
import bodyParser from 'body-parser'; | |
import { graphqlExpress, graphiqlConnect } from 'graphql-server-express'; | |
// Other imports | |
import Mongoose from './mongoose/mongoose.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { graphql } from 'react-apollo'; | |
import gql from 'graphql-tag'; | |
import Card from './card.jsx'; | |
const GET_MTG_CARD = gql` | |
query get_mtg_url { | |
getMagicCard(name: $cardName) { | |
name | |
url | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"gameLength": 416, | |
"gameMode": "CLASSIC", | |
"mapId": 11, | |
"bannedChampions": [ | |
{ | |
"pickTurn": 1, | |
"championId": 8, | |
"teamId": 100 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ApolloClient, { createNetworkInterface } from 'apollo-client'; | |
const networkInterface = createNetworkInterface('/graphql'); | |
networkInterface.use({ | |
applyMiddleWare(req, next) => { | |
if (!req.options.header) { | |
req.options.header = {}; // Create the header object if needed. | |
} | |
req.options.header.authorization = localStorage.getItem('token') ? localStorage.getItem('token') : null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[misutowolf@ajani ~]$ mopidy | |
Traceback (most recent call last): | |
File "/usr/bin/mopidy", line 9, in <module> | |
load_entry_point('Mopidy==2.0.0', 'console_scripts', 'mopidy')() | |
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point | |
return get_distribution(dist).load_entry_point(group, name) | |
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point | |
return ep.load() | |
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2229, in load | |
return self.resolve() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import util from 'util'; | |
function AppError(settings, implementationContext) { | |
settings = (settings || {}); | |
this.name = 'AppError'; | |
this.type = (settings.type || 'Application'); | |
this.message = (settings.message || 'An error occurred!!!!!!'); | |
this.detail = (settings.detail || ''); | |
this.extendedInfo = (settings.extendedInfo || ''); | |
this.errorCode = (settings.errorCode || ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Mongoose, { Schema } from 'mongoose'; | |
import Random from 'random-js'; | |
// Random Interface | |
const r = new Random(Random.engines.mt19937().autoSeed()); | |
// User Schema | |
const UserSchema = new Schema({ | |
id: { type: String, required: true, default: r.string(20) }, | |
username: { type: String, required: true }, |
NewerOlder