Package

razie

Permalink

package razie

Visibility
  1. Public
  2. All

Type Members

  1. class AA extends AttrAccessImpl

    Permalink

    simplified AttributeAccess :)

  2. class AI extends ActionItem

    Permalink

    simplified ActionItem

    simplified ActionItem

    i really should drop the stupid java base classes and move it all to scala

  3. class CSTimer extends AnyRef

    Permalink
  4. class DomXpSolver extends XpSolver[RazElement]

    Permalink

    this resolves XML dom trees

  5. case class GPath(expr: String) extends Product with Serializable

    Permalink

    simple base class to decouple parsing the elements from their actual functionality

  6. final class Icons extends Enum[Icons]

    Permalink
  7. class JAA extends AnyRef

    Permalink
  8. trait Logging extends AnyRef

    Permalink

    A Logging trait you can mix into an implementation class without affecting its public API

    A Logging trait you can mix into an implementation class without affecting its public API

    NOTE: IF you get an anon class name, you can override the logger: protected override val logger = newlog (classOf)

    NOTE: the formatting uses java.lang.String.format NOT slf4j formatting by reason of clusterfuk

  9. case class Near(l: List[Double], percent: Int = 20) extends Product with Serializable

    Permalink

    test that results are near some expeted results

  10. class NoStatic[T >: Null <: AnyRef] extends AnyRef

    Permalink

    thread local static object - ThreadLocal is easy to implement, not neccessarily to use

    thread local static object - ThreadLocal is easy to implement, not neccessarily to use

    Note this is not quite per-thread only...it is per ExecutionContext, so there can be multiple "statics" per JVM - see that class

    Use like public static NoStatic myStatic = new NoStatic("myStatic", new MyClass(...)) .

    On a thread, reset the default value if needed: myStatic.set(newValue)

    In code, access like a static, don't worry about thread: myStatic.get or myStatic()

    see TLNoStatic for why ThreadLocal is not usable

    See also

    com.razie.pub.base.ExecutionContext

    com.razie.pub.base.test.TestNoStatic

  11. class RStringBase extends AnyRef

    Permalink

    some string utilities

  12. class SampleSM extends StateMachine

    Permalink

    sample state machine

  13. case class SnakkRequest(protocol: String, method: String, url: String, headers: Map[String, String], content: String, id: String = "") extends Product with Serializable

    Permalink
  14. case class SnakkResponse(responseCode: String, headers: Map[String, String], content: String, ctype: String, id: String = "") extends Product with Serializable

    Permalink
  15. class SnakkUrl extends AnyRef

    Permalink

    wraps an URL with some arguments to be passed in the call

  16. trait Test extends AnyRef

    Permalink

    much simplified unit test primitives: expect()

  17. trait UrlTester extends AnyRef

    Permalink

    helper trait - include this to get the url constructs

    helper trait - include this to get the url constructs

    See class snakking.test.SampleWebTest for examples

  18. class WrapAttrAccess extends AA

    Permalink

    hierarchical implementation - this one adds stuff to a parent's

  19. case class XP[T](gp: GPath) extends Product with Serializable

    Permalink

    a simple resolver for x path like stuff.

    a simple resolver for x path like stuff. note the limitation at the bottom

    can resolve the following expressions

    /a/b/c /a/b/@c /a/b[cond]/... /a/{assoc}b[cond]/...

    / a / * / c - ignore one level: explore all possibilities for just that level

    One difference from classic xpath is that the root node can be specified, see "a" above

    It also differs from a classic xpath by having the {assoc} option. Useful when navigating models that use assocations as well as composition (graphs). Using "/a/{assoc}b" means that it will use association {assoc} to find the b starting from a...

    TODO the type system here is all gefuckt...need better understanding of variance in scala. See this http://www.nabble.com/X-String--is-not-a-subtype-of-X-AnyRef--td23428970.html

    Example usage:

    • on Strings: XP("/root").xpl(new StringXpSolver, "/root")
    • on scala xml: XP[scala.xml.Elem] ("/root").xpl(new ScalaDomXpSolver, root)

    NOTE - this is stateless with respect to the parsed object tree - it only keeps the pre-compiled xpath expression so you should reuse them as much as possible

    Note that this is a limited play-type thing. There are full XPATH implementations to browse stuff, like Apache's JXpath.

    The main features of this implementation are: 1) small and embeddable 2) works for most every-day things and 3) extensiblity: you can easily plugin resolvers.

  20. class XPSolved[T] extends AnyRef

    Permalink

    Simple helper to simplify client code when the context doesn't change: it pairs an XP with a particular context/solver.

    Simple helper to simplify client code when the context doesn't change: it pairs an XP with a particular context/solver.

    So you can just use it after creation and not worry about carrying both arround.

  21. class XpCond extends AnyRef

    Permalink

    the condition of an element in the path.

    the condition of an element in the path.

    TODO 3-2 maybe i should extract a trait and use it?

    this default implementation supports something like "[@attrname==15]"

  22. class XpElement extends AnyRef

    Permalink

    an element in the path: "{assoc}@prefix:name[cond]"

  23. trait XpSolver[T] extends AnyRef

    Permalink

    the strategy to break down the input based on the current path element.

    the strategy to break down the input based on the current path element. The solving algorithm is: apply current sub-path to current sub-nodes, get the results and RESTs. Filter by conditions and recurse.

