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
list = [2,4,0,11,0,1,2,0,30,0]; | |
count = 0; | |
tail = list.length - 1; | |
firstZero = -1; | |
while(count <= tail){ | |
if(list[count] == 0 && firstZero == -1){ | |
firstZero = count; | |
}else if(list[count] != 0 && firstZero != -1 ){ | |
var b = list[count]; | |
list[count] = list[firstZero] ; |
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
(flatten (repeatedly (* 10 10) | |
(partial rand-nth | |
["a" "b" "c" "d" | |
"e" "f" "g" "h" | |
"i" "j" "k" "l" | |
"m" "n" "o" "p" | |
"q" "r" "s" "t" | |
"u" "v" "x" "y" | |
"w" "z"]))) |
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
var lines = 10; | |
var columns = 10; | |
var abc = ["a", "b", "c", "d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","w","y","z"]; | |
var index = abc.length; | |
var words = ["apple","bitch","fast","datass"]; | |
var mapWords = []; | |
var gameBoard = [[]]; | |
for(i = 0 ;i < words.length;){ | |
var initialMapColumn = (Math.floor(Math.random() * columns)); |
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
(defn border [x] | |
(cond (= (meta x) nil) "nao autorizado" | |
(= ((meta x):type) "valinor") x | |
:default "lixo" )) | |
;Associar um meta a sua função de validação | |
;teste | |
(def x (with-meta [1 2 3 4] {:type "valinor"})) | |
(border x) |
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
function decoder(palavra){ | |
char=''; | |
for (i=0;i<palavra.length;i++){ | |
char+=String.fromCharCode(palavra.charCodeAt(i)-7); | |
} | |
print(char); | |
} |
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 java.util.Scanner; | |
public class Decoder { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Scanner scan = new Scanner(System.in); | |
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 java.util.Scanner; | |
public class Primos { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
int total = 0; |
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 java.util.Scanner; | |
public class Primos{ | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
int total = 0; |