Visit my blog or connect with me on Twitter
git init
or
| public class NeVar | |
| { | |
| // | |
| } |
| A common requirement with an XML file is to find a particular node. If you are targeting the .NET framework 3.5 or higher, you can find the node using Linq to XML or by using Lambda expressions. | |
| As with many of my prior XML examples, the XML string is as follows: | |
| <States> | |
| <State name="Wisconsin"> | |
| <Regions> | |
| <Region name="Milwaukee"> | |
| <Area name="Mukwanago"/> | |
| <Area name="Germantown"/> |
| set nocount on | |
| declare @namespace varchar(500) | |
| set @namespace = 'PersonnelManagement.Common.DataModel' | |
| declare @typeMap table(sqlName varchar(50), dotNetName varchar(50), isNullable bit) | |
| insert into @typeMap values('image', 'byte[2147483647]', null) | |
| insert into @typeMap values('text', 'string', null) | |
| insert into @typeMap values('uniqueidentifier', 'Guid', 0) | |
| insert into @typeMap values('uniqueidentifier', 'Guid?', 1) |
| create proc dbo.setContextUser | |
| @m varchar(15) | |
| as | |
| begin | |
| declare @v varbinary(50) ; set @v = convert(varbinary(50), @m, 0) | |
| SET CONTEXT_INFO @v | |
| print @m + ' set edildi' | |
| end |
| 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(); |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| # opensubtitles.org | |
| # Subtitles service allowed by www.OpenSubtitles.org | |
| # Language codes: http://www.opensubtitles.org/addons/export_languages.php | |
| import difflib | |
| OS_API = 'http://plexapp.api.opensubtitles.org/xml-rpc' | |
| OS_PLEX_USERAGENT = 'plexapp.com v9.0' | |
| SUBTITLE_EXT = ['utf','utf8','utf-8','sub','srt','smi','rt','ssa','aqt','jss','ass','idx'] |
| 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>>( ); |
Visit my blog or connect with me on Twitter
git init
or
Visit my blog or connect with me on Twitter
git init
or