Posts

Showing posts from November, 2010

Graph# – WPF Graph Layout Framework

Image
Download Graph#Add References to GraphSharp.dllGraphSharp.Controls.dllQuickGraph.dllWPFExtensions.dllThis sample shows you how toVisualize Data on the graphUpdate Graph using notificationsAdd menu items to graph objectAdd events to graph objectZoom in/out<Windowx:Class="Samples.TestGraph.Window1"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:graphsharp="clr-namespace:GraphSharp.Controls;assembly=GraphSharp.Controls"xmlns:zoom="clr-namespace:WPFExtensions.Controls;assembly=WPFExtensions"xmlns:local="clr-namespace:Samples.TestGraph"Title="Window1"Height="335"Width="592"><Grid><Grid.Resources><local:ActiveConverterx:Key="activeConverter"/><DataTemplateDataType="{x:Type local:SampleVertex}"><BorderBackground="{Binding Path=Active, Converter={StaticResource activeConv…

Free WPF Docking Library (like in Visual Studio)

Image

Python Reference

#import libraries importsys,os,shutil,glob,string,re,datetime #===================================== # IO Samples #===================================== #read file line by line f=open('text.txt','r') for line in f: printstring.split(line, '\n')[0] #remove linebreak #read file all at once f=open('text.txt','r') text = f.read() print(text) #current directory printos.getcwd() #list files/folders in current directory for file in os.listdir(os.getcwd()): print file #print directory structure def printDir(path,indent): for root, dirs, files in os.walk(path): for name in dirs: print indent+name printDir(os.path.join(root,name),indent+"") for name in files: print indent+nameprintDir(os.getcwd()) #create dir os.mkdir("Test") #delete dir os.remove("Test") #execute command os.system("mkdir x") #execute command line and return a result result = os.popen("ls").read() #wildcard file names print glob…