./bin/standalone.sh -c standalone.xml
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
// | |
// ======================================================================== | |
// Copyright (c) 1995-2015 Mort Bay Consulting Pty. Ltd. | |
// ------------------------------------------------------------------------ | |
// All rights reserved. This program and the accompanying materials | |
// are made available under the terms of the Eclipse Public License v1.0 | |
// and Apache License v2.0 which accompanies this distribution. | |
// | |
// The Eclipse Public License is available at | |
// http://www.eclipse.org/legal/epl-v10.html |
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
////Source code from: http://cglab.ca/~abeinges/blah/too-many-lists/book/first-final.html | |
use std::mem; | |
pub struct List { | |
head: Link, | |
} | |
enum Link { | |
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
class DataRepo { | |
def getData = 5 | |
} | |
class MockWithInjectionTest extends FunSuite { | |
@Spy var repo: DataRepo = _ | |
test("spy") { | |
MockitoAnnotations.initMocks(this) | |
Mockito.when(repo.getData).thenReturn(8) |
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 javax.inject.Inject | |
import org.mockito.{MockitoAnnotations, InjectMocks, Mock, Mockito} | |
import org.scalatest.FunSuite | |
class MockWithInjectionTest extends FunSuite { | |
@Mock var dataRepoMock: DataRepo = _ | |
@InjectMocks var calc: Calculate = _ | |
test("Mockito Injection") { |
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> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
<script src="script.js"></script> | |
</head> | |
<style> | |
#base { |
mvn package embedded-glassfish:run
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
resolvers += Resolver.mavenLocal |
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
ls -lR / | tee output.file |
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 net.ruippeixotog.scalascraper.browser.Browser | |
import net.ruippeixotog.scalascraper.dsl.DSL.Extract._ | |
import net.ruippeixotog.scalascraper.dsl.DSL._ | |
val browser = new Browser | |
val doc = browser.get("https://github.com/ruippeixotog/scala-scraper") | |
val title: String = doc >> text("h1") | |
println(title) |