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
/// <summary> | |
/// Watch the values for each joint on the robot. | |
/// </summary> | |
/// <remarks> | |
/// The interval between each callback is defined in USBC.ini in miliseconds. | |
/// </remarks> | |
/// <param name="watchJoint"></param> | |
/// <returns>true if the method has been succesfully executed; otherwise, false.</returns> | |
[DllImport(NativeMethods.DllName, EntryPoint = "?WatchJoint@@YAHP6AXPAX@Z@Z", | |
CallingConvention = CallingConvention.Cdecl)] |
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://en.wikipedia.org/wiki/Quicksort |
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
let rec QuickSort(input : List<int>) = | |
match input with | |
| [] -> [] | |
| head :: tail -> | |
let smaller = qsort (tail |> List.filter(fun e -> e <= x)) | |
let larger = qsort (tail |> List.filter(fun e -> e >= x)) | |
smaller @ [head] @ larger |
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
public class LongListCollection<T, TKey> : List<LongListItem<T, TKey>> | |
{ | |
public LongListCollection() | |
{ | |
} | |
public LongListCollection(IEnumerable<T> items, Func<T, TKey> keySelector) | |
{ | |
if (items == null) | |
throw new ArgumentException("items"); |
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
public class LongListCollection<T, TKey> : List<LongListItem<T, TKey>> | |
{ | |
public LongListCollection() | |
{ | |
} | |
public LongListCollection(IEnumerable<T> items, Func<T, TKey> keySelector) | |
{ | |
if (items == null) | |
throw new ArgumentException("items"); |
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
namespace RestSharp.Deserializers | |
{ | |
public class XmlDeserializer : IDeserializer | |
{ | |
... | |
private void Map(object x, XElement root) | |
{ | |
... |
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
open System | |
type Node<'T>(nodeValue : 'T, next : Node<'T> option) = | |
member this.NodeValue | |
with get() = | |
nodeValue | |
member this.Next | |
with get() = |
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.Windows; | |
using System.Windows.Input; | |
using Microsoft.Phone.Controls; | |
namespace Rejseplanen.Assets | |
{ | |
public class DependencyObjectExtension | |
{ | |
public static readonly DependencyProperty NavigateToProperty = |
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
<Grid assets:DependencyObjectExtension.NavigateTo="/Views/SearchMetroPage.xaml">...</Grid> |
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.IO; | |
using Microsoft.DirectX; | |
using Microsoft.DirectX.Direct3D; | |
private Image OpenImage(String filename) | |
{ | |
byte[] image = File.ReadAllBytes(filename); | |
Stream stream = new MemoryStream(); | |
stream.Write(image,0,image.Length); |
OlderNewer