Mostrando las entradas con la etiqueta Location. Mostrar todas las entradas
Mostrando las entradas con la etiqueta Location. Mostrar todas las entradas

martes, 27 de septiembre de 2016

El Libro del Día: Map Scripting 101

El Libro del Día: 2016-09-27

Titulo: Map Scripting 101
Autor: Adam DuVander
Editorial: No Starch Press
Nro Paginas: 380

Capítulos:
Chapter 1: Mapping Basics
Chapter 2: Plotting Markers and Message Boxes
Chapter 3: Geocoding
Chapter 4: Layer It On
Chapter 5: Handle Map Events
Chapter 6: Explore Proximity
Chapter 7: User Location
Chapter 8: Data Formats
Chapter 9: Go Server-Side
Chapter 10: Mashup Projects
Appendix A: JavaScript Quick Start
Appendix B: Mapstraction Reference

Descarga:
Map_Scripting_101

lunes, 8 de agosto de 2016

El Libro del Día: Professional AngularJS

El Libro del Día: 2016-08-08

Titulo: Professional AngularJS
Autor: Valeri Karpov, Diego Netto
Editorial: Wrox
Nro Paginas: 399

Capítulos:
CHAPTER 1 Building a Simple AngularJS Application
CHAPTER 2 Intelligent Workflow and Build Tools
CHAPTER 3 Architecture
CHAPTER 4 Data Binding
CHAPTER 5 Directives
CHAPTER 6 Templates, Location, and Routing
CHAPTER 7 Services, Factories, and Providers
CHAPTER 8 Server Communication
CHAPTER 9 Testing and Debugging AngularJS Applications
CHAPTER 10 Moving On
APPENDIX Resources

Descarga:
Professional_AngularJS

martes, 23 de junio de 2015

El Libro del Día: Beginning Google Glass Development

El Libro del Día: 2015-06-23

Titulo: Beginning Google Glass Development
Autor: Jeff Tang
Editorial: Apress
Nro Paginas: 358

Capítulos:
Chapter 1: Getting Started
Chapter 2: Hello, Glass Your First GDK App
Chapter 3: Glass User Interface
Chapter 4: Camera and Image Processing
Chapter 5: Video: Basics and Applications
Chapter 6: Voice and Audio
Chapter 7: Networking, Bluetooth, and Social
Chapter 8: Location, Map, and Sensors
Chapter 9: Graphics, Animation, and Games
Chapter 10: The Mirror API

Descarga:
Beginning_Google_Glass_Development

lunes, 23 de marzo de 2015

El Libro del Día: Xamarin Cross-platform Application Development

El Libro del Día: 2015-03-23

Titulo: Xamarin Cross-platform Application Development
Autor: Jonathan Peppers
Editorial: Packt
Nro Paginas: 462

Capítulos:
1. Setting Up Xamarin
2. Hello, Platforms!
3. Code Sharing between iOS and Android
4. XamChat a Cross-platform App
5. XamChat for iOS
6. XamChat for Android
7. Deploying and Testing on Devices
8. Web Services with Push Notifications
9. Third-party Libraries
10. Contacts, Camera, and Location
11. Xamarin.Forms
12. App Store Submission

Descarga:
Xamarin_Cross_Platform_Application_Development

viernes, 20 de marzo de 2015

El Libro del Día: Xamarin Mobile Application Development for Android

El Libro del Día: 2015-03-20

Titulo: Xamarin Mobile Application Development for Android
Autor: Mark Reynolds
Editorial: Packt
Nro Paginas: 168

Capítulos:
Chapter 1: The Anatomy of an Android App
Chapter 2: Xamarin.Android Architecture
Chapter 3: Creating the Points of Interest App
Chapter 4: Creating a Data Storage Mechanism
Chapter 5: Adding a List View
Chapter 6: Adding a Detail View
Chapter 7: Making POIApp Location Aware
Chapter 8: Adding Camera App Integration
Chapter 9: Deploying Your App

Descarga:
Xamarin_Mobile_Application_Development_for_Android

jueves, 19 de marzo de 2015

El Libro del Día: iOS Development with Xamarin Cookbook

