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
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Net.Mail; | |
class Toolbox { | |
public static String GenerateToken() { | |
return Guid.NewGuid().ToString(); | |
} |
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
99.downto 1 do|x|puts (y=x.to_s+a=" bottle#{"s" if x!=1} of beer")+(b=" on the wall")+", "+y+".",x==1?"Go to the store and buy some more, 99 bottles of beer#{b}.":"Take one down and pass it around, #{x-1}#{x==2?a.gsub("s",""):a}#{b}. | |
"end |
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
frase --> sn, sv. | |
sn --> artigo, nome. | |
sn --> nome. | |
sv --> verbo, sn. | |
sv --> verbo. | |
artigo --> [o]. | |
artigo --> [a]. |
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
p(L,L1,L2) :- length(L,C), C1 is C//2, p(L,C1,L1,L2). | |
p(L,0,[],L) :- !. | |
p([H|T],N,[H|LR],L2) :- N > 0, N1 is N-1, p(T,N1,LR, L2). | |
% a) Faça a tracagem do predicado quando é chamado da seguinte maneira: ?- p([1,2,3,4,5],L1,L2). | |
% b) Diga o que este predicado faz. Sem fazer traçagem diga o resultado da seguinte chamada: ?- p([1,30,24,56,100,33,23,12],L1,L2). | |
% c) O que aconteceria se o predicado fosse chamado da seguinte maneira: ?- p([1,2,3,4,5],[1,2,3],L2). |
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
elimina1(N,[H|T],T) :- N == H . | |
elimina1(N,[H|T],[H|LB]) :- elimina1(N,T,LB) . |
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
fib(0,0). | |
fib(1,1). | |
fib(N,R) :- | |
N1 is N-1, | |
N2 is N-2, | |
fib(N1,R1), | |
fib(N2,R2), | |
R is R1+R2. |
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
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8" src="milk.min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="weld.js"></script> | |
<style> | |
body { background : #333; | |
color : #fff; } | |
</style> |
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
/** | |
* CSS Box model demo | |
*/ | |
#box { | |
width: 300px; | |
height: 200px; | |
padding: 30px; | |
border-width: 10px; | |
/*box-sizing: border-box;*/ |
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
/** | |
* CSS Box model demo | |
*/ | |
#box { | |
width: 300px; | |
height: 200px; | |
padding: 30px; | |
border-width: 10px; | |
/*box-sizing: border-box;*/ |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
background-color: #0094d0; | |
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwSOMzt/XWRWAz5GuSBIkwG1H3FabJ2OsUOUhGC6tK4EMtJO0ttC6IBD3kM0ve0tJwMdSfjZo+EEISaeTr9P3wYrGjXqyC1krcKdhMpxEnt5JetoulscpyzhXN5FRpuPHvbeQaKxFAEB6EN+cYN6xD7RYGpXpNndMmZgM5Dcs3YSNFDHUo2LGfZuukSWyUYirJAdYbF3MfqEKmjM+I2EfhA94iG3L7uKrR+GdWD73ydlIB+6hgref1QTlmgmbM3/LeX5GI1Ux1RWpgxpLuZ2+I+IjzZ8wqE4nilvQdkUdfhzI5QDWy+kw5Wgg2pG |