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
def run(breakPoint : Int) = { | |
var x = 0 | |
while (x < breakPoint) { | |
val opcode = memory.readByte8(this, registers.pc) | |
registers.pc = (registers.pc + 1) & 0xFFFF //prevent overflow | |
opcodes.execute(opcode, this) | |
if (DEBUG_MODE) { | |
println(debugTraces(opcode)) | |
} | |
x += 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
def readByte8(address : Int) : Int = (address - 0xFF40) match{ | |
case 0 => 1 | |
case 1 if (currentLine == raster) => 0x4 | |
case 1 => 0 |
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 Opcodes2(cpu : Cpu) { | |
def execute(opcode : Int) = opcode match { | |
case 0x06 => LD_nn_n(cpu.registers.b) | |
case 0x0E => LD_nn_n(cpu.registers.b) | |
case 0x16 => LD_nn_n(cpu.registers.d) | |
case 0x1E => LD_nn_n(cpu.registers.e) | |
case 0x26 => LD_nn_n(cpu.registers.h) | |
case 0x2E => LD_nn_n(cpu.registers.l) |
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
package horses | |
import Suit.Suit | |
import Rank.Rank | |
import scala.collection.mutable.ArrayBuffer | |
object Suit extends Enumeration { | |
type Suit = Value | |
val Clubs, Diamonds, Hearts, Spades = Value | |
} |
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
private String createCommand(SqlLoaderSyntax prefix, String value) { | |
return prefix.command + value; | |
} | |
private String createCommand(SqlLoaderSyntax prefix, boolean value) { | |
return createCommand(prefix, Boolean.toString(value)); | |
} | |
private String createCommand(SqlLoaderSyntax prefix, File value) { | |
return createCommand(prefix, value.toString()); |
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 Testingclass { | |
val jdbcTemplate = new JdbcTemplate | |
implicit def rowMapper[T <: AnyRef](f: (ResultSet) => T) = | |
new ParameterizedRowMapper[T] { | |
override def mapRow(rs: ResultSet, row: Int): T = f(rs) | |
} | |
val rowFunction = { rs:ResultSet => rs.getString("COLNAME") } | |
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
protected RowCallbackHandler rowExtractor(final BufferedOutputStream bos, final List<Column> columnsToDump) { | |
return new RowCallbackHandler() { | |
@Override | |
public void processRow(ResultSet rs) { | |
} | |
}; | |
} |
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
#!/usr/bin/env python | |
import os, re, sys, subprocess | |
from urllib2 import HTTPError | |
from redmine import Redmine | |
redmine = Redmine('http://localhost:3000/', sys.argv[2]) | |
WORDS = ['issue', 'bug', 'fixed', 'feature'] | |
REGEX = r'(?:%s):?\s*#?(\d+)' % "|".join(['[%s|%s]%s' % (s[0].upper(), s[0].lower(), s[1:]) for s in WORDS]) |
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 play.api._ | |
import scala.io.Source | |
import models._ | |
import com.codahale.jerkson.Json._ | |
import com.mongodb.casbah.MongoConnection | |
import com.mongodb.casbah.commons.MongoDBObject | |
object Global extends GlobalSettings { | |
override def onStart(app: Application) = { |
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
lib | |
├── ant-1.8.1.jar | |
├── ant-launcher-1.8.1.jar | |
├── antlr-2.7.6.jar | |
├── aopalliance-1.0.jar | |
├── args4j-2.0.9.jar | |
├── aspectjweaver-1.5.2a.jar | |
├── backport-util-concurrent-3.1.jar | |
├── bsi-1.0.7.jar | |
├── bsi-1.0.7.pom |
OlderNewer