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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<solution> | |
<add key="disableSourceControlIntegration" value="true" /> | |
</solution> | |
</configuration> |
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
public static int Compute(string s, string t) | |
{ | |
int n = s.Length; | |
int m = t.Length; | |
int[,] d = new int[n + 1, m + 1]; | |
// Step 1 | |
if (n == 0) | |
{ | |
return m; |
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
private static string CreateCsvTextFile<T>(List<T> data) | |
{ | |
var properties = typeof(T).GetProperties(); | |
var result = new StringBuilder(); | |
var headings = properties.Select(x => x.Name.ToString()); | |
var headerLine = string.Join(",", headings); | |
result.AppendLine(headerLine); |
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
(function () { | |
'use strict'; | |
angular | |
.module('SampleApp') | |
.controller('HomeController', HomeController); | |
function HomeController() { | |
var vm = this; |
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
/// <reference path="../MvcAngularJasmineTests/Scripts/angular.js"/> | |
/// <reference path="../MvcAngularJasmineTests/Scripts/angular-route.js"/> | |
/// <reference path="Scripts/angular-mocks.js"/> | |
/// <reference path="../MvcAngularJasmineTests/Scripts/app/app.js"/> | |
/// <reference path="../MvcAngularJasmineTests/Scripts/home/home.controller.js"/> | |
/// <reference path="Scripts/jasmine/jasmine.js"/> | |
describe('When working with the home.controller', function () { |
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
SELECT t.name AS table_name, | |
SCHEMA_NAME(schema_id) AS schema_name, | |
c.name AS column_name | |
FROM sys.tables AS t | |
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID | |
WHERE c.name LIKE '%name of column%' | |
ORDER BY schema_name, table_name; |
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
private void BootAutoFac() | |
{ | |
var builder = new ContainerBuilder(); | |
var assemblies = AppDomain.CurrentDomain.GetAssemblies() | |
.Where(x => x.FullName.StartsWith("Your.Namespace")).ToArray(); | |
builder.RegisterAssemblyTypes(assemblies) | |
.Where(t => t.IsClass) |
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
<?php | |
function get_groups($user) { | |
// Active Directory server | |
$ldap_host = "ad.domain"; | |
// Active Directory DN, base path for our querying user | |
$ldap_dn = "CN=Users,DC=ad,DC=domain"; | |
// Active Directory user for querying | |
$query_user = "jane@".$ldap_host; |
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
public class Person | |
{ | |
public int Id { get; set; } | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
} | |
public class PersonService | |
{ | |
public Person GetPerson(int id) |