View tabelas_sinacor
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
Prefixo das Tabelas | |
TSC = Clientes | |
TCC = Conta Corrente | |
TTS = Tesouraria | |
TOR = Ordens Bolsa | |
TBO = Faturamento Bolsa | |
TCA = Controle de Acesso | |
TMF = Faturamento de BM&F | |
TCF = Custodia | |
TGE = Controle de Empresas |
View completion-suggester.cs
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
void Main() | |
{ | |
var indexName = "stackoverflow"; | |
var node = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); | |
var settings = new ConnectionSettings(node) | |
.InferMappingFor<Question>(m => m | |
.IndexName(indexName) | |
) | |
.PrettyJson() | |
.DisableDirectStreaming() |
View AsyncDapperDemo.cs
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.Data; | |
using System.Data.SqlClient; | |
using System.Threading.Tasks; | |
using Dapper; | |
public class Program | |
{ | |
public static void Main() |
View git-commit-csv-export.sh
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
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv |
View Validação de CPF e CNPJ - C#
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
namespace CpfCnpj | |
{ | |
public static class CpfCnpjUtils | |
{ | |
public static bool IsValid(string cpfCnpj) | |
{ | |
return (IsCpf(cpfCnpj) || IsCnpj(cpfCnpj)); | |
} | |
private static bool IsCpf(string cpf) |
View reduceExamples.js
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
//Example 1 - Calculate average value of an array (transform array into a single number) | |
var scores = [89, 76, 47, 95] | |
var initialValue = 0 | |
var reducer = function (accumulator, item) { | |
return accumulator + item | |
} | |
var total = scores.reduce(reducer, initialValue) | |
var average = total / scores.length | |
/*Explain about function |
View DataTableResultSet.cs
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
/// <summary> | |
/// Resultset to be JSON stringified and set back to client. | |
/// </summary> | |
[Serializable] | |
[SuppressMessage("ReSharper", "InconsistentNaming")] | |
public class DataTableResultSet | |
{ | |
/// <summary>Array of records. Each element of the array is itself an array of columns</summary> | |
public List<List<string>> data = new List<List<string>>(); |
View ConcurrentDictionaryExtensions.cs
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.Threading.Tasks; | |
namespace System.Collections.Concurrent | |
{ | |
public static class ConcurrentDictionaryExtensions | |
{ | |
/// <summary> | |
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>. | |
/// </summary> |