- Open the editor and go to menu
Tools->Build System
- This will open a new file named
untitled.sublime-build
- Add the path to your Groovy installation directory as show below.
{ "cmd": ["C:/Users/kulkan02/.gvm/groovy/2.3.0/bin/groovy.bat", "$file"] }
# Usage: powershell ExportSchema.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>" | |
# Start Script | |
Set-ExecutionPolicy RemoteSigned | |
# Set-ExecutionPolicy -ExecutionPolicy:Unrestricted -Scope:LocalMachine | |
function GenerateDBScript([string]$serverName, [string]$dbname, [string]$scriptpath) | |
{ | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null |
class Rational(x: Int, y: Int) { | |
require(y != 0, "denominator must be non zero") | |
def this(x: Int) = this(x, 1) | |
private def gcd(a: Int, b: Int): Int = if (b == 0) a else gcd(b, a % b) | |
private val g = gcd(x, y) |
// sqrt(x) = y = x / y | |
// sqrt(x) -> fixed point of function (y => x/y) | |
// with damping => sqrt(x) = ( y = (((y + x) / y) / 2) (1.0) | |
// def sqrt(x : Double) = fixedPoint(y => ((y + x) / 2)) (1.0) | |
import math.abs | |
val tolerance = 0.0001 | |
def isCloseEnough(a: Double, b: Double): Boolean = { | |
abs((a - b) / a) / a < tolerance |
def product(func: Int => Int)(a: Int, b: Int): Int = { | |
if (a > b) | |
1 | |
else | |
func(a) * product(func)(a + 1, b) | |
} | |
product((x) => (x + x))(1, 3) | |
def fact(a: Int): Int = { |
def inputFile = new File("org_chart.in") | |
def outputFile = new File("org_chart_.out") | |
outputFile.delete() | |
int lineCount = 0 | |
def orgCharts = [] | |
inputFile.eachLine { line -> | |
def orgChart = [:] | |
def employees = [:] |
/* | |
* Simple Arithmetics Grammar | |
* ========================== | |
* | |
* Accepts expressions like "2 * (3 + 4)" and computes their value. | |
*/ | |
{ | |
function combine(first, rest, combiners) { | |
var result = first, i; |
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
start | |
= any | |
any | |
= multiplicative | |
/ divisive | |
/ power | |
/ additive | |
/ subtractive | |
/ primary |
Movies Recommendation:
Music Recommendation: