🏳️⚧️
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
# Navigation | |
alias a='nano ~/.bash_aliases' | |
alias ae='gedit ~/.bash_aliases' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias todev='cd /media/programazing/Documents/Dev' | |
alias toproj='cd /media/programazing/Documents/Dev/personal/projects' | |
# cloneproj linkToGitRepo |
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
// IEnumerable<char> Lowercase | |
var alphabet = Enumerable.Range('a', 26).Select(n => (char)n); | |
// IEnumerable<char> Uppercase | |
var alphabet = Enumerable.Range('A', 26).Select(n => (char)n); | |
// IEnumerable<string> Lowercase | |
var alphabet = Enumerable.Range('a', 26).Select(n => ((char)n).ToString()); |
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
{"lastUpload":"2019-12-29T17:56:40.049Z","extensionVersion":"v3.4.3"} |
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 DataTable ToDataTable<T>(this List<T> input) | |
{ | |
var props = TypeDescriptor.GetProperties(typeof(T)); | |
var output = new DataTable(); | |
foreach(PropertyDescriptor item in props) | |
{ | |
if (item.PropertyType.IsGenericType && item.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) | |
output.Columns.Add(item.Name, item.PropertyType.GetGenericArguments()[0]); | |
else |
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 Xunit; | |
namespace FizzBuzzChecker.Test | |
{ | |
public class FizzBuzzTests | |
{ | |
[InlineData(3, "Fizz")] | |
[InlineData(6, "Fizz")] | |
[InlineData(9, "Fizz")] | |
[InlineData(12, "Fizz")] |
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
var book = (from theBook in _context.Books.Where(b => b.BookId == id) | |
join loan in _context.BookLoans.Where(x => !x.ReturnedOn.HasValue) on theBook.BookId equals loan.BookID into result | |
from loanWithDefault in result.DefaultIfEmpty() | |
select new BookDetailsViewModel | |
{ | |
BookID = theBook.BookId, | |
SubTitle = theBook.SubTitle, | |
Title = theBook.Title, | |
Author = theBook.Author, | |
ISBN = theBook.ISBN, |