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
using System; | |
using System.Globalization; | |
static class Program | |
{ | |
private static void Main() | |
{ | |
double d = 3.14; | |
IFormattable s = $"{d}"; | |
Console.WriteLine(s.ToString(null, CultureInfo.GetCultureInfo("cs-cz"))); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// Add this to LinqPad "C# Program" | |
// Example use: | |
// Insead of this: (create a List<CS_POSITION>) | |
// CS_POSITIONs.InsertOnSubmit(position); | |
// This: | |
// positions.Add(position); | |
// | |
// Then instead of this: | |
// SubmitChanges() | |
// 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
{% if page.locations %} | |
<img src="http://maps.googleapis.com/maps/api/staticmap?{% for location in page.locations %}{% if forloop.first %}center={{location}}&markers=color:blue%7C{{location}}{% else %}&markers=color:blue%7C{{location}}{% endif %}{% endfor %}&zoom={% if page.zoom %}{{page.zoom}}{% else %}13{% endif %}&size=300x200&scale=2&sensor=false&visual_refresh=true" alt=""> | |
{% endif %} |
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
void Main() | |
{ | |
var databaseInfo = GetDatabaseInfo(this); | |
databaseInfo.Dump(); | |
} | |
// Define other methods and classes here | |
public class DatabaseInfo | |
{ | |
public Type DataContextType { get; set; } |
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
using System.Collections.Generic; | |
using System.IO; | |
using OfficeOpenXml; // (EPPLus - http://epplus.codeplex.com/) | |
namespace OfficeReports | |
{ | |
public static class DumpToExcel | |
{ | |
public static void Dump<T>(IEnumerable<T> data, string outputFilename) | |
{ |