El Libro del Día: 2015-03-19

Titulo: iOS Development with Xamarin Cookbook
Autor: Dimitris Tavlikos
Editorial: Packt
Nro Paginas: 386

Capítulos:
Chapter 1: Development Tools
Chapter 2: User Interface – Views
Chapter 3: User Interface – View Controllers
Chapter 4: Data Management
Chapter 5: Displaying Data
Chapter 6: Web Services
Chapter 7: Multimedia Resources
Chapter 8: Integrating iOS Features
Chapter 9: Interacting with Device Hardware
Chapter 10: Location Services and Maps
Chapter 11: Graphics and Animation
Chapter 12: Multitasking
Chapter 13: Localization
Chapter 14: Deploying
Chapter 15: Advanced Features

Descarga:
iOS_Development_with_Xamarin_Cookbook

viernes, 19 de diciembre de 2014

El Libro del Día: Beginning Google Maps API 3

El Libro del Día: 2014-12-19

Titulo: Beginning Google Maps API 3
Autor: Gabriel Svennerberg
Editorial: Apress
Nro Paginas: 329

Capítulos:
Chapter 1: Introducing the Google Maps API
Chapter 2: Transferring from Version 2 to 3
Chapter 3: Creating Your First Map
Chapter 4: Taking the Map Further with MapOptions
Chapter 5: X Marks the Spot
Chapter 6: Marker Icons
Chapter 7: InfoWindow Tips and Tricks
Chapter 8: Creating Polylines and Polygons
Chapter 9: Dealing with Massive Numbers of Markers
Chapter 10: Location, Location, Location
Appendix: API Reference

Descarga:
Beginning_Google_Maps_API_3

sábado, 22 de noviembre de 2014

El Libro del Día: Hello! HTML5 & CSS3

El Libro del Día: 2014-11-22

Titulo: Hello! HTML5 & CSS3
Autor: Rob Crowther
Editorial: Manning
Nro Paginas: 561

Capítulos:
PART 1 LEARNING HTML5
1 Introducing HTML5 markup
2 HTML5 forms
3 Dynamic graphics
4 Audio and video
5 Browser-based APIs
6 Network and location APIs
PART 2 LEARNING CSS3
7 New CSS language features
8 Layout with CSS3
9 Motion and color
10 Borders and backgrounds with CSS3
11 Text and fonts

Descarga:
Hello_HTML5_CSS3

viernes, 26 de septiembre de 2014

El Demo del Día: Visor de Imágenes con Zoom en WinForms

Visor de Imágenes con Zoom en WinForms

Este post es a pedido de un alumno que quiere una aplicación en Windows Forms que muestre una secuencia de Imágenes y pueda realizar el Zoom.

Crear la Aplicación Windows Forms

Primero crearemos una aplicación en Windows Forms en C# llamada: "VisorImagenesZoom".
Cambiar de nombre al formulario por el de "frmVisor", luego diseñar la pantalla como se muestra en la siguiente figura:


Nota: También hay que incluir un Timer llamado "tmrPreview" que cada 3 segundos muestre las imágenes del directorio seleccionado.

Escribir el siguiente código en el formulario:

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.IO;

namespace VisorImagenesZoom
{
    public partial class frmVisor : Form
    {
        private int c;
        private int n;
        private Point punto1;

        public frmVisor()
        {
            InitializeComponent();
        }

        private void abrirDirectorio(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            if (fbd.ShowDialog().Equals(DialogResult.OK))
            {
                txtDirectorio.Text = fbd.SelectedPath;
                IEnumerable<string> archivos = Directory.EnumerateFiles(fbd.SelectedPath, "*.jpg");
                lstArchivo.Items.Clear();
                lstArchivo.BeginUpdate();
                foreach (string archivo in archivos)
                {
                    lstArchivo.Items.Add(Path.GetFileNameWithoutExtension(archivo));
                }
                lstArchivo.EndUpdate();
                txtTotalArchivos.Text = lstArchivo.Items.Count.ToString();
                tmrPreview.Enabled = true;
                tmrPreview.Start();
            }
        }

