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
| //ModelStateDictionary | |
| var erros = ModelState.Values.SelectMany(x => x.Errors.Select(y => y.ErrorMessage)).ToList(); |
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
| ([01]\d|2[0-3])(:[0-5]\d){2} |
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
| dar pull na branch destino pra atualizar a local | |
| dar o merge local nas duas branchs (aqui vai ficar o <<<<<<< HEAD no arquivo) | |
| -commita merge com conflitos | |
| resolvou conflitos nos arquivos da branch de destino (local) | |
| git add nos arquivos que deram conflito, porq automaticamente eles ficam untracked | |
| -commita a resolução de conflitos | |
| git push |
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
| https://color.adobe.com/pt/explore/newest/ |
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
| lookahead positive | |
| /foo(?=bar)/ match foo in Hello foobar | |
| lookahead negative | |
| /foo(?!bar)/ matches 'foo', only if it is NOT followed by 'bar' | |
| Lookbehind positive | |
| /(?<=foo)bar/ matches 'bar' only if it is preceded by 'foo' | |
| Lookbehind negative |
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
| <!-- 20480 = 1024 x 20 = 20 Megas --> | |
| <httpRuntime targetFramework="4.5" maxRequestLength="20480" /> |
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
| Regex to validate password strength | |
| ^(?=.*[A-Z].*[A-Z])(?=.*[!@#$&*])(?=.*[0-9].*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8}$ | |
| Explanation: | |
| ^ Start anchor | |
| (?=.*[A-Z].*[A-Z]) Ensure string has two uppercase letters. | |
| (?=.*[!@#$&*]) Ensure string has one special case letter. | |
| (?=.*[0-9].*[0-9]) Ensure string has two digits. |
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
| text between ** means match | |
| (\d)(\1)+ | |
| *11111111111111* | |
| 123456789 | |
| 12*4444444*56 |
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
| function copyInputValues($from, $to){ | |
| var fields = $from.find(":input").serializeArray(); | |
| jQuery.each(fields, function(i, field) { | |
| var $temp = $to.find(":input[name='"+field.name+"']"); | |
| $temp.attr({value:field.value}); | |
| $temp.val(field.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
| public static string FormatAsCNPJ(this string str) | |
| { | |
| long number; | |
| return long.TryParse(str, out number) ? number.ToString(@"00\.000\.000\/0000\-00") : null; | |
| } | |
| public static string FormatAsCPF(this string str) | |
| { | |
| long number; |
OlderNewer