This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5645 -- Marc | |
5685 -- Luca | |
5760 -- Jeff | |
5800 -- Bob and Justin | |
5860 -- Josh and Bob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> case class A[S,T](s:Int,b:T)(f:(S,T)=>T,g:(S,T)=>T) | |
defined class A | |
scala> case class A[S:Manifest,T:Manifest](s:Int,b:T)(f:(S,T)=>T,g:(S,T)=>T) | |
<console>:5: error: case classes limited by implementation: maximum of 2 constructor parameter lists. | |
Because the Manifests are just sort of added as a third parameters list with implicits... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Return sane iTunes Library settings | |
defaults write com.apple.iTunes hide-ping-dropdown 1 | |
defaults write com.apple.iTunes show-store-link-arrows 1 | |
defaults write com.apple.iTunes invertStoreLinks 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./configure --with-blas="-framework vecLib" --with-lapack="-framework vecLib" F77=gfortran CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ LDFLAGS="-flat_namespace" FFLAGS="-fexceptions -m64 -fbackslash" CFLAGS="-fno-common -m64" CXXFLAGS="-fno-common -fexceptions -m64” -disable-shared |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe(“A tree”) { | |
it("can have a root”){ | |
val n1 = mock[Node] | |
when(n1.id).thenReturn("1”) | |
val g = Tree(n1) | |
g.root.id should be ("1") | |
} | |
} | |
test output with time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Blah [@specialized (Int) T:Manifest](a:Array[T]) { | |
def map[@specialized (Int) S>:T, @specialized (Int) W:Manifest](f:S=>W):Blah[W] = { | |
var i = 0 | |
val newA = new Array[W](a.length) | |
while (i < a.length) { | |
newA(i) = f(a(i)) | |
i = i+1 | |
} | |
new Blah(newA) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.azavea.math.Numeric | |
import com.azavea.math.EasyImplicits._ | |
trait F1[@specialized T, @specialized W] extends Function1[T,W] { | |
def apply(a:T):W | |
} | |
abstract class F12D[@specialized T:Numeric:Manifest] extends F1[T,Double]{ | |
def apply(a:T):Double | |
} | |
abstract class F12I[@specialized T:Numeric:Manifest] extends F1[T,Int] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.azavea.math.Numeric | |
import com.azavea.math.EasyImplicits._ | |
class Blah { | |
def blah[@specialized T:Numeric:Manifest, @specialized W:Numeric:Manifest](f:Function1[T,W]):W = { | |
f(numeric[T].zero) | |
} | |
def blah2[T:Numeric:Manifest](f:Function[T,T]):T = { | |
f(numeric[T].zero) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.azavea.math.Numeric | |
import com.azavea.math.EasyImplicits._ | |
class Blah[@specialized T:Numeric:Manifest] { | |
def blah[@specialized W:Numeric:Manifest](f:Function1[T,W]):W = { | |
f(numeric[T].zero) | |
} | |
def blah2(f:Function[T,T]):T = { | |
f(numeric[T].zero) | |
} |