The document provides information about a programming languages course, including:
- The lecturer's details and contact information.
- Assessment criteria including tutorials, assignments, exams.
- An outline of course topics such as language categories, evaluation criteria, and implementation methods.
- References and resources used in the course.
Workplace harassment includes any unwelcome conduct that denigrates or shows hostility toward an individual based on protected characteristics like race, gender, or religion. Sexual harassment is a form of sex discrimination that involves unwanted conduct of a sexual nature. Harassment is illegal under federal and state civil rights laws, which require employers to prevent and address harassment. Employers must take prompt action to investigate complaints, discipline offenders, and ensure retaliation does not occur. Employees should report harassment to a supervisor or HR and fully cooperate with any investigation.
Controllers handle web requests from users and interact with views and models. Views display templates filled with application data and convert it to HTML. Models represent and wrap application data stored in the database. Helpers assist models, views, and controllers. Common Rails methods include link_to for creating links and migrations for modifying the database schema by adding, removing, or changing columns.
The document discusses lexical analysis, which is the first stage of syntax analysis for programming languages. It covers terminology, using finite automata and regular expressions to describe tokens, and how lexical analyzers work. Lexical analyzers extract lexemes from source code and return tokens to the parser. They are often implemented using finite state machines generated from regular grammar descriptions of the lexical patterns in a language.
This document discusses key concepts related to variables in programming languages including names, bindings, scopes, and lifetimes. It covers different types of variables such as static, stack dynamic, and heap dynamic variables. It also compares static and dynamic scoping models and how they determine variable visibility. The referencing environment is defined as the collection of all visible variables for a given statement.
The document discusses syntax analysis and parsing. It covers context-free grammars, Backus-Naur Form (BNF), Extended BNF, and different parsing techniques like recursive descent parsing and LL parsing. It also discusses Scala's combinator parser, which uses parser combinators to parse input based on a grammar.
The document provides information about a programming languages course, including:
- The lecturer's details and contact information.
- Assessment criteria including tutorials, assignments, exams.
- An outline of course topics such as language categories, evaluation criteria, and implementation methods.
- References and resources used in the course.
Workplace harassment includes any unwelcome conduct that denigrates or shows hostility toward an individual based on protected characteristics like race, gender, or religion. Sexual harassment is a form of sex discrimination that involves unwanted conduct of a sexual nature. Harassment is illegal under federal and state civil rights laws, which require employers to prevent and address harassment. Employers must take prompt action to investigate complaints, discipline offenders, and ensure retaliation does not occur. Employees should report harassment to a supervisor or HR and fully cooperate with any investigation.
Controllers handle web requests from users and interact with views and models. Views display templates filled with application data and convert it to HTML. Models represent and wrap application data stored in the database. Helpers assist models, views, and controllers. Common Rails methods include link_to for creating links and migrations for modifying the database schema by adding, removing, or changing columns.
The document discusses lexical analysis, which is the first stage of syntax analysis for programming languages. It covers terminology, using finite automata and regular expressions to describe tokens, and how lexical analyzers work. Lexical analyzers extract lexemes from source code and return tokens to the parser. They are often implemented using finite state machines generated from regular grammar descriptions of the lexical patterns in a language.
This document discusses key concepts related to variables in programming languages including names, bindings, scopes, and lifetimes. It covers different types of variables such as static, stack dynamic, and heap dynamic variables. It also compares static and dynamic scoping models and how they determine variable visibility. The referencing environment is defined as the collection of all visible variables for a given statement.
The document discusses syntax analysis and parsing. It covers context-free grammars, Backus-Naur Form (BNF), Extended BNF, and different parsing techniques like recursive descent parsing and LL parsing. It also discusses Scala's combinator parser, which uses parser combinators to parse input based on a grammar.
Slidecast about the American economy at the time. In this slidecast I talk about creating jobs and the financial crisis. I also give my personal opinion and draw conclusions out of 3 self-picked articles.
The document discusses metamodeling and its use in the MDA framework. It defines key terms like model, language, metamodel, and metalanguage. A metamodel is a model that defines the constructs and rules of a modeling language. It allows unambiguous definition of languages so transformation tools can process models. Transformation rules in a definition reference the source and target metamodels to specify how one model transforms to another. Metamodeling provides the mechanism to formally define modeling languages in MDA.
This document discusses various data types in programming languages including primitive, string, array, record, union, and pointer types. It provides details on how each type is defined and implemented in different languages. Primitive types include integers, floats, decimals, booleans, characters. Strings can have static or dynamic lengths. Arrays can be static, dynamic and allow various index types and initialization. Records group heterogeneous data under field names. Unions allow storing different types in a variable. Pointers provide indirect addressing but require careful use to avoid dangling references.
This document discusses subprograms (also called subroutines) in programming languages. It covers:
- The basic definitions and characteristics of subprograms, including headers, parameters, and local variables.
- Different parameter passing methods like pass-by-value, pass-by-reference, and their implementation in common languages.
- Additional features of subprograms including overloading, generics, and functions passing subprograms as parameters.
This document provides an overview of logic programming and the logic programming language Prolog. It discusses key concepts in logic programming like predicates, clauses, resolution, and backward chaining. It also describes the basic syntax and execution model of Prolog, including how it uses unification, backtracking, and trace to evaluate queries against a knowledge base of facts and rules.
The document provides an overview of management principles and concepts. It defines management as the process of achieving organizational goals efficiently and effectively through planning, organizing, staffing, leading, and controlling. The document also discusses Henri Fayol's 14 principles of management, McGregor's Theory X and Y, the roles and skills of managers, and the functions and levels of management.
The document discusses configuring websocket on Apache by installing Apache on CentOS, installing the websocket_rails gem and Redis, configuring a virtual host with a proxy server, and starting the websocket_rails server. Key steps include installing Apache, installing websocket_rails and Redis, configuring a virtual host to proxy websocket requests to the websocket_rails server on port 3001, and initializing websockets in JavaScript by connecting to the server hostname and port.
How to build a news website use CMS wordpressbaran19901990
This tutorial wil show you, how to build a news website use CMS Wordpress step by step. From basic to advantage. I think that this tutorial is amazing and very basic for newbie.
Implementing subprograms requires saving execution context, allocating activation records, and maintaining dynamic or static chains. Activation records contain parameters, local variables, return addresses, and dynamic/static links. Nested subprograms are supported through static chains that connect activation records. Dynamic scoping searches the dynamic chain for non-local variables, while shallow access uses a central variable table. Blocks are implemented as parameterless subprograms to allocate separate activation records for block variables.
This document discusses principles of sequence control in programming languages. It covers expressions, assignment statements, selection statements like if/else and switch/case, and iterative statements like for, while, and loops controlled by data structures. It provides examples of how these concepts are implemented in different languages like C, Pascal, and C#. Unconditional branching with goto is also discussed, noting that while powerful it can hurt readability so most modern languages avoid or restrict it.
To install git on Ubuntu, the document outlines 6 steps: 1) create a GitHub account using your company email, 2) read documentation on using git, 3) install git via terminal commands, 4) configure git with your name and email, 5) verify settings, and 6) review common git commands like cloning, adding, committing, and pushing files. The summary is to create a GitHub account, get added to your company's GitHub by sending your profile URL to your leader.
Ruby has methods to convert objects to different data types: to_s converts objects to strings, to_i converts objects to integers, and to_a converts objects to arrays. Arrays in Ruby are denoted using square brackets [].
This document provides instructions for various commands in Vim and Git. In Vim, I inserts text while in Normal mode commands like :wq save and quit. dd deletes the current line while yy copies it. Git commands like git add stage changes and git commit commits them to the local repository. git push pushes local changes to the remote server repository.
Slidecast about the American economy at the time. In this slidecast I talk about creating jobs and the financial crisis. I also give my personal opinion and draw conclusions out of 3 self-picked articles.
The document discusses metamodeling and its use in the MDA framework. It defines key terms like model, language, metamodel, and metalanguage. A metamodel is a model that defines the constructs and rules of a modeling language. It allows unambiguous definition of languages so transformation tools can process models. Transformation rules in a definition reference the source and target metamodels to specify how one model transforms to another. Metamodeling provides the mechanism to formally define modeling languages in MDA.
This document discusses various data types in programming languages including primitive, string, array, record, union, and pointer types. It provides details on how each type is defined and implemented in different languages. Primitive types include integers, floats, decimals, booleans, characters. Strings can have static or dynamic lengths. Arrays can be static, dynamic and allow various index types and initialization. Records group heterogeneous data under field names. Unions allow storing different types in a variable. Pointers provide indirect addressing but require careful use to avoid dangling references.
This document discusses subprograms (also called subroutines) in programming languages. It covers:
- The basic definitions and characteristics of subprograms, including headers, parameters, and local variables.
- Different parameter passing methods like pass-by-value, pass-by-reference, and their implementation in common languages.
- Additional features of subprograms including overloading, generics, and functions passing subprograms as parameters.
This document provides an overview of logic programming and the logic programming language Prolog. It discusses key concepts in logic programming like predicates, clauses, resolution, and backward chaining. It also describes the basic syntax and execution model of Prolog, including how it uses unification, backtracking, and trace to evaluate queries against a knowledge base of facts and rules.
The document provides an overview of management principles and concepts. It defines management as the process of achieving organizational goals efficiently and effectively through planning, organizing, staffing, leading, and controlling. The document also discusses Henri Fayol's 14 principles of management, McGregor's Theory X and Y, the roles and skills of managers, and the functions and levels of management.
The document discusses configuring websocket on Apache by installing Apache on CentOS, installing the websocket_rails gem and Redis, configuring a virtual host with a proxy server, and starting the websocket_rails server. Key steps include installing Apache, installing websocket_rails and Redis, configuring a virtual host to proxy websocket requests to the websocket_rails server on port 3001, and initializing websockets in JavaScript by connecting to the server hostname and port.
How to build a news website use CMS wordpressbaran19901990
This tutorial wil show you, how to build a news website use CMS Wordpress step by step. From basic to advantage. I think that this tutorial is amazing and very basic for newbie.
Implementing subprograms requires saving execution context, allocating activation records, and maintaining dynamic or static chains. Activation records contain parameters, local variables, return addresses, and dynamic/static links. Nested subprograms are supported through static chains that connect activation records. Dynamic scoping searches the dynamic chain for non-local variables, while shallow access uses a central variable table. Blocks are implemented as parameterless subprograms to allocate separate activation records for block variables.
This document discusses principles of sequence control in programming languages. It covers expressions, assignment statements, selection statements like if/else and switch/case, and iterative statements like for, while, and loops controlled by data structures. It provides examples of how these concepts are implemented in different languages like C, Pascal, and C#. Unconditional branching with goto is also discussed, noting that while powerful it can hurt readability so most modern languages avoid or restrict it.
To install git on Ubuntu, the document outlines 6 steps: 1) create a GitHub account using your company email, 2) read documentation on using git, 3) install git via terminal commands, 4) configure git with your name and email, 5) verify settings, and 6) review common git commands like cloning, adding, committing, and pushing files. The summary is to create a GitHub account, get added to your company's GitHub by sending your profile URL to your leader.
Ruby has methods to convert objects to different data types: to_s converts objects to strings, to_i converts objects to integers, and to_a converts objects to arrays. Arrays in Ruby are denoted using square brackets [].
This document provides instructions for various commands in Vim and Git. In Vim, I inserts text while in Normal mode commands like :wq save and quit. dd deletes the current line while yy copies it. Git commands like git add stage changes and git commit commits them to the local repository. git push pushes local changes to the remote server repository.
1. Thương M i i n T 503007
BÀI TH C HÀNH S 4
Tóm t t n i dung th c hành:
• T ng quan v portlets
• Database portlets
1. T ng quan v portlets
N i dung cùa Portals là t h p c a các Portlets & Items
Cùng v i item, portlet ư c xem là thành ph n cơ b n c a 1 trang Portal, là tool
giúp t o ng nghĩa & tính ng cho trang Portal. Ví d , t o dynamic charts, tables,
th bi u di n d li u mua bán, tìm ki m 1 n i dung ã ư c phân lo i theo
categories…
Trong n i dung th c hành này, các b n s tìm hi u v :
Bài th c hành s 4 Trang 1
2. Thương M i i n T 503007
• Ph n 1 Thêm portlet vào 1 trang
• Ph n 2 Hi u ch nh 1 portlet
• Ph n 3 Th hi n hay che d u portlet header & portlet border
• Ph n 4 Thay i kho ng cách gi a các portlet & item
• Ph n 5 Xóa porlet
• Ph n 6 Chuy n portlet sang m t region khác
• Ph n 7 Share portlet gi a các trang
Portlet ch có th ư c add trên nh ng region ki u portlet. M i portlet region có
th có m t ho c nhi u portlet.
1.1. Thêm portlet vào m t trang
Các bư c thêm portlet vào m t trang:
1. Chuy n sang ch Edit Mode (n u mu n t t c user th y ư c portlet)
ho c Personalize Mode (n u ch cá nhân th y portlet).
2. Click Add Portlet trong region d nh thêm portlet
Chú ý:
• N u m t region ã ch a item thì region ó không th ch a portlet n a.
• N u b n ang t o 1 view riêng c a b n (personalizing) & không tìm
th y portlet, b n có th add tab trên trang ó & s d ng portlet region
Bài th c hành s 4 Trang 2
3. Thương M i i n T 503007
m c nh c a tab ó. Trong trư ng h p này, b n ph i có quy n &
trang ó ph i có trư c m t s tab.
3. Trong Portlet Repository, nh p tên portlet trong ô Search & click Go
tìm ư c portlet, ho c click repository link xác nh ư c portlet.
Portlet Repository:
• Portlet Builder: Portlet xây d ng report, chart & form t nh ng
ngu n d li u khác nhau, bao g m t cơ s d li u, web services & file
XML.
• Portal Content Tools: Portlet xem, tìm ki m & i u khi n n i dung
Portal.
• Published Portal Content: Portlet xu t b n các n i dung ư c t
ch c b i page groups.
• Portlet Staging Area: Portlet & Provider không ư c phân lo i &
ư c ăng kí m i.
• Portal Community News: Portlet thông báo các s n ph m, kĩ thu t
m i nh t & các tin t c c ng ng.
• Administration Portlets: Portlet cho vi c qu n tr Portal, OID, cơ s
d li u Oracle & các báo cáo Oracle.
Bài th c hành s 4 Trang 3
4. Thương M i i n T 503007
• Shared Portlet: portlet v i nh ng hi u ch nh (customizations) có th
ư c share gi a các trang.
4. xem l i portlet trư c khi add vào page, click Preview icon ngay c nh
tên c a portlet.Click OK k t thúc quá trình add portlet vào page.
Chú ý: th t portlet trong Selected Portlet list cũng là th t xu t hi n c a
chúng trên trang c a b n. thay i th t , highlight tên c a portlet & s
d ng các Move icon phía bên ph i c a Selected Portlet list
Ngoài ra, có th s d ng Arrange Portlets Icon trên vùng portlet region
ang c n s p x p l i.
1.2. Hi u ch nh 1 portlet
a. Phân bi t Edit Default, Edit Instance & Personlize Portlet
Khi hi u ch nh 1 portlet, có th b n thay i giá tr chung cho t t c các portlet,
giá tr cho m t portlet hay ch thay i nh ng giá tr c a portlet mà ch có b n
m i th y ư c.
Hành ng Cách g i Ý nghĩa
Edit Defaults Trong Edit page mode click Hi u ch nh các giá tr liên
Edit Defaults icon g n quan n 1 ki u portlet xác
portlet. nh.
T t c user truy xu t portlet
u có th th y ư c thay i
Edit Defaults Icon
này trong quá trình portlet
ang ư c ch nh s a.
Bài th c hành s 4 Trang 4
5. Thương M i i n T 503007
Edit Instance Trong Edit page mode click Hi u ch nh các giá tr chung
Actions icon g n portlet. cho t t c các portlet, ch ng
h n như tên portlet, display
Actions Icon option hay cache setting.
T t c user truy xu t portlet
u có th th y ư c thay i
Ch n Edit Portlet Instance. này trong quá trình portlet
ang ư c ch nh s a.
Personalize Trong View page mode, click Personalize các giá tr liên
Personalize link trong portlet quan n m t ki u portlet xác
header. nh.
Ch user ang th c hi n
personalize portlet m i có th
th y ư c thay i trên portlet
trong lúc hi u ch nh.
b. Hi u ch nh default portlet: sinh viên t th c hành
c. Hi u ch nh instance portlet:
Chú ý các field sau:
• Name: tên cho portlet instance. Tên này ph i là duy nh t.
• Display Name: Tên th hi n ra bên ngoài. N u Display Name không
ư c nh p thì giá tr m c nh c a nó s là Name.
• Display Option: có th l a ch n các giá tr
Bài th c hành s 4 Trang 5
6. Thương M i i n T 503007
o Portlet Displayed Directly In Page Area
Portlet th hi n m t cách tr c ti p trên host page. V i l a ch n này
ta có th gi i h n chi u cao c a portlet: Limit Portlet Height to n
Pixels
o Link That Displays Portlet In Full Browser Window
User click link & browser window hi n t i ư c refresh th hi n
portlet.
Khi ch n option này c n ph i hi u ch nh attribute c a host region
b ng cách: click Edit Region icon/Attributes tab/Select
Attribute/ch n Link – Display Name hay Link – Display Name
(Durable)/OK
o Link That Displays Portlet In New Browser Window
User click vào link & browser window m i ư c m ra th hi n
portlet.
Khi ch n option này c n ph i hi u ch nh attribute c a host region là
Link – Display Name hay Link - Display Name (durable)
• Portlet Caching: xác nh cách portlet ư c cache.
• Portlet Caching Level: nh ra m c caching cho portlet instance.
• Description: miêu t ng n g n v portlet.
• Category drop-down list: ch n lo i category phân lo i cho portlet.
• Available Perspective list: ch n m t ho c nhi u perspective & chuy n
chúng sang Displayed Perspectives list.
d. Personalize m t portlet: sinh viên t th c hành.
1.3. Th hi n hay che d u portlet header & portlet border
Portlet header: bao g m m t banner màu s c trên nh c a portlet, cùng v i
display name c a portlet & m t s ư ng link.
Portlet border: bao quanh portlet cùng v i 1 ư ng m nh phù h p v i màu c a
header.
Bài th c hành s 4 Trang 6
7. Thương M i i n T 503007
Khi b n th hi n hay che d u header & border c a portlet, thì i u này s nh
hư ng n t t c các portlet trong cùng region. Nghĩa là không có cách nào
ch nh riêng header hay border cho cho 1 portlet trong cùng region. Portlet
header & portlet border ch áp d ng cho portlet region.
Các bư c th hi n portlet header & portlet border:
1. Click Edit Region icon trên region c n hi u ch nh
2. Ph n Portlet Display Option, tùy ch n Show Portlet Headers & Show
Portlet Borders
Bài th c hành s 4 Trang 7
8. Thương M i i n T 503007
Tương t , có th th hi n hay che d u các portlet header link:
• Personalize—Cho phép user t o góc nhìn cá nhân trên 1 portlet
• Help—Connect v i portlet help text
• About—Connect v i portlet description
• Details—d n n view chi ti t hơn v portlet
• Refresh—Refresh portlet mà không c n refresh nguyên trang
• Remove—xóa portlet
• Collapse/Restore—T i thi u hóa & t i a hóa th hi n c a portlet trong
góc nhìn cá nhân c a user v 1 trang.
1.4. Thay i kho ng cách gi a các portlet &item
Ngư i dùng có th i u ch nh kho ng cách khác nhau gi a các portlet trên cùng
m t region.
Bài th c hành s 4 Trang 8
9. Thương M i i n T 503007
Các bư c thay i kho ng cách gi a các item & portlet:
1. Click Edit Region icon trên region c n hi u ch nh
2. Trên Region Display Options, nh p kho ng cách (pixel) vào field Space
Between [Portlets or Items].
3. Nh p giá tr vào Space Around [Portlets or Items].
4. Click OK lưu thay i.
1.5. Xóa portlet
a. Xóa 1 portlet:
Bài th c hành s 4 Trang 9
10. Thương M i i n T 503007
• Click Actions icon c nh portlet c n delete
• Click Delete
• Click Yes xác nh n l nh xóa.
b. Xóa cùng lúc nhi u Portlet
• Click Edit Views: Layout trên nh trang
• Ch n các portlet c n xóa
Bài th c hành s 4 Trang 10
11. Thương M i i n T 503007
• Click Actions: delete button
• Trên màn hình xác nh n, ch n Yes
1.6. Chuy n portlet sang m t region khác
a. D ch chuy n 1 portlet
• Click Action icon c nh portlet c n di chuy n
• Click Move to another region
• Ch n region m i & click Move Portlet
Bài th c hành s 4 Trang 11
12. Thương M i i n T 503007
b. D ch chuy n nhi u portlet
Tương t xóa nhi u portlets, sinh viên t th c hành.
1.7. Share portlet gi a các trang
a. Share 1 portlet
• Click Action icon c nh portlet c n share
• Click Share Instance
• Click Yes
b. Share nhi u portlet
Tương t xóa nhi u portlets, sinh viên t th c hành.
Bài th c hành s 4 Trang 12
13. Thương M i i n T 503007
c. Thêm 1 th c th portlet ư c chia s vào 1 trang
• Click Add Portlet icon trên region d nh add portlet.
• Click Shared Portlet
• Click tên portlet add portlet vào Selected Portlet List
• Click OK
2. Database portlets
Database Portlet là portlet có s d ng d li u trong cơ s d li u. Có nhi u lo i
Database Portlet như: Form, Report, Chart, Calendar,… ây ch hư ng d n cách
t o Database Portlet lo i Form, nh ng lo i khác SV t o tương t .
Các bư c t o database portlet lo i Form (based on a table or view):
Bài th c hành s 4 Trang 13
14. Thương M i i n T 503007
1. Click Navigator link, click Providers tab
2. Click Locally Built Providers
3. Có th t o m t Database Provider m i ho c add vào database provider ã có.
t o m i , click Create New Database Provider
Ch n Name, Display Name và Schema cho database provider, click OK
Bài th c hành s 4 Trang 14
15. Thương M i i n T 503007
4. Click vào database provider v a t o, ch n Create new Form t o form
m i
5. Click Form based on table or view
Bài th c hành s 4 Trang 15
16. Thương M i i n T 503007
6. Nh p thông tin cho Form, click Next
Bài th c hành s 4 Trang 16
17. Thương M i i n T 503007
7. Ch n table tương ng, click Next
8. Ch n cách hi n th d li u trên form, click Next
9. Ch n các tùy ch n cho Form, click Next
10. Ch nh header, footer…, click Next
Bài th c hành s 4 Trang 17
18. Thương M i i n T 503007
11. Chèn các o n code PL/SQL (n u c n), click Finish
12. Click Run as Portlet xem trư c
Bài th c hành s 4 Trang 18
19. Thương M i i n T 503007
13. Ch n Manage tab và click Generate
14. Ch n Access tab, và ánh d u ch n Public As Portlet
Các bư c ưa database portlet vào portal
1. Ch n page c n ưa portlet vào, sau ó click Add Portlet icon
Bài th c hành s 4 Trang 19
20. Thương M i i n T 503007
2. Click Go
3. Ch n database portlet tương ng add vào page
Bài th c hành s 4 Trang 20
21. Thương M i i n T 503007
4. Database portlet tương ng ư c add vào page
Bài t p:
• Add & s p x p các Portlet sau theo th t mong mu n c a b n: HTML
portlet, Favorites portlet, Search portlet, User Managed Pages portlet,
Page portlet, Example Wizard Chart, Example Calendar Result …
• Ngoài ra có 1 s portlet quan tr ng liên quan n cơ s d li u, sinh viên có
th nghiên c u trư c như: Report portlet, SSO/OID portlet...
• Sinh viên t tìm hi u các database portlet còn l i
• T o 1 form cho phép ngư i dùng nh p thông tin t hàng (sách, thi t b s ,
t vé…), lưu thông tin vào database khi ngư i dùng click Submit.
Bài th c hành s 4 Trang 21