A new reserved keyword "private" has been added for declaring a sig, fun, pred, field, or an entire imported module as being "private" to this module (and does not show up in the namespace of other modules that import this module).
module moduleA open moduleB |
module moduleB sig Person { favorite: Book, knows: set Person, private likes: set Person } private sig Book { year: Int } fun allBook: set Book { Book } private fun union[a, b: set univ]: set univ { a+b } |
From moduleA, you can refer to "Person", "favorite", "knows", and "allBook".
You cannot refer to "likes" because it is a private field, and you cannot refer
to "union" because it is a private function.
From moduleA, you cannot refer to "Book" since it is a private sig,
and you cannot refer to "year" because it is a field in a private sig (and thus
it is automatically private).
The important thing to note here is this is purely a namespace management mechanism, and you may still be able to access these "hidden" values via other names. For example, if you have Person X, you can access X.favorite to see the Book atom corresponding to his favorite book, even though you cannot refer to the Book signature by name. Likewise, you can get every atom in the Book sig by calling the "allBook" function.
module moduleA open moduleB |
module moduleB private open moduleC open moduleD sig B { } |
module moduleC sig C { } |
module moduleD sig D { } |
In moduleB, you can certainly refer to B, C, and D.
In moduleA, you can refer to B and D, but you cannot refer to C, since moduleB imported moduleC as a "private import".


#include <file-system.h>
Public Types | |
| using | lockable_type = L |
| using | value_type = T |
Public Member Functions | |
Constructors & Destructor | |
| template<typename ... Args> | |
| file_system_lockable (const char *name, block_device &device, lockable_type &locker, Args &&... args) | |
| virtual | ~file_system_lockable () override |
Public Member Functions | |
| virtual int | vmount (const char *path, unsigned int flags, std::va_list args) override |
| Mount file system. | |
| virtual int | umount (int unsigned flags=0) override |
| Unmount file system. | |
| virtual file * | vopen (const char *path, int oflag, std::va_list args) override |
| virtual directory * | opendir (const char *dirpath) override |
| virtual int | mkdir (const char *path, mode_t mode) override |
| virtual int | rmdir (const char *path) override |
| virtual void | sync (void) override |
| virtual int | chmod (const char *path, mode_t mode) override |
| virtual int | stat (const char *path, struct stat *buf) override |
| virtual int | truncate (const char *path, off_t length) override |
| virtual int | rename (const char *existing, const char *_new) override |
| virtual int | unlink (const char *path) override |
| virtual int | utime (const char *path, const utimbuf *times) override |
| virtual int | statvfs (struct statvfs *buf) override |
| value_type & | impl (void) const |
Public Member Functions | |
| using | deferred_files_list_t = utils::intrusive_list< file, utils::double_list_links, &file::deferred_links_ > |
| using | deferred_directories_list_t = utils::intrusive_list< directory, utils::double_list_links, &directory::deferred_links_ > |
| int | mkfs (int options,...) |
| virtual int | vmkfs (int options, std::va_list args) |
| int | mount (const char *path=nullptr, unsigned int flags=0,...) |
| file * | open (const char *path=nullptr, int oflag=0,...) |
| const char * | mounted_path (void) |
| const char * | name (void) const |
| void | add_deferred_file (file *fil) |
| void | add_deferred_directory (directory *dir) |
| deferred_files_list_t & | deferred_files_list (void) |
| deferred_directories_list_t & | deferred_directories_list (void) |
| template<typename T > | |
| T * | allocate_file (void) |
| template<typename T , typename L > | |
| T * | allocate_file (L &locker) |
| template<typename T > | |
| T * | allocate_directory (void) |
| template<typename T , typename L > | |
| T * | allocate_directory (L &locker) |
| template<typename T > | |
| void | deallocate_files (void) |
| template<typename T > | |
| void | deallocate_directories (void) |
| block_device & | device (void) const |
| static file_system * | identify_mounted (const char **path1, const char **path2=nullptr) |
Definition at line 633 of file file-system.h.
|
inherited |
Definition at line 314 of file file-system.h.
|
inherited |
Definition at line 311 of file file-system.h.
| using os::posix::file_system_lockable< T, L >::lockable_type = L |
Definition at line 640 of file file-system.h.
| using os::posix::file_system_lockable< T, L >::value_type = T |
Definition at line 639 of file file-system.h.
| os::posix::file_system_lockable< T, L >::file_system_lockable | ( | const char * | name, |
| block_device & | device, | ||
| lockable_type & | locker, | ||
| Args &&... | args | ||
| ) |
Definition at line 1036 of file file-system.h.
|
overridevirtual |
Definition at line 1056 of file file-system.h.
|
inlineinherited |
Definition at line 824 of file file-system.h.
|
inlineinherited |
Definition at line 818 of file file-system.h.
|
inherited |
Definition at line 942 of file file-system.h.
|
inherited |
Definition at line 914 of file file-system.h.
|
inherited |
Definition at line 870 of file file-system.h.
|
inherited |
Definition at line 843 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1151 of file file-system.h.
|
inherited |
Definition at line 970 of file file-system.h.
|
inherited |
Definition at line 897 of file file-system.h.
|
inlineinherited |
Definition at line 836 of file file-system.h.
|
inlineinherited |
Definition at line 830 of file file-system.h.
|
inlineinherited |
Definition at line 812 of file file-system.h.
|
staticinherited |
Definition at line 621 of file file-system.cpp.
| file_system_lockable< T, L >::value_type & os::posix::file_system_lockable< T, L >::impl | ( | void | ) | const |
Definition at line 1224 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1119 of file file-system.h.
|
inherited |
Definition at line 470 of file file-system.cpp.
|
inherited |
Definition at line 504 of file file-system.cpp.
|
inherited |
|
inlineinherited |
Definition at line 792 of file file-system.h.
|
inherited |
Definition at line 672 of file file-system.cpp.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1107 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1181 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1129 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1161 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1214 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1139 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1171 of file file-system.h.
|
overridevirtual |
Unmount file system.
| flags | File system specific flags. |
| 0 | if successful, |
| -1 | otherwise and the variable errno is set to indicate the error. |
The root file system must be unmounted last, it cannot be unmounted if other mount points exists.
Reimplemented from os::posix::file_system.
Definition at line 1084 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1192 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1203 of file file-system.h.
|
virtualinherited |
Definition at line 482 of file file-system.cpp.
|
overridevirtual |
Mount file system.
| path | Path, terminated in / . If / or nullptr, the file system is mounted as root, i.e. the default if no other mount point matches. |
| flags | File system specific flags. |
| args | Optional arguments. |
| 0 | if successful, |
| -1 | otherwise and the variable errno is set to indicate the error. |
Reimplemented from os::posix::file_system.
Definition at line 1068 of file file-system.h.
|
overridevirtual |
Reimplemented from os::posix::file_system.
Definition at line 1096 of file file-system.h.


Matthew Starr
About
|
Portfolio
|
Contact
Portfolio
Word Guess
RPG Game
Trivia Game
Info Widget
Rock Paper Scissors


{% extends "layout.html" %} {% block body %}
Note: Anyone can see any link you enter here on the
page!


“Les Jeudi’s”, exhibition at the Centre Pompidou, Paris 2005
|
What was this exhibit? Graduate students from ENSAD, the French art school, got to interpret the permanent collection of the Centre Pompidou by juxtaposing their work next to the art in the museum. The goal of the exhibit was to provide new perspectives on the museum's collection. I was tasked to craft the exhibit catalogue (with art works that wouldn't be finished until the day of the opening)
So how do you make an exhibition catalogue with artwork that hasn't yet
been produced?
|


Hello, my name is Sharmarke Ibrahim. I was born April 29, 1994, which makes me 23 years old. I'm the second oldest of 6 siblings (yes I know that's a lot). Before starting Code Fellows, I was a Junior at the University of Washington Tacoma. I was majoring in Economics but shortly after starting I noticed that it was something I didn't have a passion for.
After a few quarter into my major, I meant a few friends who were doing Computer Science. I would see them always typing their code and talking about making the website/application do mind blowing things. I wanted to switch to a CS major but I had already invest 4+ years of my life on working towards my Econ degree. I just didn't have the time to start over and do all the pre-reqs required for the CS major. That was when I decided to go to Code Fellows. I knew what they taught here was increcible based on what my brother, an alumni of the program, told me and decided I would make the switch to web development. Quiet possibly the best decision I've made.
Salvia pinterest copper mug austin wolf. Single-origin coffee bitters vinyl pickled, cronut cornhole austin pork belly ugh. Echo park disrupt drinking vinegar squid, pickled meh cray retro air plant. Enamel pin pitchfork aesthetic copper mug, lyft tofu locavore pickled +1 paleo wolf austin. Portland pok pok distillery mixtape pickled.  Selfies man bun gentrify bushwick subway tile normcore.
Health goth 8-bit man braid kinfolk shoreditch direct trade occupy, mlkshk brunch godard banh mi pug hammock. Hoodie dreamcatcher kombucha fingerstache tacos, humblebrag glossier chillwave. Post-ironic thundercats blue bottle, try-hard brooklyn sartorial synth twee semiotics live-edge lyft. Chartreuse kale chips whatever, kogi wolf typewriter etsy pour-over hot chicken tbh. Activated charcoal subway tile biodiesel chartreuse glossier church-key, try-hard cliche ennui hammock helvetica echo park blog. Freegan portland tacos, tilde sriracha 3 wolf moon retro readymade thundercats cronut 90's viral hot chicken polaroid fanny pack.
Salvia pinterest copper mug austin wolf. Single-origin coffee bitters vinyl pickled, cronut cornhole austin pork belly ugh. Echo park disrupt drinking vinegar squid, pickled meh cray retro air plant. Enamel pin pitchfork aesthetic copper mug, lyft tofu locavore pickled +1 paleo wolf austin. Portland pok pok distillery mixtape pickled.  Selfies man bun gentrify bushwick subway tile normcore.
Health goth 8-bit man braid kinfolk shoreditch direct trade occupy, mlkshk brunch godard banh mi pug hammock. Hoodie dreamcatcher kombucha fingerstache tacos, humblebrag glossier chillwave. Post-ironic thundercats blue bottle, try-hard brooklyn sartorial synth twee semiotics live-edge lyft. Chartreuse kale chips whatever, kogi wolf typewriter etsy pour-over hot chicken tbh. Activated charcoal subway tile biodiesel chartreuse glossier church-key, try-hard cliche ennui hammock helvetica echo park blog. Freegan portland tacos, tilde sriracha 3 wolf moon retro readymade thundercats cronut 90's viral hot chicken polaroid fanny pack.


