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
//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 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 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys | |
from PySide import QtCore, QtGui, QtDeclarative | |
import argparse | |
from PySide.QtWebKit import QWebPluginFactory, QWebView, QWebSettings |
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
// 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 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
#!/bin/bash | |
# https://stackoverflow.com/questions/37242217/access-docker-container-from-host-using-containers-name | |
docker run --hostname dns.mageddo --name dns-proxy-server -p 5380:5380 \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /etc/resolv.conf:/etc/resolv.conf \ | |
defreitas/dns-proxy-server |
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
FROM drecom/centos-ruby:2.2.3 | |
MAINTAINER Rainer Schuster <schuster-rainer@web.de> | |
ENV TZ Europe/Berlin | |
ENV LANG en_US.UTF-8 | |
ENV APP_USER myapp | |
ENV APP_GROUP web | |
ENV HOME_DIR /home/${APP_USER} |
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
// Win32 : Minimal VST 2.x Synth host in C++11. | |
// | |
// This is a simplified version of the following project by hotwatermorning : | |
// A sample VST Host Application for C++ Advent Calendar 2013 5th day. | |
// https://github.com/hotwatermorning/VstHostDemo | |
// | |
// Usage : | |
// 1. Compile & Run this program. | |
// 2. Select your VST Synth DLL. | |
// 3. Press QWERTY, ZXCV, etc. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<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 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 React from 'react'; | |
import { FormattedMessage } from 'react-intl'; | |
import { Field, reduxForm } from 'redux-form/immutable'; | |
import muiThemeable from 'material-ui/styles/muiThemeable'; | |
import './form'; | |
import validatejs from 'validate.js'; | |
const ExampleForm = ({onSubmit, ...props}) => ( | |
<form onSubmit={onSubmit}> |
NewerOlder