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
//On Global.asax.cs | |
protected void Application_BeginRequest(object sender, EventArgs e) | |
{ | |
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*"); | |
if (HttpContext.Current.Request.HttpMethod == "OPTIONS") | |
{ | |
HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache"); | |
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST"); |
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"?> | |
<configuration> | |
<system.webServer> | |
<staticContent> | |
<remove fileExtension=".svg" /> | |
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> | |
</staticContent> | |
<rewrite> | |
<rules> | |
<rule name="Imported Rule 2" stopProcessing="true"> |
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
// MvxIoCSupportingTest.cs | |
// (c) Copyright Cirrious Ltd. http://www.cirrious.com | |
// MvvmCross is licensed using Microsoft Public License (Ms-PL) | |
// Contributions and inspirations noted in readme.md and license.txt | |
// | |
// Project Lead - Stuart Lodge, @slodge, me@slodge.com | |
// Modified by Sebastian Faltoni www.nukedbit.it | |
using Cirrious.CrossCore.Core; | |
using Cirrious.CrossCore.IoC; |
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.Collections.Generic; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json.Linq; | |
namespace AssetVersion.Sdk.HttpClients | |
{ | |
public abstract class HttpClientSyncronous<T> where T : class | |
{ |
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
ImageView.GestureRecognizers.Add (new TapGestureRecognizer() | |
{ | |
Command = new Command (() => contentPage.DisplayAlert ("Titolo", "Messaggio", "Cancel")) | |
}); |
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 client = new HttpClient(); | |
var result = client.GetAsync(new Uri("http://www.google.ti")).ConfigureAwait(false).GetAwaiter().GetResult(); |
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 AutofacGlobalFilterProvider : IGlobalFilterProvider | |
{ | |
private readonly IReadOnlyList<IFilter> _filters; | |
public AutofacGlobalFilterProvider(IOptions<MvcOptions> optionsAccessor, IEnumerable<IFilter> customFilters) | |
{ | |
var filters = optionsAccessor.Options.Filters.ToList(); | |
filters.AddRange(customFilters); |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package touchfx.model; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.URL; |
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
#r @"bin/Debug/MySql.Data.dll" | |
#r @"bin/Debug/FSharp.Data.SqlProvider.dll" | |
open System | |
open System.Linq | |
open FSharp.Data.Sql | |
open MySql.Data | |
let resPath = __SOURCE_DIRECTORY__ + @"/bin/Debug/" |
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 EnumerableExtensions | |
{ | |
public static IEnumerable<T[]> Split<T>(this IEnumerable<T> source, int chunkSize) | |
{ | |
int index = 0; | |
var chunk = new T[chunkSize]; | |
foreach (var item in source) | |
{ | |
chunk[index] = item; |
OlderNewer