Skip to content

Instantly share code, notes, and snippets.

View jaguarxii's full-sized avatar

Douglas Acosta jaguarxii

  • Quito, Ecuador
View GitHub Profile
@Mohammedkb
Mohammedkb / NumberToWords.txt
Created March 18, 2022 20:53
Lambda code to be imported in Excel Advanced Formula Environment to build a customized function that converts numbers to words.
NumberToWords = LAMBDA(DNumValue, CUR, DecimalCUR, DecimalCURPlace,
LET(
NumValue, INT(DNumValue),
Words1,IFS(
len(NumValue)=1,GetDigit(value(NumValue)) & " " & CUR,
len(NumValue)=2,GetTens(value(NumValue))& " " & CUR,
len(NumValue)=3,GetHundreds(value(NumValue))& " " & CUR,
len(NumValue)<=6,GetHundreds(VALUE(left(NumValue,len(NumValue)-3))) & " Thousand " & GetHundreds(value(NumValue))& " " & CUR,
len(NumValue)<=9,GetHundreds(VALUE(left(NumValue,len(NumValue)-6))) & " Million " & GetHundreds(VALUE(left(NumValue,len(NumValue)-3))) & " Thousand " & GetHundreds(value(NumValue))& " " & CUR,
len(NumValue)<=12,GetHundreds(VALUE(left(NumValue,len(NumValue)-9))) & " Billion " & GetHundreds(VALUE(left(NumValue,len(NumValue)-6))) & " Million " & GetHundreds(VALUE(left(NumValue,len(NumValue)-3))) & " Thousand " & GetHundreds(value(NumValue))& " " & CUR),
@Modem56k
Modem56k / NHibernateContainsSubsitute.cs
Last active October 19, 2019 13:19
Fluent NHibernate Query Items Matching List of Ids
public dynamic Get()
{
var ids = _session.QueryOver<model>
.Select(x=>x.Id)
.toList();
var results = Session.QueryOver<SecondModel>()
.WhereRestrictionOn(x => x.Id)
.IsIn(ids)
.GetPagedResult(pageNum, PageSize, x => {