This file contains 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
//classe Base64 | |
public class Base64 { | |
/* ******** P U B L I C F I E L D S ******** */ | |
/** No options specified. Value is zero. */ | |
public final static int NO_OPTIONS = 0; | |
/** Specify encoding in first bit. Value is one. */ |
This file contains 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
//Date Util | |
Date.prototype.getYearGap = function(){ | |
var ret = new Date(this.getTime()); | |
return this.getFullYear() - ret.getFullYear(); | |
}; | |
Date.prototype.getStartOfMonth = function(){ | |
var ret = new Date(this.getTime()); | |
ret.setDate(1) | |
return ret; | |
}; |
This file contains 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
Number.prototype.roundup= function(dec){ | |
if(this.toFixed(dec) < value) | |
return window.parseFloat(this.toFixed(dec))+(1/(Math.pow(10,dec))); | |
else | |
return window.parseFloat(this.toFixed(dec)); | |
} |
This file contains 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 countSum(numbers: List[Int], expectedResult: Int): Int = { | |
countSumRecursively(numbers, 0, expectedResult); | |
} | |
def countSumRecursively(numbers: List[Int], currentResult: Int, expectedResult: Int): Int = { | |
if (currentResult == expectedResult) | |
1 | |
else if ((currentResult > expectedResult) || (numbers.isEmpty)) | |
0 | |
else |
This file contains 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
{ | |
"cmd": ["coffee", "$file"], | |
"selector" : "source.coffee", | |
"path" : "/usr/local/bin" | |
} |
This file contains 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 sbt._ | |
class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) { | |
val liftVersion = property[Version] | |
// uncomment the following if you want to use the snapshot repo | |
// val scalatoolsSnapshot = ScalaToolsSnapshots | |
// If you're using JRebel for Lift development, uncomment | |
// this line |
NewerOlder