This file contains hidden or 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
<lift:surround with="default" at="content"> | |
<lift:Courses.findAll> | |
<div> | |
<courses:size /> courses | |
</div> | |
<div> | |
<table> | |
<courses:list> | |
<template:course> | |
<tr> |
This file contains hidden or 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
server = new Server(); | |
var connector: Connector = new SelectChannelConnector() | |
connector.setPort(8080) | |
connector.setHost("127.0.0.1") | |
server.addConnector(connector) | |
var wac: WebAppContext = new WebAppContext() | |
wac.setContextPath("/") | |
// this is path to .war OR TO expanded, existing webapp; WILL FIND web.xml and parse it | |
wac.setWar("./web") |
This file contains hidden or 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
// in Boot.scala | |
LiftRules.snippetDispatch.append( | |
Map("hello_world" -> HelloWorld) | |
) | |
// in whatever.html | |
<lift:hello_world.talk /> | |
// in YourFile.scala | |
object HelloWorld { |
This file contains hidden or 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 net.harnly.aaron.options | |
import scala.collection.mutable.{ListBuffer} | |
// Base class for options. | |
// These are things that get listed when we ask for help, | |
// and optionally can accept string arguments & perform some kind of action, | |
// usually mutating a var. | |
case class OptionDefinition( | |
canBeInvoked: Boolean, |
This file contains hidden or 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
List( | |
Map(package_reference -> something), | |
Map(package_reference -> another), | |
Map(package_reference -> something), | |
Map(package_reference -> something), | |
Map(package_reference -> another) | |
) |
This file contains hidden or 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
// | |
// FileUpload.j | |
// Editor | |
// | |
// Created by Francisco Tolmasky on 03/04/08. | |
// Copyright 2005 - 2008, 280 North, Inc. All rights reserved. | |
// | |
import <Foundation/CPObject.j> | |
import <Foundation/CPValue.j> |
This file contains hidden or 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 _root_.net.liftweb.mapper._ | |
trait HasCreatedMetaMapper[T <: HasCreated[T]] { | |
self: T with LongKeyedMetaMapper[T] => | |
import java.util.Date | |
def findByCreated(startDate:Date, endDate:Date) = findAll(By_>(created_at, startDate), By_<(created_at, endDate)) | |
def findByCreatedSince(startDate: Date) = findAll(By_>(created_at, startDate)) | |
} | |
trait HasCreated [T <: HasCreated[T]] extends KeyedMapper[Long, T] { |
This file contains hidden or 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
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAACVxTLpr0s9v75uMUd2Kb5xQOCkAGcyjx6s20Xkh2RptV2L4uOxQruW8CuoN9SJBiCYixb7EoIXlreA" type="text/javascript"></script> |
This file contains hidden or 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 scala.xml.{NodeSeq, Text, Elem} | |
import net.liftweb.common.Loggable | |
import net.liftweb.http.{S,DispatchSnippet} | |
import net.liftweb.http.S.? | |
import net.liftweb.util.Helpers._ | |
import net.liftweb.mapper.{Mapper, MetaMapper, MappedField, | |
QueryParam, OrderBy, StartAt, MaxRows, Ascending, Descending} | |
import net.liftweb.mapper.view.ModelSnippet | |
trait PaginatedSnippet extends DispatchSnippet { |
This file contains hidden or 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 MyThing extends AkkaRecord[MyThing]{ | |
object something extends StringField(this) with AkkaRef | |
} |