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
<UserControl x:Class="DTPicker.DateTimePicker" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:local="clr-namespace:DTPicker" | |
xmlns:wpftc="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" | |
mc:Ignorable="d"><!--Uses Calendar in WPFToolkit.dll, | |
see http://wpf.codeplex.com/releases/view/40535--> | |
<UserControl.Resources> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows.Markup; | |
using System.Globalization; | |
using System.Windows.Data; | |
using System.Diagnostics; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Media; |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>dep</Title> | |
<Shortcut>dep</Shortcut> | |
<Description>Code snippet to help you make properties based on 'Dependent<T>', an Update Controls class that represents a value computed based on one or more Independents. Note: in most cases you should just write a normal property instead of using Dependent<T>. Dependent<T> is useful to cache the result of a computation when the value of the property is expensive to compute.</Description> | |
<Author>David Piepgrass</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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
/******************************************************************************* | |
* * | |
* Author : Angus Johnson * | |
* Edited by : David Piepgrass * | |
* Version : 4.7 + edits * | |
* Date : 15 February 2012 * | |
* Website : http://www.angusj.com * | |
* Copyright : Angus Johnson 2010-2012 * | |
* * | |
* Note: I, David Piepgrass, refactored this library from its original version * |
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
using System; | |
#if !CompactFramework | |
using System.Runtime.Serialization; | |
#endif | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Diagnostics; | |
namespace Mentor.Utilities | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Diagnostics; | |
namespace Loyc | |
{ | |
/// <summary> | |
/// A fast, simple timer class with a more convenient interface than | |
/// System.Diagnostics.Stopwatch. Its resolution is typically 10-16 ms. |
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 Loyc.Essentials.dll. Licence: MIT | |
namespace Loyc.Collections.Impl | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Diagnostics; | |
using System.Linq; | |
/// <summary>A compact auto-enlarging array structure that is intended to be |
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
/* I wrote an application-agnostic UndoStack class for my own diagramming tool. It's easy to use, for example here's how you might write code to delete a shape: | |
UndoStack _undoStack = new UndoStack(); | |
... | |
void DeleteShape(GraphicElement el) | |
{ | |
_undoStack.Do(@do => { | |
if (@do) { | |
// Code to delete the shape | |
} else { |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Loyc | |
{ | |
/// <summary>Extension methods that add some functionality of <c>string</c> to <c>StringBuilder</c>.</summary> | |
public static class StringBuilderExt | |
{ |
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 * as React from 'react'; | |
import * as ReactDOM from 'react-dom'; | |
class App extends React.Component<{greeting: string}, {count:number}> { | |
state = {count: 0}; | |
render() { | |
return ( | |
<div> | |
<h2>{this.props.greeting}</h2> | |
<button onClick={() => this.setState( |
OlderNewer