Skip to content

Instantly share code, notes, and snippets.

View eed3si9n's full-sized avatar

eugene yokota eed3si9n

View GitHub Profile
case class SingularBuiltInTypeTest(singularbuiltintypetestsequence1: general.SingularBuiltInTypeTestSequence1,
singularbuiltintypetestsequence2: general.SingularBuiltInTypeTestSequence2,
singularbuiltintypetestsequence3: general.SingularBuiltInTypeTestSequence3) {
lazy val int = singularbuiltintypetestsequence1.int
lazy val byte = singularbuiltintypetestsequence1.byte
lazy val short = singularbuiltintypetestsequence1.short
lazy val long = singularbuiltintypetestsequence1.long
lazy val float = singularbuiltintypetestsequence1.float
lazy val double = singularbuiltintypetestsequence1.double
lazy val integer = singularbuiltintypetestsequence1.integer
case class LongAllTest(all: Map[String, scalaxb.DataRecord[Any]]) {
lazy val address1 = all("address1").as[general.Address]
lazy val address2 = all.get("address2") map { _.as[general.Address] }
lazy val string3 = all("string3").as[String]
lazy val string4 = all("string4").as[String]
lazy val string5 = all("string5").as[String]
lazy val string6 = all("string6").as[String]
lazy val string7 = all("string7").as[String]
lazy val string8 = all("string8").as[String]
lazy val string9 = all("string9").as[String]
case class LongAttributeTest(attributes: Map[String, scalaxb.DataRecord[Any]]) {
lazy val milk1 = attributes.get("@milk1") map { _.as[MilkType] }
lazy val string2 = attributes.get("@string2") map { _.as[String] }
lazy val string3 = attributes.get("@string3") map { _.as[String] }
lazy val string4 = attributes.get("@string4") map { _.as[String] }
lazy val string5 = attributes.get("@string5") map { _.as[String] }
lazy val string6 = attributes.get("@string6") map { _.as[String] }
lazy val string7 = attributes.get("@string7") map { _.as[String] }
lazy val string8 = attributes.get("@string8") map { _.as[String] }
lazy val string9 = attributes.get("@string9") map { _.as[String] }
package com.eed3si9n.pikopiko;
import com.eed3si9n.pikopiko.R;
import android.content.Context;
import android.graphics.*;
import android.media.*;
import android.graphics.Paint.Style;
public class PikoPikoEngine {
private static final int LOCAL_WIDTH = 6;
/*
* Copyright (c) 2011 e.e d3si9n
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
/*
* Copyright (c) 2011 e.e d3si9n
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:ysearchtypes="http://www.pacificspirit.com/ns/2005/yahoo/srch/types/" xmlns:yahoowns="http://www.pacificspirit.com/ns/2005/yahoo/srch/" targetNamespace="http://www.pacificspirit.com/ns/2005/yahoo/srch/"
xmlns:wsdl="http://www.w3.org/ns/wsdl" xmlns:whttp="http://www.w3.org/ns/wsdl/http"
xmlns:yahoosrch="urn:yahoo:srch" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:import schemaLocation="./Authoring/wsdl/YahooV1Search.xsd"/>
<xs:import schemaLocation="http://api.search.yahoo.com/WebSearchService/V1/WebSearchResponse.xsd"/>
</wsdl:types>
<wsdl:interface name="Search">
<wsdl:operation name="YahooSearch" method="GET" location="{searchString}">
// Generated by <a href="http://scalaxb.org/">scalaxb</a>.
package general
case class SingularBuiltInTypeTest(singularbuiltintypetestsequence1: general.SingularBuiltInTypeTestSequence1,
singularbuiltintypetestsequence2: general.SingularBuiltInTypeTestSequence2,
singularbuiltintypetestsequence3: general.SingularBuiltInTypeTestSequence3,
singularbuiltintypetestsequence4: general.SingularBuiltInTypeTestSequence4) {
lazy val int = singularbuiltintypetestsequence1.int
lazy val byte = singularbuiltintypetestsequence1.byte
lazy val short = singularbuiltintypetestsequence1.short
@eed3si9n
eed3si9n / maven.ja.md
Created June 16, 2011 06:06
maven model parsing
  1. maven-4.0.0.xsd をどっかにダウンロード。
    $ scalaxb maven-4.0.0.xsd -p maven
  1. main.scala を加える。

     object Main extends App {
       args.headOption map { arg =>
    

println(scalaxb.fromXMLmaven.Model)

def beBasicallyFunctional(hosts: Seq[String] = Nil, db: Option[String] = None, collection: Option[String] = None,
login: Option[String] = None, password: Option[String] = None): org.specs2.matcher.Matcher[String] =
(_: String) match {
case MongoURI(h, d, c, l, p) => (h == hosts && d == db && c == collection && l == login && p == password, "doesn't match")
case default => (false, "parsing failed")
}