Skip to content

Instantly share code, notes, and snippets.

import { useState, useEffect } from 'react';
import axios from 'axios';
import { useHistory } from 'react-router-dom';
import { Container, Form, FormGroup, Label, Input, Button, Alert } from 'reactstrap';
import 'bootstrap/dist/css/bootstrap.min.css';
function LoginPage({ onLogin }) {
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const [error, setError] = useState(null);
package com.comandante.game.opponents;
import com.comandante.game.board.GameBlock;
import com.comandante.game.board.GameBlockType;
import com.comandante.game.board.GameBoardCellEntity;
import com.comandante.game.board.GameBoardData;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.List;
{
"name": "fire berserker",
"colorName": "@c-red@f@c-yellow@i@c-magenta@r@c-red@e@c-reset@ @c-bold-on@@c-magenta@berserker@c-reset@",
"stats": {
"strength": 9,
"intelligence": 0,
"willpower": 0,
"aim": 3,
"agile": 3,
"armorRating": 40,
{
"name": "fire berserker",
"colorName": "@c-red@f@c-yellow@i@c-magenta@r@c-red@e@c-reset@ @c-bold-on@@c-magenta@berserker@c-reset@",
"stats": {
"strength": 9,
"intelligence": 0,
"willpower": 0,
"aim": 3,
"agile": 3,
"armorRating": 40,
{
"internalItemName": "basic wood chest",
"itemName": "basic wood chest",
"itemDescription": "a basic wooden chest",
"restingName": "a wooden chest rests on the groud.",
"valueInGold": 15,
"itemHalfLifeTicks": 60,
"rarity": "BASIC",
"itemTriggers": [
"chest",
/**
* <ul>
* <li>{@code keyCreator} creates the key which indexes the value to be saved</li>
* <li>{@code reader} reads the value stored with the key provided by {@code keyCreator}</li>
* <li>{@code creator} is a function that takes the value read by {@code reader} and returns a new value to be stored</li>
* </ul>
*/
public <T> void readWriteCompare(Provider<String> keyCreator, Provider<Optional<T>> reader, Function<Optional<T>, T> creator) {
// This method protects against concurrent writes of the owner list using the read-write-compare technique
// Starvation is hedged against with a random sleep, but is still possible
/**
* <ul>
* <li>{@code keyCreator} creates the key which indexes the value to be saved</li>
* <li>{@code reader} reads the value stored with the key provided by {@code keyCreator}</li>
* <li>{@code creator} is a function that takes the value read by {@code reader} and returns a new value to be stored</li>
* </ul>
*/
public <T> void readWriteCompare(Provider<String> keyCreator, Provider<Optional<T>> reader, Function<Optional<T>, T> creator) {
// This method protects against concurrent writes of the owner list using the read-write-compare technique
// Starvation is hedged against with a random sleep, but is still possible
package controllers;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import models.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.pdfbox.exceptions.COSVisitorException;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
List<Object> external_id = inputFileJsonLines.stream().map(new Function<String, Optional<JsonNode>>() {
public Optional<JsonNode> apply(String s) {
try {
return Optional.ofNullable(objectMapper.readTree(s));
} catch (IOException e) {
return Optional.empty();
}
}
}).filter(new Predicate<Optional<JsonNode>>() {
public boolean test(Optional<JsonNode> jsonNode) {
#!/bin/sh
getinfo () {
MODEL=$1
ZIP=$2
curl http://www.apple.com/shop/retail/pickup-message\?parts.0\=${MODEL}\&location\=${ZIP}\&little\=true\&cppart\=ATT%2FUS 2>/dev/null | python -m json.tool | grep pickupDisplay
}
echo "7 Plus 256gb GOLD"
getinfo MN5D2LL%2FA 97034