Skip to content

Instantly share code, notes, and snippets.

Elemar Rodrigues Severo Junior ElemarJR

Block or report user

Report or block ElemarJR

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8651257c8af49eb6db181b34081945b3
using System;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using static System.Console;
@ElemarJR
ElemarJR / STATEMENTS.md
Last active Dec 10, 2017
My Celebrity Statements
View STATEMENTS.md

I help senior software engineers and architects to create software that meets business needs so they can have space to innovate and to get recognized for that.

I help C-Level executives to design and implement innovation strategies effectively so they can improve their skills getting innovation done.

@ElemarJR
ElemarJR / index.cs
Last active Aug 2, 2017
Esent: out of memory
View index.cs
public sealed class Debts_ByPayer : AbstractMultiMapIndexCreationTask<PayerInfoForBilling>
{
public Debts_ByPayer()
{
AddMap<Debt>(debts =>
from debt in debts
let person = LoadDocument<Person>("people/" + debt.Charging.PersonId.ToString())
let agreement = LoadDocument<Agreement>(debt.Source.ToString())
let personIds = person.Id.ToString().Split('/')
let agreementIds = agreement.Id.ToString().Split('/')
View QueryTimings.cs
using System;
using System.Linq;
using Raven.Client;
using Raven.Client.Document;
using Raven.Client.Indexes;
namespace ConsoleApp1
{
class Program
{
View changedByOthers.cs
_subscription = DocumentStoreHolder.Store
.Changes()
.ForDocument(CategoryIdTextbox.Text)
.Where(change =>
{
if (!_justSaved) return true;
_justSaved = false;
var localEtag = _session.Advanced.GetEtagFor(_category);
var numberOfServerChanges = change.Etag.Changes - localEtag.Changes;
View Func.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication9
{
using static System.Console;
using static System.Math;
using static Helpers;
View Option.cs
using System;
namespace JLang.Functional
{
using static Helpers;
public struct Option<T>
{
internal T Value { get; }
public bool IsSome { get; }
View ToPropertyPath.cs
public static string ToPropertyPath<TB, T>(this Expression<Func<TB, T>> func)
{
var result = new StringBuilder();
var node = func.Body;
while (node.NodeType == ExpressionType.MemberAccess)
{
var me = node as MemberExpression;
if (result.Length != 0) result.Insert(0, ".");
result.Insert(0, me.Member.Name);
node = me.Expression;
View newton.fsx
type Expr =
| X
| Const of value: double
| Add of Expr * Expr
| Sub of Expr * Expr
| Mult of Expr * Expr
| Div of Expr * Expr
| Pow of Expr * Expr
| Neg of Expr
View script.fsx
let e numberStr =
match numberStr with
| "" -> numberStr
| _ -> numberStr + " e "
let writeNumber nr : string =
let unity = ["zero"; "um"; "dois"; "três"; "quatro"; "cinco"; "seis"; "sete"; "oito"; "nove"; "dez"; "onze"; "doze"; "treze"; "quatorze"; "quinze"; "dezesseis"; "dezessete"; "dezoito"; "dezenove"]
let decimals = [""; "cem"; "vinte"; "trinta"; "quarenta"; "cinquenta"; "sessenta"; "setenta"; "oitenta"; "noventa"]
let hundreds = [""; "cento"; "duzentos"; "trezentos"; "quatrocentos"; "quinhentos"; "seissentos"; "setecentos"; "oitocentos"; "novecentos"]
You can’t perform that action at this time.