I hereby claim:
- I am diafygi on github.
- I am diafygi (https://keybase.io/diafygi) on keybase.
- I have a public key whose fingerprint is F75B E4E6 EF6E 9DD2 0367 9E94 E7F6 FAD1 72EF EE3D
To claim this, I am signing this object:
Number.metaClass.formatAsCurrency { withWords = false -> | |
def puissances = ["", "mille", "million", "milliard", "billion", "billiard", "trillion", "trilliard"] | |
def dizaines = ["", "", "vingt", "trente", "quarante", "cinquante", "soixante", "soixante", "quatre-vingt", "quatre-vingt"] | |
def unites = ["", "un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix", "onze", "douze", "treize", "quatorze", "quinze", "seize", "dix-sept", "dix-huit", "dix-neuf"] | |
def chiffres = ["", ""] + unites[2..10] | |
def unitesEnLettres = { nombre -> | |
// débrayage immédiat pour 80, ce qui simplifie le code ensuite | |
if (nombre == 80) | |
return dizaines[8] + 's' |
I hereby claim:
To claim this, I am signing this object:
// Application | |
apply plugin: 'android' | |
repositories { | |
mavenCentral() | |
} | |
android { | |
compileSdkVersion rootProject.ext.compileSdkVersion | |
buildToolsVersion rootProject.ext.buildToolsVersion |
public static class LINQExtensions | |
{ | |
public static IEnumerable<IGrouping<TKey, TElement>> GroupAdjacentBy<TElement, TKey>(this IEnumerable<TElement> source, Func<TElement, TKey> keySelector, IEqualityComparer<TKey> comparer=null) | |
{ | |
comparer = comparer ?? EqualityComparer<TKey>.Default; | |
List<TElement> elements = null; | |
TKey key = default(TKey); | |
TKey lastKey = default(TKey); | |
foreach (var x in source) | |
{ |
The official docs are actually useful now, so refer to those for up-to-date information.
/*** | |
InputCapture.ino | |
Timer 1 high-resolution timing facility. | |
Copyright (C) 2008-2012 Bill Roy | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either |
def toCamelCase(String string) { | |
String result = "" | |
string.findAll("[^\\W]+") { String word -> | |
result += word.capitalize() | |
} | |
return result | |
} | |
afterEvaluate { project -> | |
Configuration runtimeConfiguration = project.configurations.getByName('compile') |
import com.android.tools.lint.client.api.UElementHandler | |
import com.android.tools.lint.detector.api.* | |
import org.jetbrains.uast.UElement | |
import org.jetbrains.uast.UPostfixExpression | |
class NonNullAssertionDetector : Detector(), Detector.UastScanner { | |
override fun getApplicableUastTypes(): List<Class<out UElement>>? { | |
return listOf(UPostfixExpression::class.java) | |
} |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |