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); |
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
<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
{ | |
"$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
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
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
/// <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
The element 'CodeSnippets' in namespace 'http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet' cannot contain text. | |
List of possible elements expected: 'CodeSnippet' in namespace 'http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet' |
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 class SecureStringExtensions | |
{ | |
public static string GetSHA512(this SecureString input) | |
{ | |
using (var sha512 = SHA512.Create()) | |
{ | |
byte[] password = Encoding.UTF8.GetBytes(ToNormalString(input)); | |
byte[] hash = sha512.ComputeHash(password); | |
return Encoding.UTF8.GetString(hash); | |
} |
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/sh | |
### BEGIN INIT INFO | |
# Provides: ts3 | |
# Required-Start: $local_fs $network | |
# Required-Stop: $local_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: TS3-Server | |
# Description: Teamspeak 3 Server | |
### END INIT INFO |
OlderNewer