Skip to content

Instantly share code, notes, and snippets.

View lucaslra's full-sized avatar

Lucas Araujo lucaslra

View GitHub Profile
@lucaslra
lucaslra / Program.cs
Created June 14, 2018 10:47
Check Emptiness Extension Method
using System;
namespace Ext
{
class Program
{
static void Main(string[] args)
{
string a = null;
string b = "";
from sys import argv
try:
word = argv[1]
for c in argv[1]:
print(word)
word = word[:-1]
for c in argv[1]:
word += c
print(word)
@lucaslra
lucaslra / gist:fb39f3afa372d08d8dbd459e269fecb6
Created September 19, 2017 11:36 — forked from Vintharas/gist:bfa5709746f9dbea3794
Mocking IDBSet IQueryable with Moq
using System.Data.Entity;
using System.Linq;
using Moq;
namespace Platform.Domain.Tests.Helpers
{
public class QueryableDbSetMock
{
public static IDbSet<T> GetQueryableMockDbSet<T>(params T[] sourceList) where T : class
{
@lucaslra
lucaslra / characterInput.py
Created July 12, 2016 00:52
Practice Python - Character Input
from datetime import date
name = input("What's your name?")
age = input("How old are you?")
years = date.today().year + 100 - int(age)
print("Well " + name +
", it seems like you are going to have 100 years by the year " + str(years))