El TecnoBaúl de Kiquenet

Kiquenet boring stories

Archive for the ‘Google’ Category

Google Calendar API

Posted by kiquenet en 26 diciembre 2014

Nuget: https://www.nuget.org/packages?q=google+calendar

Install-Package Google.GData.Calendar 
Install-Package Google.Apis.Calendar.v3

http://support.google.com/mail/bin/answer.py?hl=it&answer=1173270 to get  Application-specific password

http://googleappsupdates.blogspot.com.es/2014/06/calendar-gdata-api-google-calendar.html

Back in November 2011, we announced the deprecation of the Calendar GData API (v1, v2) when the APIv3 was made available. We’ll now be shutting down these older versions on November 17, 2014.
Any service dependent on the Calendar GData API (v1, v2), such as the Google Calendar Connectors (GCC), will no longer work as intended. GCC users should update to use Calendar Interop or their own custom built connectors that sync with v3 of the API.

Migration guide:

https://developers.google.com/google-apps/calendar/migration

http://www.programmableweb.com/news/google-calendar-api-v1-and-v2-to-shut-down-nov-17/2014/10/27

Code

NOT YET

    

Source:
http://dotnetoday.blogspot.com.es/search/label/Google%20API%20-%20Calendar

Anuncios

Posted in .NET, Google | Etiquetado: , | Leave a Comment »

Google Contacts API

Posted by kiquenet en 26 diciembre 2014

Nuget: https://www.nuget.org/packages?q=google+contacts

Install-Package Google.GData.Contacts (version 2.2)
Install-Package Google.GData.Client (version 2.2 stable)

http://support.google.com/mail/bin/answer.py?hl=it&answer=1173270 to get  Application-specific password

Code

      [TestMethod]
      public void Obtener_contactos_de_google()
      {
          // login
          var Service = new ContactsService("google-contacts");
          Service.setUserCredentials("xxxx@gmail.com", "xxxxx");
          Service.QueryClientLoginToken();

          var Contacts = new List<string[]>();

          var query = new ContactsQuery(ContactsQuery.CreateContactsUri("default"));
          query.StartIndex = 1;

          ContactsFeed feed = Service.Query(query);

          var total = 0;
          while (feed != null && feed.Entries.Count > 0)
          {
              total += feed.Entries.Count;
              foreach (ContactEntry entry in feed.Entries)
              {
                  // This Example gets the phone numbers but we can obtain the info we want/need about the contact
                  if (entry.Phonenumbers.Count > 0)
                  {
                      string phoneNumbers = "";
                      // get all phone numbers
                      for (int a = 0; a < entry.Phonenumbers.Count; a++)
                      {
                          phoneNumbers += entry.Phonenumbers[a].Value + "; ";
                      }

                      int x = phoneNumbers.LastIndexOf(";");
                      phoneNumbers = phoneNumbers.Substring(0, phoneNumbers.LastIndexOf(";"));

                      // in the array "item" there are: fullname(name and surname), phone number1;phonenumber2;…., contact url for edit
                      string[] item = { entry.Name.FullName, phoneNumbers, entry.Id.AbsoluteUri };
                      Contacts.Add(item);
                  }
              }

              // move to next page until end
              if (feed.NextChunk != null)
              {
                  query.Uri = new Uri(feed.NextChunk);
                  feed = Service.Query(query) as ContactsFeed;
              }
              else
                  feed = null;
          }

          // sorting the list for full name
          Contacts.Sort(delegate(string[] item1, string[] item2)
          {
              return item1[0].CompareTo(item2[0]);
          });

          Assert.AreNotEqual(0, Contacts.Count);
          Assert.IsTrue(total > 900);

      }

Source:
http://dotnetoday.blogspot.com.es/2012/10/c-google-api-getting-google-contacts.html?showComment=1382645543065

Posted in .NET, Google | Etiquetado: , | Leave a Comment »

Problemas instalando o actualizando Chrome

Posted by kiquenet en 7 mayo 2012

En alguna ocasión el explorador Chrome da errores de actualización o al reinstalarlo de nuevo no se consigue nada.

Este instalador en mi caso particular daba error
https://www.google.com/chrome

En esta página

http://support.google.com/chrome/bin/answer.py?hl=es&answer=117807

se comentaba eliminar la carpeta “Application” de

  • Windows XP: %USERPROFILE%\Local Settings\Application Data\Google\Chrome
  • Windows Vista: %USERPROFILE%\AppData\Local\Google\Chrome

Si tienes problemas para eliminar esta carpeta, comprueba si hay procesos de Google Chrome activos en tu equipo y finalízalos. A continuación se indican algunas formas de localizar y finalizar estos procesos:

  • Pulsa Ctrl+Alt+Supr en el teclado y haz clic en Administrador de tareas. Haz clic en la pestaña Procesos y finaliza los procesos que incluyan en su nombre "google" o "chrome".
  • Descarga un programa externo llamado Process Explorer en http://technet.microsoft.com/es-es/sysinternals/bb896653.aspx. Utiliza su menú "Find" (Buscar) para buscar "Chrome/Application" y, a continuación, finaliza todos los procesos resultantes.