        private void mostrarImagenes(object sender, EventArgs e)
        {
            lstArchivo.SelectedIndex = c;
            string archivo = Path.Combine(txtDirectorio.Text, lstArchivo.Items[c].ToString() + ".jpg");
            picPreview.LoadAsync(archivo);
            c++;
            if (c == lstArchivo.Items.Count) c = 0;
        }

        private void configurarZoom(object sender, MouseEventArgs e)
        {
            if (e.Button.Equals(MouseButtons.Left))
            {
                if (n == 0)
                {
                    punto1 = e.Location;
                    tmrPreview.Stop();
                    tmrPreview.Enabled = false;
                }
                else
                {
                    if (n == 1)
                    {
                        Point punto2 = e.Location;
                        string archivo = Path.Combine(txtDirectorio.Text,
                                                   lstArchivo.Items[c].ToString() + ".jpg");
                        Bitmap bmp = new Bitmap(picPreview.Image);
                        Bitmap bmpZoom = new Bitmap(bmp.Width, bmp.Height);
                        Graphics g = Graphics.FromImage(bmpZoom);
                        float ratioX = (bmp.Width/picPreview.Width);
                        float ratioY = (bmp.Height / picPreview.Height);
                        int posX = (int)(ratioX * punto1.X);
                        int posY = (int)(ratioY * punto1.Y);
                        int ancho = (int)(ratioX*(punto2.X-punto1.X));
                        int alto = (int)(ratioY * (punto2.Y - punto1.Y));
                        Rectangle srcRect = new Rectangle(posX, posY, ancho, alto);
                        Rectangle dstRect = new Rectangle(0, 0, bmpZoom.Width, bmpZoom.Height);
                        g.DrawImage(bmp, dstRect, srcRect, GraphicsUnit.Pixel);
                        picPreview.Image = bmpZoom;
                        tmrPreview.Enabled = true;
                        tmrPreview.Start();
                    }
                }
                n++;
                if (n == 2) n = 0;
            }
        }
    }
}

Nota: Para programar el Zoom se ha asociado al evento MouseClick del PictureBox llamado "picPreview" donde en el primer clic se captura la ubicación del punto y se guarda en una variable "punto1" y en el segundo clic se captura el punto2 y se crea un rectangulo con la imagen para el Zoom. Solo hay que tener en cuenta que el Rectangulo debe ser en base a la imagen (Bitmap) del PictureBox y No al tamaño del control (con propiedad SizeMode en StrechImage), por lo cual se crea las variables ratios.

Probar la Aplicación Creada

Grabar el proyecto y ejecutarlo con F5. Seleccionar un directorio donde se encuentren archivos jpg y se mostraran en la lista tal como aparece en la siguiente figura:


Cada 3 segundos cambiara la imagen y se seleccionara en la lista el archivo que se esta mostrando, dar el primer clic sobre la imagen y luego el segundo clic mostrará el preview de la imagen, tal como sigue:


Comentario Final

En este post hemos visto como mostrar una secuencia de imágenes usando un Timer y también como realizar el Zoom de una Imagen usando el método DrawImage de la clase Graphics para dibujar un rectángulo con la imagen especificada al dar dos clics, uno para marcar el punto de inicio y otro para marcar el punto final.

Descarga:
Demo19_VisorImagenesZoom



sábado, 26 de julio de 2014

El Libro del Día: Programming Windows Store Apps with C#

El Libro del Día: 2014-07-26

Titulo: Programming Windows Store Apps with C#
Autor: Matt Baxter-Reynolds, Iris Classon
Editorial: O'Reilly
Nro Paginas: 508

Capítulos:
1. Making the Transition from .NET (Part 1)
2. Making the Transition from .NET (Part 2)
3. Local Persistent Data
4. The App Bar
5. Notifications
6. Working with Files
7. Sharing
8. Searching
9. Settings
10. Location
11. Using the Camera
12. Responsive Design
13. Resources and Localization
14. Background Tasks and App Lifetime
15. Sideloading and Distribution
A. Cryptography and Hashing
B. Unit Testing Basics for Windows Store Apps

Descarga:
Programming_WindowsStore_AppsC#