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
<cheesebaron.slidinguppanel.SlidingUpPanelLayout | |
android:id="@+id/sliding_layout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="bottom"> | |
<RelativeLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<!-- Your main content inside here --> |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="App1.App1" android:versionCode="1" | |
android:versionName="1.0" android:installLocation="auto"> | |
<application android:label="App1" android:icon="@drawable/Icon"></application> | |
<uses-permission android:name="android.permission.READ_CONTACTS" /> | |
</manifest> |
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
var registrationId = string.Empty; | |
var allRegistrations = await hubClient.GetAllRegistrationsAsync(10); | |
foreach (var registration in allRegistrations) | |
{ | |
switch (deviceType) | |
{ | |
case NotificationSubscriptionV1.DeviceTypes.Android: | |
{ | |
var reg = registration as GcmRegistrationDescription; |
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
[Activity(Label = "DialogActivity", Theme = "@style/PopupTheme")] | |
public class DialogActivity : Activity | |
{ | |
protected override void OnCreate (Bundle bundle) | |
{ | |
base.OnCreate (bundle); | |
ShowAsPopup(this, Resource.Layout.Main); | |
} |
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
static Dictionary<string, string> QueryToKeyValueDictionary(string url) | |
{ | |
return | |
url.Substring(url.IndexOf('?') + 1) | |
.Split('&') | |
.Select(pair => pair.Split('=')) | |
.ToDictionary(val => val[0], val => Uri.UnescapeDataString(val[1])); | |
} |
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.Threading; | |
using System.Threading.Tasks; | |
using Android.Gms.Maps; | |
using Android.Gms.Maps.Model; | |
using Android.Locations; | |
using Android.OS; | |
namespace RunForYourLife | |
{ |
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 void TryRequestWhenInUseAuthorization(this CLLocationManager locationManager) | |
{ | |
if (locationManager.RespondsToSelector(new Selector("requestWhenInUseAuthorization"))) | |
locationManager.RequestWhenInUseAuthorization(); | |
} | |
public static void TryRequestAlwaysAuthorization(this CLLocationManager locationManager) | |
{ | |
if (locationManager.RespondsToSelector(new Selector("requestAlwaysAuthorization"))) | |
locationManager.RequestAlwaysAuthorization(); |
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 MyActivity : Activity | |
{ | |
private GoogleMap _map; | |
private HorizontalScrollView _hsv; | |
protected override void OnCreate(Bundle bundle) | |
{ | |
base.OnCreate(bundle); | |
SetContentView(Resource.Layout.rtc); |
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 java.util.*; | |
public class HangMan { | |
private static String[] words = { | |
"motherboard", "case", "powersupply", "harddrive", "mouse", "keyboard", "peripheral", | |
"graphicscard", "processor", "latency", "ping", "gaming", "resolution", "watercooling", | |
"cache", "memory", "chipset", "intel", "notebook", "desktop", "aliasing" }; | |
public static void main(String[] args) { | |
Random rand = new Random(); |
OlderNewer