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
using System; | |
using System.Threading; | |
namespace dotNetPlayGround | |
{ | |
class Threads | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("I am executing in thread {0}",Thread.CurrentThread.ManagedThreadId); | |
Thread fg = new Thread(new ParameterizedThreadStart(Method1)); |
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
using System; | |
using System.Threading; | |
using System.Collections.Generic; | |
using Diag = System.Diagnostics; | |
namespace dotNetPlayGround | |
{ | |
class StopWatch | |
{ | |
public static void Main() |
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
using System; | |
using System.IO; | |
using System.Text; | |
using System.Net; | |
using System.Net.Sockets; | |
namespace dotNetPlayGround | |
{ | |
class Sockets | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace dotNetPlayGround | |
{ | |
class Permutations | |
{ | |
private static int[] permutationValue = new int[0]; |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.ComponentModel.Composition; | |
using System.ComponentModel.Composition.Hosting; | |
namespace dotNetPlayGround | |
{ | |
public interface ICalculator | |
{ |
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
//design questions: | |
// why is node<t> not derived from graphNode<t> . during implementaion you find that Node<t> and graphNode<t> | |
// are siblings rather than parent-child. | |
namespace dotNetPlayGround | |
{ | |
using System; | |
using System.Collections.ObjectModel; | |
using System.Collections.Generic; | |
using System.Text; |
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
using System; | |
using System.IO; | |
using System.Threading; | |
namespace dotNetPlayGround | |
{ | |
class AsyncState | |
{ | |
public string name; | |
public Stream stream = null; |
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
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.IO.Pipes; | |
namespace dotNetPlayGround | |
{ | |
class AnonymousPipesServer | |
{ | |
static void Main() |
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
def mulTables(n): | |
for i in range(1,n+1): | |
for j in range(1,n + 1): | |
print i * j, | |
if __name__ == '__main__': | |
mulTables(12) |
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
def CharacterSwap(inputString): | |
middle = len(inputString)/2 | |
length = len(inputString) | |
inputList = list(inputString) | |
for i in range(middle): | |
temp = inputList[i] | |
inputList[i] = inputList[length - 1 -i] | |
inputList[length -1-i] = temp | |
return ''.join(inputList) |