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 multiprocessing | |
import time | |
from matplotlib import pyplot as plt | |
def fatorial(n): | |
r = 1 | |
for i in range(1, n+1): | |
r *= i | |
return r |
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 multiprocessing | |
import time | |
nums = [5, 6, 7, 8, 9, 10] | |
def fatorial(n): | |
time.sleep(1) | |
r = 1 | |
for i in range(1, n+1): | |
r *= i |
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
@[Link(ldflags: "#{__DIR__}/somador.o")] | |
lib Somador | |
fun sum(n1 : Int32, n2 : Int32) : Int32 | |
end | |
p Somador.sum 2, 3 |
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 submit_messages(){ | |
$('#message_content').on('keydown', (event) => { | |
if(event.keyCode === 13){ | |
$('input').click(); | |
event.target.value = ''; | |
} | |
}) | |
} |
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
#include <stdio.h> | |
void corta(char txt[],int ini,int fim){ | |
ini -= 1; | |
int i; | |
for (i = 0; txt[fim+i] != '\0'; i++) | |
txt[ini+i] = txt[fim+i]; | |
txt[ini+i] = '\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
#include <stdio.h> | |
void corta(char txt[],int ini,int fim){ | |
ini -= 1; | |
int i; | |
for (i = 0; txt[fim+i] != '\0'; i++) | |
txt[ini+i] = txt[fim+i]; | |
txt[ini+i] = '\0'; | |
} |
NewerOlder