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
<?php | |
$vet[5] = Array(1, 3, 5, 2, 4); | |
for($i=0;$i<5;$i++) { | |
for($j=0;$j<4;$j++) { | |
if($vet[$j] > $vet[$j+1]) { | |
$aux = $vet[$j]; | |
$vet[$j] = $vet[$j+1]; | |
$vet[$j+1] = $aux; | |
} |
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
<!DOCTYPE html> | |
<htm> | |
<head> | |
<link href="//fonts.googleapis.com/css?family=Abril+Fatface|Open+Sans:300italic,600italic,300,600|Quando|Josefin+Slab:400,700,400italic,700italic|Trocchi|Arvo|Lato:300,400,700,300italic,400italic,700italic|Raleway:200,300,700|Playfair+Display:400,700,400italic,700italic|Bitter:400,700,400italic|Vollkorn:400,400italic&subset=latin,latin-ext" media="screen" rel="stylesheet" type="text/css"> | |
</head> | |
<body> | |
<div style="font-family: 'Open Sans'; font-size: 20px;">Caio Erick Braga Costa</div> | |
<div style="font-family: 'Raleway'; font-size: 20px;">Caio Erick Braga Costa</div> | |
</body> | |
</html> |
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
<?php | |
$a = Array("Caio", " Erick", " Braga", " Costa"); | |
echo $a[0].$a[1].$a[2].$a[3]; // Imprimindo meu nome | |
for($i=0;$i<4;$i++) { | |
echo $a[$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
<?php | |
$idade = 15; | |
function validar($email) { | |
if($idade > 18) { | |
return true; | |
} | |
else { | |
return false; |
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
<?php | |
$url = (isset($_GET['url'])) ? $_GET['url'] : "home"; | |
$file = $url.".php"; | |
if(file_exists($file)) { | |
echo 'arquivo <b>'.$url.'</b> existe'; | |
} | |
else { | |
echo 'A pagina <b>'.$url.'</b> nao existe'; | |
} |
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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?url=$1 |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int narg, char *argv[]) { | |
system("clear"); | |
int continua = 1; | |
char opcao; | |
arquivo = fopen("agenda.txt","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
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?url=$1 |
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
<?php | |
$url = (isset($_GET['url'])) ? $_GET['url'] : "home"; | |
$file = $url.".php"; | |
if(file_exists($file)) { | |
include($file); | |
} | |
else { | |
echo "Desculpe... Esta página não existe."; | |
} |
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> | |
#include<stdlib.h> | |
int main(int narg, char *argv[]) { | |
int n, i; | |
scanf("%d", &n); | |
for(i=2;i<=n;i++) { | |
if(i%2 == 1) { |