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
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="My WPF UI" Height="300" Width="300"> | |
<StackPanel Margin="5"> | |
<StackPanel> | |
<Label Content="Prename:" /> | |
<TextBox x:Name="preName" MinWidth="50"/> | |
</StackPanel> | |
<StackPanel> | |
<Label Content="Surename:" /> |
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
;reference wpf assemblys | |
(import '(System.Reflection Assembly)) | |
(Assembly/LoadWithPartialName "PresentationFramework") | |
(Assembly/LoadWithPartialName "PresentationCore") | |
(Assembly/LoadWithPartialName "WindowsBase") | |
(Assembly/LoadWithPartialName "System.Xml") | |
(ns wpf | |
(:import (System.Windows Application Window)) | |
(:import (System.Windows.Threading Dispatcher DispatcherPriority)) |
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
;reference wpf assemblys | |
(import '(System.Reflection Assembly)) | |
(Assembly/LoadWithPartialName "PresentationFramework") | |
(Assembly/LoadWithPartialName "PresentationCore") | |
(Assembly/LoadWithPartialName "WindowsBase") | |
(ns wpf | |
(:import (System.Windows Application Window)) | |
(:import (System.Windows.Threading Dispatcher DispatcherPriority)) | |
(:import (System.Threading ApartmentState ThreadStart Thread AutoResetEvent)) |
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
# Projekt Structure | |
- project_root | |
| | |
+ doc/ | |
+ src/ | |
+ tests/ | |
+ run_tests.bat | |
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
//http://msdn.microsoft.com/en-us/magazine/dd419663.aspx#id0090030 | |
public class RelayCommand : ICommand | |
{ | |
#region Fields | |
readonly Action<object> _execute; | |
readonly Predicate<object> _canExecute; | |
#endregion // Fields |
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
// http://www.deanchalk.me.uk/post/WPF-e28093-Easy-INotifyPropertyChanged-Via-DynamicObject-Proxy.aspx | |
public class DynamicBindingProxy<T> : DynamicObject, INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
private static readonly Dictionary<string, Dictionary<string, PropertyInfo>> properties = | |
new Dictionary<string, Dictionary<string, PropertyInfo>>(); | |
private readonly T instance; | |
private readonly string typeName; |
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
import inspect | |
import logging | |
def interrogate(item): | |
"""Print useful information about item.""" | |
if hasattr(item, '__name__'): | |
logging.debug( "NAME: " + item.__name__) | |
if hasattr(item, '__class__'): | |
logging.debug("CLASS: " + item.__class__.__name__) | |
logging.debug("ID: {0}".format(id(item))) |
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
# $0 = date of format 201203220650 | |
# $1 = source | |
# $2 = target | |
touch -t $0 .probe | |
find $1 -type f -newer .probe -exec cp {} $2 \; |
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
// Script from Tomas Petricek | |
// http://stackoverflow.com/questions/4174852/how-to-force-f-interactive-to-reference-gtk-by-default | |
[<AutoOpen>] | |
module GtkSharp | |
// Load some common Gtk# assemblies (from /usr/lib/mono/2.0/../gtk-sharp-2.0) | |
#r "../gtk-sharp-2.0/gtk-sharp.dll" | |
#r "../gtk-sharp-2.0/gdk-sharp.dll" | |
#r "../gtk-sharp-2.0/glib-sharp.dll" |
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
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Pushing with Rx and websock.js</title> | |
<script src="script/jquery-1.7.1.js" type="text/javascript"></script> | |
<script src="script/rx.min.js" type="text/javascript"></script> | |
<script src="script/rx.jquery.js" type="text/javascript"></script> | |
<script src="script/rx.time.min.js" type="text/javascript"></script> | |
<script src="script/base64.js"></script> |