Dashing widget to show details about your Italian Wind mobile contracts. It supports both prepaid SIM cards and contracts and can display:
- credit
- voice traffic
- text traffic
- data traffic
- expiries
Dashing widget to show details about your Italian Wind mobile contracts. It supports both prepaid SIM cards and contracts and can display:
ciao |
DQuid IO - OAuth2 - Implementation | |
=================== | |
This document contains a guide to implement an OAuth2 client for DQuid IO's services. | |
## A brief overview of OAuth2 | |
### Access Tokens | |
APIs protected via OAuth2 require what is known as an **access token** to be accessed. An access token allows to implement a form of HTTP authentication which requires the token to be sent **alongside every request**, most commonly in the **authorization** header of the HTTP request: |
[TestFixture] | |
public class Test : Calculator | |
{ | |
[Test] | |
public void No_books_are_0() | |
{ | |
Assert.AreEqual(0, Price()); | |
} | |
[Test] |
public static class Extensions | |
{ | |
public static bool And(this IEnumerable<bool> bools) | |
{ | |
return bools.Foldr(Expression.AndAlso, true); | |
} | |
public static T Foldr<T>(this IEnumerable<T> enumerable, Func<Expression, Expression, BinaryExpression> fold, T v) | |
{ | |
foreach(var b in enumerable) |
<UsingTask | |
TaskName="Costura.EmbedTask" | |
AssemblyFile="$(SolutionDir)[path to]\Costura.dll" /> | |
<Target Name="AfterBuild"> | |
<Costura.EmbedTask /> | |
</Target> |
IEnumerable<string> Anagrams(IEnumerable<char> input) | |
{ | |
foreach (var c in input) | |
{ | |
var except = input.Except(new[]{c}); | |
if(except.Any()) | |
foreach (var element in Anagrams(except)) | |
yield return c.ToString() + element; | |
else |
using(var c = new WebClient()) | |
{ | |
c.DownloadStringCompleted += (_, r) => Console.WriteLine(r.Result); | |
c.DownloadStringAsync(new Uri("http://www.google.at")); | |
} |
[Test] | |
public void OneSimpleTest() | |
{ | |
var eightBall = new EightBall(); | |
var answer = eightBall.ShouldIChangeJob(); | |
Assert.That(answer, Is.True); | |
} |
[Test] | |
public void OneSimpleTest() | |
{ | |
var eightBall = new EightBall(); | |
Task<bool> answer = eightBall.ShouldIChangeJob(); | |
answer.Wait(); | |
Assert.That(answer.Result, Is.True); | |
} |