ASIDE.IO New Instance
Hosting Your Own Instance of ASIDE
It's now possible to spin up your own instance of ASIDE in just a few steps. Follow the guide below
to deploy a new version of the app and then configure the OAuth login.
Prerequisites
Before you can setup a new instance of ASIDE you're going to need a couple things:
-
A Heroku account
- Sign up is free at: https://www.heroku.com
-
A Salesforce org that you are a system administrator in
- This org will be used to contain the Connected App that facilitates the OAuth login ASIDE uses. This should probably be a developer edition or production organization, but any org will work. It's not necessarily the same org that you plan on logging into ASIDE with. It can be, but it does not need to be.
Deploy the Heroku Application
Click the button below to begin the deployment process for ASIDE. It will open a new page
which contains a form with a couple fields relating to the deployment.
Fill out the App name field. The App name will dictate what the URL is to access the application. For example, if the App name is "my-aside" then the URL is "https://my-aside.herokuapp.com". Click the Deploy app button.
Fill out the App name field. The App name will dictate what the URL is to access the application. For example, if the App name is "my-aside" then the URL is "https://my-aside.herokuapp.com". Click the Deploy app button.
Create the Connected App
From within Salesforce (and in the Lightning Experience UI), go to the setup menu. Type App Manager
in the Quick Find search, and click the App Manager setup item.
In the top right of the screen, you should see a button, New Connected App. Click the button to
begin creating the Connected App.
From the New Connected App screen, populate the first three required fields (Connected App Name, API Name, Contact Email); their values are not important. Scroll down to the "API (Enable OAuth Settings)" section and check the Enable OAuth Settings checkbox. A handful of additional fields should now be displaying in this section.
Populate the required field Callback URL with the URL to the instance of ASIDE you just deployed with "/auth" added to the end. For example, if your new instance of ASIDE is available at "https://my-aside.herokuapp.com" then the Callback URL is "https://my-aside.herokuapp.com/auth".
The last field you have to fill out to finish configuring the Connected App is the Selected OAuth Scopes field. Choose a value of "Full access (full)" and click the save button to finish configuring the Connected App.
Now that you have created a Connected App it has two fields which are populated by Salesforce on it's detail page: Consumer Key and Consumer Secret. Their values will be used to finish configuring the application in the next step.
From the New Connected App screen, populate the first three required fields (Connected App Name, API Name, Contact Email); their values are not important. Scroll down to the "API (Enable OAuth Settings)" section and check the Enable OAuth Settings checkbox. A handful of additional fields should now be displaying in this section.
Populate the required field Callback URL with the URL to the instance of ASIDE you just deployed with "/auth" added to the end. For example, if your new instance of ASIDE is available at "https://my-aside.herokuapp.com" then the Callback URL is "https://my-aside.herokuapp.com/auth".
The last field you have to fill out to finish configuring the Connected App is the Selected OAuth Scopes field. Choose a value of "Full access (full)" and click the save button to finish configuring the Connected App.
Now that you have created a Connected App it has two fields which are populated by Salesforce on it's detail page: Consumer Key and Consumer Secret. Their values will be used to finish configuring the application in the next step.
Add the Heroku Config Vars
As a final step, you will need to populate the Config Vars within Heroku in order for ASIDE's OAuth based
login to work. When logged into Heroku and viewing the application dashboard for the Heroku app you deployed earlier,
click the Settings tab. Within the Config Vars section click
Reveal Config Vars. Add the three new Config Vars detailed below.
-
CID
- This is the Consumer Key from the Connected App you created in Salesforce.
-
SEC
- This is the Consumer Secret from the Connected App you created in Salesforce.
-
URL
- This is the URL where the version of ASIDE is hosted at. The App name defined earlier will dictate what the URL is to access the application. For example, if the App name is "my-aside" then the URL is "https://my-aside.herokuapp.com".
All Done!
You have now deployed your own copy of ASIDE and configured OAuth to work. Your copy of ASIDE should be fully operational at
this point. If you still can't login, wait 10 minutes. The Connected App can sometimes take a bit to be available for use.
Thanks for using ASIDE!
Frequently Asked Questions
Below are some questions that might be on your mind after reading through this guide:
Why can't I login?
It takes a while for for the Connected App to be available for use sometimes. Wait 10 minutes and try again.
If that doesn't work, double check your configuration. If that doesn't work, read the
help for more info on login failures.
Is this really free?
It's free as described in this guide. By default the application will be configured to use the Heroku free tier.
To obtain more performance to host more users you may need to leave the free tier.
How do I setup SSL?
You can read more info about that
here.
How do I setup a custom domain?
Heroku has a knowledge article about this topic
here.
Will my version of the application automatically update when the associated git repository is updated?
Not by default. However, you can configure the app in Heroku (from the Settings tab
in the Heroku application dashboard) to be directly connected to ASIDE's git repository and then
enable automatic deploys to accomplish this.
Can you tell me more about how the login for ASIDE works?
It uses the OAuth web server flow. Salesforce has documentation on it
here.
Does the Connected App really need an OAuth Scope of Full?
Probably not, but it's safest to leave it at that setting. The definition of full access changes over time as
Salesforce obtains new capabilities and permissions to go along with those capabilities. When ASIDE was originally created it
needed full access but it probably does not need that much access now (e.g. looking at the scope list, it probably
does not need access to wave and eclair data).
Is there an easy way to hook up ASIDE to google analytics?
Indeed there is! Within the heroku config vars setup add a fourth key, its name should be
GID and its value should be your google analytics tracking id.
How does the posi-trac rear end on a Plymouth work?
It just does.
Why can't I login?
It takes a while for for the Connected App to be available for use sometimes. Wait 10 minutes and try again.
If that doesn't work, double check your configuration. If that doesn't work, read the
help for more info on login failures.
Is this really free?
It's free as described in this guide. By default the application will be configured to use the Heroku free tier.
To obtain more performance to host more users you may need to leave the free tier.
How do I setup SSL?
You can read more info about that
here.
How do I setup a custom domain?
Heroku has a knowledge article about this topic
here.
Will my version of the application automatically update when the associated git repository is updated?
Not by default. However, you can configure the app in Heroku (from the Settings tab
in the Heroku application dashboard) to be directly connected to ASIDE's git repository and then
enable automatic deploys to accomplish this.
Can you tell me more about how the login for ASIDE works?
It uses the OAuth web server flow. Salesforce has documentation on it
here.
Does the Connected App really need an OAuth Scope of Full?
Probably not, but it's safest to leave it at that setting. The definition of full access changes over time as
Salesforce obtains new capabilities and permissions to go along with those capabilities. When ASIDE was originally created it
needed full access but it probably does not need that much access now (e.g. looking at the scope list, it probably
does not need access to wave and eclair data).
Is there an easy way to hook up ASIDE to google analytics?
Indeed there is! Within the heroku config vars setup add a fourth key, its name should be
GID and its value should be your google analytics tracking id.
How does the posi-trac rear end on a Plymouth work?
It just does.


Relation Extraction Demo
Relation extraction
query:
Metamap Concepts
Concept Type
Concepts
Relations
Concept 1
Concept 2
Relation Type
Pattern based score
Machine learning score
Final score
Demo queries to Relation Extraction KB
Treatment for fever
Causes of backpain (1)
Causes of backpain (2)
Run
clear
Results


Successfully added/updated in list!
Are you sure you want to delete this anime from your list? This action will remove all your tags, scores, comments, etc.
Anime has been deleted from your list!


