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 async Task<ActionResult> Index(int? pagina, TituloViewModel viewModel) | |
{ | |
var paginaNaoNula = pagina ?? 1; | |
Guid usuarioId = Guid.Parse(User.Identity.GetUserId()); | |
var clientes = await db.Clientes.Where(c => c.UsuarioId == usuarioId).Include(cliente => cliente.Usuario).AsQueryable(); | |
if (!string.IsNullOrEmpty(viewModel.NomeCompleto)) | |
clientes = clientes.Where(p => p.Nome.Contains(viewModel.NomeCompleto)); |
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
li $s0, 2 # Carregar o valor de A | |
li $s1, 14 # Carregar o valor de B | |
main: | |
move $a1, $s0 # Fazer com que $a1 receba o valor de A, para usar na função | |
jal converter # Chamar a função que converte pra 7 segmentos | |
move $a1, $s1 # Mesma coisa que acima, só que usando o B | |
jal converter # -- | |
contar1: |
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
import time | |
from math import sqrt, ceil | |
def checkPrime(num, baseList): | |
for p in baseList: | |
if(p > ceil(sqrt(num))): break | |
if num % p == 0: | |
return False | |
return True |
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.Globalization; | |
namespace JefersonBueno | |
{ | |
public class Program | |
{ | |
public static string ChangeDate(string date, char op, long value) | |
{ | |
var toAdd = Math.Abs(value); |
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
<html> | |
<head> | |
<style> | |
@media print { | |
@page { | |
size: A4 landscape; | |
margin: 0; | |
@bottom-left { | |
content: counter(page) "/" counter(pages); |
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.Linq; | |
using System.Collections.Generic; | |
using static System.Console; | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
var numeros = Enumerable.Range(1, 31); | |
WriteLine("Números de 1 a 30"); |
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.Linq; | |
using System.Collections.Generic; | |
using static System.Console; | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
var numeros = Enumerable.Range(1, 31); | |
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.Linq; | |
using System.Collections.Generic; | |
using static System.Console; | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
var numeros = Enumerable.Range(1, 31); |
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 IEnumerable<T> MeuWhere<T>(this IEnumerable<T> src, Func<T, bool> predicate) | |
{ | |
foreach(var item in src) | |
if (predicate(item)) | |
yield return item; | |
} |
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 EventosRepository | |
{ | |
public Evento[] ObterEventos() | |
{ | |
var eventos = Connection.Query<Evento>("Select * From Eventos Limit X, Y"); | |
ComporRelacionados(eventos); | |
return eventos; | |
} | |
private void ComporRelacionados(Evento[] eventos) |