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
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE DeriveDataTypeable #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE PackageImports #-} | |
| {-# LANGUAGE ExistentialQuantification #-} |
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
| projectFields :: EntityDef -> [DB.Field] | |
| projectFields ent = zipWith (DB.:=) (getFields ent) [1,2..] |
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 load[ChartType : Manifest](opts : ForexChartOptions) { | |
| val mainchart = new ChartType(opts) | |
| mainchart.pack() | |
| RefineryUtilities.centerFrameOnScreen(mainchart) | |
| mainchart.setVisible(true) | |
| } |
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 load[ChartType : Manifest](opts : ForexChartOptions) { | |
| val ctClass = implicitly[Manifest[ChartType]].erasure | |
| val mainchart = ctClass.newInstance.asInstanceOf[ChartType] | |
| mainchart.pack() | |
| RefineryUtilities.centerFrameOnScreen(mainchart) | |
| mainchart.setVisible(true) | |
| } |
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
| libraryDependencies ++= { | |
| val liftVersion = "2.4-M4" // Put the current/latest lift version here | |
| Seq( | |
| "net.liftweb" %% "lift-webkit" % liftVersion % "compile->default", | |
| "net.liftweb" %% "lift-paypal" % liftVersion % "compile->default", | |
| "net.liftweb" %% "lift-machine" % liftVersion % "compile->default", | |
| "net.liftweb" %% "lift-textile" % liftVersion % "compile->default", | |
| "net.liftweb" %% "lift-wizard" % liftVersion % "compile->default", | |
| "net.liftweb" %% "lift-mongodb" % liftVersion % "compile->default", | |
| "net.liftweb" %% "lift-mongodb-record" % liftVersion % "compile->default") |
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 SlashemField[V, M <: Record[M]] extends OwnedField[M] { | |
| def valueBoxFromAny(a: Any): Box[V] = { | |
| try { | |
| Full(a.asInstanceOf[V]) | |
| } catch { | |
| case _ => Empty | |
| } | |
| } | |
| } |
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"> | |
| <head> | |
| <meta charset=utf-8> | |
| <meta name="viewport" content="width=620"> | |
| <title>Slider demo</title> | |
| <link type="text/css" href="css/flick/jquery-ui-1.8.16.custom.css" rel="Stylesheet" /> | |
| <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script> | |
| <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script> | |
| <style> |
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
| fn readZip(fname: str) -> io::reader unsafe { | |
| let mode= "r"; | |
| let fptr = str::as_c_str(fname) {|f| str::as_c_str(mode) { |m| libc::popen(f, m) }; }; | |
| io::FILE_reader(fptr, true); | |
| } | |
| fn main() { | |
| let rd = readZip("unzip -p \*.zip"); | |
| } |
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
| #[link(name = "import", | |
| vers = "0.1", | |
| uuid = "0b3f44de-9dba-44e9-958e-087f00c6b82f", | |
| url = "https://dunno/yet")]; | |
| #[comment = "A test project for"]; | |
| #[author = "Rick Richardson"]; | |
| #[license = "Unknown"]; | |
| #[crate_type = "bin"]; |
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
| var flatiron = require('flatiron'), | |
| ecstatic = require('ecstatic'), | |
| socketful = require('socketful'), | |
| restful = require('restful'), | |
| resourceful = require('resourceful'); | |
| var app = module.exports = flatiron.app; | |
| app.use(flatiron.plugins.http, { | |
| before: [ |