This file contains hidden or 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 Dapper; | |
| using Oracle.ManagedDataAccess.Client; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Linq; | |
| public class OracleDynamicParameters : Dapper.SqlMapper.IDynamicParameters { | |
| private static Dictionary<SqlMapper.Identity, Action<IDbCommand, object>> paramReaderCache = new Dictionary<SqlMapper.Identity, Action<IDbCommand, object>>( ); |
This file contains hidden or 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 sys | |
| import urllib2 | |
| from json import loads | |
| from urllib import urlencode | |
| import base64 | |
| print sys.argv | |
| LOG_FILE = 'uploads.log' | |
| DEV_KEY = 'YOUR KEY HERE' # from http://imgur.com/register/api_anon |
This file contains hidden or 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 Encoding GetFileEncoding(string path) | |
| { | |
| if (path == null) | |
| throw new ArgumentNullException("path"); | |
| var encodings = Encoding.GetEncodings() | |
| .Select(e => e.GetEncoding()) | |
| .Select(e => new { Encoding = e, Preamble = e.GetPreamble() }) | |
| .Where(e => e.Preamble.Any()) | |
| .ToArray(); |
This file contains hidden or 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.Collections.Generic; | |
| using System.Text; | |
| /// <summary> | |
| /// Represents assembly, application, or other version information, | |
| /// compliant with the Semantic Versioning specifications. | |
| /// </summary> | |
| /// <remarks> | |
| /// See http://semver.org/ for specifications. |
This file contains hidden or 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
| set nocount on | |
| declare @namespace varchar(500) | |
| declare @schemaName varchar(50) | |
| set @namespace = 'ConsoleApplication3.Data' | |
| set @schemaName = 'dbo' | |
| declare @typeMap table(sqlName varchar(50), dotNetName varchar(50), isNullable bit) |
NewerOlder