Skip to content

Instantly share code, notes, and snippets.

@jonnybest
jonnybest / rares.txt
Last active August 29, 2015 14:00
My list of rares for Elements the game
# Shards
6 Shard of Bravery (Fire)
4 Shard of Divinity (Light)
3 Shard of Focus (Gravity)
1 Shard of Freedom
4 Shard of Gratitude
4 Shard of Integrity
2 Shard of Patience
4 Shard of Readiness
public void checkAction() {
String text = "The penguin jumps once.";
edu.stanford.nlp.pipeline.Annotation annotationDocument = new edu.stanford.nlp.pipeline.Annotation(text);
edu.stanford.nlp.pipeline.StanfordCoreNLP classificationsPipeline;
// creates a StanfordCoreNLP object, with POS tagging,
// lemmatization,
// NER, parsing, and coreference resolution
Properties pipelineConfiguration = new Properties();
@jonnybest
jonnybest / getRequest.java
Created December 6, 2013 15:12
This is a simple method for fetching web content. It's my fork of http://www.xyzws.com/Javafaq/how-to-use-httpurlconnection-post-data-to-web-server/139 which is for POST requests only.
/** Fetches a website from the given URL.
*
* @param targetURL
* @return the website as a string
* @throws IOException
*/
public static String executeGet(String targetURL) throws IOException {
URL url;
HttpURLConnection connection = null;
frog A frog sits left of the Brokkoli facing it.
piece A piece of Brokkoli is in front of him.
plate A plate is on the table
rabbit A rabbit is sitting behind the broccoli.
Alice Alice is facing away from the bunny.
alien At the right side of the scene in the background is an alien.
bulb At the start of the scene, on the left is a light bulb which is off.
astronaut At the start the astronaut is facing to the front of the screen and the monster on wheels is positioned towards the back of the screen.
metal bucket Behind it to the left is a metal bucket.
duckling Behind it to the right is a yellow duckling wearing red socks, a crown and a scepter.
@jonnybest
jonnybest / fake-checkbox-style.css
Last active December 16, 2015 01:19
Computed styles for jQuery mobile checkbox widget http://view.jquerymobile.com/1.3.0/docs/widgets/checkbox/
.checkbox-button {
border-bottom-color: rgba(255, 255, 255, 0.298039);
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
border-left-color: rgba(255, 255, 255, 0.298039);
border-right-color: rgba(255, 255, 255, 0.298039);
border-top-color: rgba(255, 255, 255, 0.298039);
border-top-left-radius: 16px;
border-top-right-radius: 16px;
@jonnybest
jonnybest / get-proof-sample.smt2
Created November 19, 2012 21:14
An example of using the get-proof command for Z3
(set-option :produce-proofs true)
(declare-const a Int)
(assert (and (> a 3) (< a 2)))
(check-sat)
(get-proof)
@jonnybest
jonnybest / proof-sat.md
Created November 4, 2012 16:31
Satisfiability table for proof expressions

test

+-----------+------------+---------------------+---------------+

test test test test
test 6 test
+-----------+------------+---------------------+---------------+
@jonnybest
jonnybest / ematching-solvable.smt2
Created October 24, 2012 11:59
a satisfiable problem which can be solved with MBQI only (and an extension which lets MBQI fail)
(set-option :macro-finder true)
(set-option :ematching true)
(set-option :mbqi false)
;; sorts
(declare-sort Atom)
(declare-sort Rel1)
(declare-sort Rel2)
(declare-sort Rel3)
;; --end sorts
@jonnybest
jonnybest / syntaxtest.smt2
Created October 23, 2012 06:32
The translation of a simple Alloy problem with Counterexample into SMT2
(set-logic AUFLIA)
(set-option :macro-finder true)
;; sorts
(declare-sort Atom)
(declare-sort Rel1)
(declare-sort Rel2)
(declare-sort Rel3)
(declare-sort Rel4)
(declare-sort Rel5)
;; --end sorts
@jonnybest
jonnybest / syntaxtest.als
Created October 23, 2012 06:30
A simple Alloy problem with Counterexample with translation to SMT2 (to be used at (http://stackoverflow.com/questions/13025127/getting-sat-for-large-problems)
sig A {}
sig B {
fn : A -> lone B
}
fact {
no (A ->fn->A)
}