Skip to content

Instantly share code, notes, and snippets.

package examples.git;
public class Circle {
private int x;
private int y;
public Circle (int x, int y) {
this.x = x;
this.y = y;
}
@mox601
mox601 / generalproject experts recommendations
Created June 1, 2011 08:21
recommendations json models
[{"id":21}]
<?php
/*
Plugin Name: Knowledge Room
...
*/
if (!class_exists("KnowledgeRoom")) {
class KnowledgeRoom {
var $pluginPath;
$(".suggest_keys").each(
function() {
$(this).autocomplete({
@mox601
mox601 / autocomplete.js
Created October 26, 2011 12:51
autocomplete jquery configuration json response parsing
/* i added the ?callback=? part to the url because it is a cross-site request and it seems that with callback jquery is treating the request differently, not throwing an error */
var gaia_autocompletion_url = "http://hostname.eu:8080/web-service/suggest?callback=?";
var owner_id = 0;
var filter_status = "true";
function autocompleteFunction () {
$(this).autocomplete({
/*source function.
I need this to query a url with some named parameters and parse the JSON response
"id";"name";"value";"id";"date";"owner";"description"
"000069ff-73bf-4573-ad00-8335fcdbe33b";"projectRecommendationsListJson";"[stringvalue...]";"000069ff-73bf-4573-ad00-8335fcdbe33b";"1322179777431";"recommender";"new project recommendations for user"
"000069ff-73bf-4573-ad00-8335fcdbe33b";"userId";"http://collective.com/profile/user/59";"000069ff-73bf-4573-ad00-8335fcdbe33b";"1322179777431";"recommender";"new project recommendations for user"
"000082b9-f449-417e-ad11-758f9d03b4a7";"resourcesRecommendationsListJson";"[stringvalue...]";"000082b9-f449-417e-ad11-758f9d03b4a7";"1322612906292";"recommender";"new resource recommendations for user"
"000082b9-f449-417e-ad11-758f9d03b4a7";"userId";"http://collective.com/profile/user/20";"000082b9-f449-417e-ad11-758f9d03b4a7";"1322612906292";"recommender";"new resource recommendations for user"
"00009fe8-338b-4b11-a54e-e1ab86a0d0b8";"projectRecommendationsListJson";"[stringvalue...]";"00009fe8-338b-4b11-a54e-e1ab86a0d0b8";"1322158283080";"recommender";"new project rec
@mox601
mox601 / 01-activity creation
Created May 7, 2012 09:21
logging every action inside a website
a
INFO: An exception was caught and reported. Message: java.util.MissingFormatArgumentException: Format specifier 's'
java.lang.RuntimeException: Format specifier 's'
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:163)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:127)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:123)
at eu.granatum.wp5.Neo4jGraphFactory.<init>(Neo4jGraphFactory.java:34)
at eu.granatum.wp5.Neo4jGraphFactory.getInstance(Neo4jGraphFactory.java:24)
at eu.granatum.wp5.services.ProductionJerseyServletModule.getGraph(ProductionJerseyServletModule.java:74)
at eu.granatum.wp5.services.ProductionJerseyServletModule.configureServlets(ProductionJerseyServletModule.java:47)
@mox601
mox601 / gist:4060128
Created November 12, 2012 15:52
neo4j configuration: format specifier 's'
Caused by: java.lang.RuntimeException: Format specifier 's'
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:163)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:127)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:123)
at eu.granatum.wp5.Neo4jGraphFactory.<init>(Neo4jGraphFactory.java:40)
... 46 more
Caused by: java.util.MissingFormatArgumentException: Format specifier 's'
at java.util.Formatter.format(Formatter.java:2448)
at java.util.Formatter.format(Formatter.java:2383)
@mox601
mox601 / gist:4060134
Created November 12, 2012 15:54
blueprints 2.1.0 dependency tree
+- com.tinkerpop.blueprints:blueprints-neo4j-graph:jar:2.1.0:compile
[INFO] | | +- org.neo4j:neo4j:pom:1.8.M06:compile
[INFO] | | | +- org.neo4j:neo4j-kernel:jar:1.8.M06:compile
[INFO] | | | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] | | | +- org.neo4j:neo4j-lucene-index:jar:1.8.M06:compile
[INFO] | | | +- org.neo4j:neo4j-graph-algo:jar:1.8.M06:compile
[INFO] | | | +- org.neo4j:neo4j-udc:jar:1.8.M06:compile
[INFO] | | | +- org.neo4j:neo4j-graph-matching:jar:1.8.M06:compile
[INFO] | | | +- org.neo4j:neo4j-cypher:jar:1.8.M06:compile
[INFO] | | | | \- org.scala-lang:scala-library:jar:2.9.1-1:compile