Disabled external gits

This commit is contained in:
2022-04-07 18:43:21 +02:00
parent 182267a8cb
commit 88cb3426ad
1067 changed files with 102374 additions and 6 deletions

View File

@@ -0,0 +1,36 @@
object Arithmetic {
def pow(b: Int, e: Int): Int = {
if (e == 0) { 1 }
else {
if (e % 2 == 0) {
val rec: Int = pow(b, e/2);
rec * rec
} else {
b * pow(b, e - 1)
}
}
}
def gcd(a: Int, b: Int): Int = {
if (a == 0 || b == 0) {
a + b
} else {
if (a < b) {
gcd(a, b % a)
} else {
gcd(a % b, b)
}
}
}
Std.printInt("");
Std.printInt(pow(0, 10));
Std.printInt(pow(1, 5));
Std.printInt(pow(2, 10));
Std.printInt(pow(3, 3));
Std.printInt(gcd(0, 10));
Std.printInt(gcd(17, 99)); // 1
Std.printInt(gcd(16, 46)); // 2
Std.printInt(gcd(222, 888)) // 222
}

View File

@@ -0,0 +1,38 @@
How to sublimetext:
1) install LSP package
2) Add this to user settings :
"clients":
{
"amycd":
{
"command":
[
"sbt",
"run"
],
"enabled": true,
"languages":
[
{
"languageId": "amyc",
"scopes":
[
"source.amy",
"source.scala"
],
"syntaxes":
[
"Packages/Scala/Scala.sublime-syntax"
]
}
]
}
},
Note: With the previous command/setting, you need to edit code in tha same project as the amyc language server (since it runs naivly and doesnt exist in the PATH or as an alias)
3) Open a .amy file
4) Set Syntax to scala
5) Start LSP server