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
/// <summary> | |
/// Caches objects. | |
/// </summary> | |
public class Cache<T> | |
{ | |
private List<T> cache; | |
/// <summary> | |
/// Initializes a new <see cref="Cache{T}"/>: | |
/// </summary> | |
public Cache() |
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
public class MyWebClient | |
{ | |
public async Task<string> DownloadString(string uri) | |
{ | |
using (HttpClient client = new HttpClient()) | |
{ | |
using (HttpResponseMessage response = client.GetAsync(uri).Result) | |
{ | |
using (HttpContent content = response.Content) | |
{ |
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
public static T As<T>(this object objectToCast) where T : class | |
{ | |
return objectToCast as T; | |
} |
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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"location": { | |
"type": "string" | |
}, | |
"virtualMachineName": { | |
"type": "string" | |
}, |
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
<Grid Visibility="{Binding BubbleVisible, Converter={StaticResource BoolToVis}}" Height="56" Width="56" HorizontalAlignment="Left" VerticalAlignment="Top"> | |
<!--Bind keyinputs--> | |
<Grid.InputBindings> | |
<MouseBinding Gesture="LeftClick" Command="{Binding SwitchViews}"/> | |
</Grid.InputBindings> | |
<!--The bubble--> | |
<Grid.Background> | |
<ImageBrush ImageSource="/Images/TransparentBubbleWithMoveCorner56px.png" /> | |
</Grid.Background> |
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"> | |
<!-- propnfy --> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Full, notifying Property</Title> | |
<Author>Marlon Regenhardt</Author> | |
<Description>Full property, notifying when changed</Description> | |
<Shortcut>propnfy</Shortcut> |
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 android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.NumberPicker; | |
/** | |
* Created by Marlon on 26.03.2015. | |
*/ | |
public class MyNumberPicker extends NumberPicker { | |
public MyNumberPicker(Context context) { | |
super(context); |
NewerOlder