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
.data | |
HelloWorld: .ascii "Hello World" #declara variavel HelloWorld como hello world | |
.text | |
main: | |
li $v0,4 #comando de impressão de texto na tela | |
la $a0, HelloWorld #coloca a variavel HelloWorld para ser impressa | |
syscall # efetua a chamada ao sistema | |
li $v0, 10 # comando de exit |
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
.text | |
main: | |
li $s0, 10 # insere o valor 10 no regitrador $s0 | |
li $s1, 17 # insere o valor 17 no regitrador $s1 | |
add $s2,$s1,$s0 # soma o valor dos registradores $s0 e $s1 e insere no registrador $s2 | |
la $a0, ($s2) #coloca o registrador $s2 para ser impresso | |
li $v0,1 #comando de impressão de inteiro na tela | |
syscall # efetua a chamada ao sistema |
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
.data | |
$soma: .asciiz "soma: \n" #declara variavel soma como 'soma: \n' | |
$subtracao: .asciiz "\nsubtracao: \n" #declara variavel subtracao como 'subtracao: \n' | |
$multiplicacao: .asciiz "\nmultiplicacao: \n" #declara variavel multiplicacao como 'multiplicacao: \n' | |
$divisao: .asciiz "\ndivisao: \n" #declara variavel divisao como 'divisao: \n' | |
.text | |
main: | |
li $s0, 10 #insere o valor 10 no registrador $s0 | |
li $s1, 2 #insere o valor 2 no registrador $s1 |
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
.data | |
$soma: .asciiz "soma: \n" #declara variavel soma como 'soma: \n' | |
$subtracao: .asciiz "\nsubtracao: \n" #declara variavel subtracao como 'subtracao: \n' | |
$multiplicacao: .asciiz "\nmultiplicacao: \n" #declara variavel multiplicacao como 'multiplicacao: \n' | |
$divisao: .asciiz "\ndivisao: \n" #declara variavel divisao como 'divisao: \n' | |
$message1: .asciiz "\nInsira o primeiro valor:\n" | |
$message2: .asciiz "\nInsira o segundo valor:\n" | |
$message3: .asciiz "\nEscolha a operação:\n1-Soma\n2-Subtracao\n3-Multiplicacao\n4-Divisao\n" |
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
.data | |
$soma: .asciiz "soma: \n" #declara variavel soma como 'soma: \n' | |
$subtracao: .asciiz "\nsubtracao: \n" #declara variavel subtracao como 'subtracao: \n' | |
$multiplicacao: .asciiz "\nmultiplicacao: \n" #declara variavel multiplicacao como 'multiplicacao: \n' | |
$divisao: .asciiz "\ndivisao: \n" #declara variavel divisao como 'divisao: \n' | |
$message1: .asciiz "\nInsira o primeiro valor:\n" | |
$message2: .asciiz "\nInsira o segundo valor:\n" | |
$message3: .asciiz "\nEscolha a operação:\n1-Soma\n2-Subtracao\n3-Multiplicacao\n4-Divisao\n" | |
$message4: .asciiz "\nDeseja fazer uma nova operação:\n1-Sim\n2-Nao\n" |
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
.data | |
$array: .word 10, 50, 67, 1, 23, 68, 100, 2,-1 # objeto -1 indica o final do vetor | |
.text | |
main: | |
li $s0, 0 #inicia o contador | |
la $s1, $array #aponta para o array | |
loop: | |
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
#!/bin/bash | |
#instalação java | |
apt-get install python-software-properties -y | |
add-apt-repository ppa:webupd8team/java | |
#instalação docker | |
#fonte https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
apt-get install apt-transport-https ca-certificates | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
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
package com.example; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
/** | |
* Solution for http://blog.gainlo.co/index.php/2016/04/12/find-the-longest-substring-with-k-unique-characters/ | |
* @author richardsantana |
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
package com.example; | |
/** | |
* @author richardsantana | |
*/ | |
public class Solver { | |
public boolean checkAnagram(String phrase, String search) { | |
for (String substring : phrase.split(" ")) { | |
if(substring.length() == search.length()){ |
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.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Stack; | |
/** | |
* @author richard.santana | |
*/ | |
public class BracketsChecker { |
OlderNewer