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
| POST https://api.teamsnap.com/v2/authentication/login HTTP/1.1 | |
| X-Teamsnap-User: <removed-for-gist> | |
| X-Teamsnap-Password: <removed-for-gist> | |
| Host: api.teamsnap.com | |
| Content-Length: 0 | |
| HTTP/1.1 400 Bad Request | |
| Server: nginx/1.4.5 + Phusion Passenger 3.0.21 | |
| X-Rack-Cache: invalidate, pass | |
| Cache-Control: no-cache |
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
| JSON: | |
| [ | |
| { | |
| team: { | |
| international_date: false, | |
| is_coed: false, | |
| team_name: "foo bar" | |
| } | |
| }, | |
| { |
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://msdn.microsoft.com/en-us/library/ms646301.aspx | |
| [DllImport("user32.dll")] | |
| internal static extern short GetKeyState(int keyCode); | |
| [DllImport("user32.dll")] | |
| static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo); | |
| internal static bool IsCapsLockOn() | |
| { | |
| return (KeyStateHelper.GetKeyState((int)VirtualKey.CapitalLock)) != 0; |
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 Person | |
| { | |
| public string FirstName { get; set; } | |
| public string LastName { get; set; } | |
| public string FullName | |
| { | |
| get { return string.Format("{0} {1}", FirstName, LastName); | |
| } |
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
| var dbPath = Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "somedb.db"); | |
| using (var db = new SQLite.SQLiteConnection(dbPath)) | |
| { | |
| // set this to memory instead of directory | |
| db.Execute("PRAGMA temp_store = memory;"); | |
| // do your other stuff | |
| } |
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
| // | |
| // FlowLayoutWithStickyHeaders.h | |
| // From: http://blog.radi.ws/post/32905838158/sticky-headers-for-uicollectionview-using | |
| // | |
| // Created by Tim Heuer on 7/3/14. | |
| // | |
| #import <UIKit/UIKit.h> | |
| @interface FlowLayoutWithStickyHeaders : UICollectionViewFlowLayout |
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
| static void Main(string[] args) | |
| { | |
| string foo = string.Format("foo{0}", "bar"); | |
| } |
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
| <Page | |
| x:Class="Application141.BlankPage" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="using:Application141" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| mc:Ignorable="d"> | |
| <Grid Background="{StaticResource ApplicationPageBackgroundBrush}"> |
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
| #if DEBUG | |
| if (Debugger.IsAttached) | |
| { | |
| FirstFloor.XamlSpy.XamlSpyConnection.Current.Open("localhost", 4530); | |
| } | |
| #endif |
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
| <Page.Resources> | |
| <local:LengthConverter x:Key="lc" /> | |
| <local:LengthBoolConverter x:Key="lb" /> | |
| </Page.Resources> | |
| <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> | |
| <Grid.Resources> | |
| <local:MyViewModel x:Key="MyVM" BoundText="{Binding Path=Text, ElementName=inputbox, Mode=TwoWay}" /> | |
| </Grid.Resources> | |
| <StackPanel DataContext="{Binding Source={StaticResource MyVM}}"> | |
| <TextBox x:Name="inputbox" FontSize="24.667" Text="{Binding BoundText, Mode=TwoWay}" /> |
OlderNewer