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
SELECT | |
distinct comment_author, comment_author_email | |
FROM | |
wp_comments | |
INNER JOIN | |
wp_posts | |
ON | |
comment_post_ID = id | |
WHERE | |
post_title = 'Herbstcampus 2013: Teilnahme und Ticketverlosung' |
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 IEnumerable<IList<char>> CombineWithRepetitions(this IEnumerable<char> input, int take) | |
{ | |
ICollection<IList<char>> output = new Collection<IList<char>>(); | |
IList<char> item = new char[take]; | |
CombineWithRepetitions(output, input, item, 0); | |
return output; | |
} |
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 IEnumerable<IEnumerable<T>> Permute<T>(this IList<T> v) | |
{ | |
ICollection<IList<T>> result = new List<IList<T>>(); | |
Permute(v, v.Count, result); | |
return result; | |
} | |
private static void Permute<T>(IList<T> v, int n, ICollection<IList<T>> result) |
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 T AppSetting<T>(this string key) | |
{ | |
var value = default(T); | |
if (ConfigurationManager.AppSettings[key] != null) | |
{ | |
var converter = TypeDescriptor.GetConverter(typeof (T)); | |
value = (T)converter.ConvertFrom(ConfigurationManager.AppSettings[key]); | |
} |
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
static void Main() | |
{ | |
const string lowerCharacters = "abcdefghijklmnopqrstuvwxyz"; | |
const string upperCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var cultures = CultureInfo.GetCultures(CultureTypes.AllCultures); | |
foreach (var culture in cultures) | |
{ | |
var upper = lowerCharacters.ToUpper(culture); | |
var lower = upperCharacters.ToLower(culture); |
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
[TestMethod] | |
public void TestTurkishStringCompare() | |
{ | |
const string lowerCharacters = "abcdefghijklmnopqrstuvwxyz"; | |
const string upperCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var turkishCulture = CultureInfo.GetCultureInfo("tr-TR"); | |
var upper = lowerCharacters.ToUpper(turkishCulture); | |
var lower = upperCharacters.ToLower(turkishCulture); |
NewerOlder