Value Members

  1. object AA

    Permalink

    simplify usage of AttrAccess - attribute management

  2. object AI

    Permalink

    simplified ActionItem

    simplified ActionItem

    i really should drop the stupid java base classes and move it all to scala

  3. object Alarm

    Permalink
  4. object Boolean

    Permalink

    i can never find the stupid parse methods Adapted by Alexandre Martins

  5. object Debug

    Permalink
  6. object Error

    Permalink
  7. object G

    Permalink
  8. object M

    Permalink

    helper class - has all the conversions

  9. object MOLD

    Permalink
  10. object NoStatic

    Permalink
  11. object NoStaticS

    Permalink

    TODO 1-1 copy NoStatics docs here and ditch old one?

  12. object OR

    Permalink

    replaces getOrElse, orElse AND if(String.length>1) x else y

  13. object Perf

    Permalink

    MT performance testing tools

  14. object RJS

    Permalink

    conversions from java to scala collections

    conversions from java to scala collections

    probably the thing I hate the most about scala: interacting with Java collections

    use like this: RJS(javalist).foreach -OR- RJS apply javalist foreach -OR- RJS list javalist sort OR for (x <- RJS.apply(whatever-java-threw-at-you))...

  15. object RSJ

    Permalink

    conversions from scala to java collections.

    conversions from scala to java collections. TRY NOT TO do this, unless you absolutely have to :)

    probably the thing I hate the most about scala: interacting with Java collections

    use like this RSJ(scalalist)

  16. object RString extends RStringBase

    Permalink
  17. object RazString extends RStringBase

    Permalink
  18. object SM extends Logging

    Permalink

    state machines have states, transitions and consume events

  19. object SampleSMain extends App

    Permalink
  20. object ScalaDomXpSolver extends XpSolver[Elem]

    Permalink

    this resolves scala xml dom trees

  21. object Sed

    Permalink

    sed like filter using Java regexp

    sed like filter using Java regexp

    example: from US to normal: Sed ("""(\d\d)/(\d\d)/(\d\d)""", """\2/\1/\3""", "01/31/12")

    Essentially useless since plain "sss".replaceAll(..., "$1 $2...") works almost the same way..

  22. object SedTest extends App

    Permalink
  23. object Snakk

    Permalink

    rapid decomposition of data in different formats, from different sources

    rapid decomposition of data in different formats, from different sources

    NOTE that snakking will wrap the snacked so you'll need to unwrap at the end, so an expression like { root \ "j" map identity } is the same as { for ( n <- root \ "j" ) yield n }

  24. object StringXpSolver extends XpSolver[String]

    Permalink

    this example resolves strings with the /x/y/z format

  25. object TestSample extends App with Test

    Permalink
  26. object Threads

    Permalink

    multithreading helpers, to tie me over until I learn to effectively exploit actors or other inferior beings

  27. object Timer

    Permalink
  28. object U

    Permalink

    unix like commons - easy to invoke

  29. object UMain extends App

    Permalink
  30. object Warn

    Permalink
  31. object XP extends Logging with Serializable

    Permalink

    Example of creating a dedicated solver

  32. object XpCondFactory

    Permalink

    overwrite this if you want other scriptables for conditions...it's just a syntax marker

  33. object args

    Permalink
  34. package audit

    Permalink
  35. package base

    Permalink
  36. object cdebug extends Logging

    Permalink

    c++ memories, anyone...

    c++ memories, anyone... i do like to use the cout << x instead of println(x)

  37. object clog extends Logging

    Permalink

    c++ memories, anyone...

    c++ memories, anyone... i do like to use the cout << x instead of println(x)

  38. object cout

    Permalink

    c++ memories, anyone...

    c++ memories, anyone... i do like to use the cout << x instead of println(x)

  39. object csys extends Logging

    Permalink

    c++ memories, anyone...

    c++ memories, anyone... i do like to use the cout << x instead of println(x)

  40. object ctrace extends Logging

    Permalink

    c++ memories, anyone...

    c++ memories, anyone... i do like to use the cout << x instead of println(x)

  41. package db

    Permalink
  42. package diesel

    Permalink
  43. package g

    Permalink
  44. package hosting

    Permalink
  45. object js

    Permalink

    json helpers

    json helpers

    a json is represented as maps of (name,value) and lists of values, either of which can be recursive, representing a json object via a map and an array as a list.

    we do not have a common Node class - but simple Map and List

  46. package s2

    Permalink
  47. package snakked

    Permalink
  48. package tconf

    Permalink
  49. package wiki

    Permalink
  50. package xp

    Permalink
  51. object |>

    Permalink

    just some fun operator to keep the code looking nice

Deprecated Value Members

  1. object Log extends Logging

    Permalink

    some logging basics

    some logging basics

    Deprecated

    use the Logging trait

Ungrouped