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 CrossUI.Touch.Dialog.Elements; | |
using System.Drawing; | |
using MonoTouch.UIKit; | |
using MonoTouch.Foundation; | |
using CrossUI.Touch.Dialog; | |
/// <summary> | |
/// Multiline entry element. | |
/// </summary> |
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
// assumes variable data, which is a homogenous collection of objects | |
// get keys | |
var keys = _.keys(data[0]); | |
// convert to csv string | |
var csv = keys.join(","); | |
_(data).each(function(row) { | |
csv += "\n"; | |
csv += _(keys).map(function(k) { |
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 Raygun { | |
private static string ApiKey { get; set; } | |
private static Uri BaseUrl = new Uri("https://api.raygun.io/entries"); | |
[DllImport(MonoTouch.Constants.SystemLibrary)] | |
internal static extern int sysctlbyname([MarshalAs(UnmanagedType.LPStr)] string property, IntPtr output, IntPtr oldLen, IntPtr newp, | |
uint newlen); | |
public static void Attach(string apiKey) { |
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
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)] | |
public class RequiredOneRoleOfAttribute : RequestFilterAttribute | |
{ | |
public List<string> RequiredRoles { get; set; } | |
public RequiredOneRoleOfAttribute(ApplyTo applyTo, params string[] roles) | |
{ | |
this.RequiredRoles = roles.ToList(); | |
this.ApplyTo = applyTo; | |
this.Priority = (int)RequestFilterPriority.RequiredRole; |
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
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)] | |
public class RequiredOneRoleOfAttribute : RequestFilterAttribute | |
{ | |
public List<string> RequiredRoles { get; set; } | |
public RequiredOneRoleOfAttribute(ApplyTo applyTo, params string[] roles) | |
{ | |
this.RequiredRoles = roles.ToList(); | |
this.ApplyTo = applyTo; | |
this.Priority = (int)RequestFilterPriority.RequiredRole; |
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 partial class FollowFingerViewController : UIViewController | |
{ | |
static bool UserInterfaceIdiomIsPhone { | |
get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; } | |
} | |
UIView _square; | |
public FollowFingerViewController () | |
{ |
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> | |
/// Defines an interface which upgrades | |
/// the application from a version which is great | |
/// or equal to <see cref="IUpgrade.FromVersion"/> | |
/// and before <see cref="IUpgrade.ToVersion"/>. | |
/// </summary> | |
public interface IUpgrade { | |
Version FromVersion { get; } | |
Version ToVersion { get; } |
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"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2011-11-08T19:40:02" | |
exclude-result-prefixes="my" | |
version="1.0"> | |
<xsl:output method="html" /> | |
<xsl:strip-space elements="*" /> | |
<xsl:param name="delimter" select="'|'" /> | |
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
void Main() | |
{ | |
var myXamarinApps = | |
Directory | |
.EnumerateFiles(Path.Combine(Environment.GetEnvironmentVariable("HOMEPATH"), @"Music\iTunes\iTunes Media\Mobile Applications"), "*.ipa") | |
.Where(f=> ZipFile.Open(f, ZipArchiveMode.Read) | |
.GetRawEntries() | |
.Any(e=> e.FullName.Contains(".monotouch-"))); | |
foreach (var app in myXamarinApps) |
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.IO; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
using ReactiveUI; | |
namespace SaveAllTheTime.Models | |
{ | |
interface IFilesystemWatchCache | |
{ |