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
| scala> import net.liftweb.json._ | |
| import net.liftweb.json._ | |
| scala> val json = parse("""{"a": 1} """) | |
| json: net.liftweb.json.package.JValue = JObject(List(JField(a,JInt(1)))) | |
| scala> val json = parseOpt("""{"a": 1} """) | |
| json: Option[net.liftweb.json.package.JValue] = Some(JObject(List(JField(a,JInt(1))))) | |
| scala> val json = parseOpt("""{"a": 1"} """) |
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
| [info] FlexMenuBuilder should | |
| [error] x Link to Self | |
| [error] 'No Navigation Defined.' is not equal to '' (FlexMenuBuilderSpec.scala:47) | |
| [error] Expected: | |
| [error] Actual: No Navigation Defined. | |
| [info] |
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 xml: NodeSeq = <div class="main" id="wall"> | |
| <div class="row innerRow" id="mainRow"> | |
| <img src="/static/assets/logos/basf.png" class="logo" alt="" /> | |
| <p> | |
| <span class="supplierName"><strong>BASF North America Order Management</strong></span> | |
| <span class="right textSuccess supplierStatus">New</span><br/> | |
| <span class="actions"><a href="#">Upload Partners</a></span> | |
| <span class="actions clearable"><a href="#">Edit Program Details</a></span> | |
| </p> |
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
| # ======================================== | |
| # Testing n-gram analysis in ElasticSearch | |
| # ======================================== | |
| # The goal is to search for terms like | |
| # key | |
| # keyboard | |
| # 8 | |
| # 8 cell | |
| # 8x DVD |
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
| Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_35). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import net.liftweb.util.Helpers._ | |
| import net.liftweb.util.Helpers._ | |
| scala> case class Musicians(graduation_year: Int, last_name: String, first_name: String) | |
| defined class Musicians |
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
| # ======================================== | |
| # Testing n-gram analysis in ElasticSearch | |
| # ======================================== | |
| curl -X DELETE localhost:9200/test | |
| curl -X PUT localhost:9200/test -d ' | |
| { | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { |
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
| curl -X DELETE localhost:9200/inventory | |
| curl -X PUT localhost:9200/inventory -d ' | |
| { | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { | |
| "analyzer" : { | |
| "my_analyzer" : { | |
| "type" : "snowball", | |
| "language" : "English" |
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
| # ======================================== | |
| # Testing n-gram analysis in ElasticSearch | |
| # ======================================== | |
| curl -X DELETE localhost:9200/test | |
| curl -X PUT localhost:9200/test -d ' | |
| { | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { |
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
| #!/bin/bash | |
| #It is called unsafe so most people stay away from this | |
| #But this script is safe to use if you are trying to publish Lift Framework to sonatype | |
| #as a release version (including Milestones and RC's | |
| ## This scripts runs on mac's bash terminal | |
| # Exit on any errors and on unbound vars to be safe | |
| set -o errexit |
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 com.fmpwizard | |
| import bootstrap.liftweb.Boot | |
| import net.liftweb.common.Full | |
| import net.liftweb.http.S | |
| import net.liftweb.mocks.MockHttpServletRequest | |
| import net.liftweb.mockweb.MockWeb | |
| import net.liftweb.json.JsonDSL._ | |
| import net.liftweb.json.JsonAST._ | |
| import com.fmpwizard.snippet.Result |