The requirements of this subclause shall apply for the procedure read when applied to a textfile; therein, f shall denote the textfile. The effects of applying read(f,v) to the textfile f shall be defined by pre-assertions and post-assertions within the requirements of <IP_ADDRESS>. The pre-assertion of read(f,v) shall be the pre-assertion of get(f). Let t denote a sequence of components having the char-type ; let r, s, and u each denote a value of the sequence-type defined by the structure of the type denoted by text ; if u = S( ), then let t = S( ) ; otherwise, let u.first = end-of-line ; let w = f0" or w = f0.R.first, where the decision as to which shall be implementation-dependent ; and let r ~ s ~ t ~u = w ~ f0.R.rest. The post-assertion of read(f,v) shall be
(f.M = f0.M) and (f.L ~ f.R = f0.L ~ f0.R) and (f.R = t ~ u) and
(if f.R = S( ) then (f^ is totally-undefined) else (f^ = f.R.first)).
NOTE -- 1 The variable-access is not a variable parameter. Consequently, it may be a component of a packed structure, and the value of the buffer-variable need only be assignment-compatible with it.
a) For n>=1, read(f,v1 ,...,vn ) shall access the textfile and establish a reference to that textfile for the remaining execution of the statement ; each of v1,...,vn shall be a variable-access possessing a typethat is the real-type, is a string-type, or is compatible with the char-type or with the integer-type. For n>=2, the execution of read(f,v 1 ,...,vn ) shall be equivalent to
begin read(ff,v 1 ) ; read(ff,v 2 ,...,v n) end
where ff denotes the referenced textfile.
b) If v is a variable-access possessing the char-type (or subrange thereof), the execution of read(f,v) shall be equivalent to
begin v := ff^ ; get(ff) end
where ff denotes the referenced textfile.
NOTE -- 2 To satisfy the post-assertions of get and of read(f,v) requires r = S( ) and length(s) = 1.
c) If v is a variable-access possessing the integer-type (or subrange thereof), read(f,v) shall satisfy the following requirements. No component of s shall equal end-of-line. The components of r, if any, shall each, and (s ~ t ~ u).first shall not, equal either the char-type value space or end-of-line. Either s shall be empty or s shall, and s ~ S(t.first) shall not, form a signed-integer according to the syntax of 6.1.5. It shall be an error if s is empty. The value of the signed-integer thus formed shall be assignment-compatible with the type possessed by v and shall be attributed to v.
NOTE -- 3 The sequence r represents any spaces and end-of-lines to be skipped, and the sequence s represents the signed-integer to be read.
d) If v is a variable-access possessing the real-type, read(f,v) shall satisfy the following requirements. No component of s shall equal end-of-line. The components of r, if any, shall each, and (s ~t ~u).first shall not, equal either the char-type value space or end-of-line. Either s shall be empty or s shall, and s ~ S(t.first) shall not, form a signed-number according to the syntax of 6.1.5. It shall be an error if s is empty. The value denoted by the number thus formed shall be attributed to the variable v.
NOTE -- 4 The sequence r represents any spaces and end-of-lines to be skipped, and the sequence s represents the number to be read.
The syntax of the parameter list of readln shall be
readln-parameter-list = [ '(' ( file-variable | variable-access )
{ ',' variable-access } ')' ] .
Readln shall only be applied to textfiles. If the file-variable or the entire readln-parameter-list is omitted, the procedure shall be applied to the required textfile input, and the program shall contain a program-parameter-list containing an identifier with the spelling input.
Readln(f,v 1 ,...,v n ) shall access the textfile and establish a reference to that textfile for the remaining execution of the statement. The execution of the statement shall be equivalent to
begin read(ff,v 1 ,...,vn ) ; readln(ff) end
where ff denotes the referenced textfile.
Readln(f) shall access the textfile and establish a reference to that textfile for the remaining execution of the statement. The execution of the statement shall be equivalent to
begin while not eoln(ff) do get(ff) ; get(ff) end
where ff denotes the referenced textfile.
NOTES
1 The effect of readln is to place the current file position just past the end of the current line in the textfile. Unless this is the end-of-file position, the current file position is therefore at the start of the next line.
2 Because the definition of readln makes use of get, the implementation-defined aspects of the post-assertion of get also apply (see <IP_ADDRESS>).
The syntax of the parameter list of write when applied to a textfile shall be
write-parameter-list = '(' [ file-variable ',' ] write-parameter
{ ',' write-parameter } ')' .
write-parameter = expression [ ':' expression [ ':' expression ] ] .
If the file-variable is omitted, the procedure shall be applied to the required textfile output, and the program shall contain a program-parameter-list containing an identifier with the spelling output. When write is applied to a textfile f, it shall be an error if f is undefined or f.M = Inspection (see <IP_ADDRESS>).
For n>=1, write(f,p 1 ,...,p n ) shall access the textfile and establish a reference to that textfile for the remaining execution of the statement. For n >=2, the execution of the statement shall be equivalent to
begin write(ff,p 1 ) ; write(ff,p2 ,...,p n ) end
where ff denotes the referenced textfile.
Write(f,p), where f denotes a textfile and p is a write-parameter, shall write a sequence of zero or more characters on the textfile f ; for each character c in the sequence, the equivalent of
begin ff^ := c; put(ff) end
where ff denotes the referenced textfile, shall be applied to the textfile f. The sequence of characters written shall be a representation of the value of the first expression in the write-parameter p, as specified in the remainder of this subclause.
NOTE -- Because the definition of write includes the use of put, the implementation-defined aspects of the post-assertion of put also apply (see <IP_ADDRESS>).
A write-parameter shall have one of the following forms
e : TotalWidth : FracDigits
e : TotalWidth
e
where e shall be an expression whose value is to be written on the file f and shall be of integertype, real-type, char-type, Boolean-type, or a string-type, and where TotalWidth and FracDigits shall be expressions of integer-type whose values shall be the field-width parameters. The values of TotalWidth and FracDigits shall be greater than or equal to one ; it shall be an error if either value is less than one.
Write(f,e) shall be equivalent to the form write(f,e : TotalWidth), using a default value for TotalWidth that depends on the type of e ; for integer-type, real-type, and Boolean-type, the default values shall be implementation-defined.
Write(f,e : TotalWidth : FracDigits) shall be applicable only if e is of real-type (see <IP_ADDRESS>.2).
If e is of char-type, the default value of TotalWidth shall be one. The representation written on the file f shall be
(TotalWidth - 1) spaces, the character value of e.
If e is of integer-type, the decimal representation of the value of e shall be written on the file f. Assume a function
function IntegerSize ( x : integer ) : integer ;
{ returns the number of digits, z, such that
10 to the power (z - 1) < abs(x) < 10 to the power z }
and let IntDigits be the positive integer defined by
if e = 0
then IntDigits := 1
else IntDigits := IntegerSize(e);
then the representation shall consist of
a) if TotalWidth > = IntDigits + 1:
(TotalWidth - IntDigits - 1) spaces,
the sign character: '-' if e < 0, otherwise a space,
IntDigits digit-characters of the decimal representation of abs(e).
b) if TotalWidth < IntDigits + 1:
if e < 0 the sign character '- ',
IntDigits digit-characters of the decimal representation of abs(e).
If e is of real-type, a decimal representation of the value of e, rounded to the specified number of significant figures or decimal places, shall be written on the file f.
Write(f,e : TotalWidth) shall cause aoating-point representation of the value of e to be written. Assume functions
function TenPower ( Int : integer ) : real ;
{ Returns 10.0 raised to the power Int }
function RealSize ( y : real ) : integer ;
{ Returns the value, z, such that TenPower(z - 1) < abs(y) <
TenPower(z) }
function Truncate ( y : real ; DecPlaces : integer ) : real ;
{ Returns the value of y after truncation to DecPlaces decimal places }
let ExpDigits be an implementation-defined value representing the number of digit-characters written in an exponent;
let ActWidth be the positive integer defined by
if TotalWidth > = ExpDigits + 6
then ActWidth := TotalWidth
else ActWidth := ExpDigits + 6;
and let the non-negative number eWritten, the positive integer DecPlaces, and the integer ExpValue be defined by
DecPlaces := ActWidth - ExpDigits - 5;
if e = 0.0
then begin eWritten := 0.0 ; ExpValue := 0 end
else
begin
eWritten := abs(e);
ExpValue := RealSize ( eWritten ) - 1;
eWritten := eWritten / TenPower ( ExpValue );
eWritten := eWritten + 0.5 * TenPower ( -DecPlaces );
if eWritten > = 10.0
then
begin
eWritten := eWritten / 10.0;
ExpValue := ExpValue + 1
end;
eWritten := Truncate ( eWritten, DecPlaces )
end ;
then the floating-point representation of the value of e shall consist of
the sign character
( '-' if (e < 0.0) and (eWritten > 0.0), otherwise a space ),
the leading digit-character of the decimal representation of eWritten,
the character '.' ,
the next DecPlaces digit-characters of the decimal representation of
eWritten,
an implementation-defined exponent character
(either 'e' or 'E'),
the sign of ExpValue
( '-' if ExpValue < 0, otherwise '+' ),
the ExpDigits digit-characters of the decimal representation of
ExpValue (with leading zeros if the value requires them).
Write(f,e : TotalWidth : FracDigits) shall cause a fixed-point representation of the value of e to be written. Assume the functions TenPower, RealSize, and Truncate described in <IP_ADDRESS>.1;
let eWritten be the non-negative number defined by
if e = 0.0
then eWritten := 0.0
else
begin
eWritten := abs(e);
eWritten := eWritten + 0.5 * TenPower ( - FracDigits );
eWritten := Truncate ( eWritten, FracDigits )
end;
let IntDigits be the positive integer defined by
if RealSize ( eWritten ) < 1
then IntDigits := 1
else IntDigits := RealSize ( eWritten );
and let MinNumChars be the positive integer defined by
MinNumChars := IntDigits + FracDigits + 1;
if (e < 0.0) and (eWritten > 0.0)
then MinNumChars := MinNumChars + 1 ; {'-' required}
then the fixed-point representation of the value of e shall consist of
if TotalWidth > = MinNumChars,
(TotalWidth - MinNumChars) spaces,
the character '-' if (e < 0.0) and (eWritten > 0.0),
the first IntDigits digit-characters of the decimal representation of
the value of eWritten,
the character '.',
the next FracDigits digit-characters of the decimal representation of
the value of eWritten.
NOTE -- At least MinNumChars characters are written. If TotalWidth is less than this value, no initial spaces are written.
If e is of Boolean-type, a representation of the word true or the word false (as appropriate to the value of e) shall be written on the file f. This shall be equivalent to writing the appropriate character-string ' True ' or ' False ' (see <IP_ADDRESS>), where the case of each letter is implementation-defined, with a field-width parameter of TotalWidth.
If the type of e is a string-type with n components, the default value of TotalWidth shall be n. The representation shall consist of
if TotalWidth > n,
(TotalWidth - n) spaces,
the first through n-th characters of the value of e in that order.
if 1 <= TotalWidth <= n,
the first through TotalWidth-th characters in that order.
The syntax of the parameter list of writeln shall be
writeln-parameter-list = [ '(' ( file-variable j write-parameter )
{ ',' write-parameter g ')' ] .
Writeln shall only be applied to textfiles. If the file-variable or the writeln-parameter-list is omitted, the procedure shall be applied to the required textfile output, and the program shall contain a program-parameter-list containing an identifier with the spelling output.
Writeln(f,p 1 ,...,p n ) shall access the textfile and establish a reference to that textfile for the remaining execution of the statement. The execution of the statement shall be equivalent to
begin write(ff,p 1 ,...,pn) ; writeln(ff) end
where ff denotes the referenced textfile.
Writeln shall be defined by a pre-assertion and a post-assertion using the notation of <IP_ADDRESS>.
pre-assertion : (f0 is not undefined) and (f0.M = Generation) and (f0.R = S( )).
post-assertion : (f.L = (f0.L ~ S(end-of-line))) and (f^ is totally-undefined)
and (f.R = S( )) and (f.M = Generation),
where S(e) is the sequence consisting solely of the end-of-line component defined in <IP_ADDRESS>.
NOTE -- Writeln(f) terminates the partial line, if any, that is being generated. By the conventions of <IP_ADDRESS> it is an error if the pre-assertion is not true prior to writeln(f).
It shall be an error if the pre-assertion required for writeln(f) (see 6.9.4) does not hold prior to the activation of page(f). If the actual-parameter-list is omitted, the procedure shall be applied to the required textfile output, and the program shall contain a program-parameter-list containing an identifier with the spelling output. Page(f) shall cause an implementation-defined effect on the textfile f, such that subsequent text written to f will be on a new page if the textfile is printed on a suitable device, shall perform an implicit writeln(f) if f.L is not empty and if f.L.last is not the endof-line component (see <IP_ADDRESS>), and shall cause the buffer-variable f^ to become totally-undefined. The effect of inspecting a textfile to which the page procedure was applied during generation shall be implementation-dependent.
program = program-heading ' ;' program-block '.' .
program-heading = 'program' identifier [ '(' program-parameter-list ')'] .
program-parameter-list = identifier-list .
program-block = block .
The identifier of the program-heading shall be the program name. It shall have no significance within the program. The identifiers contained by the program-parameter-list shall be distinct and shall be designated program-parameters. Each program-parameter shall have a defining-point as a variable-identifier for the region that is the program-block. The binding of the variables denoted by the program-parameters to entities external to the program shall be implementation-dependent, except if the variable possesses a file-type in which case the binding shall be implementation-defined.
NOTE -- The external representation of such external entities is not defined by this International Standard.
The execution of any action, operation, or function, defined within clause 6 to operate on a variable, shall be an error if the variable is a program-parameter and, as a result of the binding of the program-parameter, the execution cannot be completed as defined.
The occurrence of the required identifier input or output as a program-parameter shall constitute its defining-point for the region that is the program-block as a variable-identifier of the required type denoted by the required type-identifier text. Such occurrence of the identifier input shall cause the post-assertions of reset to hold, and of output, the post-assertions of rewrite to hold, prior to the first access to the textfile or its associated buffer-variable. The effect of the application of the required procedure reset or the required procedure rewrite to either of these textfiles shall be implementation-defined.
Examples:
program copy (f, g);
var f, g : file of real;
begin reset(f) ; rewrite(g);
while not eof(f) do
begin g" := f^ ; get(f) ; put(g)
end
end.
program copytext (input, output);
{This program copies the characters and line structure of the textfile
input to the textfile output. g
var ch : char;
begin
while not eof do
begin
while not eoln do
begin read(ch) ; write(ch)
end;
readln; writeln
end
end.
program t6p6p3p4 (output);
var globalone, globaltwo : integer;
procedure dummy ;
begin
writeln( ' fail4 ' )
end { of dummy 1;
procedure p (procedure f(procedure ff ; procedure gg) ; procedure g);
var localtop : integer;
procedure r;
begin { r }
if globalone = 1 then
begin
if (globaltwo <>
writeln( ' fail1' )
end
else if globalone = 2 then
begin
if (globaltwo <> 2) or (localtop <> 2) then
writeln( ' fail2 ' )
else
writeln( ' pass ' )
end
else
writeln( ' fail3 ' );
globalone := globalone + 1
end { of r ~;
begin { of p }
globaltwo := globaltwo + 1;
localtop := globaltwo;
if globaltwo = 1 then
p(f, r)
else
f(g, r)
end { of p};
procedure q (procedure f ; procedure g);
begin
f;
g
end { of q};
begin { of t6p6p3p4 }
globalone := 1;
globaltwo := 0;
p(q, dummy)
end. { of t6p6p3p4 }
(Informative)
The nonterminal symbols pointer-type, program, signed-number, simple-type, special-symbol, and structured-type are only referenced by the semantics and are not used in the right-hand-side of any production. The nonterminal symbol program is the start symbol of the grammar.
6.7.3 actual-parameter = expression | variable-access | procedure-identifier
| function-identifier.
6.7.3 actual-parameter-list = '(' actual-parameter { ',' actual-parameter } ')' .
<IP_ADDRESS> adding-operator = '+' | '-' | 'or' .
6.1.7 apostrophe-image = '"' .
<IP_ADDRESS> array-type = 'array' '[' index-type { ',' index-type } ']' 'of' component-type .
<IP_ADDRESS> array-variable = variable-access .
<IP_ADDRESS> assignment-statement = ( variable-access | function-identifier ) ':=' expression .
<IP_ADDRESS> base-type = ordinal-type .
6.2.1 block = label-declaration-part constant-definition-part type-definition-part
variable-declaration-part procedure-and-function-declaration-part
statement-part .
<IP_ADDRESS> Boolean-expression = expression .
<IP_ADDRESS>.1 bound-identifier = identifier .
6.5.5 buffer-variable = file-variable '"' .
<IP_ADDRESS> case-constant = constant .
<IP_ADDRESS> case-constant-list = case-constant { ',' case-constant } .
<IP_ADDRESS> case-index = expression .
<IP_ADDRESS> case-list-element = case-constant-list ':' statement .
<IP_ADDRESS> case-statement = 'case' case-index 'of' case-list-element
{ ';' case-list-element } [ ';' ] 'end' .
6.1.7 character-string = ''' string-element { string-element } '''
<IP_ADDRESS> component-type = type-denoter .
<IP_ADDRESS> component-variable = indexed-variable | field-designator.
<IP_ADDRESS> compound-statement = 'begin' statement-sequence 'end'.
<IP_ADDRESS> conditional-statement = if-statement | case-statement.
<IP_ADDRESS>.1 conformant-array-parameter-specification = value-conformant-array-specification
| variable-conformant-array-specification.
<IP_ADDRESS>.1 conformant-array-schema = packed-conformant-array-schema
| unpacked-conformant-array-schema.
6.3 constant = [ sign ] ( unsigned-number | constant-identifier )
| character-string.
6.3 constant-definition = identifier '=' constant.
6.2.1 constant-definition-part = [ 'const' constant-definition ';' { constant-definition ';' } ] .
6.3 constant-identifier = identifier .
<IP_ADDRESS> control-variable = entire-variable .
6.1.1 digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' .
6.1.5 digit-sequence = digit { digit } .
6.1.4 directive = letter { letter | digit }.
6.4.4 domain-type = type-identifier.
<IP_ADDRESS> else-part = 'else' statement.
<IP_ADDRESS> empty-statement =.
6.5.2 entire-variable = variable-identifier.
<IP_ADDRESS> enumerated-type = '(' identifier-list ')'.
6.7.1 expression = simple-expression [ relational-operator simple-expression ].
<IP_ADDRESS>.1 factor > bound-identifier.
6.7.1 factor > variable-access | unsigned-constant | function-designator
| set-constructor | '(' expression ')' | 'not' factor.
<IP_ADDRESS> field-designator = record-variable '.' field-specifier | field-designator-identifier.
<IP_ADDRESS> field-designator-identifier = identifier.
<IP_ADDRESS> field-identifier = identifier.
<IP_ADDRESS> field-list = [ ( fixed-part [ ';' variant-part ] | variant-part ) [ ';' ] ].
<IP_ADDRESS> field-specifier = field-identifier.
<IP_ADDRESS> file-type = 'file' 'of' component-type.
6.5.5 file-variable = variable-access.
<IP_ADDRESS> final-value = expression.
<IP_ADDRESS> fixed-part = record-section { ';' record-section } .
<IP_ADDRESS> for-statement = 'for' control-variable ':=' initial-value ( 'to' | 'downto' ) final-value
'do' statement.
<IP_ADDRESS> formal-parameter-list = '(' formal-parameter-section { ';' formal-parameter-section } ')' .
<IP_ADDRESS> formal-parameter-section > value-parameter-specification
| variable-parameter-specification
| procedural-parameter-specification
| functional-parameter-specification.
<IP_ADDRESS>.1 formal-parameter-section > conformant-array-parameter-specification.
6.1.5 fractional-part = digit-sequence.
6.6.2 function-block = block.
6.6.2 function-declaration = function-heading ';'directive
| function-identification ';' function-block
| function-heading ';' function-block.
6.7.3 function-designator = function-identifier [ actual-parameter-list ].
6.6.2 function-heading = 'function' identifier [ formal-parameter-list ] ':' result-type.
6.6.2 function-identification = 'function' function-identifier.
6.6.2 function-identifier = identifier.
<IP_ADDRESS> functional-parameter-specification = function-heading.
<IP_ADDRESS> goto-statement = 'goto' label.
6.5.4 identified-variable = pointer-variable '"'.
6.1.3 identifier = letter { letter | digit }.
<IP_ADDRESS> identifier-list = identifier { ',' identifier }.
<IP_ADDRESS> if-statement = 'if' Boolean-expression 'then' statement [ else-part ].
<IP_ADDRESS> index-expression = expression.
<IP_ADDRESS> index-type = ordinal-type.
<IP_ADDRESS>.1 index-type-specification = identifier '..' identifier ':' ordinal-type-identifier.
<IP_ADDRESS> indexed-variable = array-variable '[' index-expression, { ',' index-expression } ']' .
<IP_ADDRESS> initial-value = expression.
6.1.6 label = digit-sequence.
6.2.1 label-declaration-part = [ 'label' label { ',' label } ';' ] .
6.1.1 letter = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j'
| 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't'
| 'u' | 'v' | 'w' | 'x' | 'y' | 'z'.
6.7.1 member-designator = expression [ '..' expression ].
<IP_ADDRESS> multiplying-operator = '*' | '/' | 'div' | 'mod' | 'and'.
<IP_ADDRESS> new-ordinal-type = enumerated-type | subrange-type.
6.4.4 new-pointer-type = '^' domain-type.
<IP_ADDRESS> new-structured-type = [ 'packed' ] unpacked-structured-type.
6.4.1 new-type = new-ordinal-type | new-structured-type | new-pointer-type.
<IP_ADDRESS> ordinal-type = new-ordinal-type | ordinal-type-identifier.
<IP_ADDRESS> ordinal-type-identifier = type-identifier.
<IP_ADDRESS>.1 packed-conformant-array-schema = 'packed' 'array' '[' index-type-specification ']'
'of' type-identifier.
6.4.4 pointer-type = new-pointer-type | pointer-type-identifier.
6.4.1 pointer-type-identifier = type-identifier.
6.5.4 pointer-variable = variable-access.
<IP_ADDRESS> procedural-parameter-specification = procedure-heading.
6.2.1 procedure-and-function-declaration-part = { ( procedure-declaration
| function-declaration ) ';' } .
6.6.1 procedure-block = block.
6.6.1 procedure-declaration = procedure-heading ';' directive
| procedure-identification ';' procedure-block
| procedure-heading ';' procedure-block .
6.6.1 procedure-heading = 'procedure' identifier [ formal-parameter-list ].
6.6.1 procedure-identification = 'procedure' procedure-identifier.
6.6.1 procedure-identifier = identifier.
<IP_ADDRESS> procedure-statement = procedure-identifier ( [ actual-parameter-list ]
| read-parameter-list | readln-parameter-list
| write-parameter-list | writeln-parameter-list ) .
6.10 program = program-heading ';' program-block '.'.
6.10 program-block = block.
6.10 program-heading = 'program' identifier [ '(' program-parameter-list ')' ] .
6.10 program-parameter-list = identifier-list.
6.9.1 read-parameter-list = '(' [ file-variable ',' ] variable-access { ',' variable-access } ')' .
6.9.2 readln-parameter-list = [ '(' ( file-variable | variable-access )
{ ',' variable-access } ')' ].
<IP_ADDRESS> real-type-identifier = type-identifier.
<IP_ADDRESS> record-section = identifier-list ':' type-denoter.
<IP_ADDRESS> record-type = 'record' field-list 'end'.
<IP_ADDRESS> record-variable = variable-access.
<IP_ADDRESS> record-variable-list = record-variable { ',' record-variable }.
<IP_ADDRESS> relational-operator = '=' | '<>' | '<' | '>' | '<=' | '>=' | 'in'.
<IP_ADDRESS> repeat-statement = 'repeat' statement-sequence 'until' Boolean-expression.
<IP_ADDRESS> repetitive-statement = repeat-statement | while-statement | for-statement.
6.6.2 result-type = simple-type-identifier | pointer-type-identifier.
6.1.5 scale-factor = [ sign ] digit-sequence.
6.7.1 set-constructor = '[' [ member-designator { ',' member-designator } ] ']'.
<IP_ADDRESS> set-type = 'set' 'of' base-type.
6.1.5 sign = '+' | '-'.
6.1.5 signed-integer = [ sign ] unsigned-integer.
6.1.5 signed-number = signed-integer | signed-real.
6.1.5 signed-real = [ sign ] unsigned-real.
6.7.1 simple-expression = [ sign ] term { adding-operator term }.
<IP_ADDRESS> simple-statement = empty-statement | assignment-statement
| procedure-statement | goto-statement.
<IP_ADDRESS> simple-type = ordinal-type | real-type-identifier.
6.4.1 simple-type-identifier = type-identifier.
6.1.2 special-symbol = '+' | '~' | '*' | '/' | '=' | '<' | '>' | '[' | ']'
| '.' | ',' | ':' |' ;' | '"' | '(' | ')'
| '<>' | '<=' | '>=' | ' :=' | '..' | word-symbol
6.8.1 statement = [ label ' :' ] ( simple-statement | structured-statement ).
6.2.1 statement-part = compound-statement.
<IP_ADDRESS> statement-sequence = statement { ';' statement }.
6.1.7 string-character = one-of-a-set-of-implementation-defined-characters.
6.1.7 string-element = apostrophe-image | string-character.
<IP_ADDRESS> structured-statement = compound-statement | conditional-statement
| repetitive-statement | with-statement.
<IP_ADDRESS> structured-type = new-structured-type | structured-type-identifier.
6.4.1 structured-type-identifier = type-identifier.
<IP_ADDRESS> subrange-type = constant '..' constant.
<IP_ADDRESS> tag-field = identifier.
<IP_ADDRESS> tag-type = ordinal-type-identifier.
6.7.1 term = factor { multiplying-operator factor }.
6.4.1 type-definition = identifier '=' type-denoter.
6.2.1 type-definition-part = [ 'type' type-definition ' ;' { type-definition ';' } ] .
6.4.1 type-denoter = type-identifier | new-type.
6.4.1 type-identifier = identifier.
<IP_ADDRESS>.1 unpacked-conformant-array-schema =
'array' '[' index-type-specification { ';' index-type-specification } ']'
'of' ( type-identifier | conformant-array-schema ).
<IP_ADDRESS> unpacked-structured-type = array-type | record-type | set-type | file-type.
6.7.1 unsigned-constant = unsigned-number | character-string | constant-identifier | 'nil'.
6.1.5 unsigned-integer = digit-sequence.
6.1.5 unsigned-number = unsigned-integer | unsigned-real.
6.1.5 unsigned-real = digit-sequence '.' fractional-part [ 'e' scale-factor ]
| digit-sequence 'e' scale-factor.
<IP_ADDRESS>.1 value-conformant-array-specification = identifier-list ':' conformant-array-schema.
<IP_ADDRESS> value-parameter-specification = identifier-list ':' type-identifier.
6.5.1 variable-access = entire-variable | component-variable | identified-variable
| buffer-variable.
<IP_ADDRESS>.1 variable-conformant-array-specification = 'var' identifier-list ':' conformant-array-schema.
6.5.1 variable-declaration = identifier-list ':' type-denoter.
6.2.1 variable-declaration-part = [ 'var' variable-declaration ' ;' { variable-declaration ';' } ] .
6.5.2 variable-identifier = identifier.
<IP_ADDRESS> variable-parameter-specification = 'var' identifier-list ':' type-identifier.
<IP_ADDRESS> variant = case-constant-list ':' '(' field-list ')'.
<IP_ADDRESS> variant-part = 'case' variant-selector 'of' variant { ';' variant }.
<IP_ADDRESS> variant-selector = [ tag-field ':' ] tag-type.
<IP_ADDRESS> while-statement = 'while' Boolean-expression 'do' statement.
<IP_ADDRESS> with-statement = 'with' record-variable-list 'do' statement.
6.1.2 word-symbol = 'and' | 'array' | 'begin' | 'case' | 'const' | 'div'
| 'do' | 'downto' | 'else' | 'end' | 'file' | 'for'
| 'function' | 'goto' | 'if' | 'in' | 'label' | 'mod'
| 'nil' | 'not' | 'of' | 'or' | 'packed' | 'procedure'
| 'program' | 'record' | 'repeat' | 'set' | 'then'
| 'to' | 'type' | 'until' | 'var' | 'while' | 'with'.
6.9.3 write-parameter = expression [ ':' expression [ ':' expression ] ].
6.9.3 write-parameter-list = '(' [ file-variable ',' ] write-parameter
{ ',' write-parameter } ')'.
6.9.4 writeln-parameter-list = [ '(' ( file-variable | write-parameter )
{ ',' write-parameter } ')' ].
 To facilitate the production of such documentation, all the errors specified in clause 6 are described again in this annex.
D.1 <IP_ADDRESS>
For an indexed-variable closest-containing a single index-expression, it is an error if the value of the index-expression is not assignment-compatible with the index-type of the array-type.
D.2 <IP_ADDRESS>
It is an error unless a variant is active for the entirety of each reference and access to each component of the variant.
D.3 6.5.4
It is an error if the pointer-variable of an identified-variable denotes a nil-value.
D.4 6.5.4
It is an error if the pointer-variable of an identified-variable is undefined.
D.5 6.5.4
It is an error to remove from its pointer-type the identifying-value of an identified-variable when a reference to the identified-variable exists.
D.6 6.5.5
It is an error to alter the value of a file-variable f when a reference to the buffer-variable f^ exists.
D.7 <IP_ADDRESS>
It is an error if the value of each corresponding actual value parameter is not assignmentcompatible with the type possessed by the formal-parameter.
D.8 <IP_ADDRESS>
For a value parameter, it is an error if the actual-parameter is an expression of a set-type whose value is not assignment-compatible with the type possessed by the formal-parameter.
D.9 <IP_ADDRESS>
It is an error if the file mode is not Generation immediately prior to any use of put, write, writeln or page.
D.10 <IP_ADDRESS>
It is an error if the file is undefined immediately prior to any use of put, write, writeln or page.
D.11 <IP_ADDRESS>
It is an error if end-of-file is not true immediately prior to any use of put, write, writeln or page.
D.12 <IP_ADDRESS>
It is an error if the buffer-variable is undefined immediately prior to any use of put.
D.13 <IP_ADDRESS>
It is an error if the file is undefined immediately prior to any use of reset.
D.14 <IP_ADDRESS>
It is an error if the file mode is not Inspection immediately prior to any use of get or read.
D.15 <IP_ADDRESS>
It is an error if the file is undefined immediately prior to any use of get or read.
D.16 <IP_ADDRESS>
It is an error if end-of-file is true immediately prior to any use of get or read.
D.17 <IP_ADDRESS>
For read, it is an error if the value possessed by the buffer-variable is not assignmentcompatible with the variable-access.
D.18 <IP_ADDRESS>
For write, it is an error if the value possessed by the expression is not assignment-compatible with the buffer-variable.
D.19 <IP_ADDRESS>
For new(p,c l ,...,c n,), it is an error if a variant of a variant-part within the new variable becomes active and a different variant of the variant-part is one of the specified variants.
D.20 <IP_ADDRESS>
For dispose(p), it is an error if the identifying-value had been created using the form new(p,c l ,...,c n ).
D.21 <IP_ADDRESS>
For dispose(p,k l ,...,k, ), it is an error unless the variable had been created using the form new(p,c l ,...,c,,,) and m is equal to n.
D.22 <IP_ADDRESS>
For dispose(p,k l ,...,k, ), it is an error if the variants in the variable identified by the pointer value of p are different from those specified by the case-constants k l ,...,k,,,,.
D.23 <IP_ADDRESS>
For dispose, it is an error if the parameter of a pointer-type has a nil-value.
D.24 <IP_ADDRESS>
For dispose, it is an error if the parameter of a pointer-type is undefined.
D.25 <IP_ADDRESS>
It is an error if a variable created using the second form of new is accessed by the identifiedvariable of the variable-access of a factor, of an assignment-statement, or of an actual-parameter.
D.26 <IP_ADDRESS>
For pack, it is an error if the parameter of ordinal-type is not assignment-compatible with the index-type of the unpacked array parameter.
D.27 <IP_ADDRESS>
For pack, it is an error if any of the components of the unpacked array are both undefined and accessed.
D.28 <IP_ADDRESS>
For pack, it is an error if the index-type of the unpacked array is exceeded.
D.29 <IP_ADDRESS>
For unpack, it is an error if the parameter of ordinal-type is not assignment-compatible with the index-type of the unpacked array parameter.
D.30 <IP_ADDRESS>
For unpack, it is an error if any of the components of the packed array are undefined.
D.31 <IP_ADDRESS>
For unpack, it is an error if the index-type of the unpacked array is exceeded.
D.32 <IP_ADDRESS>
Sqr(x) computes the square of x. It is an error if such a value does not exist.
D.33 <IP_ADDRESS>
For ln(x), it is an error if x is not greater than zero.
D.34 <IP_ADDRESS>
For sqrt(x), it is an error if x is negative.
D.35 <IP_ADDRESS>
For trunc(x), the value of trunc(x) is such that if x is positive or zero then 0 < x-trunc(x) < 1; otherwise 1 <x- trunc(x) < 0. It is an error if such a value does not exist.
D.36 <IP_ADDRESS>
For round(x), if x is positive or zero then round(x) is equivalent to trunc(x+0.5), otherwise round(x) is equivalent to trunc(x- 0.5). It is an error if such a value does not exist.
D.37 <IP_ADDRESS>
For chr(x), the function returns a result of char-type that is the value whose ordinal number is equal to the value of the expression x if such a character value exists. It is an error if such a character value does not exist.
D.38 <IP_ADDRESS>
For succ(x), the function yields a value whose ordinal number is one greater than that of x, if such a value exists. It is an error if such a value does not exist.
D.39 <IP_ADDRESS>
For pred(x), the function yields a value whose ordinal number is one less than that of x, if such a value exists. It is an error if such a value does not exist.
D.40 <IP_ADDRESS>
When eof(f) is activated, it is an error if f is undefined.
D.41 <IP_ADDRESS>
When eoln(f) is activated, it is an error if f is undefined.
D.42 <IP_ADDRESS>
When eoln(f) is activated, it is an error if eof(f) is true.
D.43 6.7.1
An expression denotes a value unless a variable denoted by a variable-access contained by the expression is undefined at the time of its use, in which case that use is an error.
D.44 <IP_ADDRESS>
A term of the form x/y is an error if y is zero.
D.45 <IP_ADDRESS>
A term of the form i div j is an error if j is zero.
D.46 <IP_ADDRESS>
A term of the form i mod j is an error if j is zero or negative.
D.47 <IP_ADDRESS>
It is an error if an integer operation or function is not performed according to the mathematical rules for integer arithmetic.
D.48 6.7.3
It is an error if the result of an activation of a function is undefined upon completion of the algorithm of the activation.
D.49 <IP_ADDRESS>
For an assignment-statement, it is an error if the expression is of an ordinal-type whose value is not assignment-compatible with the type possessed by the variable or function-identifier.
D.50 <IP_ADDRESS>
For an assignment-statement, it is an error if the expression is of a set-type whose value is not assignment-compatible with the type possessed by the variable.
D.51 <IP_ADDRESS>
For a case-statement, it is an error if none of the case-constants is equal to the value of the case-index upon entry to the case-statement.
D.52 <IP_ADDRESS>
For a for-statement, it is an error if the value of the initial-value is not assignment-compatible with the type possessed by the control-variable if the statement of the for-statement is executed.
D.53 <IP_ADDRESS>
For a for-statement, it is an error if the value of the final-value is not assignment-compatible with the type possessed by the control-variable if the statement of the for-statement is executed.
D.54 6.9.1
On reading an integer from a textfile, after skipping preceding spaces and end-of-lines, it is an error if the rest of the sequence does not form a signed-integer.
D.55 6.9.1
On reading an integer from a textfile, it is an error if the value of the signed-integer read is not assignment-compatible with the type possessed by variable-access.
D.56 6.9.1
On reading a number from a textfile, after skipping preceding spaces and end-of-lines, it is an error if the rest of the sequence does not form a signed-number.
D.57 6.9.1
It is an error if the buffer-variable is undefined immediately prior to any use of read.
D.58 <IP_ADDRESS>
On writing to a textfile, the values of TotalWidth and FracDigits are greater than or equal to one ; it is an error if either value is less than one.
D.59 6.10
The execution of any action, operation, or function, defined to operate on a variable, is an error if the variable is a program-parameter and, as a result of the binding of the program-parameter, the execution cannot be completed as defined.
D.60 <IP_ADDRESS>
For a conformant array, it is an error if the smallest or largest value specified by the index-type of the actual-parameter lies outside the closed interval specified by the index-type-specification of the conformant-array-schema.
(Informative)
A complying processor is required to provide a definition of all the implementation-defined features of the language. To facilitate the production of this definition, all the implementation-defined aspects specified in clause 6 are listed again in this annex.
E.1 6.1.7
The string-characters which denote an implementation-defined value of the required chartype.
NOTE -- For processors which compile and execute in different environments, the above may require the definition of two character sets and a mapping between the two.
E.2 6.1.9
Provision of the reference tokens ", [, and ], of the alternative token @, and of the delimiting characters f and g, is implementation-defined.
E.3 <IP_ADDRESS> b)
The values of the implementation-defined approximation to an implementation-defined subset of the real numbers denoted by signed-real.
NOTE -- The subset defined above may be by reference to another specification.
E.4 <IP_ADDRESS> d)
The values of char-type which are an enumeration of a set of implementation-defined characters.
E.5 <IP_ADDRESS> d)
The ordinal numbers of each value of char-type are implementation-defined.
E.6 <IP_ADDRESS>
The set of characters designated prohibited from textfiles is implementation-defined.
E.7 <IP_ADDRESS>
The point at which the file operations rewrite, put, reset, and get are actually performed is implementation-defined.
E.8 <IP_ADDRESS>
The value denoted by the constant-identifier maxint is implementation-defined.
E.9 <IP_ADDRESS>
The accuracy of the approximation of the result of the real operations and functions to the mathematical result is implementation-defined.
E.10 <IP_ADDRESS>
The default value of TotalWidth for integer-type is implementation-defined.
E.11 <IP_ADDRESS>
The default value of TotalWidth for real-type is implementation-defined.
E.12 <IP_ADDRESS>
The default value of TotalWidth for Boolean-type is implementation-defined.
E.13 <IP_ADDRESS>.1
The value of ExpDigits is implementation-defined.
E.14 <IP_ADDRESS>.1
The value of the exponent character ('e' or 'E') used on output of values of real-type is implementation-defined.
E.15 <IP_ADDRESS>
The case of each character of ' True ' and ' False ' used on output of values of Boolean-type is implementation-defined.
E.16 6.9.5
The effect of the procedure page when applied to a textfile which is in generation mode is implementation-defined.
E.17 6.10
The binding of a file-type program-parameter is implementation-defined.
E.18 6.10
The effect of reset and rewrite on the standard files input and output is implementation-defined.
(Informative)
A complying processor is required to provide documentation concerning the implementation-dependent features of the language. To facilitate the production of such documentation, all the implementationdependent aspects specified in clause 6 are listed again in this annex.
F.1 <IP_ADDRESS>
For any textfile t, the effect of attributing to a component of either t.L or t.R a member of the characters prohibited from textfiles is implementation-dependent.
F.2 <IP_ADDRESS>
The order of evaluation of the index-expressions of an indexed-variable is implementationdependent.
F.3 6.7.1
The order of evaluation of expressions of a member-designator is implementation-dependent.
F.4 6.7.1
The order of evaluation of the member-designators of a set-constructor is implementationdependent.
F.5 <IP_ADDRESS>
The order of evaluation of the operands of a dyadic operator is implementation-dependent.
F.6 6.7.3
The order of evaluation, accessing, and binding of the actual-parameters of a function-designator
is implementation-dependent.
F.7 <IP_ADDRESS>
The order of accessing the variable and evaluating the expression of an assignment-statement
is implementation-dependent.
F.8 <IP_ADDRESS>
The order of evaluation, accessing, and binding of the actual-parameters of a procedurestatement
is implementation-dependent.
F.9 6.9.5
The effect of inspecting a textfile to which the page procedure was applied during generation
is implementation-dependent.
F.10 6.10
The binding of non-file variables denoted by the program-parameters to entities external to the program is implementation-dependent.


Test Your Luck
Initialize
10
Abort!
Analizing
Your very Lucky
Do It Again...
You got some bad luck
Try Again...


--- layout: paper title: Publications --- Universal Schema for Entity Type Prediction, , Proceedings of the 3rd Workshop on Automated Knowledge Base Construction 2013 [pdf]
@inproceedings{yao13universal, author={Limin Yao and Sebastian Riedel and Andrew McCallum}, title={Universal Schema for Entity Type Prediction}, month={October}, booktitle={Proceedings of the 3rd Workshop on Automated Knowledge Base Construction}, year={2013}, }


Streams
public struct Streams
Streams is a category of Twitch API calls that interacts with Streams
on Twitch.
-
GetStreamsResult
defines the different types of results that can be retrieved from thegetStreams
call of theStreams
API. Variables are included that specify the data that was returned.- success: Defines that the call was successful. The output variable will contain all returned data.
- failure: Defines that the call failed. Returns all data corresponding to the failed call. These data pieces are as follows:
- Data? - The data that was returned by the API
- URLResponse? - The response from the URL task
- Error? - The error that was returned from the API call
Declaration
Swift
public enum GetStreamsResult
-
GetStreamsMetadataResult
defines the different types of results that can be retrieved from thegetStreamsMetadata
call of theSttreams
API. Variables are included that specify the data that was returned.- success: Defines that the call was successful. The output variable will contain all returned data.
- failure: Defines that the call failed. Returns all data corresponding to the failed call. These data pieces are as follows:
- Data? - The data that was returned by the API
- URLResponse? - The response from the URL task
- Error? - The error that was returned from the API call
Declaration
Swift
public enum GetStreamsMetadataResult
-
CreateStreamMarkerResult
defines the different types of results that can be retrieved from thecreateStreamMarker
call of theGames
API. Variables are included that specify the data that was returned.- success: Defines that the call was successful. The output variable will contain all returned data.
- failure: Defines that the call failed. Returns all data corresponding to the failed call. These data pieces are as follows:
- Data? - The data that was returned by the API
- URLResponse? - The response from the URL task
- Error? - The error that was returned from the API call
Declaration
Swift
public enum CreateStreamMarkerResult
-
GetStreamMarkersResult
defines the different types of results that can be retrieved from thegetStreamMarkers
call of theGames
API. Variables are included that specify the data that was returned.- success: Defines that the call was successful. The output variable will contain all returned data.
- failure: Defines that the call failed. Returns all data corresponding to the failed call. These data pieces are as follows:
- Data? - The data that was returned by the API
- URLResponse? - The response from the URL task
- Error? - The error that was returned from the API call
Declaration
Swift
public enum GetStreamMarkersResult
-
getStreams(tokenManager:after:before:communityIds:first:gameIds:languages:userIds:userNames:completionHandler:)
getStreams
will run theGet Streams
API call of the New Twitch API. The returned streams are sorted in descending order such that the most-watched streamer is returned first in the received data.This method does not require a
TwitchTokenManager
. No Authorization is required.More information about the web call is available here
Seealso
Declaration
Swift
public static func getStreams(tokenManager: TwitchTokenManager = TwitchTokenManager.shared, after: String? = nil, before: String? = nil, communityIds: [String]? = nil, first: Int? = nil, gameIds: [String]? = nil, languages: [String]? = nil, userIds: [String]? = nil, userNames: [String]? = nil, completionHandler: @escaping (GetStreamsResult) -> Void)
Parameters
tokenManager
The TokenManager whose token should be used. Singleton by default.
after
The forward pagination token.
before
The backwards pagination token.
communityIds
Specifies that streams from the specified communities should be returned. Up to 100 IDs are possible.
first
The maximum number of streams to return. Maximum 100. Default 20.
gameIds
The IDs of the games to retrieve streams for. Maximum 100.
languages
The languages of streams that should be received. Maximum 100.
userIds
The IDs of the users whose streams should be retrieved. Maximum 100.
userNames
The names of the users whose streams should be retrieved. Maximum 100.
completionHandler
The function that should be run whenever the retrieval is successful. There are two types of
GetStreamsResult
:success
andfailure
. -
getStreamsMetadata(tokenManager:after:before:communityIds:first:gameIds:languages:userIds:userNames:completionHandler:)
getStreamsMetadata
will run theGet Streams Metadata
API call of the New Twitch API. The returned streams are sorted in descending order such that the most-watched streamer is returned first in the received data. This data contains special information about streamers who are playing Overwatch or Hearthstone!This method does not require a
TwitchTokenManager
. No Authorization is required.More information about the web call is available here
Seealso
Declaration
Swift
public static func getStreamsMetadata(tokenManager: TwitchTokenManager = TwitchTokenManager.shared, after: String? = nil, before: String? = nil, communityIds: [String]? = nil, first: Int? = nil, gameIds: [String]? = nil, languages: [String]? = nil, userIds: [String]? = nil, userNames: [String]? = nil, completionHandler: @escaping (GetStreamsMetadataResult) -> Void)
Parameters
tokenManager
The TokenManager whose token should be used. Singleton by default.
after
The forward pagination token.
before
The backwards pagination token.
communityIds
Specifies that streams from the specified communities should be returned. Up to 100 IDs are possible.
first
The maximum number of streams to return. Maximum 100. Default 20.
gameIds
The IDs of the games to retrieve streams for. Maximum 100.
languages
The languages of streams that should be received. Maximum 100.
userIds
The IDs of the users whose streams should be retrieved. Maximum 100.
userNames
The names of the users whose streams should be retrieved. Maximum 100.
completionHandler
The function that should be run whenever the retrieval is successful. There are two types of
GetStreamsMetadataResult
:success
andfailure
. -
createStreamMarker
will run theCreate Stream Marker
API call of the New Twitch API. Stream Markers are points in streams that the Streamer or Editor wants to mark so that they can return to that point later. The marker will be created at the current timestamp of the livestream.This method does requires
user:edit:broadcast
permissions on a user who is an editor or streamer of the stream where the stream marker should be created.More information about the web call is available here
Seealso
Declaration
Swift
public static func createStreamMarker(tokenManager: TwitchTokenManager = TwitchTokenManager.shared, userId: String, description: String? = nil, completionHandler: @escaping (CreateStreamMarkerResult) -> Void)
Parameters
tokenManager
The TokenManager whose token should be used. Singleton by default.
userId
The ID of the user who’s stream should be marked at the current time
description
The description of the marker.
completionHandler
The function that should be run whenever the post is successful. There are two types of
CreateStreamMarkerResult
:success
andfailure
. -
getStreamMarkers
will run theGet Stream Markers
API call of the New Twitch API. Stream Markers are points in streams that the Streamer or Editor wants to mark so that they can return to that point later. The marker will be created at the current timestamp of the livestream.This method does requires
user:read:broadcast
permissions on a user who is an editor or streamer of the stream where the stream marker should be created.More information about the web call is available here
Seealso
Declaration
Swift
public static func getStreamMarkers(tokenManager: TwitchTokenManager = TwitchTokenManager.shared, userId: String, videoId: String, after: String? = nil, before: String? = nil, first: Int? = nil, completionHandler: @escaping (GetStreamMarkersResult) -> Void)
Parameters
tokenManager
The TokenManager whose token should be used. Singleton by default.
userId
The ID of the user whose stream markers should be obtained
videoId
The ID of the video whose stream markers should be obtained
after
The forward pagination token.
before
The backwards pagination token.
communityIds
Specifies that streams from the specified communities should be returned. Up to 100 IDs are possible.
first
The maximum number of streams to return. Maximum 100. Default 20. successful. There are two types of
CreateStreamMarkerResult
:success
andfailure
.


{% extends 'layout.html' %} {% block pageTitle %} What is your telephone number? {% endblock %} {% block content %}
This must be the same telephone number you have registered with the benefits agency (DWP or HMRC).


Laravel & React
FUNdamentals Workshop
December 17 - December 18, 2018
John Vee Uminga
Modern Web Development
- Write less, do more.
- Rapid.
- Reusabality.
Frameworks
- A standardized set of concepts, practices and criteria for dealing with a common type of problem.
- A set of resources and tools for software developers to build and manage web applications, web services and websites.
Why Frameworks?
- Better code.
- Faster development.
- Quality and quantity.
Web development is continually evolving ,fast.


31 August 2010 - The Ministry of Health of Egypt has announced a new human case of A(H5N1) avian influenza infection.
The case is a 33 year-old female from Qaluibia governorate. She developed symptoms on 17 August, was hospitalized on 24 August, where she received oseltamivir treatment, and died on 26 August.
Investigations into the source of infection indicated that the case had exposure to sick and dead poultry.
The case was confirmed by the Egyptian Central Public Health Laboratories, a National Influenza Center of the WHO Global Influenza Surveillance Network (GISN).
Of the 112 laboratory confirmed cases of Avian influenza A(H5N1) reported in Egypt, 36 have been fatal.


Over 175 million professionals use LinkedIn to exchange information,ideas and opportunities.
- Stay informed about your contacts and industry
- Find the people & knowledge you need to achieve your goals
- Control your professional identity online
Join LinedIn Today
Sign Up


Defines the PvP tic tac toe contract example.
More...
For the following tic-tac-toe game:
- Each pair of player can have 2 unique game, one where player_1 become host and player_2 become challenger and vice versa
- The game data is stored in the "host" scope and use the "challenger" as the key
(0,0) coordinate is on the top left corner of the board
(0,2)
(0,0) - | o | x where - = empty cell
- | x | - x = move by host
(2,0) x | o | o o = move by challenger
Board is represented with number:
- 0 represents empty cell
- 1 represents cell filled by host
- 2 represents cell filled by challenger Therefore, assuming x is host, the above board will have the following representation: [0, 2, 1, 0, 1, 0, 1, 2, 2] inside the game object
In order to deploy this contract:
- Create an account called tic.tac.toe
- Add tic.tac.toe key to your wallet
- Set the contract on the tic.tac.toe account
How to play the game:
- Create a game using
create
action, with you as the host and other account as the challenger.
- The first move needs to be done by the host, use the
move
action to make a move by specifying which row and column to fill.
- Then ask the challenger to make a move, after that it's back to the host turn again, repeat until the winner is determined.
- If you want to restart the game, use the
restart
action
- If you want to clear the game from the database to save up some space after the game has ended, use the
close
action


ADVAYA 8
ON AIR
National level Multi-fest of Government Engineering College Idukki, Kerala.
Menu
Close
Infinite Dreams.
Home
Events
Event Schedule
Workshops
Explore Idukki
Gallery
About


Michael L. Tushman
Credited for introduction of boundary spanner as a key area of the innovation process. This treatment covers principally how boundaries of organisations can be transcended by participants who have a role of conduit, but the concept has been broadened and nested, when adopted more widely by the discipline.


Finally up and running.
First created in Aug 2013, updated in Sep 2013 and made an alpha version in Dec 2013. That is a very bad pace of development. There are people who've perfected html and css in the time it took me to make this site. While the time it took is something to be ashamed of, i'm pretty happy to have finally finished it. Almost resembles what i had in mind the first time i started sketching out the design and laying out the functionality of this site. And while i deny it, shifting to windows was more than responsible for this. Monkeys can use the github windows GUI and i guess it makes sense that i learnt how to use it in about an hour.
Bottom line, the site is finally up and running. Let's see how long i can keep this streak going :)


Text inputs and textareas are coded with standard HTML elements, then enhanced by jQuery Mobile to make them more attractive and useable on a mobile device.
Text inputs and textareas are coded with standard HTML elements, then enhanced by jQuery Mobile to make them more attractive and useable on a mobile device.


James Maddison to be handed England debut in forthcoming Euro 2020 qualifiers
Maddison has been in fine form for Leicester this season and is finally set to receive his senior England bow by Gareth Southgate this week
by John Cross, https://www.facebook.com/johncrossmirror/James Maddison looks set to be given his England debut in one of their forthcoming Euro 2020 qualifiers.
Leicester midfielder Maddison, 22, has now been in three of Gareth Southgate’s squads but has yet to get a single minute of football for England’s senior team.
But Maddison’s form has impressed Southgate and his coaching staff enough for them to be talking in terms of giving him his chance amid midfield absences.
Jordan Henderson will miss the Montenegro game on Thursday through suspension and has been given permission to only report up on Wednesday to give him some extra rest.
Ross Barkley has had to withdraw through injury while Fabian Delph has also been troubled by a hamstring injury and the injuries may open the door for Maddison with England playing Kosovo on Sunday which means they may make changes with just two days in between games.
Harry Winks impressed last time against Bulgaria while Declan Rice, Mason Mount and Alex Oxlade-Chamberlain are also in the mix.
England boss Southgate intends to speak to Maddison about his conduct as an international after he was pictured in a casino after being sent home ill from the last camp.
But Southgate excused Maddison and that matter now seems over with the Leicester midfielder in his thoughts for the future.


Hardware Support¶
The DeepSparse Engine is validated to work on x86 Intel and AMD CPUs running Linux operating systems.
It is highly recommended to run on a CPU with AVX-512 instructions available for optimal algorithms to be enabled.
Here is a table detailing specific support for some algorithms over different microarchitectures:
| x86 Extension | Microarchitectures | Activation Sparsity | Kernel Sparsity | Sparse Quantization |
|---|---|---|---|---|
| AMD AVX2 | Zen 2, Zen 3 | not supported | optimized | not supported |
| Intel AVX2 | Haswell, Broadwell, and newer | not supported | optimized | not supported |
| Intel AVX-512 | Skylake, Cannon Lake, and newer | optimized | optimized | emulated |
| Intel AVX-512 VNNI (DL Boost) | Cascade Lake, Ice Lake, Cooper Lake, Tiger Lake | optimized | optimized | optimized |


We had cases in which people come to us and say: We like the idea of single
source, but we need a way to style the output which is fast, easy to do and
consistent across the variety of output media.
We discovered that the majority of users do not need completely different styling for the Web or print outputs. More than that, they need to be aware of how the output looks directly when they are editing the content.
We need a way of avoiding situations in which our customers are happy with one of their outputs and need to redo their work in a completely other styling language. What they need is both single source and single styling.
Currently there are two major standard ways of styling XML, the XSL-FO and CSS.
Let's see how they line up:
| Capability | CSS | XSL-FO |
|---|---|---|
| Adoption | Massive | Very limited |
| Complexity | Simple | Complicated |
| Can style PDF output | Yes | Yes |
| Can style HTML output | Yes | No |
| Can be used when editing | Yes | No |
| Print Quality | Good | Excellent |
So the winner is CSS, as long as you do not already have an excellent team with high skills of XSL-FO.
DITA-OT and Prince XML are a good combination, and can make use of the existing DITA-OT infrastructure.
DITA-OT comes out of the box with a plug-in for converting your maps to PDF: org.dita.pdf2. It is widely used, and performs nicely.. as long as you do not need to change the page layout.
To obtain a PDF from a DITA map, this plug-in makes the following steps:
What is nice about this file is that:
<opentopic:map xmlns:opentopic="http://www.idiominc.com/opentopic" ... > <title class="- topic/title ">DITA Topic Map</title> <topicref class="- map/topicref " href="#unique_1" id="unique_1" type="task" ohref="task.dita" first_topic_id="#unique_1"> <topicmeta class="- map/topicmeta "> <navtitle class="- topic/navtitle ">This is a Mega Task!</navtitle> <linktext class="- map/linktext ">This is a Mega Task!</linktext> <shortdesc class="- map/shortdesc "> This task shows styles for different DITA elements.</shortdesc> </topicmeta> </topicref> <topicref ...........> <topicref ...........> </opentopic:map>
The index is a tree structure grouping all the indexterms from the merged topics, using elements from the opentopic-index namespace. For instance, when having in a DITA topic:
<indexterm>primary<indexterm>secondary<indexterm>tertiary</indexterm></indexterm></indexterm>
This is converted in:
<opentopic-index:index.groups> <opentopic-index:index.group> <opentopic-index:label>P</opentopic-index:label> ... <opentopic-index:index.entry value="primary"> ... <opentopic-index:index.entry value="secondary"> .... <opentopic-index:index.entry value="tertiary"> <opentopic-index:formatted-value>tertiary</opentopic-index:formatted-value> <opentopic-index:refID value="primary:secondary:tertiary:"/> </opentopic-index:index.entry> </opentopic-index:index.entry> </opentopic-index:index.entry> </opentopic-index:index.group> </opentopic-index:index.groups>
Also, in the merged content, the old indexterm DITA elements are converted to opentopic-index:index.entry elements with the same structure as above.
As seen above, there are several steps DITA-OT is performing to get the PDF done, the last one being linked to the XSL-FO processing. The stage1a.xml file contains enough information to get a good printout: it has the TOC, the index, the link references are made using unique IDs, and the URLs of the external resources, like images are absolute. To convert such a document using Prince should be pretty straight forward. You will see in the following how different issues were addressed.
The stage1a.xml.pp is obtained after further processing the stage1a.xml by adding:
Let's see what is the current status of the CSS in relation to the printed output and how can we use it to format our merged map. Starting from CSS 3 there is functionality for:
Many of the convertors from XML and CSS to PDF have adopted the CSS 3 specification, but they are still using a lot of extensions.
It is very simple, it all resumes to setting the size and margins for an ordinary DIV element, but this time using the @page at-rule syntax. I will choose the A4 size:
@page{ padding-top:0.2em; padding-bottom:0.2em; size: 8.27in 11.69in; margin: 0.75in 0.25in 0.75in 1in; }
The pdf2 DITA-OT plug-in forces page breaks between chapters. The CSS equivalent is:
*[class ~= "topic/topic"][is-chapter = "true"]{ page-break-before:always; }
In CSS you can collect values from the elements and refer them from the generated content.
To collect the name of the current chapter, we can use a selector that matches the titles of the first level topics (the chapters) and puts the content of the title in a string-set (chaptertitle).
*[class ~= "map/map"] > *[class ~= "topic/topic"] > *[class ~= "topic/title"] { string-set: chaptertitle content() }
Similarly, to get the map title in a string-set (maptitle):
*[class ~= "map/map"] { string-set: maptitle attr(title) }
Now, to place them in the right place: for the left pages (consider reading the book) use the top left side, otherwise the right top side:
@page :left{ @top-left { content: string(maptitle) " | " string(chaptertitle) " | " counter(page); font-size:8pt; } } @page :right{ @top-right { content: string(maptitle) " | " string(chaptertitle) " | " counter(page); font-size:8pt; } }
A lot of people ask us on support about using the same images for the print and web output, outlining the resolution differences. While an image looks fine in the browser, at 72dpi, it looks totally different when printed at 300 dpi. Any PDF formatter needs to know the pixel density of the image. Some formats keep this meta-data directly in the image file, others not.
When using Prince you can specify the image resolution using a property extension:
@media print{ *[class ~= "map/map"] { prince-image-resolution: 196dpi; } }
This means that the entire merged map should consider 196dpi for images .
PDFs can be either read on a device, or printed on paper. If used on a device, the links can be decorated with an underline, to be more visible, and should be click-able. There is a different story when printing such a document: the links should indicate the page number of the target, so the reader can browse the book and find the target. Here is how we can tackle both in CSS:
*[class ~= "topic/xref"][href]:after { content: " [page " target-counter(attr(href), page) "]"; link: attr(href); }
So, the DITA snippet:
...This will be discussed in <xref href="installation.dita">installation</xref>...
Gets rendered in PDF like:
...This will be discussed in installation [page 433]...
As you can see, it is underlined and click-able as a link but shows also the page number in the eventuality the content gets printed on paper.
The target-counter is in the standard CSS Level 3, but the link property is specific only to Prince and oXygen.
Our table of contents should have the following features:
Sounds complicated, but is quite simple in CSS. Let's start with the first two issues:
Make the chapters standout: bold them and increase the font size. For this, use the @is-chapter attribute added in the preprocessing step:
*[class ~= "map/topicref"][is-chapter] { font-weight: bold; font-size:1.5em; }
And make the other titles at lower levels look normal:
*[class ~= "map/topicref"][is-chapter] > *[class ~= "map/topicref"]:not(is-chapter) { font-weight: normal; font-size:0.67em; }
The dotted line between the chapter name and the page number is called the "leader" (usually is a repeating pattern used to visually connect content across horizontal spaces). There is a standard way to specify the leader properties in CSS Level 3.
Now place a leader after the content of the navtitle element and add the page number:
*[class ~= "map/topicref"] *[class ~= "topic/navtitle"]:after { display:inline; content: leader('.') target-counter(attr(href), page); link:attr(href); }
The leader takes here as argument a dot character, but it can be any string (You can use also the solid constant to draw a continuous line).
The target-counter is able to determine from the href the page on which is located the referenced element.
To format the TOC pages, let's define a special page layout, named table-of-contents:
@page table-of-contents { @top { content: "Table of Contents" } @bottom { content: counter(page, lower-roman) } @bottom-right { content: none } @bottom-left { content: none } @top-right { content: none } @top-left { content: none } }If you remember, the stage1a.xml file defines the TOC using the element <opentopic:map xmlns:opentopic="http://www.idiominc.com/opentopic" ... >. We will associate to this element the defined page layout, and will take care to reset the page counter:
*[class ~= "map/map"] > map { /* The local name of the opentopic:map */ display: block; page: table-of-contents; counter-reset: page 1; }
No serious printed material comes without an index. Fortunately, because Prince supports a blend of CSS and JavaScript we can get the job done.
From the data perspective, the stage1a.xml.pp file contains now:
<opentopic-index:index.groups id="d1e387"> <opentopic-index:index.group> <opentopic-index:label>P</opentopic-index:label> <opentopic-index:index.entry value="pruning"> <opentopic-index:formatted-value>pruning</opentopic-index:formatted-value> <opentopic-index:refID value="pruning:"> <oxy:index-link href="#d1e80"> [d1e80] </oxy:index-link> <oxy:index-link href="#d1e301"> [d1e301] </oxy:index-link> </opentopic-index:refID>
We can format this structure, determine the page for each indexterm by using the target-counter and use the link property to make the index click-able. We need something like this:
[P] pruning 5, 6, 7 tools 5 folding saw 5
The main problem is avoiding duplicate pages for the same index term. It would be messy to have something like:
[P] pruning 5, 6, 6, 6, 7 tools 5, 5, 5 folding saw 5, 5
We can use a two phase process, as recommended by the Prince support team:
For this, let's trigger from the CSS the invocation of a JavaScript function called index for each of the index-link element:
index-link[href] { content: prince-script(index, attr(href), target-counter(attr(href), page)) !important; }
The index function captures both the value of the href attribute, usually the ID of the index term, and the page number as returned by the target-counter CSS function:
var refs = {}; function index(href, counter) { refs[href] = counter; return counter; }
Then, when the Prince processing is over, it saves the collected values into the console. The PDF output is discarded.
The CSS specification misses the idea of generated index. As you can see, you can get a good index section, but there is a performance penalty, as the PDF gets generated twice. For large books this could prove too costly.
To create footnotes in DITA, you should use the fn element:
... The memory storage capacity of the computer is 2 GB<fn>A GB (gigabyte) is equal to 1000 million bytes</fn> with error correcting support ...
The DITA-OT pdf2 renders it in PDF like this:
... The memory storage capacity of the computer is 2 GB1 with error correcting support ... _________________________________________________________________________________________ 1A GB (gigabyte) is equal to 1000 million bytes
Footnotes are now first class citizens in CSS. We can make them float in the "footnote" area:
fn { float:footnote; counter-increment: fn-count; }
We can also style the footnote call:
fn::footnote-call { content: counter(fn-count); font-size: 83%; vertical-align: super; line-height: none; }
And also we can style the entire area where the footnotes are displayed:
@page { @footnotes { border-top: solid black thin; padding-top: 8pt; } }
In oXygen you can comment things. The comments appear as colored callouts (or balloons) besides the commented text. Let's try the same thing in CSS.
The preprocessing step already converted the oXygen comment processing instructions into elements, so they can be matched by the CSS rules. In this way we have a comment-anchor, similar to a footnote call, that should stay in the document, and a comment element, which can float to one side.
<oxy:comment-anchor id="sc_1" hr_id="1"/> <oxy:comment href="#sc_1" hr_id="1"> <oxy:comment-author>Mary</oxy:comment-author> <oxy:comment-text>Remove the infested branches.</oxy:comment-text> <oxy:comment-date>2012/05/10</oxy:comment-date> </oxy:comment>
The CSS:
comment { display:block; position:relative; link:attr(href); float: left; clear:left; ...... } comment:before { content:'[' attr(hr_id) '] '; } comment-anchor:before { content:'[' attr(hr_id) ']'; background-color: yellow; }


Lean & Mean Drag and Drop is a small script for dragging, dropping, sorting and reordering html structures
Features
Usage
//Load LMDD css and js files
<link href="../css/lmdd.min.css" rel="stylesheet">

//Initialize LMDD instance with your preferred options

Examples
-
speaker_notes
The basic script is essentially the same for all cases. Set LMDD on an element (containing all that has to be dragged or nested in), and declare the relevant classes (containerClass,draggableItemClass & handleClass). The rest is done through proper HTML markup.
-
filter_1Simple GridGreenPinkPurpleBlueLimeTealAmberOrangeBlack
-
filter_2Multiple containers + handleTasksreorderCode refactoring & optimizationsreorderCross browser testingImportant TasksreorderCall momDonereorderBasic Drag & Drop scriptreorderSmooth transitionsreorderSupport nested structuresreorderScroll while dragging
-
filter_3Nested Grid
Red
Red
Red
Green
Green
Green
Blue
Blue
Blue
-
code
Simple
 (scope)
 (container)

 (draggable)

  Multiple Containers and handle
 (scope)
 (container)
 (draggable)

 (handle)

 (another container)

  Nested
 (scope)
 (container)
 (container AND draggable)

 (draggable)

 (draggable)

 (draggable)

 (container AND draggable)

 (draggable)

 (draggable)

 (draggable)

Options
-
speaker_notes
Option Description containerClass Containers act as drop zones for draggable items draggableItemClass Draggable items can be moved inside and between containers handleClass Restricts drag start to a specific element which acts as a drag "handle" dragstartTimeout Delays the drag start for a short time to distinct it from other user intentions (such as selecting text) calcInterval Time interval in which LMDD evaluates the dragged element position, Short interval means more responsive experience (and more CPU usage) revert When set to true the draggable item will revert to its original position when the cursor is out of the container bounds nativeScroll LMDD uses its own auto-scroll function, you can eliminate it and use the native browser scroll mirrorMinHeight, mirrorMaxWidth Scale down the mirror size when it exceeds the maximum width set positionDelay When set to true - position will not be recalculated when the mouse stops moving (Prevents flickering on deep nested structures) dataMode When set to 'true' LMDD will undo all DOM mutations when the drag event ends, This is useful for integrating LMDD with Angular/React/Vue etc. -
code
//LMDD Options default values: lmdd.set(document.getElementById('someID'), { containerClass:'lmdd-container', draggableItemClass: 'lmdd-draggable', handleClass: false, dragstartTimeout: 50, calcInterval: 200, revert: true, nativeScroll: false, mirrorMinHeight: 100, mirrorMaxWidth: 500, positionDelay: false, dataMode: false });
Advanced
-
content_copyCloning
To clone dragged elements, just add two additional classes to your markup:
'lmdd-clonner' - for every element you want to clone when dragged
'lmdd-dispatcher' - for the container (parent of the elements to be cloned)
containers having the 'lmdd-dispatcher' class will not act as drop zones, the cloning operation will begin when the mouse cursor enters a different container.//Example markup:
 (scope)
 (dragging items out from this container will clone them)
(this draggable item will be cloned when dragged)

 (container)

-
eventEvents
LMDD dispatches three events:
- 'lmddbeforestart': Dispatched before any changes has been made to the DOM. Does not contain a detail object
- 'lmddstart': Dispatched when the drag operation starts. Contains a 'detail' object
- 'lmddend':Dispatched when the drag operation ends. Contains a 'detail' object
The detail object carries the following information:
- dragType: "move" or "clone"
- draggedElement: HTML element being dragged
- from.container: HTML element that originally contained the dragged element
- from.index: The original index of the dragged element
- to.container: HTML element that currently contains the dragged element
- to.index: The current index of the dragged element
-
blockRendering Blocks
To animate transitions LMDD makes a copy of all movable elements on its scope and manage their location with relative positioning,
this is an expensive process and might (in some cases) alter the way your markup renders while dragging.
To prevent this from happening, AND save CPU on drag operations, add the class 'lmdd-block' to the parts of your markup which are not needed to be animated.
This will stop LMDD from traversing down the DOM tree and keep all children of the element intact.//Example markup:
 (scope)
 (container)
(draggable) <--! A lot of additional markup -->

Integration
-
bookmarkGuidelines
LMDD is fairly easy to integrate with any other script. I would recommend treating the drag operation as any other user input, think of it as some kind of a sophisticated mouse gesture. Having this point of view in mind, the integration process should be as follows:
- Upon rendering your markup, set an LMDD instance on the relevant part of the DOM
- Set the dataMode to 'true'. (Which will undo any changes LMDD made on the DOM when the drag operation ends)
- Add an eventListener for the 'lmddend' event
- Use an event handler to process the event details and implement the necessary changes on your app data/state
-
filter_1Vue Example
See the Pen vue.js drag and drop with lmdd by Yair Levy (@supraniti) on CodePen.
Note that the relevant code for implementing the drag and drop operation is made out of two simple functions,
- setting up lmdd and adding an event listener (on Vue 'mounted' function).
- moving the relevant data object from it's original parent into it's new parent (on our 'handleDragEvent' function)
-
code
mounted: function() { //set lmdd lmdd.set(document.getElementById('drag-scope'), { containerClass: 'todo-container', draggableItemClass: 'todo-item', handleClass: 'handle', dataMode: true //set dataMode to true }); //listen to 'lmddend' event this.$el.addEventListener('lmddend', this.handleDragEvent); } methods: { //handle 'lmddend' event handleDragEvent: function(event) { // Process the event detail var newIndex = event.detail.to.index; var oldIndex = event.detail.from.index; var newContainer = event.detail.to.container.__vue__.data; var oldContainer = event.detail.from.container.__vue__.data; if (event.detail.dragType === 'move') { //implement the changes on the app data newContainer.splice(newIndex, 0, oldContainer.splice(oldIndex, 1)[0]); } } }
Angular and React integration is pretty much the same, examples will be added to this section later on.
More
Bug reports & feature requests are more than welcome.
Feel free to ask questions and contribute on github
If you are interested in a drag&drop functionality for your web apps, you might also like:


{% extends "global/Page.html" %} {% load staticfiles otree_tags %} {% block title %} Congratulations! {% endblock %} {% block content %} {% if lucky %}
You reached the end of the game.
You were randomly choosen to be awarded also with the payoff from the practice!
These are all the payoffs from each game you played:
You reached the end of the game.
These are all the payoffs from each game you played: