Asp.Net Web Pages Using the Razor Syntax

Total Page:16

File Type:pdf, Size:1020Kb

Asp.Net Web Pages Using the Razor Syntax ASP.NET WEB PAGES USING THE RAZOR SYNTAX Microsoft® ASP.NET Web Pages is a free Web development technology that is designed to deliver the world's best experience for Web developers who are building websites for the Internet. This book provides an overview of how to create dynamic Web content using ASP.NET Web Pages with the Razor syntax. Note This document is preliminary documentation for the Beta release of Microsoft WebMatrix and ASP.NET Web pages and is subject to change. For the latest information, visit http://www.asp.net/webmatrix. Chapter 1 - Getting Started with Microsoft WebMatrix Beta and ASP.NET Web Pages 1 What is WebMatrix Beta? 1 Installing WebMatrix Beta 1 Getting Started with WebMatrix Beta 2 Using ASP.NET Web Pages Code 6 Creating and Testing ASP.NET Pages Using Your Own Text Editor 8 Chapter 2 - Introduction to ASP.NET Web Programming Using the Razor Syntax 10 The Top 8 Programming Tips 10 HTTP GET and POST Methods and the IsPost Property 16 A Simple Code Example 16 Basic Programming Concepts 18 Classes and Instances 19 Language and Syntax 20 HTML Encoding 21 Additional Resources 38 Chapter 3 - Creating a Consistent Look 39 Creating Reusable Blocks of Content 39 Creating a Consistent Look Using Layout Pages 42 Designing Layout Pages That Have Multiple Content Sections 45 Making Content Sections Optional 48 Passing Data to Layout Pages 49 Chapter 4 - Working With Forms 54 Creating a Simple HTML Form 54 Reading User Input From the Form 55 HTML Encoding for Appearance and Security 57 Validating User Input 58 Restoring Form Values After Postbacks 59 Additional Resources 61 Chapter 5 - Working With Data 62 Introduction to Databases 62 Relational Databases 63 Creating a Database 63 Adding Data to the Database 65 Displaying Data from a Database 65 Structured Query Language (SQL) 67 Inserting Data in a Database 68 Updating Data in a Database 71 Deleting Data in a Database 76 Displaying Data Using the WebGrid Helper 79 Connecting to a Database 81 Additional Resources 82 Chapter 6 - Working With Files 83 Creating a Text File and Writing Data to It 83 Appending Data to an Existing File 86 Reading and Displaying Data from a File 87 Displaying Data from a Microsoft Excel Comma-Delimited File 89 Deleting Files 89 Letting Users Upload a File 91 Letting Users Upload Multiple Files 94 Additional Resources 96 Chapter 7 - Working With Images 97 Adding an Image to a Web Page Dynamically 97 Uploading an Image 99 About GUIDs 102 Resizing an Image 102 Rotating and Flipping an Image 104 Adding a Watermark to an Image 106 Using an Image As a Watermark 107 Chapter 8 - Working with Video 109 Choosing a Video Player 109 MIME Types 110 Playing Flash (.swf) Videos 110 Playing MediaPlayer (.wmv) Videos 112 Playing Silverlight Videos 114 Additional Resources 115 Chapter 9 - Adding Email to Your Website 116 Sending Email Messages from Your Website 116 Sending a File Using Email 119 Additional Resources 122 Chapter 10 - Adding Social Networking to Your Website 123 Linking Your Website on Social Networking SItes 123 Adding a Twitter Feed 124 Rendering a Gravatar Image 126 Displaying an Xbox Gamer Card 127 Chapter 11 - Analyzing Traffic 129 Tracking Visitor Information (Analytics) 129 Chapter 12 - Caching to Improve the Performance of Your Website 132 Caching to Improve Website Responsiveness 132 Chapter 13 – Adding Security and Membership 135 Introduction to Website Membership 135 Creating a Website That Has Registration and Login Pages 136 Creating a Members-Only Page 139 Creating Security for Groups of Users (Roles) 141 Creating a Password-Change Page 143 Letting Users Generate a New Password 144 Preventing Automated Programs from Joining Your Website 148 Chapter 14 - Introduction to Debugging 151 Using the ServerInfo Helper to Display Server Information 151 Embedding Output Expressions to Display Page Values 153 Using the ObjectInfo Helper to Display Object Values 156 Using Debugging Tools 158 Examining Traffic Using the WebMatrix Beta Requests Tool 160 Analyzing SEO Using the Reports Workspace 162 Additional Resources 164 Chapter 15 - Customizing Site-Wide Behavior 165 Adding Website Startup Code 165 Running Code Before and After Files in a Folder 169 Creating More Readable and Searchable URLs 173 Appendix A - API Quick Reference 177 Introduction 177 Classes 177 Data 180 Helpers 181 Appendix B - Visual Basic Language and Syntax 185 The Top 8 Programming Tips 185 HTTP GET and POST Methods and the IsPost Property 191 A Simple Code Example 191 Visual Basic Language and Syntax 193 HTML Encoding 194 Additional Resources 211 Chapter 1 - Getting Started with Microsoft WebMatrix Beta and ASP.NET Web Pages This chapter introduces Microsoft WebMatrix Beta, a free Web development technology that delivers the world's best experience for Web developers. What you'll learn What is WebMatrix? How to install WebMatrix. How to get started creating a simple website using WebMatrix. How to create a dynamic Web page using WebMatrix. What is WebMatrix Beta? WebMatrix is a free, lightweight set of Web development tools that provides the easiest way to build websites. It includes IIS Developer Express (a development Web server), ASP.NET (a Web framework), and Microsoft SQL Server® Compact (an embedded database). It also includes a simple tool that streamlines website development and makes it easy to start websites from popular open source apps. The skills and code you develop with WebMatrix transition seamlessly to Microsoft Visual Studio® and SQL Server. The web pages that you create using WebMatrix can be dynamic—that is, they can alter their content or style based on user input or on other information, such as database information. To program dynamic Web pages, you use ASP.NET with the Razor syntax and the C# or Microsoft Visual Basic® programming languages. If you already have programming tools that you like, you can try the WebMatrix tools or you can use your own tools to create websites that use ASP.NET. This chapter shows you how WebMatrix makes it easy to get started creating websites and dynamic web pages. Installing WebMatrix Beta To install WebMatrix, you can use Microsoft’s Web Platform Installer, which is a free application that makes it easy to install and configure web-related technologies. 1. If you don't already have the Web Platform Installer, download it from the following URL: http://www.microsoft.com/web/downloads/platform.aspx ASP.NET Web Pages: Chapter 1 - Getting Started with Microsoft WebMatrix Beta and ASP.NET Web Pages 1 © Microsoft. All Rights Reserved 2. Run the Web Platform Installer, select Getting Started, and then click Install Now. Getting Started with WebMatrix Beta To begin, you'll create a new website and a simple web page. 1. Start WebMatrix. ASP.NET Web Pages: Chapter 1 - Getting Started with Microsoft WebMatrix Beta and ASP.NET Web Pages 2 © Microsoft. All Rights Reserved 2. Click Site From Template. Templates include prebuilt files and pages for different types of websites. 3. Select Empty Site and name the new site HelloWorld. 4. Click OK. WebMatrix creates and opens the new site. At the top, you see a Quick Access Toolbar and a ribbon, as in Microsoft Office 2010. At the bottom left, you see the workspace selector, which contains buttons that determine what appears above them in the left pane. On the right is the content pane, which is where you view reports, edit files, and so on. Finally, across the bottom is the notification bar, which shows messages as needed. ASP.NET Web Pages: Chapter 1 - Getting Started with Microsoft WebMatrix Beta and ASP.NET Web Pages 3 © Microsoft. All Rights Reserved 5. Select the Files workspace. This workspace lets you work with files and folders. The left pane shows you the file structure of your site. 6. In the ribbon, click New and then click New File…. WebMatrix displays a list of file types. Most of these are probably familiar, like HTML, CSS, and TXT. ASP.NET Web Pages: Chapter 1 - Getting Started with Microsoft WebMatrix Beta and ASP.NET Web Pages 4 © Microsoft. All Rights Reserved 7. Select CSHTML, and in the Name box, type HelloWorld.cshtml. A CSHTML page is a special type of page in WebMatrix that can contain the usual contents of a web page, such as HTML and JavaScript code, and that can also contain code for programming web pages. (You'll learn more about CSHTML files later.) 8. Click OK. WebMatrix creates the page and opens it in the editor. As you can see, this is ordinary HTML markup. 9. Add the following highlighted HTML and content to the page: <!DOCTYPE html> <html> <head> <title>Hello World Page</title> </head> <body> <h1>Hello World Page</h1> <p>Hello World!</p> </body> </html> 10. In the Quick Access Toolbar, click Save. 11. In the ribbon, click Run. ASP.NET Web Pages: Chapter 1 - Getting Started with Microsoft WebMatrix Beta and ASP.NET Web Pages 5 © Microsoft. All Rights Reserved 12. WebMatrix starts a web server (IIS Developer Express) that you can use to test pages on your computer. The page is displayed in your default browser. In the next section, you'll see how easy is it is to add code to the HelloWorld.cshtml page in order to create a dynamic page. Using ASP.NET Web Pages Code In this procedure, you'll create a page that uses simple code to display the server date and time on the page. The example here will introduce you to the Razor syntax that lets you embed code into the HTML on ASP.NET Web pages. (You can read more about this in the next chapter.) The code introduces a helper, which is a powerful concept in ASP.NET.
Recommended publications
  • Ironpython in Action
    IronPytho IN ACTION Michael J. Foord Christian Muirhead FOREWORD BY JIM HUGUNIN MANNING IronPython in Action Download at Boykma.Com Licensed to Deborah Christiansen <[email protected]> Download at Boykma.Com Licensed to Deborah Christiansen <[email protected]> IronPython in Action MICHAEL J. FOORD CHRISTIAN MUIRHEAD MANNING Greenwich (74° w. long.) Download at Boykma.Com Licensed to Deborah Christiansen <[email protected]> For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. Sound View Court 3B fax: (609) 877-8256 Greenwich, CT 06830 email: [email protected] ©2009 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15% recycled and processed without the use of elemental chlorine.
    [Show full text]
  • Fortran Resources 1
    Fortran Resources 1 Ian D Chivers Jane Sleightholme October 17, 2020 1The original basis for this document was Mike Metcalf’s Fortran Information File. The next input came from people on comp-fortran-90. Details of how to subscribe or browse this list can be found in this document. If you have any corrections, additions, suggestions etc to make please contact us and we will endeavor to include your comments in later versions. Thanks to all the people who have contributed. 2 Revision history The most recent version can be found at https://www.fortranplus.co.uk/fortran-information/ and the files section of the comp-fortran-90 list. https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=comp-fortran-90 • October 2020. Added an entry for Nvidia to the compiler section. Nvidia has integrated the PGI compiler suite into their NVIDIA HPC SDK product. Nvidia are also contributing to the LLVM Flang project. • September 2020. Added a computer arithmetic and IEEE formats section. • June 2020. Updated the compiler entry with details of standard conformance. • April 2020. Updated the Fortran Forum entry. Damian Rouson has taken over as editor. • April 2020. Added an entry for Hewlett Packard Enterprise in the compilers section • April 2020. Updated the compiler section to change the status of the Oracle compiler. • April 2020. Added an entry in the links section to the ACM publication Fortran Forum. • March 2020. Updated the Lorenzo entry in the history section. • December 2019. Updated the compiler section to add details of the latest re- lease (7.0) of the Nag compiler, which now supports coarrays and submodules.
    [Show full text]
  • Thriving in a Crowded and Changing World: C++ 2006–2020
    Thriving in a Crowded and Changing World: C++ 2006–2020 BJARNE STROUSTRUP, Morgan Stanley and Columbia University, USA Shepherd: Yannis Smaragdakis, University of Athens, Greece By 2006, C++ had been in widespread industrial use for 20 years. It contained parts that had survived unchanged since introduced into C in the early 1970s as well as features that were novel in the early 2000s. From 2006 to 2020, the C++ developer community grew from about 3 million to about 4.5 million. It was a period where new programming models emerged, hardware architectures evolved, new application domains gained massive importance, and quite a few well-financed and professionally marketed languages fought for dominance. How did C++ ś an older language without serious commercial backing ś manage to thrive in the face of all that? This paper focuses on the major changes to the ISO C++ standard for the 2011, 2014, 2017, and 2020 revisions. The standard library is about 3/4 of the C++20 standard, but this paper’s primary focus is on language features and the programming techniques they support. The paper contains long lists of features documenting the growth of C++. Significant technical points are discussed and illustrated with short code fragments. In addition, it presents some failed proposals and the discussions that led to their failure. It offers a perspective on the bewildering flow of facts and features across the years. The emphasis is on the ideas, people, and processes that shaped the language. Themes include efforts to preserve the essence of C++ through evolutionary changes, to simplify itsuse,to improve support for generic programming, to better support compile-time programming, to extend support for concurrency and parallel programming, and to maintain stable support for decades’ old code.
    [Show full text]
  • Dr. C#: a Pedagogic IDE for C# Featuring a Read-Eval-Print-Loop by Dennis Lu
    RICE UNIVERSITY Dr. C#: A Pedagogic IDE for C# Featuring a Read-Eval-Print-Loop by Dennis Lu ATHESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE Master of Science APPROVED,THESIS COMMITTEE: Robert Cartwright, Chair Professor of Computer Science Joe Warren Professor of Computer Science Dan Wallach Assistant Professor of Computer Science Dung X. Nguyen Lecturer, Computer Science Houston, Texas April, 2003 Dr. C#: A Pedagogic IDE for C# Featuring a Read-Eval-Print-Loop Dennis Lu Abstract As the primary programming language of the Microsoft .NET platform, C# will play a significant role in software development for the foreseeable future. As the language rapidly gains popularity in industry, tools made for C# development fo- cus on the professional programmer, while leaving the beginning computer science student behind. To address this problem, we introduce Dr. C#, a simple lightweight develop- ment environment with an integrated, interactive Read-Eval-Print-Loop (REPL). Dr. C# helps flatten the learning curve of both the environment and the language, enabling students to quickly learn key elements of the language and focus more easily on concepts. Dr. C# thus serves not only as a learning tool for beginner students but also as a teaching tool for instructors. The editor is based on an open source IDE called SharpDevelop. This thesis describes the implementation of Dr. C# focusing primarily on building the REPL and integrating with SharpDevelop. Acknowledgments I would like to thank my advisor Professor Robert “Corky” Cartwright for giving me the opportunity and autonomy to develop Dr. C#. I would also like to thank Professor Dung Nguyen for acting as co-advisor and for his years of guidance and support.
    [Show full text]
  • Oracle Fusion Middleware Platform Developer's Guide for Oracle Real-Time Decisions 11G Release 1 (11.1.1) E16630-06
    Oracle® Fusion Middleware Platform Developer's Guide for Oracle Real-Time Decisions 11g Release 1 (11.1.1) E16630-06 February 2013 Explains how to develop adaptive solutions with Oracle Real-Time Decisions (Oracle RTD). Includes a tutorial, information about integrating with Oracle RTD, and details about Inline Services. Oracle Fusion Middleware Platform Developer's Guide for Oracle Real-Time Decisions 11g Release 1 (11.1.1) E16630-06 Copyright © 2011, 2013, Oracle and/or its affiliates. All rights reserved. Primary Author: Oracle Corporation Contributors: Oracle Real-Time Decisions development, product management, and quality assurance teams. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S.
    [Show full text]
  • Cornell CS6480 Lecture 3 Dafny Robbert Van Renesse Review All States
    Cornell CS6480 Lecture 3 Dafny Robbert van Renesse Review All states Reachable Ini2al states states Target states Review • Behavior: infinite sequence of states • Specificaon: characterizes all possible/desired behaviors • Consists of conjunc2on of • State predicate for the inial states • Acon predicate characterizing steps • Fairness formula for liveness • TLA+ formulas are temporal formulas invariant to stuering • Allows TLA+ specs to be part of an overall system Introduction to Dafny What’s Dafny? • An imperave programming language • A (mostly funconal) specificaon language • A compiler • A verifier Dafny programs rule out • Run2me errors: • Divide by zero • Array index out of bounds • Null reference • Infinite loops or recursion • Implementa2ons that do not sa2sfy the specifica2ons • But it’s up to you to get the laFer correct Example 1a: Abs() method Abs(x: int) returns (x': int) ensures x' >= 0 { x' := if x < 0 then -x else x; } method Main() { var x := Abs(-3); assert x >= 0; print x, "\n"; } Example 1b: Abs() method Abs(x: int) returns (x': int) ensures x' >= 0 { x' := 10; } method Main() { var x := Abs(-3); assert x >= 0; print x, "\n"; } Example 1c: Abs() method Abs(x: int) returns (x': int) ensures x' >= 0 ensures if x < 0 then x' == -x else x' == x { x' := 10; } method Main() { var x := Abs(-3); print x, "\n"; } Example 1d: Abs() method Abs(x: int) returns (x': int) ensures x' >= 0 ensures if x < 0 then x' == -x else x' == x { if x < 0 { x' := -x; } else { x' := x; } } Example 1e: Abs() method Abs(x: int) returns (x': int) ensures
    [Show full text]
  • F# in Education – Programming the New Generation
    Computer Science F# in Education – Programming Fast Facts Project Principal: the New Generation Don Syme, Principal Researcher, Microsoft Research F# is a simple, type-safe, and efficient functional programming lan- Judith Bishop, guage with special expressiveness in parallel programming, scripting, Director, Computer Science, and algorithmic development. F# combines the advantages of typed Microsoft External Research functional programming with a high-quality, well-supported modern runtime system and the Microsoft .NET library and tools base. Websites: F#: http://www.fsharp.org/ # provides type-safe, succinct, efficient and expressive functional programming Microsoft F# Developer Center: on the .NET platform. It is a simple and pragmatic language, and has particular http://msdn.microsoft.com/fsharp strengths in data-oriented programming, parallel programming, scripting, and F Pex4fun: algorithmic development. It offers access to the huge .NET library and tools base and http://www.pex4fun.com/ comes with a strong set of Microsoft® Visual Studio® development tools. This combi- nation has been so successful that the language is now a first-class language in Visual Studio 2010. Events: F# in Education Workshop: As a teaching language, F# has the advantage of being freely available for .NET http://research.microsoft.com/ as well as Mono, which means that students can develop programs on Windows®, fsharpined Macintosh, and Linux. At the moment, its richest experience is in Visual Studio 2010, but to support teaching of F#, Microsoft Research is working in conjunction with the Microsoft Technologies: F# community to ensure a consistent learning experience across all three platforms. Microsoft Visual Studio 2010 Several projects are underway for F# courseware, implementations, and compiler Microsoft .NET Framework open-sourcing.
    [Show full text]
  • Neufuzz: Efficient Fuzzing with Deep Neural Network
    Received January 15, 2019, accepted February 6, 2019, date of current version April 2, 2019. Digital Object Identifier 10.1109/ACCESS.2019.2903291 NeuFuzz: Efficient Fuzzing With Deep Neural Network YUNCHAO WANG , ZEHUI WU, QIANG WEI, AND QINGXIAN WANG China National Digital Switching System Engineering and Technological Research Center, Zhengzhou 450000, China Corresponding author: Qiang Wei ([email protected]) This work was supported by National Key R&D Program of China under Grant 2017YFB0802901. ABSTRACT Coverage-guided graybox fuzzing is one of the most popular and effective techniques for discovering vulnerabilities due to its nature of high speed and scalability. However, the existing techniques generally focus on code coverage but not on vulnerable code. These techniques aim to cover as many paths as possible rather than to explore paths that are more likely to be vulnerable. When selecting the seeds to test, the existing fuzzers usually treat all seed inputs equally, ignoring the fact that paths exercised by different seed inputs are not equally vulnerable. This results in wasting time testing uninteresting paths rather than vulnerable paths, thus reducing the efficiency of vulnerability detection. In this paper, we present a solution, NeuFuzz, using the deep neural network to guide intelligent seed selection during graybox fuzzing to alleviate the aforementioned limitation. In particular, the deep neural network is used to learn the hidden vulnerability pattern from a large number of vulnerable and clean program paths to train a prediction model to classify whether paths are vulnerable. The fuzzer then prioritizes seed inputs that are capable of covering the likely to be vulnerable paths and assigns more mutation energy (i.e., the number of inputs to be generated) to these seeds.
    [Show full text]
  • Intel® Software Guard Extensions: Data Center Attestation Primitives
    Intel® Software Guard Extensions Data Center Attestation Primitives Installation Guide For Windows* OS Revision <1.0> <3/10/2020> Table of Contents Introduction .......................................................................................................................... 3 Components – Detailed Description ....................................................................................... 4 Platform Configuration .......................................................................................................... 6 Windows* Server OS Support ................................................................................................. 7 Installation Instructions ......................................................................................................... 8 Windows* Server 2016 LTSC ................................................................................................................. 8 Downloading the Software ........................................................................................................................... 8 Installation .................................................................................................................................................... 8 Windows* Server 2019 Installation ....................................................................................................... 9 Downloading the Software ........................................................................................................................... 9 Installation
    [Show full text]
  • Cascading Style Sheet Web Tool
    CASCADING STYLE SHEET WEB TOOL _______________ A Thesis Presented to the Faculty of San Diego State University _______________ In Partial Fulfillment of the Requirements for the Degree Master of Science in Computer Science _______________ by Kalthoum Y. Adam Summer 2011 iii Copyright © 2011 by Kalthoum Y. Adam All Rights Reserved iv DEDICATION I dedicate this work to my parents who taught me not to give up on fulfilling my dreams. To my faithful husband for his continued support and motivation. To my sons who were my great inspiration. To all my family and friends for being there for me when I needed them most. v ABSTRACT OF THE THESIS Cascading Style Sheet Web Tool by Kalthoum Y. Adam Master of Science in Computer Science San Diego State University, 2011 Cascading Style Sheet (CSS) is a style language that separates the style of a web document from its content. It is used to customize the layout and control the appearance of web pages written by markup languages. CSS saves time while developing the web page by applying the same layout and style to all pages in the website. Furthermore, it makes the website easy to maintain by just editing one file. In this thesis, we developed a CSS web tool that is intended to web developers who will hand-code their HTML and CSS to have a complete control over the web page layout and style. The tool is a form wizard that helps developers through a user-friendly interface to create a website template with a valid CSS and XHTML code.
    [Show full text]
  • Formalizing Markup Languages for User Interface
    LU´IS GONZAGA MARTINS FERREIRA FORMALIZING MARKUP LANGUAGES FOR USER INTERFACE Dissertac¸ao˜ para Mestrado em Informatica´ Escola de Engenharia UNIVERSIDADE DO MINHO Braga, 2005 LU´IS GONZAGA MARTINS FERREIRA FORMALIZING MARKUP LANGUAGES FOR USER INTERFACE Dissertac¸ao˜ submetida a` Universidade do Minho para obtenc¸ao˜ do grau de Mestre em Informatica,´ ar´ ea de especializac¸ao˜ em Sistemas Distribu´ıdos, Comunicac¸oes˜ por Computador e Arquitectura de Computadores, elabo- rada sob a orientac¸ao˜ do Professor Doutor Jose´ Nuno de Oliveira, Pro- fessor Associado do Departamento de Informatica´ da Universidade do Minho. Dissertac¸ao˜ desenvolvida no ambitoˆ do Projecto EUREKA IKF (E!2235) Escola de Engenharia UNIVERSIDADE DO MINHO Braga, 2005 A` Ana, Aninhas e Ritinha Abstract This document presents a Dissertation theme, as integral part of Masters Degree in Distributed Systems, Computers Architecture and Computers Communication. The work has as primary objective the application of formal methods in the specifi- cation of presentation layer. Even reaching several relevance HCI concerns, the scope focus essentially on the way how formal methods can be explored to specify user in- terfaces described using markup languages. The state-of-the-art analysis of user interface markup languages and UIML - User Interface Markup Language formal specification are main contributions. Therefore the tabular graphical object OLAP main features are formally specified in VDM-SL and animated using UIML. This research should be considered as a contribution towards a definition of a visual component library , with user interfaces components composition and reuse. i Acknowledgements I would like to thank my supervisor Professor Jose´ Nuno Oliveira, member of DI (Department of Informatics, Minho University1), who encouraged all formal methods research and initiatives at the University, for his useful support and advice during this work.
    [Show full text]
  • Opengl Install Guide
    OpenGL Install Guide Windows Install your favorite IDE. This tutorial assumes that you have Microsoft Visual Studio 6.0 (available from the CS Department Software Library as of Autumn 2004) installed on your machine. See specific IDE guides at the end of this document for more information. Install OpenGL OpenGL v1.1 software runtime is included as part of operating system for WinXP, Windows 2000, Windows 98, Windows 95 (OSR2) and Windows NT. If you think your copy is missing, the OpenGL v1.1 libraries are also available as the self- extracting archive file from the Microsoft website, via this url: http://download.microsoft.com/download/win95upg/info/1/W95/EN-US/Opengl95.exe OpenGL Libraries and header files are • opengl32.lib • glu32.lib • gl.h • glu.h Install GLUT GLUT is not normally pre-installed. You can download it from: http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip Install GLUT by following the instructions in the README file (copy and pasted here): Copy the files: 1. glut32.dll to %WinDir%\System, 2. glut32.lib to $(MSDevDir)\..\..\VC98\lib 3. glut.h to $(MSDevDir)\..\..\VC98\include\GL. Use OpenGL & GLUT in your source code 1. Start Visual C++ and create a new empty project of type “Win32 Console Application.” 2. To test your setup, add a simple GLUT program to the project like “drawCircle.cpp” from our sample programs. 3. You should only need to #include <GL/glut.h>. It includes the other necessary dependent libraries. You might need to modify our example programs to fit this requirement.
    [Show full text]