Presentation is loading. Please wait.

Presentation is loading. Please wait.

HTML, MATLAB & Delphi Aleksey Charapko 11/3/13. HTML Markup Language  Created at CERN for scientific purposes  No executable code  Controls the “look”

Similar presentations


Presentation on theme: "HTML, MATLAB & Delphi Aleksey Charapko 11/3/13. HTML Markup Language  Created at CERN for scientific purposes  No executable code  Controls the “look”"— Presentation transcript:

1 HTML, MATLAB & Delphi Aleksey Charapko 11/3/13

2 HTML Markup Language  Created at CERN for scientific purposes  No executable code  Controls the “look” of the document

3 HTML Widely used on the Internet Many versions exist  Most current version is HTML5 Still not an official standard Widely used Not fully supported

4 HTML Basic structure of HTML is a tag Tags define elements placed on the page  Tag is a markup command  Looks like a text inside angled braces Ex.,  Tags are often paired Opening and closing tags  Ex.,

5 HTML Has a number of defined tags All non tags are displayed on the screen as text  Ignores double white spaces and new lines  New lines are markup Tags exists for new lines

6 HTML Parsing  Many parsers exists – Browsers  HTML is parsed into DOM (Document Object Model) Tree structure, can be manipulated with JavaScript

7 HTML Example Example 0 HTML Example #0 This is a correct HTML file

8 HTML Parsing Most parsers are not “Strict”  Allow for errors in HTML  Have error correction mechanisms  Degrades readability Makes developers careless

9 HTML Tag Soup Tag Soup: Example 1 This is a tag soup example In this example child tag closes after the parent tag

10 HTML Parsing How much of HTML is correct? validator.w3.org  www.unf.edu? www.unf.edu  www.unf.edu/~ree/ ?  www.google.com ? www.google.com

11 HTML Time Proven  20+ years Easy to use Hard to follow standards

12 MATLAB Scientific language  Used in research, engineering and education Interpreted Procedural OOP

13 MATLAB Comes bundled with MATLAB software Available for Windows, Linux, Mac OS Mobile app availability  Runs calculations in a cloud.

14 MATLAB Matrices MATrix LABoratory  Matrix manipulation  2x3 Matrix: MyMatrix = [4 5 7; 3 8 2]  Matrix Operations Must adhere to rules of matrix operations

15 MATLAB Matrices myMatrix = [4 5 7; 3 8 2]; myOtherMatrix = [1 2 3; 9 8 7]; ans = myMatrix * myOtherMatrix; “Inner matrix dimensions must agree” error myMatrix = [4 5 7; 3 8 2]; MyOtherMatrix2 = [1 2; 9 8; 3 4]; ans = myMatrix * MyOtherMatrix2 Result: ans = 70 76 81 78

16 MATLAB Matrices Matrix is not an array  Can hold only numeric data types MATLAB supports cells which can hold non- numeric data types

17 MATLAB Supports integration with other languages  C/C++, Fortran, etc. Requires special MATLAB function to be written  Java Can interface straight form the MATLAB code

18 MATLAB & Java Seamless integration with Java xmlObj is Java object  getChildNodes is method ob xmlObj children is another Java Object xmlObj = xmlread('file.xml') children = xmlObj.getChildNodes; children = children.item(0);

19 MATLAB Data Types Implicit Data types  Coercion is widespread  Can implicitly convert from MATLAB data types to non-MATLAB types  In some cases explicit conversion is required

20 MATLAB Many more interesting features: function [x, y] foo (a) x = 2 * a; if x > 10 y = a + 5; else y = 5 end Multiple returns No semicolon – prints the output Many structures end with “end” keyword

21 MATLAB Intuitive and easy to read  Somewhat confusing when accessing other languages Somewhat slow  Especially when allocating memory Have been in use for many years

22 Delphi Object Oriented Dialect of Object Pascal  Object Pascal originally developed by Apple

23 Delphi IDE

24 Delphi Based On Pascal  Has many pascal features begin... end blocks := assignment operator common for languages of the era

25 Delphi Strongly typed Flexible with Enumerated types  Can define sets of primitives of Enums  Sub-ranges of Primitives or Enums

26 Delphi var SmallNums : Set of 0..55; // Set of the 56 set members begin // We have a range of 0 to 55 values that we can set SmallNums := [3..12,23,30..32]; // Set some of the members on if 12 in SmallNums then ShowMessage('12 is in SmallNums') else ShowMessage('12 is NOT in SmallNums'); if 13 in SmallNums then ShowMessage('13 is in SmallNums') else ShowMessage('13 is NOT in SmallNums') Result: 12 is in SmallNums 13 is NOT in SmallNums

27 Delphi Delphi does not provide a garbage collection  Programer responsible for memory deallocation Supports functional programming  No variables/objects  Less memory leaks

28 Delphi RAD Often used for RAD and Prototyping  Rapid Application Development Delphi IDE has tools for RAD Languages facilitates RAD  Modular structure  Verbose declarations  Easy to read code

29 Delphi Easy to read  Yet hard to write Fast to develop Have been in use for 20+ years


Download ppt "HTML, MATLAB & Delphi Aleksey Charapko 11/3/13. HTML Markup Language  Created at CERN for scientific purposes  No executable code  Controls the “look”"

Similar presentations


Ads by Google