Skip to content

Instantly share code, notes, and snippets.

View icebeam7's full-sized avatar
💭
🎶 You can roam the world with colours, flying high 🎶

Luis Beltran icebeam7

💭
🎶 You can roam the world with colours, flying high 🎶
View GitHub Profile
// Get a list of non-repeatable random numbers
List<int> GenerateRandomList(Random random, int size)
{
int num, i = 0;
List<int> list = new List<int>();
do{
num = random.Next(0, size) + 1;
if (!list.Contains(num))
<xml version="1.0" encoding="utf-8"?>
<resources>
<string name="Mensaje">Mensaje</string>
<string name="ApplicationName">XamarinWhatsapp</string>
<string name="Enviar">Enviar mensaje</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:text="@string/Mensaje"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText android:id="@+id/edtMensaje"
android:layout_width="fill_parent"
using System;
using Android.App;
using Android.Widget;
using Android.OS;
using Android.Content;
using Android.Content.PM;
namespace XamarinWhatsapp
{
[Activity(Label = "XamarinWhatsapp", MainLauncher = true, Icon = "@drawable/icon")]
@icebeam7
icebeam7 / App.xaml.cs
Created April 12, 2018 14:49
Sentimental Tweets: App.xaml.cs
using Xamarin.Forms;
namespace SentimentalTweets
{
public partial class App : Application
{
public App ()
{
InitializeComponent();
@icebeam7
icebeam7 / ServicioTwitter.cs
Created April 12, 2018 14:49
Sentimental Tweets: ServicioTwitter.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using LinqToTwitter;
using SentimentalTweets.Modelos;
using SentimentalTweets.Helpers;
namespace SentimentalTweets.Servicios
{
@icebeam7
icebeam7 / ServicioTextAnalytics.cs
Last active April 12, 2018 14:54
Sentimental Tweets: ServicioTextAnalytics.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using SentimentalTweets.Modelos;
using SentimentalTweets.Helpers;
using System.Net.Http;
using System.Net.Http.Headers;
using Newtonsoft.Json.Linq;
@icebeam7
icebeam7 / PaginaTweets.xaml.cs
Created April 12, 2018 14:50
Sentimental Tweets: PaginaTweets.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using SentimentalTweets.Servicios;
@icebeam7
icebeam7 / PaginaTweets.xaml
Created April 12, 2018 14:51
Sentimental Tweets: PaginaTweets.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SentimentalTweets.Paginas.PaginaTweets">
<ContentPage.Content>
<StackLayout BackgroundColor="White" Padding="10">
<Label Text="Tweets" TextColor="Blue" FontSize="Large"/>
<Entry x:Name="txtBusqueda" TextColor="White" Placeholder="Introduce el término de búsqueda"
PlaceholderColor="LightGray" BackgroundColor="Black" FontSize="Medium"/>
@icebeam7
icebeam7 / PaginaAnalisisTweet.xaml.cs
Created April 12, 2018 14:51
SentimentalTweets: PaginaAnalisisTweet.xaml.cs
using SentimentalTweets.Modelos;
using SentimentalTweets.Servicios;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;