This file contains hidden or 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.Globalization; | |
namespace ExtensionMethodsDate | |
{ | |
internal static class Extension | |
{ | |
internal static string ObterDiaDaSemana(this DateTime data) | |
{ | |
int diaDaSemana = (int)data.DayOfWeek; |
This file contains hidden or 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
<input type="text" name="nome" placeholder="Seu nome" /> | |
<select name="sexo"> | |
<option value="M">Masculino</option> | |
<option value="F">Feminino</option> | |
</select> | |
<textarea name="mensagem" placeholder="Mensagem"></textarea> |
This file contains hidden or 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
<form method="POST" action="https://simple-form.com/[email protected]"> | |
<input type="text" name="name" placeholder="Seu nome" /> | |
<input type="email" name="replyTo" placeholder="Seu e-mail" /> | |
<textarea name="message" placeholder="Sua mensagem"></textarea> | |
<input type="submit" value="Send" /> | |
</form> |
This file contains hidden or 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
#Script para atualizar o sistema | |
alias AtualizarSistema='sudo apt-get update && | |
sudo apt-get dist-upgrade -f && | |
sudo apt-get autoclean && | |
sudo apt-get autoremove && | |
sudo apt-get clean' |
This file contains hidden or 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
DotCEP.Localidades.Municipio municipioBase = new DotCEP.Localidades.Municipio(); | |
municipioBase = DotCEP.Localidades.Municipio.ObterInformacoesDoMunicipio(4314407); | |
//ou | |
municipioBase = DotCEP.Localidades.Municipio.ObterInformacoesDoMunicipio("Pelotas",DotCEP.UF.RS); | |
Console.WriteLine(String.Format("{0} {1} {2}", municipioBase.Codigo, municipioBase.CodigoEstado, municipioBase.Nome)); | |
//Saída: 4314407 43 Pelotas |
This file contains hidden or 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
DotCEP.Localidades.Municipio.ObterNomeDoMunicipio(3550308) | |
//Saída: São Paulo |
This file contains hidden or 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
DotCEP.Localidades.Municipio.ObterCodigoDoMunicipio("Bom Jesus",DotCEP.UF.PI) | |
//Saída: 4302303 |
This file contains hidden or 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
DotCEP.Localidades.Municipio.ObterListaDeMunicipio(); | |
DotCEP.Localidades.Municipio.ObterListaDeMunicipio(DotCEP.UF.RS); | |
DotCEP.Localidades.Municipio.ObterListaDeMunicipio("RS"); |
This file contains hidden or 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
DotCEP.Localidades.Estado.ObterListaDeEstados(); |
This file contains hidden or 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
DotCEP.Localidades.Estado.ObterNomeDoEstado(43) | |
Saída:Rio Grande do Sul | |
DotCEP.Localidades.Estado.ObterNomeDoEstado("SP") | |
Saída:Sao Paulo | |
DotCEP.Localidades.Estado.ObterCodigoDoEstado("RS") | |
Saída:43 | |
DotCEP.Localidades.Estado.ObterSiglaDoEstado(43) |