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
// Initial Bar Graph | |
"subscribers": [ | |
{ | |
"subscriber_idx": 2, | |
"num_records": 200, | |
"practice_name": "practice_name2" | |
}, | |
{ | |
"subscriber_idx": 3, | |
"num_records": 300, |
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 getRecords(userIdx: Int) = TxAction { | |
val devices = UserDevice findAllByUser userIdx | |
val nestedRecords = | |
for { device <- devices } | |
yield EmailViewRecord getNew device.address | |
// It would be nice if I could yield a flattened list | |
Ok(Json.toJson(nestedRecords.flatten)) | |
} |
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 models | |
import anorm.SQL | |
import anorm.SqlStringInterpolation | |
import java.sql.Connection | |
import anorm.RowParser | |
import anorm.ResultSetParser | |
trait Findable[T] { | |
val table: String |
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
case class PortalMsg( | |
portalMsgIdx: Long = 0, | |
portalMsgThreadIdx: Int = 0, | |
message: Option[String] = None, | |
sentDateTime: Option[DateTime] = None, | |
readDateTime: Option[DateTime] = None, | |
sentBy: Option[Int] = None, | |
readBy: Option[Int] = None | |
) |
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
"A SecureFile instance copied from an existing file" should { | |
"Have the same idx as the source " in { | |
copiedFile.secureFileIdx mustEqual(NEW_SECURE_FILE_IDX) | |
} | |
"Have the same subscriberIdx as the source " in { | |
copiedFile.subscriberIdx mustEqual(NEW_SUBSCRIBER_IDX) | |
} | |
"Have the same userIdx as the source " in { | |
copiedFile.userIdx mustEqual(NEW_USER_IDX) | |
} |
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 getMobileUser(id: Int) = Action.async { | |
val f = Future { | |
DBAsyncExec { | |
implicit Connection => | |
val user = MobileUser.findById(id) | |
val flatUser = user match { | |
case Some(simpleUser) => | |
simpleUser | |
} |
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
public class TrackedFile | |
{ | |
public static void main(String[] args) | |
{ | |
go(); | |
} | |
// Is this function stupid? | |
public static go() | |
{ |
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
control_center.h | |
variables: | |
puOneShot * dec_dt_button; | |
methods | |
static void alterDT(puObject *); | |
void init( boost::shared_ptr<Simulation> residentSimulation ); | |
----------------------- | |
control_center.cpp |