Skip to content

Instantly share code, notes, and snippets.

View jesulink2514's full-sized avatar
🎯
Focusing

Jesus Angulo jesulink2514

🎯
Focusing
View GitHub Profile
Incident Identifier: 5E416B8D-E08F-413C-8820-F30456B2A205
CrashReporter Key: cb0c121155dfeafd08013a7d2c10dab8e6784406
Hardware Model: xxx
Process: DemoApp.iOS [7894]
Path: /private/var/containers/Bundle/Application/FF082013-A081-4A78-819C-56E2CCD5AE6C/DemoApp.iOS.app/DemoApp.iOS
Identifier: com.lachanga.app
Version: 1.0 (7)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
public MapSpan Region
{
get => _region;
set
{
SetProperty(ref _region, value);
OnPositionChange(value);
}
}
@jesulink2514
jesulink2514 / MainPage.xaml
Created February 21, 2018 14:14
CreditCardDemo
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CardDemoXamarin"
xmlns:fastEntry="clr-namespace:XamarinFastEntrySample.FastEntry;assembly=XamarinFastEntry.Behaviors"
x:Class="CardDemoXamarin.MainPage">
<Grid Padding="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
private static async Task<HttpResponseMessage> PushNotification(string[] players, Techie user, TraceWriter log)
{
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic","ZjYyZTkxMDQtMjE3My00MWVjLWFlODAtNGRmNGM2MmU3Yzhj");
var andIcon = user.ProfileIcon.Replace(".png", string.Empty).ToLowerInvariant();
var not = new NotificationRequest()
{
[FunctionName("sendMessage")]
public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "post")]HttpRequestMessage req, TraceWriter log)
{
var client = new DocumentClient(new Uri("https://techies.documents.azure.com:443/"), "ptLkI7Ub5RH4UIuYWHsnher1QtCoemkMK1hZlH3cpLD4kBQCSg16R8SxO48e0ljjn3B4eBpdLU8XZw3oUJh6Dw==");
var collection = UriFactory.CreateDocumentCollectionUri("techieschat", "users");
var raw = await req.Content.ReadAsStringAsync();
protected override async void OnStart()
{
OneSignal.Current.StartInit("ONESIGNAL APP ID HERE")
.HandleNotificationOpened(OnNotificationOpened)
.HandleNotificationReceived(OnNotificationReceived)
.EndInit();
}
public List<Techie> GetUsers(Point point)
{
var queryText = $"SELECT * FROM c WHERE ST_DISTANCE(c.LastLocation, {{\"type\":\"Point\",\"coordinates\":[{point.Coordinates[0]},{point.Coordinates[1]}]}}) < 5 * 1000";
var collection = UriFactory.CreateDocumentCollectionUri(Database, Collection);
var query = _client.CreateDocumentQuery<Techie>(collection,queryText,new FeedOptions()
{
MaxItemCount = 500
});
var items = query.ToList();
public async Task RegisterAsync(Techie user)
{
var coll = UriFactory.CreateDocumentCollectionUri(Database,Collection);
await _client.UpsertDocumentAsync(coll, user);
}
using System.Threading.Tasks;
using Refit;
namespace DemoRefit.Client
{
public interface IMoviesApi
{
[Get("/")]
Task<Movie> FindMovies(
[AliasAs("i")]string id,
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Refit;
namespace DemoRefit.Client
{
public class Program
{
static void Main(string[] args)