Skip to content

Instantly share code, notes, and snippets.

View antonkulaga's full-sized avatar

Anton Kulaga antonkulaga

View GitHub Profile
@antonkulaga
antonkulaga / gist:5473253
Last active December 16, 2015 17:49
I get:"scala: value kind is not a member of scalax.collection.edge.LDiEdge[semantic.graph.ConsoleGraphTester.Person] p.edges.map(e=>e.toEdgeIn).filter(e=>e.kind.equals("friend")).foreach{e=>println(e.toString())}" exception ^
package semantic.graph
import scala.Predef._
import scalax.collection.mutable.{Graph => MGraph}
import scalax.collection.GraphEdge._
import scalax.collection.edge._
import scalax.collection.mutable._
import scalax.collection.edge.LBase._
import scalax.collection.edge.Implicits._
@antonkulaga
antonkulaga / gist:5476511
Last active December 16, 2015 18:19
Intellij IDEA infers the type as "N" when I choose "add type annotation" or try to access one of its properties. But the real type here is Person
package semantic.graph
import scala.Predef._
import scalax.collection.mutable.{Graph => MGraph}
import scalax.collection.GraphEdge._
import scalax.collection.edge._
import scalax.collection.mutable._
import scalax.collection.edge.LBase._
import scalax.collection.edge.Implicits._
@antonkulaga
antonkulaga / gist:5496966
Created May 1, 2013 17:59
Scala-graph reveals another portion of scala-plugin bugs
package semantic.graph
import scala.Predef._
import scalax.collection.mutable.{Graph => MGraph}
import scalax.collection.GraphEdge._
import scalax.collection.edge._
import scalax.collection.mutable._
import scalax.collection.edge.Implicits._
@antonkulaga
antonkulaga / gist:5497894
Created May 1, 2013 19:58
Experiments with scala-graph JSON
package semantic.graph
import scala.Predef._
import scalax.collection.mutable.{Graph => MGraph}
import scalax.collection.GraphEdge._
import scalax.collection.edge._
import scalax.collection.mutable._
import scalax.collection.edge.Implicits._
@antonkulaga
antonkulaga / gist:5506349
Created May 2, 2013 23:53
When I do gen-idea (with 1.4.0 version) I get """ scala: Output path /home/antonkulaga/denigma/gene-app/modules/gene-actors/project/target/idea-test-classes is shared between: Module 'gene-actors-build' tests, Module 'semantic-data-build' tests Output path /home/antonkulaga/denigma/gene-app/modules/gene-actors/project/target/idea-classes is shar…
import sbt._
import sbt.Keys._
/**
* this files is intended to build the main project
* it contains links to all dependencies that are needed
* */
object ApplicationBuild extends GeneActors {
@antonkulaga
antonkulaga / gist:5532205
Created May 7, 2013 12:29
Vivagraph serialization bug
###
it is an extract from one of my classes.
Here a save a log of nodes to the graph but only first one is shown =(
###
@graph = Viva.Graph.graph()
params =
container: @get("node")
@renderer = Viva.Graph.View.renderer(@graph, params)
@renderer.run()
@antonkulaga
antonkulaga / gist:5575690
Created May 14, 2013 13:04
Several widgets on one page
jQuery ->
params =
widget_margins: [10, 10]
widget_base_dimensions: [250, 250]
shift_larger_widgets_down: false
draggable:
items: ".gs_w:not(.dashboard_static)"
gridster = $(".gridster ul").gridster(params).data('gridster');
package org.denigma.frontend.extensions
import scala.collection.immutable._
import rx._
import rx.ops._
//NOTE THIS CODE IS NOT TESTED YET
trait RxCollectionOps {
/**
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<title>Keyboard events do not work for inputs. I cannot type anything there=(</title>
</head>
<body>
<script src="../build/three.min.js"></script>
Alistair Johnson 12:52
// A root, aggregate project
lazy val rootModule = XRootModule(moduleName = "notests", defaultSettings = buildSettings)
lazy val root = rootModule.project(rootJvm, rootJs)
lazy val rootJvm = rootModule.jvmProject(rdfJvm, dbJvm, jena)
lazy val rootJs = rootModule.jsProject(rdfJs, dbJs)
// The RDF Module
type m = Modules#rdf