I hereby claim:
- I am keith9820 on github.
- I am keith9820 (https://keybase.io/keith9820) on keybase.
- I have a public key whose fingerprint is B3FA 1E49 7F13 552D F7E9 6AAF 8EAE 8193 F573 7C3C
To claim this, I am signing this object:
private static object Eval(string __code) | |
{ | |
var csc = new CSharpCodeProvider(new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } }); | |
var p = new CompilerParameters(new[] { "mscorlib.dll", "System.Core.dll" }, null, true); | |
p.GenerateInMemory = true; | |
p.GenerateExecutable = false; | |
CompilerResults r = csc.CompileAssemblyFromSource(p, "using System; class p {public static object c(){"+__code+"}}"); | |
if (r.Errors.Count > 0) | |
{ | |
r.Errors.Cast<CompilerError>().ToList().ForEach(error => Console.WriteLine(error.ErrorText)); |
I hereby claim:
To claim this, I am signing this object:
var sought = 13; | |
int[] array = new int[5]{5,7,8,15,20}; | |
array.OrderBy(a => Math.Abs(a - sought)).First().Dump(); |
CAST(CAST(year AS VARCHAR(4)) +RIGHT('0' + CAST(month AS VARCHAR(2)), 2) +RIGHT('0' + CAST(day AS VARCHAR(2)), 2) AS DATE) |
CREATE FUNCTION [dbo].[ToBinary] | |
( | |
@Input int | |
) | |
RETURNS varchar(255) | |
AS | |
BEGIN | |
DECLARE @Output varchar(32) = '' |
CREATE FUNCTION [dbo].[GetPart](@inputString AS VARCHAR(MAX), @index AS int, @delimiter AS CHAR(1) = '~') RETURNS VARCHAR(MAX) | |
AS | |
BEGIN | |
DECLARE @ResultVar AS VARCHAR(MAX), @start INT, @end INT, @current INT | |
SELECT @start = 1, @end = CHARINDEX(@delimiter, @inputString), @current = 0 | |
WHILE @start < LEN(@inputString) + 1 | |
BEGIN | |
IF @end = 0 | |
SET @end = LEN(@inputString) + 1 |
ALTER USER devuser WITH LOGIN = devuser |
#Cleanup repo filesystem tasks
use
git mv
to move or rename indexed fies
usegit rm xxx --cached
to remove a file from the index but keep it in the filesystem
###Repos:
# Work in progress, modified from: | |
##----------------------------------------------------------------------- | |
## <copyright file="ApplyVersionToAssemblies.ps1">(c) Microsoft Corporation. This source is subject to the Microsoft Permissive License. See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx. All other rights reserved.</copyright> | |
##----------------------------------------------------------------------- | |
# Look for a 0.0.0.0 pattern in the build number. | |
# If found use it to version the assemblies. | |
# | |
# For example, if the 'Build number format' build process parameter | |
# $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) | |
# then your build numbers come out like this: |