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
app.directive('clickSpinner', ['$q', function ($q) { | |
var spinnerId = 1; | |
var directive = { | |
restrict: 'A', | |
link: link, | |
transclude: true, | |
scope: { | |
clickHandler: '&clickSpinner' | |
}, |
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
app.directive('datepickerLocaldate', ['$parse', function ($parse) { | |
var directive = { | |
restrict: 'A', | |
require: ['ngModel'], | |
link: link | |
}; | |
return directive; | |
function link(scope, element, attr, ctrls) { | |
var ngModelController = ctrls[0]; |
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 SourceExtractor { | |
self: BasicScalaProject => | |
def srcManagedDir = info.projectPath / "src_managed" | |
def scalaPaths = info.projectPath / "project" / "boot" / ("scala-" + crossScalaVersionString) ** "*-src.jar" | |
def libPaths = (managedDependencyPath ** "*-sources.jar") | |
lazy val sources = sourcesAction | |
def sourcesAction = task { |
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 DistributableProject extends BasicScalaProject with MavenStyleScalaPaths { | |
// staging is currently done to make ensure the paths of the files within the resulting zip end up in the correct directory structure | |
def stagingDir = (outputPath ##) / (normalizedName + "-" + version) | |
def distributionZipName = normalizedName + "-dist-" + version + ".zip" | |
def distributionOutputPath = outputPath / distributionZipName | |
def libTargetDirectoryName = "lib" |
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 ReverseSubstring { | |
/** | |
* Find the longest substring (within a given string) that is the same in reverse. | |
* Example: "I like bananas but not cucumbers." should return "anana". | |
*/ | |
def main(args: Array[String]) { | |
val biggestSubstring = findBiggestReverseSubstring(args(0)) | |
println("biggest substring is '%s'".format(biggestSubstring)) | |
} |