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
Console.Write("Hello Gist"); |
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
DBCC CHECKIDENT ('tabela', RESEED, 0) |
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
string recebeJSON = ""; | |
using (var client = new WebClient()) | |
{ | |
recebeJSON = client.DownloadString("URL do JSON"); | |
} | |
//transforma a string em objeto | |
JObject _recebeJSON = JObject.Parse(recebeJSON); |
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
string id = string.Empty; | |
if (!String.IsNullOrEmpty(@Model.Video)) | |
{ | |
System.Text.RegularExpressions.Regex regexYoutube = new System.Text.RegularExpressions.Regex("youtu(?:\\.be|be\\.com)/(?:.*v(?:/|=)|(?:.*/)?)([a-zA-Z0-9-_]+)"); | |
System.Text.RegularExpressions.Match youtubeMatchs = regexYoutube.Match(Model.Video); | |
if (youtubeMatchs.Success) | |
{ | |
id = youtubeMatchs.Groups[1].Value; | |
} |
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
h3{ | |
text-transform: lowercase; | |
} | |
h3:first-letter{ | |
text-transform: uppercase; | |
} |
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
private string UTF8_to_ISO(string value) | |
{ | |
Encoding isoEncoding = Encoding.GetEncoding("ISO-8859-1"); | |
Encoding utfEncoding = Encoding.UTF8; | |
// Converte os bytes | |
byte[] bytesIso = utfEncoding.GetBytes(value); | |
// Obtém os bytes da string UTF |
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
<appSettings> | |
<add key="DefaultCulture" value="pt-BR" /> | |
</appSettings> |
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
/*Aplicando a validação*/ | |
$(".boxFormCadastro form").validate({ | |
errorLabelContainer: "#messageBox", | |
rules: { | |
dataNascimento: { | |
required: true, | |
dateBR: true | |
} | |
}, | |
messages: { |
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
/*String.Equals*/ | |
string.Equals("STringG", "strIng", StringComparison.OrdinalIgnoreCase) | |
/*or*/ | |
string text = "STRING"; | |
text.Equals("string", StringComparison.OrdinalIgnoreCase) |
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
//classe Costumer | |
public class Customer | |
{ | |
public int Id {get;set;} | |
public string nome {get;set;} | |
public string sobrenome {get;set;} | |
public string CPF {get;set;} | |
public string Telefone {get;set;} | |
} |
OlderNewer