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 Microsoft.VisualStudio.TestTools.UnitTesting; | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
// 66ms: Dictionary with lock() | |
// 78ms: Dictionary with ReaderWriterLockSlim | |
// 128ms: ConcurrentDictionary (with Add if not exists) |
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
import EventBus from "@/eventBus"; // A simple new Vue() event bus | |
import store from "@/store"; | |
import HomePage from "./pages/index.vue"; | |
import NotFoundPage from "./pages/404.vue"; | |
import CustomersHomePage from "./pages/customers/index.vue"; | |
import CustomersCategoriesPage from "./pages/customers/categories.vue"; | |
const routes = | |
[ | |
{ |
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; | |
namespace Pools | |
{ | |
public abstract class GenericPool<T> : IDisposable where T : class | |
{ | |
public abstract void Dispose(); | |
private T _instance; |
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
{"swagger":"2.0","info":{"version":"1.0.0","title":"Notícias","description":"Canal de notícias globo.com"},"host":"recomendacao.globo.com","schemes":["http"],"produces":["application/json"],"paths":{"/rec/v2/user/gshow/feed":{"get":{"description":"Retorna uma lista de notícias recomendadas","produces":["application/json"],"responses":{"200":{"description":"Página contendo a lista de notícias recomendadas","schema":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mainSection":{"type":"string"},"mainSectionPermalink":{"type":"string"},"issued":{"type":"string"},"caption":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"photos":{"type":"object","properties":{"original":{"type":"string"},"thumbnail":{"type":"string"}}}}}}}}}}}} |
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 connectionString = "Data Source=.;Initial Catalog=NomeBanco;Integrated Security=True"; // String de conexão do banco local contendo as procs | |
var databaseName = "AdminDataClient"; // Nome da interface e classe (Foo cria a interface IFoo e a classe concreta Foo) | |
var ns = "Dados"; // Namespace onde as classes de entrada, saída e client serão geradas (geralmente o namespace do projeto atual) | |
var schemaFilter = "admin"; // Filtra apenas procedures pertencentes a este schema | |
#> | |
<#@ include file="ModelGenerator.ttinclude" #> |
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
<#@ output extension=".cs" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Data" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.Data" #> | |
<#@ import namespace="System.Data.SqlClient" #> | |
// ReSharper disable All | |
using System; | |
using System.Data.SqlClient; | |
using System.Collections.Generic; |
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
Press enter to begin the benchmark: | |
Results | |
======= | |
Framework Entities Insert Update Delete Single Fetch Paged | |
--------------------------------------------------------------------------------------------------------------- | |
DapperExtensionsAsync 1.40/1.4.3: 1 17,69 ms 17,07 ms 17,40 ms 1,43 ms 1,22 ms 1,28 ms | |
DapperExtensionsAsync 1.40/1.4.3: 25 23,50 ms 21,74 ms 18,32 ms 3,60 ms 1,47 ms 1,41 ms | |
DapperExtensionsAsync 1.40/1.4.3: 50 24,64 ms 37,30 ms 22,95 ms 5,79 ms 1,91 ms 1,69 ms |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
NewerOlder