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
public static class SeoUrl | |
{ | |
public static string Sanitize(string input) | |
{ | |
if (string.IsNullOrEmpty(input)) | |
{ | |
return input; | |
} | |
var normalizedString = FoldDiacriticals(input); |
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
using System.Web.Mvc; | |
using TISelvagem.Aplicacao; | |
using TISelvagem.Dominio; | |
namespace TISelvagem.UI.Web.Controllers | |
{ | |
public class AlunoController : Controller | |
{ | |
// | |
// GET: /Aluno/ |
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
let somar (n1:int) (n2:int) = n1 + n2 | |
let subtrair = fun n1 n2 -> n1 - n2 | |
let multiplicar n1 n2 = n1 * n2 | |
module Calculadora = | |
let somar n1 n2 = n1 + n2 | |
let subtrair = fun n1 n2 -> n1 - n2 | |
let rec fatorial n = | |
if n = 0 |
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
DateTime baseDate = DateTime.Today; | |
var today = baseDate; | |
var yesterday = baseDate.AddDays(-1); | |
var thisWeekStart = baseDate.AddDays(-(int)baseDate.DayOfWeek); | |
var thisWeekEnd = thisWeekStart.AddDays(7).AddSeconds(-1); | |
var lastWeekStart = thisWeekStart.AddDays(-7); | |
var lastWeekEnd = thisWeekStart.AddSeconds(-1); | |
var thisMonthStart = baseDate.AddDays(1 - baseDate.Day); | |
var thisMonthEnd = thisMonthStart.AddMonths(1).AddSeconds(-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
class Ola | |
def initialize(nome="mundo") | |
@nome = nome | |
end | |
def dizOi | |
puts "Olá #{@nome}" | |
end | |
def dizFui | |
puts "Adeus #{@nome}" | |
end |
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
using System.Collections.Generic; | |
using System.Web.Http; | |
using W7Gestao.UI.Web.Helper; | |
namespace W7Gestao.UI.Web.Controllers.API.Configuracao | |
{ | |
public class UsuarioController : ApiController | |
{ | |
[Seguranca(Roles = "Administrador")] | |
public IEnumerable<string> Get() |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using PagedList; | |
using W7.Camara.Aplicacao; | |
using W7.Camara.UI.Web.Site.ViewModel; | |
namespace W7.Camara.UI.Web.Site.Controllers |
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
foreach (var empenhoXML in listaDeEmpenhosConvertidos) | |
{ | |
var empenhoBanco = lista.FirstOrDefault(x => x.NumeroEmpenho == empenhoXML.NumeroEmpenho); | |
if (empenhoBanco != null) | |
{ | |
if (empenhoXML.ValorEmpenhado < 0) | |
{ | |
if (empenhoBanco.Anulacao == null) empenhoBanco.Anulacao = new Collection<ItensAnulacao>(); | |
if (empenhoBanco.Anulacao.Any(x => x.Data == empenhoXML.Data && x.Valor == empenhoXML.ValorEmpenhado)) | |
continue; |
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
Public class Vereador { | |
public int Id {get;set;} | |
public string Nome {get;set;} | |
public string Partido {get;set;} | |
} | |
Public class Funcionario { | |
public int Id {get;set;} | |
public string Nome {get;set;} |