Create a sample todo using gist ( github style markdown)
- a task list item
- list syntax required
- normal formatting, @mentions, #1234 refs
- incomplete
- completed
package main | |
import "fmt" | |
func fibonacci() func() int { | |
sum := 0 | |
x := 0 | |
y := 1 | |
return func() int { | |
sum = sum + x |
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("Hello World"); | |
Create a sample todo using gist ( github style markdown)
/// <summary> | |
/// Parses a query string into a dictionary collection | |
/// </summary> | |
/// <param name="queryString">the query string to parse</param> | |
/// <returns>a dictionary collection of querystring items</returns> | |
public static Dictionary<string, string> ParseQueryString(string queryString) | |
{ | |
Dictionary<string, string> nameValueCollection = new Dictionary<string, string>(); | |
string[] items = queryString.Split('&'); |
There is no click event in datagrid's checkcolumn, but the checkbox control has a click event, so you can try to use the datagrid's template column and place a checkbox in template, and add code to checkbox click event code block. | |
You can try to pre-define the checkbox in the a datatemplate in the usercontro.resource tags, and register the checkbox event, like below: | |
<UserControl.Resources> | |
<DataTemplate x:Key="myCellTemplate"> | |
<CheckBox Click="CheckBox_Click"></CheckBox> | |
</DataTemplate> | |
</UserControl.Resources> |
#files listing in a directory and write it to a file | |
ARGV.each do|a| | |
puts "Directory: #{a}" | |
dir_contents = Dir.entries(a) | |
puts dir_contents | |
end | |
#usage |
private XDocument ConvertXmlDocumentToXDocument(XmlDocument xmlDoc) | |
{ | |
return XDocument.Load(xmlDoc.CreateNavigator().ReadSubtree()); | |
} | |
private XmlDocument ConvertXDocumentToXmlDocument(XDocument xDoc) | |
{ | |
var xmldoc = new XmlDocument(); | |
xmldoc.Load(xDoc.CreateReader()); | |
return xmldoc; |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Program p = new Program(); | |
Console.WriteLine(p.linqStringList()); | |
Console.ReadLine(); | |
} |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Program p = new Program(); | |
//Console.WriteLine(p.linqStringList()); | |
Console.WriteLine(p.linqObjectArrayList()); | |
Console.ReadLine(); | |
} |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Xml; | |
/* | |
* download NewtonSoft josn library from | |
* http://www.codeplex.com/json/Release/ProjectReleases.aspx | |
* */ |