- 浏览: 2552842 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Lift(1)Setup a Simple Project
1.1 Install the lift app
Download the latest file https://nodeload.github.com/lift/lift_25_sbt/legacy.tar.gz/master
Expand the project with command.
>tar zxvf lift-lift_25_sbt-c62bc97.tar.gz
>mv lift-lift_25_sbt-c62bc97 life_25
>cd /Users/carl/tool/lift_25/scala_29/lift_basic
>./sbt
sbt is short for simple build tool. It is the maven to java, sbt to scala.
>container:start
It will start the web container. I can visit http://localhost:8080/.
>container:stop
1.2 Begin from the book
>git clone https://github.com/dpp/simply_lift.git
2. The ubiquitous Chat app
>cd /Users/carl/work/lift/simply_lift/chat
Make eclipse available for the project first
>./sbt
using LiftProject with sbt 0.7.5 and Scala 2.7.7
I will first check that I have scala plugin already.
Find and install this plugin https://github.com/frank06/sbt-eclipse-plugin
2.1 Import the project into Eclipse
Go to the working directory
>cd /Users/carl/tool/lift_25/scala_29/lift_basic
Delete all the files and folders, only leave the src folder.
Create a new build configuration file named build.sbt. The content of this file will be as follow:
name := "lift-basic"
organization := "com.sillycat"
version := "1.0"
scalaVersion := "2.9.1"
libraryDependencies ++= {
val liftVersion = "2.4"
Seq(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile",
"net.liftweb" %% "lift-mapper" % liftVersion % "compile",
"org.mortbay.jetty" % "jetty" % "6.1.26" % "test",
"junit" % "junit" % "4.7" % "test",
"ch.qos.logback" % "logback-classic" % "0.9.26",
"org.scala-tools.testing" %% "specs" % "1.6.9" % "test",
"com.h2database" % "h2" % "1.2.147"
)
}
Run the command to enter sbt environment
>sbt
Command update will download all needed dependencies.
>update
We will need sbteclipse plugin to generate the Eclipse project files(.project, .classpath, etc.).
Create a file in this directory
>cd ~
>cd .sbt
>mkdir plugins
>cd plugins
>vi build.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0")
This plugin will be enabled for all the projects I have.
Then I will go back to lift_basic/build.sbt
…snip…
scalaVersion := "2.9.1"
EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource
…snip…
>sbt
sbt>eclipse with-source=true
The we can import the project as usual. But still there are some red error messages on STS.
Install the plugin on normal eclipse:http://download.scala-ide.org/releases-29/stable/site/. And I will try to import the project and see. But the problem is the same.
Error Message:
object liftmodules is not a member of package net
object eclipse is not a member of package org
Solution:
Add these lines to my build.sbt
"org.eclipse.jetty" % "jetty-webapp" % "8.1.0.RC5" % "compile",
"org.eclipse.jetty" % "jetty-webapp" % "8.1.0.RC5" % "test",
"net.liftmodules" % "lift-jquery-module_2.9.2" % "2.5-M1-1.0" % "compile",
"org.specs2" % "specs2_2.9.2" % "1.12.1" % "test",
>sbt update
sbt>ecipse with-source=true
We can then run the lift project in Scala IDE like this>
Right click RunWebApp.scala and select Run As --> Scala Application (or Debug As --> Scala Application). And then we can visit http://localhost:8080
Error Message:
23:29:34.331 [main] ERROR n.liftweb.http.provider.HTTPProvider - Failed to Boot! Your application may not run properly
java.lang.NoSuchMethodError: net.liftweb.util.Safe$.next()J
Solution:
There is no right now.
2.2 Try to think about other IDE
>./sbt
sbt>gen-idea
Then we can use IntelliJ IDEA to import this project.
Download the tool from here.
http://www.jetbrains.com/idea/download/index.html
But this method is only working for https://github.com/lift/lift_25_sbt.git projects and samples.
Then I import the 4 projects under this directory /Users/carl/tool/lift_25/scala_29
lift_basic
lift_blank
lift_json
lift_mvc
In every project, we can use these commands.
>cd lift_basic
>./sbt
sbt>container:start
sbt>container:stop
I can run these projects via command line. And change the codes in IDEA.
I will go and study them after play framework.
References:
http://liftweb.net/
http://simply.liftweb.net/index-Part-I.html
http://simply.liftweb.net/index-Chapter-2.html#toc-Chapter-2
http://www.spenceruresk.com/2010/10/developing-with-lift-in-eclipse/
https://github.com/frank06/sbt-eclipse-plugin
http://scala-ide.org/docs/tutorials/lift24scalaide20/index.html
1.1 Install the lift app
Download the latest file https://nodeload.github.com/lift/lift_25_sbt/legacy.tar.gz/master
Expand the project with command.
>tar zxvf lift-lift_25_sbt-c62bc97.tar.gz
>mv lift-lift_25_sbt-c62bc97 life_25
>cd /Users/carl/tool/lift_25/scala_29/lift_basic
>./sbt
sbt is short for simple build tool. It is the maven to java, sbt to scala.
>container:start
It will start the web container. I can visit http://localhost:8080/.
>container:stop
1.2 Begin from the book
>git clone https://github.com/dpp/simply_lift.git
2. The ubiquitous Chat app
>cd /Users/carl/work/lift/simply_lift/chat
Make eclipse available for the project first
>./sbt
using LiftProject with sbt 0.7.5 and Scala 2.7.7
I will first check that I have scala plugin already.
Find and install this plugin https://github.com/frank06/sbt-eclipse-plugin
2.1 Import the project into Eclipse
Go to the working directory
>cd /Users/carl/tool/lift_25/scala_29/lift_basic
Delete all the files and folders, only leave the src folder.
Create a new build configuration file named build.sbt. The content of this file will be as follow:
name := "lift-basic"
organization := "com.sillycat"
version := "1.0"
scalaVersion := "2.9.1"
libraryDependencies ++= {
val liftVersion = "2.4"
Seq(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile",
"net.liftweb" %% "lift-mapper" % liftVersion % "compile",
"org.mortbay.jetty" % "jetty" % "6.1.26" % "test",
"junit" % "junit" % "4.7" % "test",
"ch.qos.logback" % "logback-classic" % "0.9.26",
"org.scala-tools.testing" %% "specs" % "1.6.9" % "test",
"com.h2database" % "h2" % "1.2.147"
)
}
Run the command to enter sbt environment
>sbt
Command update will download all needed dependencies.
>update
We will need sbteclipse plugin to generate the Eclipse project files(.project, .classpath, etc.).
Create a file in this directory
>cd ~
>cd .sbt
>mkdir plugins
>cd plugins
>vi build.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0")
This plugin will be enabled for all the projects I have.
Then I will go back to lift_basic/build.sbt
…snip…
scalaVersion := "2.9.1"
EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource
…snip…
>sbt
sbt>eclipse with-source=true
The we can import the project as usual. But still there are some red error messages on STS.
Install the plugin on normal eclipse:http://download.scala-ide.org/releases-29/stable/site/. And I will try to import the project and see. But the problem is the same.
Error Message:
object liftmodules is not a member of package net
object eclipse is not a member of package org
Solution:
Add these lines to my build.sbt
"org.eclipse.jetty" % "jetty-webapp" % "8.1.0.RC5" % "compile",
"org.eclipse.jetty" % "jetty-webapp" % "8.1.0.RC5" % "test",
"net.liftmodules" % "lift-jquery-module_2.9.2" % "2.5-M1-1.0" % "compile",
"org.specs2" % "specs2_2.9.2" % "1.12.1" % "test",
>sbt update
sbt>ecipse with-source=true
We can then run the lift project in Scala IDE like this>
Right click RunWebApp.scala and select Run As --> Scala Application (or Debug As --> Scala Application). And then we can visit http://localhost:8080
Error Message:
23:29:34.331 [main] ERROR n.liftweb.http.provider.HTTPProvider - Failed to Boot! Your application may not run properly
java.lang.NoSuchMethodError: net.liftweb.util.Safe$.next()J
Solution:
There is no right now.
2.2 Try to think about other IDE
>./sbt
sbt>gen-idea
Then we can use IntelliJ IDEA to import this project.
Download the tool from here.
http://www.jetbrains.com/idea/download/index.html
But this method is only working for https://github.com/lift/lift_25_sbt.git projects and samples.
Then I import the 4 projects under this directory /Users/carl/tool/lift_25/scala_29
lift_basic
lift_blank
lift_json
lift_mvc
In every project, we can use these commands.
>cd lift_basic
>./sbt
sbt>container:start
sbt>container:stop
I can run these projects via command line. And change the codes in IDEA.
I will go and study them after play framework.
References:
http://liftweb.net/
http://simply.liftweb.net/index-Part-I.html
http://simply.liftweb.net/index-Chapter-2.html#toc-Chapter-2
http://www.spenceruresk.com/2010/10/developing-with-lift-in-eclipse/
https://github.com/frank06/sbt-eclipse-plugin
http://scala-ide.org/docs/tutorials/lift24scalaide20/index.html
发表评论
-
NodeJS12 and Zlib
2020-04-01 07:44 476NodeJS12 and Zlib It works as ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 337Traefik 2020(1)Introduction and ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 436Private Registry 2020(1)No auth ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 385Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 479NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 424Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 337Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 248GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 452GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 328GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 314Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 319Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 294Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 312Serverless with NodeJS and Tenc ... -
NodeJS MySQL Library and npmjs
2020-02-07 06:21 288NodeJS MySQL Library and npmjs ... -
Python Library 2019(1)requests and aiohttp
2019-12-18 01:12 261Python Library 2019(1)requests ... -
NodeJS Installation 2019
2019-10-20 02:57 574NodeJS Installation 2019 Insta ... -
Monitor Tool 2019(2)Monit on Multiple Instances and Email Alerts
2019-10-18 10:57 266Monitor Tool 2019(2)Monit on Mu ... -
Sqlite Database 2019(1)Sqlite3 Installation and Docker phpsqliteadmin
2019-09-05 11:24 368Sqlite Database 2019(1)Sqlite3 ... -
Supervisor 2019(2)Ubuntu and Multiple Services
2019-08-19 10:53 371Supervisor 2019(2)Ubuntu and Mu ...
相关推荐
Lift3.1.0Setup.exe是该软件的安装程序,用户可以通过运行这个文件来安装软件,确保与富士变频器进行顺畅的通信和配置。 首先,富士LIFT软件允许用户进行详细的参数设置。变频器有许多可调参数,如启动频率、停止...
1. **项目结构**:Lift项目通常遵循特定的目录结构,如`src/main/scala`存放源代码,`src/main/resources`存储资源配置,`project`目录下有SBT构建配置文件。 2. **SBT配置**:`lift-lift_22_sbt-22a67aa`可能是一...
\[ F = -\frac{8}{3}\pi \mu a^2 K V \left(1 - \frac{8}{3} \frac{\nu}{aK} \right) + \text{更小的项} \] 其中: - \(F\) 表示作用于小球上的升力; - \(\mu\) 是液体的动力粘度; - \(a\) 是小球的半径; - \(K\...
I have been writing Lift and Scala for 4 years, and even I learn new things about the language and the framework on a weekly basis. Please consider Lift an path and an exploration, rather than an end...
1. **Lift 框架**:Lift 是一个用 Scala 语言构建的全栈 Web 开发框架,它的设计目标是提供安全、高性能和良好的用户体验。Lift 提供了强大的模板引擎、内置的安全防护机制以及丰富的库支持。 2. **版本管理**:在...
Scala Lift 是一个基于 Scala 语言的全功能Web框架,它为开发者提供了构建高效、可扩展且反应迅速的Web应用程序的工具。在这个压缩包中,包含了三本书籍,旨在帮助学习者深入理解 Scala Lift 框架,提升开发能力。...
**提升算法(Lift Algorithm)详解** 提升算法是一种在数据挖掘和机器学习领域广泛应用的统计方法,主要用于构建分类模型。它的全称为“迭代增益提升”(Iterative Gain Boosting)。提升算法的核心思想是通过一...
LIFT的模板系统是其一大亮点,它采用了XML格式的模板,提供了丰富的标签库,如`<a>`、`<bind>`、`<bind-at>`等,这些标签让开发者能够轻松地在模板中插入动态数据或执行特定操作。此外,LIFT还支持视图和标签的概念...
【Lift in Action中文版】这本书探讨了使用Scala语言构建Web应用程序的框架——Lift。在本书中,作者深入介绍了如何利用Lift框架的特性,特别是对于有状态和无状态snippet的管理和Ajax交互。 首先,StatefulSnippet...
富士电机机器制御株式会社所生产的FRENIC-Lift系列变频器是一款用于控制异步电动机及同步电动机的变频装置,特别适用于上下传送装置。它能够使3相异步电动机和同步电动机实现可变速运转,提高运输效率并节约能源。 ...
根据评分卡的评分结果分组计算lift,可以调用后绘制lift曲线
Lift, Splat, Shoot: Encoding Images From Arbitrary Camera Rigs by Implicitly Unprojecting to 3D源码及权重,给不会上网的人下载
**Python-Lift编程语言** Lift编程语言是一种专注于GPU(图形处理器单元)编程的高性能、可移植的函数式语言。它的设计目标是提供一个简洁、高效且易于理解的语法,以便开发者可以充分利用GPU的并行计算能力。由于...
Lift made easy with step-by-steps recipes written by a developer for developers Practical examples covering topics from basic to advanced levels Learn to use Schemifier to automatically create tables ...