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 se.apogo.liftcms | |
| package boot | |
| import model._ | |
| import net.liftweb.http.LiftRules | |
| import _root_.net.liftweb.mapper.{Schemifier} | |
| object LiftCmsComponent { | |
| var allowEdit : () => Boolean = () => false |
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
| <!DOCTYPE html> | |
| <html lang="en" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="color:Background" content="#fff"> | |
| <meta name="color:Text" content="#424037"> | |
| <meta name="color:Post Title" content="#444"> | |
| <meta name="color:Lighter Text" content="#999"> | |
| <meta name="color:Date" content="#C6C1A5"> |
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
| <plugin> | |
| <groupId>org.mortbay.jetty</groupId> | |
| <artifactId>maven-jetty-plugin</artifactId> | |
| <version>6.1.25</version> | |
| <configuration> | |
| <reload>manual</reload> | |
| <contextPath>/</contextPath> | |
| <scanIntervalSeconds>5</scanIntervalSeconds> | |
| </configuration> | |
| </plugin> |
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
| -startup | |
| ../../../plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar | |
| --launcher.library | |
| ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.0.1.R35x_v20090707 | |
| -showsplash | |
| org.eclipse.platform | |
| --launcher.XXMaxPermSize | |
| 256m | |
| -vmargs | |
| -Xdock:icon=../Resources/Eclipse.icns |
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
| def shorten(input: String, acronyms: Set[String]) = { | |
| type Shortenee = String | |
| type Acronym = String | |
| val orderByLength = Ordering[Int].on[Shortenee](c => c.length) | |
| def shortest(unvisited: Set[Shortenee], visited: Set[Shortenee]): Shortenee = { | |
| if (unvisited isEmpty) | |
| visited min orderByLength | |
| else { | |
| val next = unvisited head |
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
| object Temperature { | |
| def main(args: Array[String]): Unit = { | |
| val display = Display.getDefault | |
| val window = new Shell(display) | |
| window.setMinimumSize(400, 150) | |
| window.pack | |
| window.setLayout(new GridLayout()); | |
| new Temperature(window, SWT.NONE) | |
| window.open | |
| while (!window.isDisposed) { |
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
| object Temperature { | |
| implicit def unboxText2Double(t: Text) = java.lang.Double.parseDouble(t.getText()) | |
| implicit def convertDouble2String(d: Double) = d.toString | |
| var fahrenheit: Text = null | |
| var celsius: Text = null | |
| def main(args: Array[String]): Unit = { | |
| val window = shell("Demo!", | |
| composite( |
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
| trait Source[T] { | |
| def emitTo(v: Var[T]): Unit | |
| } | |
| trait Target[T] { | |
| def bind(value: Signal[T]): Unit | |
| } |
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
| implicit def textToSource(text: Text): Source[String] = { | |
| new Source[String] { | |
| override def emitTo(channel: Var[String]) { | |
| text.addModifyListener(new ModifyListener() { | |
| override def modifyText(event: ModifyEvent) = { | |
| channel.update(text.getText) | |
| } | |
| }) | |
| } | |
| } |
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
| val signal = Var[String]("") | |
| new Text(parent, style) emitTo signal |
OlderNewer