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
+ <PropertyGroup> | |
+ <JavaMaximumHeapSize>1G</JavaMaximumHeapSize> | |
+ </PropertyGroup> |
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
// Note: this also works for netstandard libraries. Just create the file and compile it. | |
using System.Runtime.CompilerServices; | |
[assembly:InternalsVisibleTo("NightOut.Core.Test")] |
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
using System; | |
using Monad; | |
namespace NightOut.Core.ViewModel.CheckIn.LocationSelector | |
{ | |
[Serializable] | |
partial class State | |
{ | |
public readonly Maybe<string> longitude = Nothing<string>.Default; | |
public readonly Maybe<string> latitude = Nothing<string>.Default; |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp1.1</TargetFramework> | |
<PackageTargetFallback>portable-net45+win8+wp8+wpa81</PackageTargetFallback> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.CodeAnalysis.Compilers" Version="2.0.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
class RecycledViewPool | |
{ | |
public delegate ViewHolder Factory(ViewGroup parent, int viewType); | |
// A stack has a O(1) add/remove, so better than a list | |
Dictionary<int, Stack<ViewHolder>> pool; | |
Factory factory; | |
public RecycledViewPool(Factory factory) | |
{ |
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
using System; | |
using System.IO; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using Android.OS; | |
namespace Serialization | |
{ | |
public static class BundleSerializationExtensions | |
{ | |
public static void PutObject(this Bundle self, string key, object obj) |
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
using Facebook.CoreKit; | |
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) | |
{ | |
// Override point for customization after application launch. | |
// If not required for your application you can safely delete this method | |
return ApplicationDelegate.SharedInstance.FinishedLaunching (application, launchOptions); | |
} |
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
FLICKR="$HOME/Flickr" | |
for image in "$@" | |
do | |
basename=$(basename $image) | |
imagename=${basename%.*} | |
extension=${basename##*.} | |
counter=1 | |
filename=$basename |
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://swtch.com/~rsc/regexp/regexp1.html | |
$_ = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; | |
if ( m/a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ ) { | |
print "hello"; | |
} |
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
^ | |
(?# street - required)([^/\n]+?) | |
(?# separator)[\s,]+ | |
(?# number - required)(\d[\w-]*) | |
(?# box - optional)(?:\s*(?:bte|bus|boite|box|/)\s*(.+?))? | |
(?# trailing whitespaces)\s* | |
$ | |
(?# | |
FIXME: how to make a difference between a ‘/‘ and ‘/b’, | |
when the ‘b’ could be part of the box? |