Skip to content

Instantly share code, notes, and snippets.

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
View randomlist
// 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))
View Strings.xml
<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>
View Main.axml
<?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"
View MainActivity.cs
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 Apr 12, 2018
Sentimental Tweets: App.xaml.cs
View App.xaml.cs
using Xamarin.Forms;
namespace SentimentalTweets
{
public partial class App : Application
{
public App ()
{
InitializeComponent();
@icebeam7
icebeam7 / ServicioTwitter.cs
Created Apr 12, 2018
Sentimental Tweets: ServicioTwitter.cs
View 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 Apr 12, 2018
Sentimental Tweets: ServicioTextAnalytics.cs
View 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 Apr 12, 2018
Sentimental Tweets: PaginaTweets.xaml.cs
View 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 Apr 12, 2018
Sentimental Tweets: PaginaTweets.xaml
View 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 Apr 12, 2018
SentimentalTweets: PaginaAnalisisTweet.xaml.cs
View 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;