Skip to content

Instantly share code, notes, and snippets.

// Initial Bar Graph
"subscribers": [
{
"subscriber_idx": 2,
"num_records": 200,
"practice_name": "practice_name2"
},
{
"subscriber_idx": 3,
"num_records": 300,
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))
}
package models
import anorm.SQL
import anorm.SqlStringInterpolation
import java.sql.Connection
import anorm.RowParser
import anorm.ResultSetParser
trait Findable[T] {
val table: String
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
)
"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)
}
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
}
public class TrackedFile
{
public static void main(String[] args)
{
go();
}
// Is this function stupid?
public static go()
{
@swoogles
swoogles / gist:7457461
Last active December 28, 2015 06:29
Random File
control_center.h
variables:
puOneShot * dec_dt_button;
methods
static void alterDT(puObject *);
void init( boost::shared_ptr<Simulation> residentSimulation );
-----------------------
control_center.cpp