Seguía sin solución.

El siguiente paso, con Revo Uninstaller se puede realizar una desinstalación limpia y se puede probar este instalador
http://www.google.com/chrome/eula.html?system=true

Si así no funciona se debe acudir al Soporte Chrome
http://productforums.google.com/forum/#!forum/chrome-es

Posted in Errores, Google | Leave a Comment »

10 Useful Google Spreadsheet Formulas You Must Know

Posted by kiquenet en 24 febrero 2011

Google Spreadsheet is a powerful and free tool to manage complex spreadsheets. This tutorial illustrates ten useful formulas you must know to help you simplify the way you work in Google Spreadsheet.

Vertical Look Up

This formula searches for value in the left-most column of array and returns the value in the same row based on the index.

=vlookup(search_criterion, array, index, sort_order)

For example, if you want to find the population of the value contained in the cell C2, from all values contained in the range A2:B4, copy and paste the following formula into the cell D2:
=vlookup(C2;A2:B4;2;false)

Filter

This formula returns a filtered version of the given source array.

=filter(range; condition1, condition2,...)

In this example I filtered all values contained in the column A (range A2:A12) greater than 37.

Copy and paste the following formula into the cell B2:
=filter(A2:A12;A2:A12>37)

You can also use multiple conditions to filter a source array:
=filter(A2:A12;A2:A12>37; A2:A12<60)

In this case the formula returns all values contained in the range A2:A12 greater than 37 AND less than 60.

Concatenate

This function concatenates several text strings, contained in different cells, into one string.

=concatenate(text1, text2, text3,...)

If you want to concatenate all values contained in the cells A2, A3, A4 into one string, copy and paste this formula into the cell B2:
=concatenate(A2,A3,A4)

If you want to separate each single value with a space (cell B3), use this formula:
=concatenate(A2," ", A3," ", A4)

Find

This formula looks for a string of text within another string and returns an integer.

=find(find_text, text, position)

For example, if you want to find the "space" within the string contained in the cell C2 (which contains this text: Jack Bauer), copy and paste the following formula into the cell B2:
=find(" ", A2, 1)

This formula returns "5" that means the "space" is found within the source string after 4 characters.

Left and Right

Left extracts a substring from a string, starting from the left-most character.

=left(text, number)

Right extracts a substring from a string, starting from the right-most character.

=right(text, number)

If you want to extract the name "Jack" from the cell A2, copy and paste the following formula into the cell B2:
=left(A2;4)

If you want to extract the surname "Bauer" from the cell A3, copy and paste the following formula into the cell B3:
=right(A3;5)

You can also use the following formula to extract dynamically the name from an array of multiple values (Jack Bauer, Gregory House, Christian Troy, …):
=left(A2; find(" ", A2, 1)-1)

Split

This formula splits text based on the given delimiter, putting each section into a separate column in the row.

=split(string, delimiter)

For example, if you want to split the values contained in the column A, using the delimiter " " (space), copy the following formula into the column B (the column C will be populated automatically):
=split(A2," ")

Substitute

This formula substitutes new text for old text in a string.

=substitute(text, search_text, new text, occurrence)

If you want to substitute "Jack" with "Mike" from the text contained in the cell A2, copy and paste this formula into the cell B2:
=substitute(A2, "Jack", "Mike",1)

Occurrence (optional, in this case "1") indicates how many occurrences of the search text are to be replaced.

Unique

This formula returns only the unique values in the source array, discarding duplicates.

=unique(array)

If you want to obtain an array of unique values from the values contained in the column A, copy and paste the following formula into the cell B2:
=unique(A2;A9)

As you can see, this formula returns only unique values in the column A, discarding all duplicates.

Google Finance

This function returns market information from Google Finance related to a specific company.

=GoogleFinance(symbol, attribute)

For example, if you want to know the Google stock price, copy and paste the following formula into the cell B2: =GoogleFinance(A2,"price")

You can use the same formula for the other companies in this example (NVidia, Intel, Cisco,…). Other attributes are volume, earning per share, opening price and so on (take a look at the official documentation for a full list).

GoogleLookup

This formula attempts to find the values for straightforward facts about specific things.

=GoogleLookup(entity, attribute)

For example if you want to find the countries of cities listed in the column A, copy and paste the following formula into the column B:

=googleLookup(A2;"country")

You can access some types of entities such as countries and territories (population, largest city), rivers (origin, length), actors and musicians (date of birth, nationality), planets and so on. For a full list of popular entities, take a look at the official documentation.

Antonio Luppetti
http://woorkup.com/2010/02/19/10-useful-google-spreadsheet-formulas-you-must-know/

Posted in Google | Etiquetado: , | Leave a Comment »