Ent Book: Very Well Written, Easy to Read, and Fun

Total Page:16

File Type:pdf, Size:1020Kb

Ent Book: Very Well Written, Easy to Read, and Fun Prepared exclusively for Antonio Pardo What readers are saying about Hello, Android This is a most excellent book: very well written, easy to read, and fun. In addition, any of Android’s quirks are explained along with just the right amount of detail to ensure quality programming principles are followed. Anthony Stevens Founder and CTO, PocketJourney and Top 20 Winner of Google Android Competition Ed Burnette covers an impressive amount of ground in a nicely com- pact book while retaining the popular Pragmatic style. For the mate- rial on 2D and 3D graphics alone, this is worthy of a spot in any Android developer’s library. Mark Murphy Founder, CommonsWare I remember when I first started to work with Android; it was like a huge maze. With this book, the introduction would have been much less painful. I am convinced that by reading this book new Android programmers will have an easier start. Gabor Paller Senior Software Architect, OnRelay, Ltd. Prepared exclusively for Antonio Pardo Hello, Android Introducing Google’s Mobile Development Platform Ed Burnette The Pragmatic Bookshelf Raleigh, North Carolina Dallas, Texas Prepared exclusively for Antonio Pardo Many of the designations used by manufacturers and sellers to distinguish their prod- ucts are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Portions of the book’s cover are reproduced from work created and shared by Google and used according to terms described in the Creative Commons 2.5 Attribution License. See http://code.google.com/policies.html#restrictions for details. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://www.pragprog.com Copyright © 2008 Ed Burnette. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmit- ted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-10: 1-934356-17-4 ISBN-13: 978-1-934356-17-3 Printed on acid-free paper. P1.1 printing, May 26, 2008 Version: 2009-5-26 Prepared exclusively for Antonio Pardo Contents Acknowledgments 9 Changes (Cupcake Updates) 10 P1.1—May 26 ............................ 10 Preface 12 What Makes Android Special? ................... 12 Who Should Read This Book? ................... 13 What’s in This Book? ........................ 14 What’s New for Cupcake? ..................... 14 Online Resources .......................... 15 Fast-Forward >> ........................... 15 I Introducing Android 17 1 Quick Start 18 1.1 Installing the Tools ..................... 18 1.2 Creating Your First Program ................ 22 1.3 Running on the Emulator ................. 22 1.4 Running on a Real Phone ................. 27 1.5 Fast-Forward >> ....................... 27 2 Key Concepts 28 2.1 The Big Picture ....................... 28 2.2 It’s Alive! ........................... 33 2.3 Building Blocks ....................... 37 2.4 Using Resources ....................... 38 2.5 Safe and Secure ....................... 39 2.6 Fast-Forward >> ....................... 40 Prepared exclusively for Antonio Pardo CONTENTS 6 II Android Basics 41 3 Designing the User Interface 42 3.1 Introducing the Sudoku Example ............. 42 3.2 Designing by Declaration .................. 43 3.3 Creating the Opening Screen ............... 44 3.4 Using Alternate Resources ................. 52 3.5 Implementing an About Box ................ 55 3.6 Applying a Theme ...................... 60 3.7 Adding a Menu ....................... 61 3.8 Adding Settings ....................... 64 3.9 Starting a New Game .................... 66 3.10 Debugging with Log Messages ............... 68 3.11 Debugging with the Debugger ............... 69 3.12 Exiting the Game ...................... 69 3.13 Fast-Forward >> ....................... 70 4 Exploring 2D Graphics 71 4.1 Learning the Basics ..................... 71 4.2 Adding Graphics to Sudoku ................ 76 4.3 Handling Input ....................... 85 4.4 The Rest of the Story .................... 91 4.5 Making More Improvements ................ 100 4.6 Fast-Forward >> ....................... 101 5 Multimedia 102 5.1 Playing Audio ........................ 102 5.2 Playing Video ......................... 108 5.3 Adding Sounds to Sudoku ................. 113 5.4 Fast-Forward >> ....................... 116 6 Storing Local Data 117 6.1 Adding Options to Sudoku ................. 117 6.2 Continuing an Old Game .................. 119 6.3 Remembering the Current Position ............ 121 6.4 Accessing the Internal File System ............ 123 6.5 Accessing SD Cards ..................... 124 6.6 Fast-Forward >> ....................... 126 Report erratum Prepared exclusively for Antonio Pardo this copy is (P1.1 printing, May 26, 2008) CONTENTS 7 III Beyond the Basics 127 7 The Connected World 128 7.1 Browsing by Intent ..................... 129 7.2 Web with a View ....................... 132 7.3 From JavaScript to Java and Back ............ 137 7.4 Using Web Services ..................... 144 7.5 Fast-Forward >> ....................... 155 8 Locating and Sensing 156 8.1 Location, Location, Location ................ 156 8.2 Set Sensors to Maximum .................. 162 8.3 Bird’s-Eye View ....................... 165 8.4 Fast-Forward >> ....................... 171 9 Putting SQL to Work 173 9.1 Introducing SQLite ..................... 173 9.2 SQL 101 ........................... 174 9.3 Hello, Database ....................... 176 9.4 Data Binding ......................... 184 9.5 Using a ContentProvider .................. 186 9.6 Implementing a ContentProvider ............. 190 9.7 Fast-Forward >> ....................... 191 10 3D Graphics in OpenGL 193 10.1 Understanding 3D Graphics ................ 193 10.2 Introducing OpenGL .................... 194 10.3 Building an OpenGL Program ............... 195 10.4 Managing Threads ..................... 197 10.5 Building a Model ...................... 203 10.6 Lights, Camera, ... ...................... 206 10.7 Action! ............................ 208 10.8 Applying Texture ...................... 211 10.9 Peekaboo ........................... 214 10.10 Fast-Forward >> ....................... 215 Report erratum Prepared exclusively for Antonio Pardo this copy is (P1.1 printing, May 26, 2008) CONTENTS 8 IV Appendixes 216 A Java vs. the Android Language and APIs 217 A.1 Language Subset ...................... 217 A.2 Standard Library Subset .................. 219 A.3 Third-Party Libraries .................... 220 B Creating a Widget 221 C Publishing to the Android Market 222 D Bibliography 223 Index 224 Report erratum Prepared exclusively for Antonio Pardo this copy is (P1.1 printing, May 26, 2008) Acknowledgments I’d like to thank the many people who made this book possible, includ- ing my reviewers Anthony Stevens, Gabor Paller, Fred Burke, Dianne Hackborn, and Laurent Pontier for their attention to detail; my editor Susannah Pfalzer for her great suggestions and good cheer in the face of impossible deadlines; and especially my family for their patience in putting up with all the long hours. Prepared exclusively for Antonio Pardo Changes (Cupcake Updates) Android 1.5, also known as Cupcake, was released this spring. Cup- cake contains a number of user- and programmer-facing changes that broke examples in this book, and rendered some sections obsolete. This series of updates will address these changes, and add new sections and appendixes based on the Cupcake release. All changes since the original printing will be flagged with an orange color, like this text. P1.1—May 26 This update contains the following changes: • Chapter , Changes (Cupcake Updates): New section (you’re reading it now) that will detail the changes made in each release. • Chapter , Preface, on page 12: Updated for Cupcake. • Chapter 1, Quick Start, on page 18: Updated for Cupcake. Added new material on Android Virtual Devices (AVDs). Took new screen- shots with 1.5_r1 and ADT 0.9.1v200905011822-1621. • Appendix B, on page 221: New appendix on writing widgets (just a placeholder for now). • Appendix C, on page 222: New appendix on signing and publishing (just a placeholder for now). • Updated all sample source code files1 so they build and run with 1.5. I haven’t updated the text that describes the samples. • Tested all samples on 1.5 firmware on a real phone except for MyMap. 1. http://www.pragprog.com/titles/eband/source_code Prepared exclusively for Antonio Pardo P1.1—MAY 26 11 • Various: Cleared up all outstanding errata.2 • Various: Fixed URLs that Google broke since the first printing. TODO in future releases: • Review the remaining chapters and make changes as needed. • Double-check that sample code changes are reflected in the text that surrounds them. • Update the MyMap sample to use new zoom API. • Update
Recommended publications
  • Rapid GUI Development with Qtruby
    Rapid GUI Development with QtRuby Caleb Tennis The Pragmatic Bookshelf Raleigh, North Carolina Dallas, Texas BOOKLEET © Many of the designations used by manufacturers and sellers to distin- guish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Pro- grammer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Qt® is a registered trademark of Trolltech in Norway, the United States and other countries. Useful Friday Links • Source code from this book and Every precaution was taken in the preparation of this book. However, the other resources. publisher assumes no responsibility for errors or omissions, or for dam- • Free updates to this PDF • Errata and suggestions. To report ages that may result from the use of information (including program list- an erratum on a page, click the ings) contained herein. link in the footer. To see what we’re up to, please visit us at http://www.pragmaticprogrammer.com Copyright © 2006 The Pragmatic Programmers LLC. All rights reserved. This PDF publication is intended for the personal use of the individual whose name appears at the bottom of each page. This publication may not be disseminated to others by any means without the prior consent of the publisher. In particular, the publication must not be made available on the Internet (via a web server, file sharing network, or any other means).
    [Show full text]
  • Multiplatformní GUI Toolkity GTK+ a Qt
    Multiplatformní GUI toolkity GTK+ a Qt Jan Outrata KATEDRA INFORMATIKY UNIVERZITA PALACKÉHO V OLOMOUCI GUI toolkit (widget toolkit) (1) = programová knihovna (nebo kolekce knihoven) implementující prvky GUI = widgety (tlačítka, seznamy, menu, posuvník, bary, dialog, okno atd.) a umožňující tvorbu GUI (grafického uživatelského rozhraní) aplikace vlastní jednotný nebo nativní (pro platformu/systém) vzhled widgetů, možnost stylování nízkoúrovňové (Xt a Xlib v X Windows System a libwayland ve Waylandu na unixových systémech, GDI Windows API, Quartz a Carbon v Apple Mac OS) a vysokoúrovňové (MFC, WTL, WPF a Windows Forms v MS Windows, Cocoa v Apple Mac OS X, Motif/Lesstif, Xaw a XForms na unixových systémech) multiplatformní = pro více platforem (MS Windows, GNU/Linux, Apple Mac OS X, mobilní) nebo platformově nezávislé (Java) – aplikace může být také (většinou) událostmi řízené programování (event-driven programming) – toolkit v hlavní smyčce zachytává události (uživatelské od myši nebo klávesnice, od časovače, systému, aplikace samotné atd.) a umožňuje implementaci vlastních obsluh (even handler, callback function), objektově orientované programování (objekty = widgety aj.) – nevyžaduje OO programovací jazyk! Jan Outrata (Univerzita Palackého v Olomouci) Multiplatformní GUI toolkity duben 2015 1 / 10 GUI toolkit (widget toolkit) (2) language binding = API (aplikační programové rozhraní) toolkitu v jiném prog. jazyce než původní API a toolkit samotný GUI designer/builder = WYSIWYG nástroj pro tvorbu GUI s využitím toolkitu, hierarchicky skládáním prvků, z uloženého XML pak generuje kód nebo GUI vytvoří za běhu aplikace nekomerční (GNU (L)GPL, MIT, open source) i komerční licence např. GTK+ (C), Qt (C++), wxWidgets (C++), FLTK (C++), CEGUI (C++), Swing/JFC (Java), SWT (Java), JavaFX (Java), Tcl/Tk (Tcl), XUL (XML) aj.
    [Show full text]
  • KDE E.V. Quarterly Report 2008Q3/Q4
    Quarterly Report Q3/2008 & Q4/2008 solid accounting and valuable organizational skills month after month, year after year. As such, I am more than confident in his stepping into the President's chair. Cornelius will also benefit from the solid board members that have helped us build KDE e.V. over the past few years into what it has become. We should all be quite proud of what we have achieved Dear KDE e.V. member, within this organization. It has never been as robust, professional and effective. In the spirit of continuous When one is busy, time flies by quicker than one expects. improvement, I am equally sure we will be able to say the They say the same thing happens when you're having fun. same thing in five years time. When I look at the calendar and realize that we're already into the second month of 2009, I'm struck with just how I would also take this opportunity to ask each and every quickly 2008 melted away. It's safe to say that we were one of the members of our society to examine their own both hard at work and having fun in the process. involvement within KDE e.V. It operates smoothly only because we have members who step up and help get things Going forward, we have a series of very exciting programs done. We achieve things together that we can not achieve underway, probably not least of which is a new Individual alone. Supporting Members program. We also have the Gran Canaria Desktop Summit, which is an experiment in co- These activities range from the simple task of voting (and locating Akademy with GUADEC.
    [Show full text]
  • 18T00464 JACOME Q Y MACAS C
    ESCUELA SUPERIOR POLITÉCNICA DE CHIMBORAZO FACULTAD DE INFORMÁTICA Y ELECTRÓNICA ESCUELA DE INGENIERÍA EN SISTEMAS “ANÁLISIS COMPARATIVO DE BIBLIOTECAS MULTIPLATAFORMA PARA EL DESARROLLO DE APLICACIONES DE ESCRITORIO, APLICADO A LA ESCUELA DE DISEÑO GRÁFICO” TESIS DE GRADO Previa la obtención del título de: INGENIERA EN SISTEMAS INFORMÁTICOS Presentado por: MAYRA ALEXANDRA MACAS CARRASCO ANA ELIZABETH JÁCOME QUINTANILLA RIOBAMBA – ECUADOR 2011 AGRADECIMIENTO Agradezco a Dios, por concederme la vida y mantenerme con salud, pero sobre todo por estar siempre junto a mi bendiciéndome; a mis padres ya que siempre me apoyaron incondicionales inculcándome que se debe ser honesto, trabajador y perseverante; a mis hermanas por su motivación y apoyo, y a mis amigos porque cada uno de ellos en un determinado tiempo me brindaron su mano para ayudarme. Mayra Macas Carrasco A Dios por otorgarme el regalo de la vida y estar siempre junto a mí, a mi familia por su amor incondicional, sus consejos, enseñanzas para salir adelante, a mis amigas porque junto a ellas aprendí muchas cosas y a mis profesores por su colaboración para culminar este trabajo. Ana Jácome Quintanilla DEDICATORIA A Dios por estar junto a mí iluminándome siempre, a mis padres y hermanas que son fundamentales en mi vida, a mis amigos por brindarme siempre su apoyo incondicional y a los profesores por ser una guía en el proceso de formación profesional de los estudiantes. Mayra Macas Carrasco El presente trabajo está dedicado a mis padres, hermanas y hermanos que son uno de los pilares fundamentales en mi vida, a mis amigas por concederme su apoyo incondicional y a mis profesores por ser mi guía durante esta etapa de aprendizaje.
    [Show full text]
  • Technical Notes All Changes in Fedora 13
    Fedora 13 Technical Notes All changes in Fedora 13 Edited by The Fedora Docs Team Copyright © 2010 Red Hat, Inc. and others. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. For guidelines on the permitted uses of the Fedora trademarks, refer to https:// fedoraproject.org/wiki/Legal:Trademark_guidelines. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. All other trademarks are the property of their respective owners. Abstract This document lists all changed packages between Fedora 12 and Fedora 13.
    [Show full text]
  • Towards Left Duff S Mdbg Holt Winters Gai Incl Tax Drupal Fapi Icici
    jimportneoneo_clienterrorentitynotfoundrelatedtonoeneo_j_sdn neo_j_traversalcyperneo_jclientpy_neo_neo_jneo_jphpgraphesrelsjshelltraverserwritebatchtransactioneventhandlerbatchinsertereverymangraphenedbgraphdatabaseserviceneo_j_communityjconfigurationjserverstartnodenotintransactionexceptionrest_graphdbneographytransactionfailureexceptionrelationshipentityneo_j_ogmsdnwrappingneoserverbootstrappergraphrepositoryneo_j_graphdbnodeentityembeddedgraphdatabaseneo_jtemplate neo_j_spatialcypher_neo_jneo_j_cyphercypher_querynoe_jcypherneo_jrestclientpy_neoallshortestpathscypher_querieslinkuriousneoclipseexecutionresultbatch_importerwebadmingraphdatabasetimetreegraphawarerelatedtoviacypherqueryrecorelationshiptypespringrestgraphdatabaseflockdbneomodelneo_j_rbshortpathpersistable withindistancegraphdbneo_jneo_j_webadminmiddle_ground_betweenanormcypher materialised handaling hinted finds_nothingbulbsbulbflowrexprorexster cayleygremlintitandborient_dbaurelius tinkerpoptitan_cassandratitan_graph_dbtitan_graphorientdbtitan rexter enough_ram arangotinkerpop_gremlinpyorientlinkset arangodb_graphfoxxodocumentarangodborientjssails_orientdborientgraphexectedbaasbox spark_javarddrddsunpersist asigned aql fetchplanoriento bsonobjectpyspark_rddrddmatrixfactorizationmodelresultiterablemlibpushdownlineage transforamtionspark_rddpairrddreducebykeymappartitionstakeorderedrowmatrixpair_rddblockmanagerlinearregressionwithsgddstreamsencouter fieldtypes spark_dataframejavarddgroupbykeyorg_apache_spark_rddlabeledpointdatabricksaggregatebykeyjavasparkcontextsaveastextfilejavapairdstreamcombinebykeysparkcontext_textfilejavadstreammappartitionswithindexupdatestatebykeyreducebykeyandwindowrepartitioning
    [Show full text]
  • The Ruby Way: Solutions and Techniques in Ruby Programming
    Praise for The Ruby Way, Third Edition “Sticking to its tried and tested formula of cutting right to the techniques the modern day Rubyist needs to know, the latest edition of The Ruby Way keeps its strong reputation going for the latest generation of the Ruby language.” Peter Cooper Editor of Ruby Weekly “The authors’ excellent work and meticulous attention to detail continues in this lat- est update; this book remains an outstanding reference for the beginning Ruby pro- grammer—as well as the seasoned developer who needs a quick refresh on Ruby. Highly recommended for anyone interested in Ruby programming.” Kelvin Meeks Enterprise Architect Praise for Previous Editions of The Ruby Way “Among other things, this book excels at explaining metaprogramming, one of the most interesting aspects of Ruby. Many of the early ideas for Rails were inspired by the first edition, especially what is now Chapter 11. It puts you on a rollercoaster ride between ‘How could I use this?’ and ‘This is so cool!’ Once you get on that roller- coaster, there’s no turning back.” David Heinemeier Hansson Creator of Ruby on Rails, Founder at Basecamp “The appearance of the second edition of this classic book is an exciting event for Rubyists—and for lovers of superb technical writing in general. Hal Fulton brings a lively erudition and an engaging, lucid style to bear on a thorough and meticulously exact exposition of Ruby. You palpably feel the presence of a teacher who knows a tremendous amount and really wants to help you know it too.” David Alan Black Author of The Well-Grounded Rubyist “This is an excellent resource for gaining insight into how and why Ruby works.
    [Show full text]
  • A Brief Introduction to Qt Bruce Bolden March 25, 2009
    Introduction to Qt 1 A Brief Introduction to Qt Bruce Bolden March 25, 2009 Introduction to Qt 2 What is Qt1? A platform independent (cross-platform) graphics library for the development of applications with/without UIs (user interfaces). Features • Intuitive C++ class library • Portability across desktop and embedded operating systems • Look and Feel of the native OS • Integrated development tools with cross-platform IDE • High runtime performance and small footprint on embed- ded systems Note: Qt is pronounced cute by Europeans. 1Qt is pronounced cute by Europeans. Introduction to Qt 3 Some frequently Used Acronyms API Application Program Interface GUI Graphical User Interface IDE Integrated Development Environment KDE K Desktop Environment LGPL GNU Lesser General Public License RTTI Run Time Type Identification SDK Software Development Toolkit KDE details: http://www.kde.org/ Introduction to Qt 4 Why Qt? • Not Java • Platform independent (cross-platform) • Large C++-based library • The choice for KDE development • Easy transition to OpenGL Introduction to Qt 5 Qt History • Trolltech was founded in 1994 • Nokia acquired Trolltech ASA, in June 2008 • Active development! { 4.5 released March 3, 2009 { 4.2 released August 24, 2006 This is Qt 4.5: http://www.youtube.com/watch?v=8xRfNsY53GY Introduction to Qt 6 Qt History|Details Nokia acquired Trolltech ASA, in June 2008, to enable the ac- celeration of their cross-platform software strategy for mobile devices and desktop applications, and to develop its Internet services business. On September 29, 2008 Nokia renamed Troll- tech to Qt Software.2 Trolltech was founded in 1994. The core team of designers at Trolltech started developing Qt in 1992, and the first commercial version of Qt was released in 1995.
    [Show full text]
  • New Product Development with Ruby on Rails by Selina D’Souza
    WHITE PAPER New Product Development with Ruby on Rails by Selina D’Souza There are huge changes in the way software is being built today and the timeframes in which it gets built. The reasons for these changes are manifold and have deep implications for software companies. Ruby-on-Rails supports rapid development, extensive collaboration and can be a great platform of choice for building new web applications and products successfully. Table of Contents 1. The Changing Rules for Web Startups..............................................................................................................2 2. Ruby on Rails (RoR) – Platform for New Product Development.......................................................................2 3. Advantages of the Rails Framework ................................................................................................................3 4. Web 2.0 and Rich Internet Applications...........................................................................................................3 5. Ruby - Dynamic and Elegant.............................................................................................................................4 6. Behavior Driven Development with RoR..........................................................................................................4 7. Shortcomings of Rails.......................................................................................................................................4 8. Hosting Rails.....................................................................................................................................................5
    [Show full text]
  • Domácí Cloudové Úložiště
    BAKALÁŘSKÁ PRÁCE Domácí cloudové úložiště 2021 Aleš Kašpárek Vedoucí práce: Mgr. Jan Tříska, Studijní obor: Aplikovaná informatika, PhD. prezenční forma Bibliografické údaje Autor: Aleš Kašpárek Název práce: Domácí cloudové úložiště Typ práce: bakalářská práce Pracoviště: Katedra informatiky, Přírodovědecká fakulta, Univerzita Palackého v Olomouci Rok obhajoby: 2021 Studijní obor: Aplikovaná informatika, prezenční forma Vedoucí práce: Mgr. Jan Tříska, PhD. Počet stran: 32 Přílohy: 1 CD/DVD Jazyk práce: český Bibliograhic info Author: Aleš Kašpárek Title: Home cloud storage Thesis type: bachelor thesis Department: Department of Computer Science, Faculty of Science, Pa- lacký University Olomouc Year of defense: 2021 Study field: Applied Computer Science, full-time form Supervisor: Mgr. Jan Tříska, PhD. Page count: 32 Supplements: 1 CD/DVD Thesis language: Czech Anotace Cílem práce je navrhnout a implementovat efektivní způsob uložení a sdílení sou- borů mezi uživateli, bez potřeby fyzického úložiště. Výsledkem práce je systém, pomocí kterého mohou uživatelé přistupovat ke svým souborům kdekoliv pomocí internetu. Synopsis The main goal of thesis is to desing and implement effective way of storing and sharing files between users, without need of physical storage. Result of this thesis is a system, which allows users to use their files anywhere using the internet. Klíčová slova: cloud, cloudové úložiště, REST API, Python, GUI, C++, Docker Keywords: cloud, cloud storage, REST API, Python, GUI, C++, Docker Chtěl bych poděkovat Mgr. Janu Třískovi, PhD. za připomínky, nápady a zájem při tvoření této práce. Místopřísežně prohlašuji, že jsem celou práci včetně příloh vypracoval/a samo- statně a za použití pouze zdrojů citovaných v textu práce a uvedených v seznamu literatury.
    [Show full text]
  • Cross-Platform Development with Jruby and Swing
    Cross-platform Desktop Application Development with JRuby and Swing Copyright 2014 James Britt / Neurogami Originally published in 2007. Ruby for the desktop The Ruby programming language is currently best known for building Web applications, primarily with the Ruby on Rails framework. However, Ruby is more than capable for writing graphical desktop applications as well. The standard Ruby distribution includes code for bindings for Tk, an open-source, cross- platform set of widgets that allows you to create graphical desktop applications. This can be extremely handy, but when installing Ruby from source code you need to be sure you also have the Tk dependencies and make sure the compilation settings include Tk. Further, if you are using Ruby on Windows installed using the excellent “one-click” installer package, you still have to take extra steps to have Tk working, since it no longer supports automatic installation. Even with Tk set up for Ruby it is somewhat clunky. Tk applications often look like Tk applications; depending on the target platform it can look somewhat ugly. Plus, attempting to create complex interfaces is daunting. Tk is best used for smaller GUI needs. Available Toolkits The weakness of Tk has prompted the development of other GUI toolkit options for Ruby. Here are the some of the notable choices: FxRuby FxRuby is a Ruby binding for Fox, a GUI toolkit written in C++. It is available for installation using rubygems. There is a binary gem available for Windows; the gem on other platforms will require you to compile native code. WxRuby WxRuby is a binding for the cross-platform wxWidgets C++ GUI toolkit that allows the creation of native-looking desktop applications.
    [Show full text]
  • Ruby Advanced
    Ruby Advanced Часть I Марченко Светлана Ruby Advanced Графические интерфейсы для Ruby Потоки в Ruby Сценарии и системное администрирование Тестирование и отладка Создание пакетов и распространение программ Ruby и Web приложения Ruby tricks Графические интерфейсы для Ruby (Tk, GTK+, FOX, QtRuby) Ruby/Tk Tk — платформо-независимая система Perl, Tcl (Perl/Tk) Переносимость, стабильность Корневой контейнер с виджетами + геометрический менеджер(pack, grid, place) Блоки вычисляются в контексте вызываемого объекта (instance_eval), а не в контексте вызывающей программы Ruby/GTK2 Ruby/GTK2 (GIMP Toolkit) Лежит в основе графического менеджера GNOME, но MS Windows, MAC OS X c X Window System Расширение Ruby/GTK2 (GTK+ 2.0) НЕ ПУТАТЬ c Ruby/GTK (GTK+ 1.2), которое несовместимо и считается устаревшим GNU LGPL Концепция фреймов, диалогов, окон и менеджеров размещения Располагает богатым набором виджетов (стандартные + более сложные, например, деревья, многоколонные списки) GTK+ написана на С, но спроектирована в ОО манере Ruby/GTK2 предоставляет объектно-ориентированный API GTK2 написана вручную → API выдержан в духе Ruby (с использованием блоков, необязательных аргументов и т.д) GTK+ на базе Glib, Pango, ATK, Cairo, GDK Графические интерфейсы для Ruby Недостатки недостаточно богатый набор стандартных диалоговых окон все строки должны быть в UTF-8 (в начало сценария $KCODE= "U") FXRuby (FOX — Free Objects for X) относительно новая технология акцент на быстродействие и межплатформенную совместимость не обертка платформенного
    [Show full text]