ENEMY OF THE STATE ** 1/2 Directed by Tony Scott. Written by David Marconi. Ohrograohym Dan Mindel. Editing, Chris Lebenzon. Production design, Benjamin Fernandez. Music, Trevor Rabin & Harry Gregson-Williams. Produced by Jerry Bruckheimer. Cast: Will Smith (Bobby Dean); Gene Hackman (Brill); Jon Voight (Reynolds); Lisa Bonet (Rachel Banks); Regina King (Carla Dean); Ian Hart (Bingham); Jake Busey (Krug); Barry Pepper (Pratt); Gabriel Byrne, Tom Sizemore, Jason Robards (the Congressman); Jason Lee (photographer Zavitz), et al. A Touchstone release. 128 minutes. R (violence)
On Friday the 13th my computer's display crashed terminally. On Friday the 20th, the computer was still disabled - so when, that day, I saw Enemy of the State, the contrast between my electronic reality and the film's flawless, dazzling magic made the movie both a techno-wonder and a techno-thriller.
Congressman Jason Robards intends to vote against a Telecommunications Security and Privacy Act. Reynolds (John Voight), who is high up in the NSA (National Security Agency), unable to change the Congressman's mind, takes the easy way out. He has the man killed in a park, before his (Voight's) eyes.
By one of those coincidences that transform films into movies, the murder is recorded by a video camera hidden in the area by photographer Zavitz (Jason Lee) who was monitoring geese. When he examines the footage and alerts a magazine editor, his phone call is intercepted. The NSA apparently bugs and monitors every human on this planet.
Immediately a chase begins, and not a wild goose one. Reynolds army of computer-whizzes see and hear everything. Armed agents pursue the photographer. As he flees, by an amazing coincidence he runs into his long time-no-see college classmate, labor lawyer Bobby Dean (Will Smith) who is shopping for lingerie in a shop a la Victoria's Secret with provocative Class 3 seductresses as saleswomen.
It's a blitz-meeting. The first thing Bobby does is -- improbably-- to give his visiting card to Zavitz, who, in turn, secretly slips into Bobby's purchases a diskette he has made of the incriminating video.
Zavitz dies. The God-like computers clue in the pursuers as to the diskette. Bobby becomes their prey. It's like the familiar Alfred Hithcock trick of The Wrong Man, except that unsuspecting Bobby does not realize that he is the Right Man. Get my drift?
The lawyer is spied upon and hunted down. Bugs are planted on his clothes, his shoes, a transmitter that duplicates his Mont Blanc pen, another that duplicates his watch, etc. NSA's stock most likely includes bugs in Viagra pills, toilet paper rolls, wedding rings, toenail clippers and all else.
Instant images and sounds show up on banks of monitors that also are hooked up to cars, taxis, trucks, helicopters and a dedicated satellite 155 miles up.
Actor Will Smith has declared: "You can be followed, watched, listened to wherever you go; there's nothing the Government can't do. And the technology we use in the movie is actually 10 years old. Fot this film, we went to the CIA. We saw a recorder that you can implant in one of your tooth fillings. We saw satellite surveillance of poppy fields. All the technology that we show in the film exists for real. The concept of privacy is obsolete."
Who am I not to believe him? I'll have to be cautious though next week, when I see Nick, my dentist. But then, if there's nothing the government can't do, why can't it govern?
Anyway, the NSA people or their equivalent either must be furious or are laughing themselves sick. Can't guess.
If the computer screens are crystal clear, the plot is not. At the end Voight is revealed as a rogue super-spy, yet I can't decide whether his henchpeople are co-conspirators or believe that they are kosher patriots.
Early on, during a sequence of long-distance miking it became obvious that the whole thing was derivative of Coppola's masterful The Conversation, but done here in silly ways bereft of humanity, filmed like an MTV montage and not involving the audience. So, who, later, pops up but Gene Hackman, the tortured anti-hero of The Conversation!
He turns the movie's techno-jokes into one big inside joke. Hackman, a techno-genius and former NSAer, teams up with Will for defense, counter-attack -- and a happy ending.
I have revealed almost nothing of the gimmickry and the twists. These are as numeorus as the bytes of your computer. At random, they include and involve quid pro quos; vengeful Mafiosi; the luscious Lisa Bonet as Will's college swetheart and now his informer; Will's wife, son and lapdog; Will as a human fly; Will without pants; Will puzzling (and amusing) an Oriental couple in their hotel room; a hotel fire; explosions; a mysterious can driver; a sort of humongous "French Connection"-ish (which starred Hackman) chase in a tunnel and beneath it; split-second changes; and so on ad infinitum and ad absurdum.
"Non-stop" takes on a new meaning. So do "techno-over-skill and overkill." Nonsense goes from mega to giga. Whatever truths are present, they are treated so lavishly that they make King Kong, Mothra, Spielberg's dinosaurs and James Bond feel real; by comparison the Enigma encryption machine of World War II and the amazing spy-gadgets and surveillance of STASI (the East German all-pervasive secret police) feel like advanced toys.
The realities behind Enemy of the State -- and I don't doubt that there are several --go so much overboard that the movie becomes a fantasy whose cautionary aspects are defanged.
As in the James Bond hyperboles, the silliness has a lining of humor which, along with the exaggerations, does help pass the time. Will Smith is very good. He performs with self-confidence, a twinkle in his eye, and no mugging for the lens. His type of humor and cool reminds me of Eddie Murphy's, minus the grin; or, going way back, of Clark Gable's, minus the smugness.
" Le mauvais gout mene au crime" (Stendhal)
Edwin Jahiel's movie reviews are at http://www.prairienet.org/ejahiel
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


E-Meeting system use Laravel PHP Framework base.
Laravel version 5.2.31
Documentation for the framework can be found on the Laravel website.
The Laravel framework is open-sourced software licensed under the MIT license.


The High Definition setting only applies to browsers with pixel ratios greater than 1 (most mobile devices), it won't have an effect on your current browser.
High Definition
Auto Resize


I am experienced in Android development with Java, and am currently learning Kotlin. Working on my web development skills constantly; familiar with the standard LAMP stack, with an interest in React.
Backend Ruby developer for the Orders team.
Sole developer for custom Android framework development for three distinct research projects. Web development for University of Alberta Grand Forum project by contributing to forked web applications for the faculties of Computing Science, Chemistry, Physics, and Occupational Therapy.
Android development for as-of-yet unreleased application. Consulting end-to-end architecture design with emphasis in maintainability and scalability.
Ran Android development workshop, provided programming aid to various HackDay projects in Java and C++.
C# and Android development in connection to two research projects. Maintaining industrial drone for crop imaging. Python with OpenCV for processing said crop imaging.
Integrating SVG graphics with live MongoDB database recording hundreds of sensors around a research facility to aid with visualization of data as it occurs. Contributing to Node.js web app development for accessing database.
GPA: 3.33
I truly love to program. I'd go so far as to say it is my favourite hobby even with work revolving around it. When not working on a project, I enjoy the outdoors, provided it isn't too cold out. Winter is great for just two reasons: the hockey season begins, and ski hills open up. In the four months of "not-winter" in Alberta, I enjoy running and spending as much time as possible relaxing at the lake, making the most of the extended daylight.
Indoors, I consider myself a chef, musician (keyboard, ukulele, bass), and video gamer. I also enjoy reading about and adopting the newest in software development. Currently, Kotlin!


"Bringing foodies and fooders together!"
you can find the food trucks you love in the area you live!
Copyright CHOWSTER @2020


"MATTOCK "(1.) Hebrews ma’eder, an instrument for dressing or pruning a vineyard (Isaiah 7:25); a weeding-hoe. (2.) Hebrews mahareshah (1 Samuel 13:1), perhaps the ploughshare or coulter. (3.) Hebrews herebh, marg. of text (2 Chronicles 34:6). Authorized Version, “with their mattocks,” marg. “mauls.” The Revised Version renders “in their ruins,” marg. “with their axes.” The Hebrew text is probably corrupt.
"MATTOCK "(1.) Hebrews ma’eder, an instrument for dressing or pruning a vineyard (Isaiah 7:25); a weeding-hoe.
(2.) Hebrews mahareshah (1 Samuel 13:1), perhaps the ploughshare or coulter.
(3.) Hebrews herebh, marg. of text (2 Chronicles 34:6). Authorized Version, “with their mattocks,” marg. “mauls.” The Revised Version renders “in their ruins,” marg. “with their axes.” The Hebrew text is probably corrupt.


{% load static %}
Main Project Home
Game Home
Toggle Dark/Light Mode
{{results}} {% if game_over == False%}
Try again with 1/2 the numbers
Split Odds
{% endif%} {% if game_over == True %}
Start New Game
{% endif %}


|
|
| any () |
| | Constructs an object of type any with an empty state.
|
| |
|
| any (const any &rhs) |
| | Constructs an object of type any with an equivalent state as other.
|
| |
| | any (any &&rhs) noexcept |
| | Constructs an object of type any with a state equivalent to the original state of other. More...
|
| |
|
| ~any () |
| | Same effect as this->clear().
|
| |
| template<typename ValueType , typename = typename std::enable_if<!std::is_same<typename std::decay<ValueType>::type, any>::value>::type> |
| | any (ValueType &&value) |
| | Constructs an object of type any that contains an object of type T direct-initialized with std::forward<ValueType>(value). More...
|
| |
|
any & | operator= (const any &rhs) |
| | Has the same effect as any(rhs).swap(*this). No effects if an exception is thrown.
|
| |
| any & | operator= (any &&rhs) noexcept |
| | Has the same effect as any(std::move(rhs)).swap(*this). More...
|
| |
| template<typename ValueType , typename = typename std::enable_if<!std::is_same<typename std::decay<ValueType>::type, any>::value>::type> |
| any & | operator= (ValueType &&value) |
| | Has the same effect as any(std::forward<ValueType>(value)).swap(*this). More...
|
| |
|
void | clear () noexcept |
| | If not empty, destroys the contained object.
|
| |
|
bool | empty () const noexcept |
| | Returns true if *this has no contained object, otherwise false.
|
| |
|
const std::type_info & | type () const noexcept |
| | If *this has a contained object of type T, typeid(T); otherwise typeid(void).
|
| |
|
void | swap (any &rhs) noexcept |
| | Exchange the states of *this and rhs.
|
| |
|
|
bool | is_typed (const std::type_info &t) const |
| | Same effect as is_same(this->type(), t);.
|
| |
|
template<typename T > |
| const T * | cast () const noexcept |
| | Casts (with no type_info checks) the storage pointer as const T*.
|
| |
|
template<typename T > |
| T * | cast () noexcept |
| | Casts (with no type_info checks) the storage pointer as T*.
|
| |
|
| static bool | is_same (const std::type_info &a, const std::type_info &b) |
| | Checks if two type infos are the same. More...
|
| |
|
| template<typename T > |
| const T * | any_cast (const any *operand) noexcept |
| | If operand != nullptr && operand->type() == typeid(ValueType), a pointer to the object contained by operand, otherwise nullptr. More...
|
| |
| template<typename T > |
| T * | any_cast (any *operand) noexcept |
| | If operand != nullptr && operand->type() == typeid(ValueType), a pointer to the object contained by operand, otherwise nullptr. More...
|
| |
| linb::any::any |
( |
any && |
rhs | ) |
|
|
inlinenoexcept |
Constructs an object of type any with a state equivalent to the original state of other.
rhs is left in a valid but otherwise unspecified state.
template<typename ValueType , typename = typename std::enable_if<!std::is_same<typename std::decay<ValueType>::type, any>::value>::type>
| linb::any::any |
( |
ValueType && |
value | ) |
|
|
inline |
Constructs an object of type any that contains an object of type T direct-initialized with std::forward<ValueType>(value).
T shall satisfy the CopyConstructible requirements, otherwise the program is ill-formed. This is because an any
may be copy constructed into another any
at any time, so a copy should always be allowed.
| static bool linb::any::is_same |
( |
const std::type_info & |
a, |
|
|
const std::type_info & |
b |
|
) |
| |
|
inlinestaticprotected |
Checks if two type infos are the same.
If ANY_IMPL_FAST_TYPE_INFO_COMPARE is defined, checks only the address of the type infos, otherwise does an actual comparision. Checking addresses is only a valid approach when there's no interaction with outside sources (other shared libraries and such).
| any& linb::any::operator= |
( |
any && |
rhs | ) |
|
|
inlinenoexcept |
Has the same effect as any(std::move(rhs)).swap(*this).
The state of *this is equivalent to the original state of rhs and rhs is left in a valid but otherwise unspecified state.
template<typename ValueType , typename = typename std::enable_if<!std::is_same<typename std::decay<ValueType>::type, any>::value>::type>
| any& linb::any::operator= |
( |
ValueType && |
value | ) |
|
|
inline |
Has the same effect as any(std::forward<ValueType>(value)).swap(*this).
No effect if a exception is thrown.
T shall satisfy the CopyConstructible requirements, otherwise the program is ill-formed. This is because an any
may be copy constructed into another any
at any time, so a copy should always be allowed.
template<typename T >
| const T* any_cast |
( |
const any * |
operand | ) |
|
|
friend |
If operand != nullptr && operand->type() == typeid(ValueType), a pointer to the object contained by operand, otherwise nullptr.
template<typename T >
| T* any_cast |
( |
any * |
operand | ) |
|
|
friend |
If operand != nullptr && operand->type() == typeid(ValueType), a pointer to the object contained by operand, otherwise nullptr.
The documentation for this class was generated from the following file:


Deepak Chouhan
I am a computer science student. Passionate about technology
Thanks You for Visiting!
I am a computer science student. Passionate about technology
Thanks You for Visiting!


REGISTRATION FORM
Enter your first name:
Enter your last name:
Sex:
Male
Female
Tell more about yourself:


Our services:
Clinic36 offers a number of services - the dispensing of both methadone, suboxone, and subutex, all depending on which treatment options clients might choose, in conjunction with
the opinion of a doctor assigned to them. The clinic ensures patients have frequent checkups with an in-house medical doctor, under the supervision of whom, clients of the clinic can choose to undergo titration (the raising or lowering of the
dose according to the needs of the patient), maintenence, or a medically supervised detox, where a patient chooses to slowly taper themselves off of the medication they're currently on. Clinic 36 is also a liver clinic; a clinic at which patients
with Hepatitis, or other liver diseases or complications can seek medical advice, and increasingly effective treatment. New treatment options for hepatitis A and B have recently become available; depending on a variety of factors, hepatitis A
and B are actually curable.


WEEK 14 SUNDAY
Entrance Antiphon Cf. Ps 47:10-11
Your merciful love, O God, we have received in the midst of your temple. Your praise,
O God, like your name, reaches the ends of the earth. Your right hand is filled with saving justice.
Collect
O God, who in the abasement of your Son have raised up a fallen world, fill your faithful with holy joy, for on those you have rescued from slavery to sin you bestow eternal gladness. Through our Lord...
Theme of the Sunday: God Reveals Himself to the Poor.
The gospel shows Jesus “gentle and humble,” that is, on the side of the poor and the oppressed. He rejoices because it is to them that the Father has revealed his message of salvation. In the first reading we find the words of the prophet announcing a Messiah who is poor and humble. These appear to be words that describe Jesus. The second reading can be linked to this theme because it speaks of the Spirit who can only be received by the poor, by those who are “humble in heart.”
FIRST READING Zechariah 9:9-10
A reading from the Book of the Prophet Zechariah
Thus says the LORD: Rejoice greatly, O daughter of
The word of the Lord
RESPONSORIAL PSALM Psalm 145:1-2.8-9.10-11.13cd-14 (R. see 1)
R. I will bless your name for ever, my king and my God.
I will extol you, my God and King, and bless your
name for ever and ever. I will bless you day after day, and praise your name
for ever and ever.
R. I will bless your name for ever, my king and my
God.
The LORD is kind and full of compassion, slow to
anger, abounding in mercy. How good is the LORD to all, compassionate to all
his creatures.
R. I will bless your name for ever, my king and my
God.
All your works shall thank you, O LORD, and your
faithful ones bless you. They shall speak of the glory of your reign, and
declare your mighty deeds.
R. I will bless your name for ever, my king and my
God.
The LORD is faithful in all his words, and holy in
all his deeds. The LORD supports all who fall, and
raises up all who are bowed down.
R. I will bless your name for ever, my king and my
God.
SECOND READING Romans 8:9.11-13
A reading from the Letter of Saint Paul to the Romans
Brethren: You are not in the flesh,
you are in the Spirit, if the Spirit of God really dwells in you. Any one who
does not have the Spirit of Christ does not belong to him. If the Spirit of him
who raised Jesus from the dead dwells in you, he who raised Christ Jesus from
the dead will give life to your mortal bodies also through his Spirit which
dwells in you. So then, brethren, we are debtors, not to the flesh, to live
according to the flesh-- for if you live according to the flesh you will die,
but if by the Spirit you put to death the deeds of the body you will
live.
The word of the Lord
ALLELUIA Matthew 11:25
R. Alleluia. Blessed are you, Father, Lord of heaven and earth, that you have revealed to little ones the mysteries of the kingdom. R. Alleluia.
GOSPEL Matthew 11:25-30
A reading from the holy Gospel according to Matthew
At that time Jesus declared, "I thank you, Father, Lord of heaven and earth, that you have hidden these things from the wise and understanding and revealed them to infants; yes, Father, for such was your gracious will. All things have been delivered to me by my Father; and no one knows the Son except the Father, and no one knows the Father except the Son and any one to whom the Son chooses to reveal him. Come to me, all who labour and are heavy laden, and I will give you rest. Take my yoke upon you, and learn from me; for I am gentle and lowly in heart, and you will find rest for your souls. For my yoke is easy, and my burden is light."
The Gospel of the Lord.
Theme of the Sunday: The Power of God Is Manifested through the Weakness.
The first reading describes the vocation of the prophet Ezekiel. He was a simple man, like other men. What he accomplished was due to the power of the Word of God. The second reading is even clearer. Paul states that the power of God always manifests itself through weak instruments. The gospel shows the reaction of Jesus to the people of Nazareth because they failed to understand the true ways of God, and did not recognise him as the Messiah, and deprived themselves of salvation.
FIRST READING Ezekiel 2:2-5
A reading from the Book of the Prophet Ezekiel
In those days: The Spirit entered into me and set
me upon my feet; and I heard him speaking to me. And he said to me, "Son
of man, I send you to the people of
The word of the Lord
RESPONSORIAL PSALM Psalm 123:1-2a.2bc.3-4 (R. 2ef)
R. Our eyes are on the Lord our God, till he show us his mercy.
To you have I lifted up my eyes, you who dwell in
the heavens. Behold, like the eyes of slaves on the
hand of their lords.
R. Our eyes are on the Lord our God, till he show us his mercy.
Like the eyes of a servant on the hand of her
mistress, so our eyes are on the LORD our God, till he show
us his mercy.
R. Our eyes are on the Lord our God, till he show us his mercy.
Have mercy on us, LORD, have mercy. We are filled
with contempt. Indeed, all too full is our soul with the scorn of the arrogant,
the disdain of the proud.
R. Our eyes are on the Lord our God, till he show us his mercy.
SECOND READING 2 Corinthians 12:7-10
A reading from the second Letter of Saint Paul to the Corinthians
Brethren: To keep me from being too elated by the
abundance of revelations, a thorn was given me in the flesh, a messenger of
Satan, to harass me, to keep me from being too elated. Three times I besought
the Lord about this, that it should leave me; but he said to me, "My grace
is sufficient for you, for my power is made perfect in weakness." I will
all the more gladly boast of my weaknesses, that the power of Christ may rest
upon me. For the sake of Christ, then, I am content with weaknesses, insults,
hardships, persecutions, and calamities; for when I am weak, then I am
strong.
The word of the Lord
ALLELUIA Luke 4:18
R. Alleluia. The spirit of the Lord is upon me; he has sent me to preach good news to the poor. R. Alleluia.
GOSPEL Mark 6:1-6
A reading from the holy Gospel according to Mark
Jesus came to his own country; and his disciples followed him. And on the sabbath he began to teach in the synagogue; and many who heard him were astonished, saying, "Where did this man get all this? What is the wisdom given to him? What mighty works are wrought by his hands! Is not this the carpenter, the son of Mary and brother of James and Joses and Judas and Simon, and are not his sisters here with us?" And they took offence at him. And Jesus said to them, "A prophet is not without honour, except in his own country, and among his own kin, and in his own house." And he could do no mighty work there, except that he laid his hands upon a few sick people and healed them. And he marvelled because of their unbelief. And he went about among the villages teaching.
The Gospel of the Lord.
Theme of the Sunday: Sent to Announce Peace.
In his letter to the Romans, Paul says that one cannot believe in Christ without first having heard about him. Faith depends on preaching (Rom 10:14-17). The gospel of today begins by recalling the need for people who will announce the word of God; it goes on to show how they should carry out their mission. They are reminded not to be discouraged, that evil has already been defeated and the victory of the kingdom of God is assured. The first reading is in line with this last part of the gospel. When troubles come we should not forget that the promises of God will always be realised. The lamb does not rely on its own strength but on the help of the shepherd; a child may be weak, but is safe in the arms of its mother. The second reading is also about this. Paul says that his glory is in the cross of Christ. Those who proclaim the gospel must not rely on their own strength. Our strength comes from the word that we proclaim.
FIRST READING Isaiah 66:10-14
A reading from the Book of Isaiah
"Rejoice with
The word of the Lord
RESPONSORIAL PSALM Psalm 66:1-3a.4-5.6-7a.16 and 20 (R. 1)
R. Cry
out with joy to God, all the earth.
Cry out with joy to God all the earth; O sing to the glory of his name. O render
him glorious praise. Say to God: 'How awesome your deeds!
R. Cry
out with joy to God, all the earth.
 Come and see the
works of God: awesome his deeds among the children of men.
R. Cry
out with joy to God, all the earth.
He turned the sea into dry land; they passed
through the river on foot. Let our joy, then, be in him; he rules for ever by
his might.
R. Cry
out with joy to God, all the earth.
Come and hear, all who
fear God; I will tell what he did for my soul. Blest be God, who did not reject
my prayer, nor withhold from me his merciful love.
R. Cry
out with joy to God, all the earth.
SECOND READING Galatians 6:14-18
A reading from the Letter of Saint Paul to the Galatians
Brethren: Far be it from me to glory except in the
cross of our Lord Jesus Christ, by which the world has been crucified to me,
and I to the world. For neither circumcision counts for
anything, nor uncircumcision, but a new creation. Peace and mercy be
upon all who walk by this rule, upon the Israel of God. Henceforth let no man
trouble me; for I bear on my body the marks of Jesus. The grace of our Lord
Jesus Christ be with your spirit, brethren. Amen.
ALLELUIA Colossians 3:15.16
R. Alleluia.  R. Alleluia.
GOSPEL Luke 10:1-12.17-20
A reading from the holy Gospel according to Luke
At that time: The Lord appointed seventy others,
and sent them on ahead of him, two by two, into every town and place where he
himself was about to come. And he said to them, "The harvest is plentiful,
but the labourers are few; pray therefore the Lord of the harvest to send out
labourers into his harvest.  Carry no purse, no bag, no sandals;
and salute no one on the road. Whatever house you enter, first say, 'Peace be to this house!' And if a son of peace is there, your
peace shall rest upon him; but if not, it shall return to you. And remain in
the same house, eating and drinking what they provide, for the labourer
deserves his wages; do not go from house to house. Whenever you enter a town
and they receive you, eat what is set before you; heal the sick in it and say
to them, 'The
The Gospel of the Lord.
Prayer over the Offerings
May this oblation, dedicated to your name purify us, O Lord, and day by day bring our conduct closer to the life of heaven. Through Christ our Lord.
Communion Antiphon
Ps 33:9
Taste and see that the Lord is good. Blessed the man who seeks refuge in him.
Or
Mt 11:28
We have come to know and to believe in the love that
God has for us.
Prayer after Communion
Grant, we pray, O Lord, that having been replenished by such great gifts, we may gain the prize of salvation and never cease to praise you. Through Christ our Lord.


1. Booking - 01/05/2017
Confirm
Cancel
Edit
Delete
2. Booking - 01/05/2017
Confirm
Cancel
Edit
Delete
Edit event on your calendar
Title:
Desc:
Date:
1. Booking - 01/05/2017
Confirm
Cancel
Edit
Delete


✔ Booking complete
Please keep this information for your records
Your appointment details
Booking reference number
0002 7480 8900
Date and time
Monday 18th November 2018, 1:30pm
Clinic
Rheumatology - Chapel Allerton Hospital - Leeds TH - RR8
Location
CHAPELTOWN ROAD
LEEDS
WEST YORKSHIRE
England
LS7 4SA
Referred by
Dr Zubeir Smith at New Street Medical Practice
Information
Please arrive 30 minutes before your appointment is due to start. Wear loose clothing.
To change or cancel this apopintment go to nhs.uk/referrals. You will need to login using the reference number and access code or password provided in your referral letter or email.
What happens next?
You do not need to do anything else.
We’ve sent your request to the provider. The provider will contact you if there are any issues with this booking. You may find it useful to print a copy of your appointment details or take a note of them.
You can change or cancel your appointment here.
You can return here at any point up to your appointment date by logging in to nhs.uk/referrals.


Modern bungalows located in a scenic natural area near the sea, north of Falkenberg.
Retreat from the desk, return refreshed.
Have the work week you always dreamed of — to reconnect with yourself and your team.
16 private rooms, 2 group meeting rooms, and 4 breakout rooms to hang out in.
Private chef team providing on demand meals - just like your team kitchen.
5 outdoor obstacle courses, and a beautiful beach five minutes walk from the bungalows.
Retreat facilitator to manage your day to day activities so you all get a chance to reset.
Dedicated computer room for times that you just must use the wifi.
Be a better team in 5 days, like this one.
The GreenHubs Co. September 2019
"This retreat really changed our team's group dynamics for the better.
In the 5 obstacle courses we got a chance to finally get to know each other for real,
show vulnerability and practice daring to ask each other for help. We would never want
to go back to how we were as a group before visiting Unplugged retreat."
— Anna, CEO GreenHubs Co.


| EU CPI (YoY) % | Actuals | |||||
| Release Dt | For Month | Market Expectation | Kshitij Expectation | Previous | Released | Revision |
| 18-Dec-17 | Nov-17 | 1.50 | - | 1.38 | 1.54 | - |
| 17-Jan-18 | Dec-17 | 1.40 | - | 1.54 | 1.35 | - |
| 23-Feb-18 | Jan-18 | 1.30 | 1.89 | 1.35 | 1.30 | - |
| 16-Mar-18 | Feb-18 | - | - | 1.30 | - | - |
| Copyright: Kshitij Consultancy Services |


my favourite things
My Favourites Things
Here are the List of My Favourite Things
- Dancing
- Coffee
- Programming
- Sleeping
- Watching Movies
My Favourite Things
Best Friends
- Maggie Opiata
- Kimosop
- Milka Wangare
- Onyango Kamau
Favourite Foods
- Ugali Nyama
- Chapati Madodo
- Pilau Njeri
- Samaki wa kupaka
Some of my favourite things are swimming , jogging and watching movies
My favourite websites


Keyword: call
An action can call another action, passing arguments, using the call
keyword, for example:
action connect_unique(a:node, b:node) = {
call clear(a);
call connect(a,b)
}
Ivy uses the call-by-value convention. That is, when we call clear(a)
a local variable x
is created during the execution of clear
and assigned the value a
. This means that, as in the C programming language, modifying the value of x
in clear
would not result in modifying the value of a
in connect_unique
.
The return values of an action can be obtained like this:
call x,y := swap(x,y)
An action with a single return value can be called within an expression. For example, if sqrt
is an action, then:
x := y + sqrt(z)
is equivalent to
call temp := sqrt(z)
x := y + temp
If there is more than one call within an expression, the calls are executed in left-to-right order. Calls inside conditional operators occur whether or not the condition is true. For example, the statement:
x := sqrt(y) if c else z
is equivalent to:
call temp := sqrt(y);
x := temp if c else z
Parentheses are not used when calling an action with no parameters. For example, if we have:
action next returns (val:t) = {
current := current + 1;
val := current
}
then we would write:
x := y + next
The lack of parentheses introduces no ambiguity, since the action next
is not a value and cannot itself be passed as an argument to the function +
. An advantage of this convention is that we don't have to remember whether next
is an action or a declared variable, and we can easily replace a variable by an action without modifying all references to the variable.


Debate Types
| Debate Type | # of people | Types of evidence | Notes |
|---|---|---|---|
| Lincoln-Douglas | 1v1 | Philosphy | |
| Public Forum Debate | 2v2 | Philosophy and Practical | Topics ripped from the headlines |
| Cross-Examination / Policy Debate | 2v2 | Practical | Hardcore |
| World Schools Debate | 3v3 | Philosophy and Practical | Not very common in US |
| Congressional Debate | 20-30 individuals | mostly Practical | like a mock congress |


Lidia's Diary:
Everyone is dead.
I was finally able to see Nidrah, by using some terrible tricks I won't divulge here!
I just had to see him!
He was my only hope!
He agreed to see me, even though he was in the middle of a ceremony!
He reminded me what he'd said before.
He said to have courage and act!
I'm sure now that the time is right!
Turn the page.


Presented by Mike Smith
<EMAIL_ADDRESS>See The Algorithmic Foundations of Differential Privacy by Dwork and Roth for a rigorous introduction to the framework.
In the mid-1990s the Massachusetts Group Insurance Commission released 'anonymised' health records for state employees.
The Governor assured the public that GIC had protected patient privacy by deleting identifiers.
Broken Promises of Privacy, Paul Ohm
The data was 'anonymised' by removing names. Other identifying columns remained.
Latanya Sweeney used the voter rolls to find the Governor's medical records...
...which she posted to him.
This is a linkage attack: it uses auxiliary information to compromise privacy in a database.
We might want to find out whether people hold a controversial view, that they wouldn't normally express:
Many people in this room might secretly agree, but maybe wouldn't like to say 'Yes' to this question.
If they're the same...
say
YES for heads
and
NO for tails
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 50 | 38 | 27 | 19 | 13 | 9 | 6 | 4 | 3 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 63 | 50 | 38 | 28 | 20 | 14 | 10 | 7 | 4 | 3 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | 73 | 62 | 50 | 39 | 29 | 21 | 15 | 11 | 7 | 5 | 3 | 2 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| 3 | 81 | 72 | 62 | 50 | 40 | 30 | 22 | 16 | 11 | 8 | 6 | 4 | 3 | 2 | 1 | 1 | 1 | 0 | 0 | 0 |
| 4 | 87 | 80 | 72 | 61 | 50 | 40 | 31 | 23 | 17 | 12 | 9 | 6 | 4 | 3 | 2 | 1 | 1 | 1 | 0 | 0 |
| 5 | 91 | 86 | 79 | 71 | 61 | 51 | 41 | 32 | 24 | 18 | 13 | 10 | 7 | 5 | 3 | 2 | 2 | 1 | 1 | 1 |
| 6 | 94 | 91 | 85 | 79 | 70 | 61 | 51 | 41 | 32 | 25 | 19 | 14 | 10 | 8 | 5 | 4 | 3 | 2 | 1 | 1 |
| 7 | 96 | 94 | 90 | 85 | 78 | 69 | 60 | 51 | 42 | 33 | 26 | 20 | 15 | 11 | 8 | 6 | 4 | 3 | 2 | 2 |
| 8 | 97 | 96 | 93 | 89 | 84 | 77 | 69 | 60 | 51 | 42 | 34 | 27 | 21 | 16 | 12 | 9 | 7 | 5 | 3 | 3 |
| 9 | 98 | 97 | 95 | 92 | 88 | 83 | 76 | 68 | 60 | 51 | 42 | 35 | 28 | 22 | 17 | 13 | 10 | 7 | 5 | 4 |
| 10 | 99 | 98 | 97 | 95 | 92 | 87 | 82 | 75 | 68 | 59 | 51 | 43 | 35 | 28 | 23 | 18 | 14 | 10 | 8 | 6 |
| 11 | 99 | 99 | 98 | 96 | 94 | 91 | 87 | 81 | 75 | 67 | 59 | 51 | 43 | 36 | 29 | 23 | 18 | 14 | 11 | 8 |
| 12 | 99 | 99 | 98 | 97 | 96 | 94 | 90 | 86 | 80 | 74 | 67 | 59 | 51 | 43 | 36 | 30 | 24 | 19 | 15 | 12 |
| 13 | 100 | 99 | 99 | 98 | 97 | 95 | 93 | 90 | 85 | 80 | 73 | 66 | 59 | 51 | 44 | 37 | 30 | 25 | 20 | 16 |
| 14 | 100 | 100 | 99 | 99 | 98 | 97 | 95 | 92 | 89 | 84 | 79 | 73 | 66 | 58 | 51 | 44 | 37 | 31 | 25 | 21 |
| 15 | 100 | 100 | 100 | 99 | 99 | 98 | 96 | 94 | 92 | 88 | 84 | 78 | 72 | 65 | 58 | 51 | 44 | 38 | 32 | 26 |
| 16 | 100 | 100 | 100 | 99 | 99 | 98 | 97 | 96 | 94 | 91 | 87 | 83 | 78 | 71 | 65 | 58 | 51 | 44 | 38 | 32 |
| 17 | 100 | 100 | 100 | 100 | 99 | 99 | 98 | 97 | 96 | 93 | 91 | 87 | 82 | 77 | 71 | 65 | 58 | 51 | 45 | 38 |
| 18 | 100 | 100 | 100 | 100 | 100 | 99 | 99 | 98 | 97 | 95 | 93 | 90 | 86 | 82 | 76 | 71 | 64 | 58 | 51 | 45 |
| 19 | 100 | 100 | 100 | 100 | 100 | 99 | 99 | 99 | 98 | 97 | 95 | 92 | 89 | 86 | 81 | 76 | 70 | 64 | 58 | 51 |
We want to protect a user from a linkage attack...
...while still performing inference over the whole group.
Making a dataset private needs more than just erasing names.
To achieve a level of privacy one needs to add randomness to the data.
This is a fundamental feature of differential privacy.
We have a dataset in which the inputs, $X$, are public. The outputs, $\mathbf{y}$, we want to keep private.
Data consists of the heights and weights of 287 women from a census of the !Kung
Hall et al. (2013) showed that one can ensure that a version of $f$, function $\tilde{f}$ is $(\varepsilon, \delta)$-differentially private by adding a scaled sample from a GP prior.
3 pages of maths ahead!
We applied this method to the GP posterior.
The covariance of the posterior only depends on the inputs, $X$. So we can compute this without applying DP.
The mean function, $f_D(\mathbf{x_*})$, does depend on $\mathbf{y}$. $f_D(\mathbf{x_*}) = \mathbf{k}_*^\top K^{-1} \mathbf{y}$
We are interested in finding $|| f_D(\mathbf{x_*}) - f_{D^\prime}(\mathbf{x_*}) ||_H^2$
...how much the mean function (in RKHS) can change due to a change in $\mathbf{y}$.
Using the representer theorem, we can write $|| f_D(\mathbf{x_*}) - f_{D^\prime}(\mathbf{x_*}) ||_H^2$
as:
$\Big|\Big|\sum_{i=1}^n k(\mathbf{x_*},\mathbf{x}_i) \left(\alpha_i - \alpha^\prime_i\right)\Big|\Big|_H^2$
where $\mathbf{\alpha} - \mathbf{\alpha}^\prime = K^{-1} \left(\mathbf{y} - \mathbf{y}^\prime \right)$
$\Big|\Big|\sum_{i=1}^n k(\mathbf{x_*},\mathbf{x}_i) \left(\alpha_i - \alpha^\prime_i\right)\Big|\Big|_H^2$
where $\mathbf{\alpha} - \mathbf{\alpha}^\prime = K^{-1} \left(\mathbf{y} - \mathbf{y}^\prime \right)$
We constrain the kernel: $-1\leq k \leq 1$ and we only allow one element of $\mathbf{y}$ and $\mathbf{y}'$ to differ (by at most $d$).
So only one column of $K^{-1}$ will be involved in the change of mean (which we are summing over).
The distance above can then be shown to be no greater than $d\;||K^{-1}||_\infty$
This 'works' in that it allows DP predictions...but to avoid too much noise, the value of $\varepsilon$ is too large (here it is 100)
EQ kernel, $l = 25$ years, $\Delta=100$cm
Using sparse methods (i.e. inducing inputs) can help reduce the sensitivity a little.
So far we've made the whole posterior mean function private...
...what if we just concentrate on making particular predictions private?
Previously I mentioned that the noise is sampled from the GP's prior.
This is not necessarily the most 'efficient' covariance to use.
Left: Ideal covariance. Right: actual covariance
Hall et al. (2013) also presented a bound on vectors.
Find a bound ($\Delta$) on the scale of the output change, in term of its Mahalanobis distance (wrt the added noise covariance).
$\sup_{D \sim {D'}} ||M^{-1/2} (\mathbf{y}_* - \mathbf{y}_{*}')||_2 \leq \Delta$
We use this to scale the noise we add:
$\frac{\text{c}(\delta)\Delta}{\varepsilon} \mathcal{N}_d(0,M)$
We get to pick $M$
Intuitively we want to construct $M$ so that it has greatest covariance in those directions most affected by changes in training points, so that it will be most able to mask those changes.
The change in posterior mean predictions is,
$\mathbf{y}_* - \mathbf{y}'_* = K_{*f} K^{-1} (\mathbf{y}-\mathbf{y}')$
The effect of perturbing each training point on each test point is represented in the cloaking matrix, $C = K_{*f} K^{-1}$
We assume we are protecting only one training input's change, by at most $d$.
So $\mathbf{y}-\mathbf{y}'$ will be all zeros except for one element, $i$.
So the change in test points will be (at most)
$\mathbf{y}_*' - \mathbf{y}_* = d C_{:i}$
We're able to write the earlier bound as,
$d^2 \sup_{i} \mathbf{c}_i^\top M^{-1} \mathbf{c}_i \leq \Delta$
where $\mathbf{c}_i \triangleq C_{:i}$
Dealing with $d$ elsewhere and setting $\Delta = 1$ (thus $0 \leq \mathbf{c}_i^\top M^{-1} \mathbf{c}_i \leq 1$) and minimise $\log |M|$ (minimises the partial entropy).
Using lagrange multipliers and gradient descent, we find
$M = \sum_i{\lambda_i \mathbf{c}_i \mathbf{c}_i^\top}$
The noise added by this method is now practical.
EQ kernel, $l = 25$ years, $\Delta=100$cm, $\varepsilon=1$
It also has some interesting features;
House prices around London
Tested on 4d citibike dataset (predicting journey durations from start/finish station locations).
The method appears to achieve lower noise than binning alternatives (for reasonable $\varepsilon$).
lengthscale in degrees, values above, journey duration (in seconds)We have developed an improved method for performing differentially private regression.
Unlike binning this can scale to increased numbers of dimensions
Multiple outputs
GP classification
DP Optimising hyperparameters
Making the inputs private
The go-to book on differential privacy, by Dwork and Roth;
Dwork, Cynthia, and Aaron Roth. "The algorithmic foundations of differential privacy." Theoretical Computer Science 9.3-4 (2013): 211-407.
link
I found this paper allowed me to start applying DP to GP;
Hall, Rob, Alessandro Rinaldo, and Larry Wasserman. "Differential privacy for functions and functional data." The Journal of Machine Learning Research 14.1 (2013): 703-727.
link
Articles about the Massachusetts privacy debate
Barth-Jones, Daniel C. "The're-identification'of Governor William Weld's medical information: a critical re-examination of health data identification risks and privacy protections, then and now." Then and Now (June 4, 2012) (2012). link
Ohm, Paul. "Broken promises of privacy: Responding to the surprising failure of anonymization." UCLA Law Review 57 (2010): 1701. link
Narayanan, Arvind, and Edward W. Felten. "No silver bullet: De-identification still doesn’t work." White Paper (2014). link
Howell, N. Data from a partial census of the !kung san, dobe. 1967-1969. https://public.tableau. com/profile/john.marriott#!/vizhome/ kung-san/Attributes, 1967.
Images used: BostonGlobe: Mass Mutual, Weld. Harvard: Sweeney. Rich on flickr: Sheffield skyline.


a side-by-side reference sheet
grammar and invocation | variables and expression | arithmetic and logic | strings | regexes | dates and time | resizable arrays | dictionaries | functions | execution control | exceptions | streams | files | file formats | directories | processes and environment | libraries and namespaces | objects | inheritance and polymorphism | reflection | gui | net and web
| javascript | smalltalk | tcl | autohotkey | |
|---|---|---|---|---|
| version used |
ECMAScript 5 | Pharo 3.0 | 8.5 | 1.1 |
| show version |
ECMAScript 5 compatibility | SmalltalkImage current aboutThisSystem. at command line: $ ./pharo Pharo.image printVersion |
$ tclsh % info tclversion |
msgbox % a_ahkversion |
| grammar and invocation | ||||
| javascript | smalltalk | tcl | autohotkey | |
| interpreter |
$ tclsh foo.tcl | > autohotkey foo.ahk | ||
| repl |
Javascript Console: Chrome (Mac): ⌥⌘J Chrome (Win): Ctrl+Shift+J Firefox (Mac): ⌥⌘K Firefox (Win): Ctrl+Shift+K |
$ tclsh | ||
| command line program |
$ Pharo --headless Pharo.image eval '1 + 1.' | none | none | |
| statement separator | ; or newline newline not separator inside (), [], {}, "", '', or after binary operator newline sometimes not separator when following line would not parse as a valid statement |
period: . | newline or ; newline not a separator inside {}, "", [] or after backslash: \ |
sometimes newline newline does not terminate statement: (1) inside parens (2) when following line starts with binary operator |
| block delimiters |
{} | [ ] | {} or "" | { } |
| regions which define lexical scope | top level: html page nestable: function |
|||
| are expressions statements |
yes | no | no | |
| end-of-line comment |
// comment | no | # comment | ; comment |
| multiple line comment | /* line another line */ |
"comment another comment" |
if (0) { commented out can contain {} if balanced } |
/* comment another comment */ |
| variables and expressions | ||||
| javascript | smalltalk | tcl | autohotkey | |
| local variable | var x = 1; var y = 2, z = 3; |
# set variable inside procedure: proc foo {args} { set x 1 … } |
||
| global variable | // assign without using var g = 1; function incr_global () { g++; } |
# set variable outside procedure: set g 1 proc incr_global {} { global g incr g } |
||
| assignment | x = 1; | a := 1. | set x 1 | s1 := PATH s2 := "foo bar" ; traditional style: s1 = %PATH% s2 = foo bar |
| parallel assignment |
none | none | lassign {1 2 3} x y z # 3 is discarded: lassign {1 2 3} x y # z is set to "": lassign {1 2} x y z |
none |
| swap |
tmp = x; x = y; y = tmp; |
lassign "$x $y" y x | none | |
| compound assignment arithmetic, string, bit |
+= -= *= /= none %= += none <<= >>= &= |= ^= |
+= -= *= /= //= .= <<= >>= &= |= ^= |
||
| increment and decrement | var x = 1; var y = ++x; var z = --y; |
premodifiers: ++i --i postmodifiers: i++ i-- |
||
| variable declaration |
||||
| null |
null | nil | "" | "" |
| null test |
v === null | v = nil | v eq "" | v == "" ; traditional style: v = |
| undefined variable |
undefined | evaluates as nil | error | evaluates as empty string |
| conditional expression |
x > 0 ? x : -x | x > 0 ifTrue: [x] ifFalse: [0 - x] | expr $x > 0 ? $x : -$x | x > 0 ? x : -x |
| arithmetic and logic | ||||
| javascript | smalltalk | tcl | autohotkey | |
| true and false |
true false | true false | 1 0 | 1 0 synonyms: true false |
| falsehoods | false null undefined "" 0 NaN | false | 0 "false" "no" most strings cause error in boolean context; nonzero numbers are true |
0 "" |
| logical operators |
&& || ! | & | not | && || ! | and or not synonyms: && || ! |
| relational expression | if {$x > 3} {…} # outside of conditionals use expr: expr $x > 3 |
|||
| relational operators |
=== !== < > >= <= perform type coercion: == != |
= ~= > < >= <= | == != > < >= <= # string comparison: eq ne |
== != > < >= <= case insensitive equality: = |
| min and max | Math.min(1, 2, 3) Math.max(1, 2, 3) Math.min.apply(Math, [1, 2, 3]) Math.max.apply(Math, [1, 2, 3]) |
expr min(1, 2, 3) expr max(1, 2, 3) |
||
| arithmetic expression |
1 + 3 "Binary operators are evaluated left to right. This is 20:" 1 + 3 * 5 |
expr 1 + 3 # expr not needed in conditionals: if {1 + 3} {…} |
1 + 3 | |
| arithmetic operators addition, subtraction, multiplication, float division, quotient, remainder |
+ - * / none % | + - * / // \\ | + - * none / % | + - * / // none ** modulo function: mod(m, n) |
| integer division |
Math.floor(x / y) | 7 // 3 | expr $x / $y | 7 // 3 |
| integer division by zero |
returns assignable value Infinity, NaN, or -Infinity depending upon whether dividend is positive, zero, or negative. There are literals for Infinity and NaN. |
ZeroDivide exception | error | evaluates to empty string |
| float division |
13 / 5 | 7 / 3 asFloat. "exact rational:" 7 / 3 |
expr $x * 1.0 / $y | 7 / 3 |
| float division by zero |
same behavior as for integers | ZeroDivide exception | returns assignable value Inf if dividend is positive and -Inf if negative. Raises error if dividend is zero. There is a literal for Inf. |
evaluates to empty string |
| power |
Math.pow(2, 32) | 2 raisedTo 32 | expr 2 ** 32 expr pow(2, 32) |
2 ** 32 |
| sqrt |
Math.sqrt(2) | 2 sqrt | expr sqrt(2) | sqrt(2) |
| sqrt -1 |
NaN | raises DomainError | error | evaluates to empty string |
| transcendental functions | Math.exp Math.log Math.sin Math.cos Math.tan Math.asin Math.acos Math.atan Math.atan2 | exp ln sin cos tan arcSin arcCos arcTan |
exp log sin cos tan asin acos atan atan2 # how to use math functions: expr exp(2) expr atan2(1, 1) ::tcl::mathfunc::exp 2 ::tcl::mathfunc::atan2 1 1 |
exp ln sin cos tan asin acos atan |
| transcendental constants | Math.PI Math.E |
Float pi Float e |
expr 4 * atan(1) expr exp(1) |
|
| float truncation round towards zero, round to nearest integer, round down, round up |
none Math.round(3.1) Math.floor(3.1) Math.ceil(3.1) |
3.14 asInteger 3.14 rounded 3.14 ceiling 31.4 floor |
expr int(3.1) expr round(3.1) expr floor(3.1) expr ceil(3.1) |
none round(3.14) floor(3.14) ceil(3.14) |
| absolute value |
Math.abs(-3) | -7 abs | expr abs(-7) | abs(-7) |
| integer overflow |
all numbers are floats | converted to LargePositiveInteger or LargeNegativeInteger | arbitrary length integers since 8.5 | signed modular arithmetic |
| float overflow |
Infinity | Float infinity or Float infinity negated | error | evaluates to string value such as: 1.#INF00 |
| random integer, uniform float | Math.floor(Math.random() * 100) Math.random() |
rnd := Random new. rnd next. (rnd nextInt: 100) - 1. |
expr int(rand() * 100) expr rand() none |
; store results in n and x: random, n, 0, 99 random, x, 0.0, 1.0 |
| seed random numbers |
none | rnd := Random new. rnd :seed 17. |
expr srand(17) | random, , 17 |
| bit operators |
<< >> & | ^ ~ | 5 bitShift: 1 5 bitShift: -1 5 bitAnd: 1 5 bitOr: 1 5 bitInvert |
<< >> & | ^ ~ | << >> & | ^ ~ |
| binary, octal, and hex literals | none 052 // deprecated 0x2a |
|||
| radix convert integer to and from string with radix |
(42).toString(7) ?? |
|||
| strings | ||||
| javascript | smalltalk | tcl | autohotkey | |
| string type |
String | |||
| string literal | "don't say \"no\"" 'don\'t say "no"' |
'don''t say "no"'. | "don't say \"no\"" {don't say "no"} |
"don't say ""no""" |
| newline in literal | yes | no " print newline in Transcript:" Transcript cr. |
yes | |
| literal escapes | single and double quotes: \b \f \n \r \t \v \uhhhh \xhh \" \' \\ |
none | in double quotes: \a \b \f \n \r \t \v \\ \" \oooo \uhhhh \xhh |
|
| variable interpolation | // None; use string concatenation. // Both of these expressions are '11': 1 + "1" "1" + 1 |
set count 3 set item "ball" "$count ${item}s" |
||
| string concatenate | s = "Hello, " + "World!"; | 'hello, ', 'world' | set s1 "Hello, " set s2 "World!" set s $s1$s2 |
"hello, " . "world" |
| string replicate |
var hbar = Array(80).join("-"); | set hbar [string repeat "-" 80] | ||
| string join |
["do", "re", "mi"].join(" ") | join [list "do" "re" "mi"] " " | ||
| split |
// [ "do", "re", "", "mi", "" ]: "do re mi ".split(" ") // [ "do", "re", "mi", "" ]: "do re mi ".split(/\s+/) |
split "do re mi" | ||
| format string | // None; use string concatenation. // Evaluates to "12.35": 12.3456.toFixed(2) |
set fmt "lorem %s %d %.2f" format $fmt "ipsum" 13 3.7 |
||
| translate case to upper, to lower |
"lorem".toUpperCase() "LOREM".toLowerCase() |
'hello' asUppercase 'HELLO' asLowercase |
string toupper "lorem" string tolower "LOREM" |
s1 := "Hello" stringupper, s2, s1 stringlower, s3, s2 |
| trim | " lorem ".trim() # some browsers: " lorem".trimLeft() "lorem ".trimRight() |
string trim " lorem " string trimleft " lorem" string trimright "lorem " |
||
| pad | none | format "%10s" "lorem" format "%-10s" "lorem" |
||
| string to number | 7 + parseInt("12", 10) 73.9 + parseFloat(".037") // 12: parseInt("12A") // NaN: parseInt("A") |
12' asInteger + 7 | # use expr to interpret as numbers: set x "12" expr 7 + $x set y ".037" expr 73.9 + $y |
|
| number to string |
"value: " + 8 | 7 printString, ' items' | all values are strings | |
| prefix and suffix test | "foobar".startsWith("foo") "foobar".endsWith("bar") |
|||
| length |
"lorem".length | 'hello' byteSize | string length "lorem" | strlen("hello") |
| index of substring | // returns -1 if not found: "lorem ipsum".indexOf("ipsum") |
'foo bar' indexOfAnyOf: 'bar' | string first "ipsum" "lorem ipsum" | ; returns 5: instr("foo bar", "bar") |
| extract substring | "lorem ipsum".substr(6, 5) "lorem ipsum".substring(6, 11) |
'foo bar' copyFrom: 5 to: 7 | string range "lorem ipsum" 6 10 | substr("foo bar", 5, 3) |
| character literal | $A | |||
| character lookup | "lorem ipsum"[6] | |||
| chr and ord | String.fromCharCode(65) "A".charCodeAt(0) |
65 asCharacter $A asciiValue |
format %c 65 scan A %c ascii_value |
|
| to array of characters | "abcd".split("") | split "abcd" "" | ||
| regular expressions | ||||
| javascript | smalltalk | tcl | autohotkey | |
| regex match | if (s.match(/1999/)) { alert("party!"); } |
if [regexp -- {1999} $s] { puts "party!" } |
||
| literal, custom delimited literal | /lorem|ipsum/ | |||
| character class abbreviations and anchors | . \d \D \s \S \w \W | char class abbrevs: . \d \D \s \S \w \W anchors: ^ $ \A \m \M \y \Y \Z |
||
| anchors | ^ $ \b \B | |||
| case insensitive match test | "Lorem".match(/lorem/i) | regexp -nocase -- {lorem} "Lorem" | ||
| modifiers | g i m | -all -expanded -indices -inline -line -lineanchor -linestop -nocase |
||
| substitution | s = "do re mi mi mi"; s.replace(/mi/g, "ma"); |
set s "do re mi mi mi" regsub -all -- "mi" $s "ma" |
||
| match, prematch, postmatch | m = /\d{4}/.exec(s); if (m) { match = m[0]; # no prematch or postmatch } |
|||
| group capture | rx = /^(\d{4})-(\d{2})-(\d{2})$/; m = rx.exec('2009-06-03'); yr = m[1]; mo = m[2]; dy = m[3]; |
set s "2009-06-03" set rx {^(\d{4})-(\d{2})-(\d{2})$} regexp -- $rx $s - yr mo dy |
||
| named group capture | ||||
| scan | var a = "dolor sit amet".match(/\w+/g); | |||
| backreference in regex, in substitution string |
/(\w+) \1/.exec("do do") "do re".replace(/(\w+) (\w+)/, '$2 $1') |
regexp -- {(\w+) \1} "do do" set rx {(\w+) (\w+)} regsub -all -- $rx "do re" {\2 \1} |
||
| dates and time | ||||
| javascript | smalltalk | tcl | autohotkey | |
| broken-down datetime type |
Date | |||
| current date/time | var t = new Date(); | Date today. Time now. |
set t [clock seconds] | |
| to unix epoch, from unix epoch | Math.round(t.getTime() / 1000) var epoch =<PHONE_NUMBER>; var t2 = new Date(epoch * 1000); |
t set t2<PHONE_NUMBER> |
||
| current unix epoch | (new Date()).getTime() / 1000 | |||
| strftime | set fmt "%Y-%m-%d %H:%M:%S" clock format $t -format $fmt |
|||
| strptime | none | |||
| parse date w/o format | var t = new Date("July 7, 1999"); | set t [clock scan "July 7, 1999"] | ||
| get date parts | t.getFullYear() t.getMonth() + 1 t.getDate() // getDay() is day of week |
clock format $t -format "%Y" clock format $t -format "%m" clock format $t -format "%d" |
||
| get time parts | t.getHours() t.getMinutes() t.getSeconds() |
clock format $t -format "%H" clock format $t -format "%M" clock format $t -format "%S" |
||
| build date/time from parts | var yr = 1999; var mo = 9; var dy = 10; var hr = 23; var mi = 30; var ss = 0; var t = new Date(yr, mo - 1, dy, hr, mi, ss); |
none | ||
| result of date subtraction | number containing time difference in milliseconds | |||
| add time duration | var t1 = new Date(); var delta = (10 * 60 + 3) * 1000; var t2 = new Date(t1.getTime() + delta); |
|||
| local timezone | ||||
| timezone name; offset from UTC; is daylight savings? | ||||
| microseconds | ||||
| sleep |
none | after 500 | ||
| timeout | ||||
| resizable arrays | ||||
| javascript | smalltalk | tcl | autohotkey | |
| literal | a = [1, 2, 3, 4] | nums := OrderedCollection new. nums add: 1; add: 2; add: 3; add: 4. "creates immutable array:" nums := #(1 2 3 4) |
set a [list 1 2 3 4] set a {1 2 3 4} |
|
| size | a.length | nums size | llength $a | |
| empty test | // TypeError if a is null or undefined: a.length === 0 |
|||
| lookup | a[0] | nums at: 1 | lindex $a 0 | |
| update | a[0] = "lorem" | # provide start and end index: # of elements to replace: set a [lreplace $a 1 1 "lorem"] |
||
| out-of-bounds behavior | returns undefined | returns "" | ||
| index of element first and last occurrence |
// returns -1 if not found: [6, 7, 7, 8].indexOf(7) [6, 7, 7, 8].lastIndexOf(7) |
lsearch {6 7 7 8} 7 lindex [lsearch -all {6 7 7 8} 7] end # returns -1 if not found |
||
| slice | // select 3rd and 4th elements: ["a", "b", "c", "d"].slice(2, 4) |
nums copyFrom: 2 to: 3 | lrange $a 1 2 | |
| slice to end | ["a", "b", "c", "d"].slice(1) | lrange {"a" "b" "c" "d"} 1 end | ||
| concatenation | a = [1, 2, 3].concat([4, 5, 6]); | set a [concat {1 2 3} {4 5 6}] | ||
| copy | a = [1, 2, [3, 4]]; a2 = a; a3 = a.slice(0); a4 = JSON.parse(JSON.stringify(a)); |
|||
| manipulate back of array | a = [6, 7, 8]; a.push(9); i = a.pop(); |
a := OrderedCollection new. a add: 6; add: 7; add: 8. a add: 9. a removeLast. |
set a {6 7 8} lappend a 9 set i [lindex $a end] set a [lreplace $a end end] |
|
| manipulate front of array | a = [6, 7, 8]; a.unshift(5); i = a.shift(); |
a := OrderedCollection new. a add: 6; add: 7; add: 8. a addFirst: 5. a removeFirst. |
set a {6 7 8} set a [concat {5} $a] set a [lassign $a i] |
|
| array iteration | [1, 2, 3].forEach(function(n) { alert(n); }); |
nums do: [:o| Transcript show: o printString; cr] | foreach i $a { puts $i } | |
| reverse | var a = [1, 2, 3]; a.reverse(); |
set a {1 2 3} set a [lreverse $a] |
||
| sort | var a = [3, 1, 4, 2]; a.sort(); |
set a {3 1 4 2} set a [lsort $a] |
||
| dedupe | lsort -unique {1 2 2 3} | |||
| membership |
nums includes: 7 | expr {7 in $a} expr {7 ni $a} |
||
| intersection | package require struct::set ::struct::set intersect {1 2} {2 3} |
|||
| union | package require struct::set ::struct::set union {1 2} {2 3 4} |
|||
| relative complement | package require struct::set ::struct::set difference {1 2 3} {2} |
|||
| map |
// callback gets 3 args: // value, index, array a.map(function(x) { return x * x }) |
#(1 2 3) collect: [ :o | o*o ] | package require struct::list proc sqr {x} {return [expr $x * $x]} ::struct::list map {1 2 3} sqr |
|
| filter |
a.filter(function(x) { return x > 1 }) | #(1 2 3) select: [:o | o > 1] | package require struct::list proc gt1 {x} {return [expr $x > 1]} ::struct::list filter {1 2 3} gt1 |
|
| reduce |
a.reduce(function(m, o) { return m + o; }, 0) |
#(1 2 3) inject: 0 into: [:m :o| m + o] | package require struct::list ::struct::list fold {1 2 3} 0 ::tcl::mathop::+ |
|
| universal test |
#(1 2 3 4) allSatisfy: [:o | o even] | |||
| existential test |
var a = [1, 2, 3, 4]; var even = function(x) { return x % 2 == 0; }; a.every(even) a.some(even) |
#(1 2 3 4) anySatisfy: [:o | o even] | ||
| dictionaries | ||||
| javascript | smalltalk | tcl | autohotkey | |
| constructor |
d = {"t": 1, "f": 0}; // keys do not need to be quoted if they // are a legal JavaScript variable name and not a reserved word |
h := Dictionary new add: 't'->1; add: 'f'->0; yourself | set d [dict create t 1 f 0] | |
| dictionary size |
var size = 0; for (var k in d) { if (d.hasOwnProperty(k)) size++; } |
h size | dict size $d | |
| lookup |
d.t d["t"] |
h at: 't' | dict get $d t | |
| update | d["t"] = 2; d.t = 2; |
dict set d t 2 | ||
| missing key behavior |
var d = {}; // sets s to undefined: var s = d["lorem"]; // adds key/value pair: d["lorem"] = "ipsum"; |
raises exception | error | |
| is key present |
d.hasOwnProperty("t"); | dict exists $d t | ||
| delete | delete d["t"]; delete d.t; |
dict unset d t | ||
| iterate |
for (var k in d) { use k or d[k] } |
h keysAndValuesDo: [:k :v| code ] | foreach {k v} $d { code } |
|
| keys and values as arrays | h keys h values |
|||
| functions | ||||
| javascript | smalltalk | tcl | autohotkey | |
| define | function add(x, y) { return x+y; } |
add := [ :a :b | a + b ] | proc add { x y } { expr $x + $y } |
add(x, y) { return x + y } |
| call | add(1, 2) | add value: 1 value: 2 | # statement position: add 1 2 # argument position: set a [ add 1 2 ] |
x := add(1, 2) |
| missing argument behavior | set to// undefined | raises BlockClosure exception | error | error |
| extra argument behavior | ignored | raises BlockClosure exception | error | error |
| default argument | none | proc log {x {base 10 }} { … } | fapprox(x, y, eps=0.001) { return abs(x - y) < eps } |
|
| named parameters | none | |||
| variadic function | args in arguments[0], arguments[1], … with number of args in arguments.length | last arg contains list of remaining values|f(args*) { return args.maxindex() } |
||
| pass by reference | swap(byref v1, byref v2) { tmp := v1 v1 := v2 v2 := tmp } |
|||
| return value | Return arg or undefined. If invoked with new and return value not an object, returns this. | return arg or empty string | argument of return | |
| nested function | defined when containing function executes; visible outside containing function | |||
| anonymous function literal | var sqr = function(x) { return x*x; } | set sqr {{x} {return [expr $x*$x]}} | ||
| call anonymous function |
sqr(2) | apply $sqr 2 | ||
| function with private state | function counter() { counter.i += 1; return counter.i; } counter.i = 0; alert(counter()); |
|||
| closure | function make_counter() { var i = 0; return function() { i += 1; return i; } } |
|||
| execution control | ||||
| javascript | smalltalk | tcl | autohotkey | |
| if | if (0 == n) { alert("no hits"); } else if (1 == n) { alert("1 hit"); } else { alert(n + " hits"); } |
msg := [ :s | Transcript show: s. Transcript cr ] n = 0 ifTrue: [ msg value: 'no hits' ] ifFalse: [ n = 1 ifTrue: [ msg value: '1 hit' ] fFalse: [ msg value: n printString, ' hits' ]]. |
if { 0 == $n } { puts "no hits" } elseif { 1 == $n } { puts "1 hit" } else { puts "$n hits" } |
if (n = 0) { msgbox % "zero hits" } else if (n = 1) { msgbox % "one hit" } else { msgbox % n . " hits" } |
| switch | switch (n) { case 0: alert("no hits\n"); break; case 1: alert("one hit\n"); break; default: alert(n + " hits\n"); } |
|||
| while | while (i < 100) { i += 1; } |
[ i < 100 ] whileTrue: [ i := i + 1 ]. |
while { $i < 100 } { incr i } |
|
| break/continue | break continue | break continue | exit 0 | |
| for | for (var i = 0; i < 10; i++) { alert(i); } |
1 to: 100 do: [ :i | msg value: i printString ]. |
for {set i 0} {$i < 10} {incr i} { puts $i } |
|
| exceptions | ||||
| javascript | smalltalk | tcl | autohotkey | |
| base exception | Any value can be thrown. | |||
| predefined exceptions | Error EvalError RangeError ReferenceError SyntaxError TypeError URIError |
|||
| raise exception | throw new Error("bad arg"); | Exception raiseSignal: 'bam!'. | error "bad arg" | |
| catch-all handler |
try { risky(); } catch (e) { alert("risky failed: " + e.message); } |
|||
| uncaught exception behavior | stderr and exit | |||
| re-raise exception | try { throw new Error("bam!"); } catch (e) { alert("re-raising..."); throw e; } |
|||
| global variable for last exception | none | |||
| define exception | function Bam(msg) { this.message = msg; } Bam.prototype = new Error; |
|||
| handle exception | try { throw new Bam("bam!"); } catch (e) { if (e instanceof Bam) { alert(e.message); } else { throw e; } } |
[ o risky ] on: Exception do: [ :ex | Transcript show: 'risky failed' ] |
catch risky retval if { retval != 0 } { puts "risky failed" } |
|
| finally block |
acquire_resource(); try { risky(); } finally { release_resource(); } |
|||
| streams | ||||
| javascript | smalltalk | tcl | autohotkey | |
| standard file handles | stdin stdout stderr |
|||
| read line from stdin | gets stdin line | |||
| end-of-file behavior | ||||
| chomp | string trimright $line "\r\n" | |||
| write line to stdout | puts "Hello, World!" | |||
| write formatted string to stdout | ||||
| open file for reading | set f [open "/tmp/foo"] | |||
| open file for writing | set f [open "/tmp/foo" "w"] | |||
| set file handle encoding | ||||
| open file for appending | ||||
| close file |
close $f | |||
| close file implicitly | ||||
| i/o error | ||||
| encoding error | ||||
| read line |
gets $f | |||
| iterate over file by line | while { [gets $f s] >= 0 } { use s } |
|||
| read file into array of strings | ||||
| read file into string | set s [ read $f] | |||
| write string |
puts -nonewline $f "lorem ipsum" | |||
| write line | ||||
| flush file handle | flush $f | |||
| end-of-file test | ||||
| get and set file handle position | ||||
| open temporary file | ||||
| in memory file | ||||
| files | ||||
| javascript | smalltalk | tcl | autohotkey | |
| file exists test, file regular test | file exists "/etc/hosts" file isfile "/etc/hosts" |
|||
| file size | ||||
| is file readable, writable, executable | ||||
| set file permissions | set s "/tmp/foo" file attributes $s -permissions 0755 |
|||
| last modification time | ||||
| copy file, remove file, rename file | file copy "/tmp/foo" "/tmp/bar" file delete "/tmp/foo" file rename "/tmp/bar" "/tmp/foo" |
|||
| create symlink, symlink test, readlink | ||||
| generate unused file name | set tmp [::fileutil::tempfile foo] set f [open $tmp "w"] puts $f "lorem ipsum" close $f puts "tmp file: $tmp" |
|||
| file formats | ||||
| javascript | smalltalk | tcl | autohotkey | |
| parse json | var s1 = '{"t":1,"f":0}'; var d1 = JSON.parse(s1); |
|||
| generate json | var d2 = {'t': 1, 'f': 0}; var s2 = JSON.stringify(d1); |
|||
| directories | ||||
| javascript | smalltalk | tcl | autohotkey | |
| working directory get and set |
||||
| build pathname | file join "/etc" "hosts" | |||
| dirname and basename | file dirname "/etc/hosts" file tail "/etc/hosts" |
|||
| absolute pathname | ||||
| iterate over directory by file | ||||
| glob paths | ||||
| make directory | file mkdir "/tmp/foo/bar" | |||
| recursive copy | ||||
| remove empty directory | file delete "/tmp/foodir" | |||
| remove directory and contents | file delete -force "/tmp/foodir" | |||
| directory test |
file isdirectory "/tmp" | |||
| generate unused directory | ||||
| system temporary file directory | ||||
| processes and environment | ||||
| javascript | smalltalk | tcl | autohotkey | |
| command line arguments | [lindex $argv 0] [lindex $argv 1] … |
|||
| environment variable get, set |
$env(HOME) | |||
| get pid, parent pid | ||||
| exit |
exit 0 | |||
| external command | exec ls | |||
| command substitution | set f [ open |ls ] read f |
|||
| libraries and namespaces | ||||
| javascript | smalltalk | tcl | autohotkey | |
| load library | source foo.tcl add 3 7 |
|||
| load library in subdirectory | ||||
| hot patch | ||||
| load error | ||||
| main routine in library | ||||
| library path | none | |||
| library path environment variable | TCLLIBPATH | |||
| library path command line option | ||||
| simple global identifiers | ||||
| multiple label identifiers | ||||
| label separator | :: | |||
| namespace declaration | namespace | |||
| child namespace declaration | ||||
| unqualified import of namespace | ||||
| unqualified import of definitions | ||||
| list installed packaged, install a package | ||||
| objects | ||||
| javascript | smalltalk | tcl | autohotkey | |
| define class |
function Int(i) { this.value = i === undefined ? 0 : i; } |
|||
| create object |
var i = new Int(); var i2 = new Int(7); |
|||
| instance variable visibility | public | |||
| get and set instance variable |
var v = i.value; i.value = v + 1; |
|||
| define method |
// inside constructor: this.plus = function(v) { return this.value + v; }; // outside constructor: Int.prototype.plus = function (v) { return this.value + v; } |
|||
| invoke method |
i.plus(3); | |||
| inheritance and polymorphism | ||||
| javascript | smalltalk | tcl | autohotkey | |
| subclass |
||||
| mixin | ||||
| overload operator | ||||
| reflection | ||||
| javascript | smalltalk | tcl | autohotkey | |
| object id |
none | |||
| inspect type |
typeof([]) === 'object' | |||
| basic types | number string boolean undefined function object # these evaluate as 'object': typeof(null) typeof([]) typeof({}) |
|||
| inspect class | // returns prototype object: Object.getPrototypeOf(o) |
'hello' class | ||
| inspect class hierarchy | var pa = Object.getPrototypeOf(o) //prototype's of prototype object: var grandpa = Object.getPrototypeOf(pa) |
|||
| has method? |
o.reverse && typeof(o.reverse) === 'function' | |||
| message passing |
not a standard feature | |||
| eval |
eval('1 + 1') | |||
| list object methods |
1 class selectors. | |||
| list object attributes |
||||
| list loaded libraries | ||||
| list loaded namespaces | ||||
| inspect namespace | ||||
| pretty-print |
var d = {"lorem": 1, "ipsum": [2, 3]}; console.log(JSON.stringify(d, null, 2)); |
|||
| source line number and file name | ||||
| command line documentation | ||||
| gui | ||||
| javascript | smalltalk | tcl | autohotkey | |
| pop-up box | var app = Application.currentApplication() app.includeStandardAdditions = true app.displayAlert('hi world') |
package require Tk wm title . grid [ttk::frame .f -padding "10 10 10 10"] grid [ttk::label .f.t -text "hi world"] |
msgbox % "hi world" | |
| button | ||||
| text entry | ||||
| frame | ||||
| label | ||||
| image | ||||
| net and web | ||||
| javascript | smalltalk | tcl | autohotkey | |
| get local hostname, dns lookup, reverse dns lookup | ||||
| http get |
||||
| http post |
||||
| serve working directory | ||||
| absolute url from base and relative url |
||||
| parse url | ||||
| url encode/decode |
||||
| html escape escape character data, escape attribute value, unescape html entities |
||||
| base64 encode/decode | ||||
| ____________________________________________ | ____________________________________________ | ____________________________________________ | ____________________________________________ |
General
version used
The version of the language used for verifying the examples in the reference sheet.
show version
How to get the version.
Grammar and Invocation
interpreter
The customary name of the interpreter and how to invoke it.
command line program
How to pass a single command to be executed as a command line argument.
statement separator
How the parser determines the end of a statement.
tcl:
Code fragments such as
1 + 1
or
[expr 1 + 1]
result in invalid command name errors when used as statements.
The following is a valid statement:
expr 1 + 1
The above cannot be used as an argument to a command without putting it inside square brackets, however.
Since the constructs which can be used as statements and the constructs which can be used in the positions where expressions are normally used are disjoint, we claim that expressions are not statements in Tcl.
block delimiters
How blocks are delimited.
tcl:
The block delimiters {} and "" are the same as the string delimiters. Double quotes "" cause variable interpolation and as a result they are not often used to delimit blocks.
The following three lines of code behave the same:
if {true} {puts "true"}
if "true" "puts \"true\""
if "true" "puts {true}"
are expressions statements
Whether an expression can be used where a statement is expected.
to end-of-line comment
How to make the remainder of the line a comment.
multiline comment
How to comment out multiple lines.
tcl:
The method described requires that there not be an unmatched right curly bracket in the comment.
Variables and Expressions
are identifiers case sensitive
assignment
How to assign a value to a variable.
parallel assignment
How to assign values to variables in parallel.
swap
How to exchange the values held by two variables.
compound assignment
The compound assignment operators for arithmetic, string, and bit operations
increment and decrement
The C-style increment and decrement operators which can be used in expressions.
variable declaration
How to declare a variable.
null
The null literal.
tcl
Tcl has has no null value.
null test
How to test if a value is null.
undefined variable
The value of an undefined variable, or the behavior if there is no such value.
tcl:
The following test can be used to determine if a variable is defined:
expr ![info exists v]
Arithmetic and Logic
true and false
The literals for true and false.
falsehoods
Values which are false in conditional expressions.
tcl:
0 is false and all other numeric values are true. For non-numeric strings, "no" and "false" are false, and "yes" and "true" are true. The comparison is case insensitive. All other non-numeric strings raise an error when evaluated in a boolean context.
logical operators
Logical and, or, and not.
conditional expression
The syntax for a conditional expression.
relational expression
tcl
To evaluate a relational expression outside of the the conditional of an if statement, the expr command can be used.
Use square brackets to make an expression an argument of a command:
puts [expr $x>1]
relational operators
tcl:
The eq and ne operators always perform comparisons on their operators as strings. If the arguments are numeric, they are converted to a standard floating point representation.
% expr {"0" eq "00"}
0
% expr {"0" == "00"}
1
The == and != operators try to convert their arguments to a numeric form for the purpose of comparison. String comparison is used when no numeric conversion is possible:
% expr {"lorem" == "ipsum"}
0
The relational operators can be invoked as commands in the following manner:
% ::tcl::mathop::== 1 1
1
% ::tcl::mathop::!= 1 1
0
% ::tcl::mathop::> 1 1
%::tcl::mathop::< 1 1
0
% ::tcl::mathop::>= 1 1
1
% ::tcl::mathop::<= 1 1
1
% ::tcl::mathop::eq "lorem" "ipsum"
0
%::tcl::mathop::ne "lorem" "ipsum"
1
autohotkey:
<> is a synonym for !=.
convert from string
convert to string
arithmetic expressions
How to evaluate an arithmetic expression.
tcl:
Arithmetic expressions are normally evaluated with the expr command. However, the conditional argument of an if statement is always evaluated as an expression.
arithmetic operators
The operators for addition, subtraction, multiplication, float division, integer division, modulus, and exponentiation. Some languages provide a function pow instead of an operator for exponentiation.
tcl:
Arithmetic operators are normally used as arguments to expr, but commands also exist for each of them:
::tcl::mathop::+
::tcl::mathop::-
::tcl::mathop::*
::tcl::mathop::/
::tcl::mathop::**
::tcl::mathop::%
integer division
How to perform integer division.
float division
How to perform floating point division, even if the operands might be integers.
arithmetic functions
Functions for computing square root, natural exponent, natural logarithm, sine, cosine, tangent, arcsine, arccosine, arctangent, and atan2.
The trigonometric functions are all in radians. atan2 takes two arguments which are the x and y co-ordinates of a vector in the Cartesian plane. It returns
the angle to the positive x-axis made by the vector.
arithmetic truncation
division by zero
integer overflow
float overflow
sqrt -2
The result of taking the square root of -2.
random integer, uniform float
The examples show how to generate a uniform random integer in the range from 0 to 99, inclusive; how to generate a uniform float in the range 0.0 to 1.0; how to generate a float from a standard normal distribution
seed random numbers
bit operators
Strings
string literal
The syntax for a string literal and how to escape the delimiter.
newline in literal
Whether a newline character sequence can be included in a string.
For all the languages described in this reference sheet a string literal is permitted to encompass multiple lines in the source code and the resulting string will contain the same number of lines.
escapes
Character escape sequences which can be used in string literals.
variable interpolation
How to interpolate variables in a string.
length
How to get the length of a string.
index substring
How to find the index of the start of a substring in a string.
extract substring
string concatenation
The string concatenation operator.
split
How to split a string into an array of strings.
tcl:
split takes an optional 2nd argument which is a string containing the characters to split on. split can only split on characters, not strings or regular expressions. For each pair of adjacent splitting characters in the input string, there will be an empty string in the result list.
join
How to concatenate the elements of an array into a string with a separator.
scan
sprintf
How to create a string using a printf style format.
case manipulation
strip
pad on right, pad on left
string to number
tcl:
All values are strings. The expr function will concatenate the arguments together and then evaluate the string as a numerical expression. If all the numbers are integers, the expression is computed using integer arithmetic. Otherwise floating point arithmetic is used. The variables can contain compound arithmetic expressions; the following script outputs 10:
set a "7+3"
puts [expr $a]
Regular Expressions
regex match
How to test whether a regular expression matches a string.
modifiers
tcl:
| modifier | description |
|---|---|
| -all | causes regexp to return number of matches in string; causes regsub to replace all occurrences of match |
| -expanded | ignore whitespace in patten |
| -indices | modifies group capture: returns start and end indices of the substring instead of the substring itself |
| -inline | return the total match and each of the group captures as a list. Normally the number of matches is returned |
| -line | same as using -lineanchor and -linestop |
| -lineanchor | causes ^ and $ to match the beginning and ending of lines (\A and \Z still match beginning and ending of string) |
| -linestop | causes . to not matcch a newline |
| -nocase | makes matching case insensitive |
single substitution
How to replace the first occurrence of a pattern in a string.
tcl:
To replace only the first occurrence of the pattern, omit the -all flag:
set s "do re mi mi mi"
regsub "mi" $s "ma"
global substitution
How to replace all occurrences of a pattern in a string.
Dates and Time
The Unix epoch is the number of seconds since January 1, 1970 UTC. In the case of Lua, the native date/time object is the Unix epoch, so no conversion is needed.
arrays Resizable Arrays
tcl:
Tcl arrays are associative arrays. The dict type is new in Tcl 8.5. See the documentation for array and dict.
array literal
Array literal syntax.
array size
How to get the number of elements in an array.
array lookup
How to access a value in an array by index.
tcl:
Does not support negative indices. To change the 2nd element in the list a to 8, use
lset a 1 8
lset will not increase the size of the list if the index is out of bounds. For more list manipulation commands see http://www.tcl.tk/man/tcl/tutorial/Tcl15.html.
array slice
How to slice a subarray from an array.
array iteration
membership
How to test for membership in an array.
intersection
How to compute an intersection.
union
map
filter
reduce
universal predicate
How to test whether a condition holds for all members of an array. Always true for an empty array.
existential predicate
How to test whether an item in an array exists for which a condition holds. Always false for an empty array.
Dictionaries
tcl:
The dict type was introduced in Tcl 8.5.
In earlier versions of Tcl associative arrays were used when a dictionary type was needed, and they remain an alternative in Tcl 8.5. Associative arrays are stored in variables as strings. The array command is used to treat the string as an associative array:
array set d [list "t" 1 "f" 0]
array size d
$d(t)
array set d [list "t" 2]
info exists d(t)
array unset d "t"
foreach {k v} [array get d] {
puts k
puts v
}
dictionary literal
dictionary size
dictionary lookup
dictionary iteration
out of bounds behavior
Functions
tcl:
Tcl variables inside functions have local scope.
function definition
function invocation
missing argument value
Value of an argument variable if a function is invoked with fewer arguments than are declared.
extra arguments
If a function is invoked with more arguments than are declared, how the function can access them.
default argument value
How to declare a default value for an argument.
variable number of arguments
How to write a function which accepts a variable number of argument.
named parameters
How to write a function which uses named parameters.
return value
lambda declaration
How to define a lambda function.
lambda invocation
default scope
Execution Control
if
tcl:
Tcl also has a switch:
switch $a 0 { puts "no" } 1 { puts "yes" } 2 { puts "maybe" } default { puts "error" }
autohotkey:
The traditional style omits the parens around the conditionals.
|if n = 0
{
msgbox % "zero hits"
} _
else if n = 1
{
msgbox % "one hit"
}
else
{
msgbox % n . " hits"
}
while
break/continue/redo
break exits a for or while loop immediately. continue goes to the next iteration of the loop. redo goes back to the beginning of the current iteration.
for
Exceptions
raise exception
How to raise an exception.
catch exception
How to handle an exception.
uncaught exception behavior
System behavior if an exception goes uncaught. Most interpreters print the exception message to stderr and exit with a nonzero status.
tcl:
A tcl process can have multiple interpreters and multiple threads. However, each interpreter is limited to a single thread.
wait on thread
Files
print to standard out
tcl:
To prevent puts from appending a newline to the output, use
puts -nonewline "hello"
standard filehandles
read line
read file
write to file
append to file
GUI
File Formats
Directories
Processes and Environment
external command
tcl
When using tclsh as a shell or repl, external commands that do not have the same name as a built-in or user defined function can be executed directly without using the exec command.
backticks
command line args
speech
How to make the computer talk.
environment variable
command path
The directory containing a command. Also indicates if the command is a built-in, alias, or function. Shows the definition of aliases and functions.
exit
set signal handler
Libraries and Namespaces
library
What a library looks like.
import library
library path
namespace declaration
namespace separator
Reflection
class
Smalltalk
image and virtual machine | browser, workspace, and transcript | the smalltalk language
image and virtual machine
Executable Smalltalk consists of an image and a virtual machine. A Smalltalk image is equivalent to a program, except that it also contains the state of a Smalltalk process; a Smalltalk process can save itself as an image at any point in its execution. The Smalltalk image is usually portable, whereas the virtual machine is operating system specific.
To create a new Smalltalk executable, one copies an existing image, launches it, adds to or modifies the code while the process is running, and then persists the new code and the process state when the executable is done.
After a fresh installation of Pharo 3.0 on Mac OS X, one has a image named Pharo.image and a virtual machine named Pharo. One can launch the program at the command line by passing the image to the virtual machine as an argument:
$ ls -l Pharo.image
-rw-rw-r-- 1 hpglot staff 21802780 Dec 12 06:38 Pharo.image
$ ls -l pharo-vm/Pharo.app/Contents/MacOS/Pharo
-rwxr-xr-x 1 hpglot staff 867488 May 15 2014 pharo-vm/Pharo.app/Contents/MacOS/Pharo
$ ./pharo-vm/Pharo.app/Contents/MacOS/Pharo Pharo.image
It is worth noting that even after a fresh installation, the image is already much larger than the virtual machine. The standard library and any ofther classes distributed with the implementation are implemented in Smalltalk; they are in the image, not the virtual matchine.
browser, workspace, and transcript
the smalltalk language
All values which can be stored in variables are objects.
Every expression and statement is implemented as a message which is sent to an object.
Messages are classified as unary, binary, or keyword.
Examples of unary messages:
1 class.
false not.
Date today.
Examples of binary messages:
2 * 7.
true & true.
3 < 10.
'Hello, ', 'World!'.
Examples of keyword messages:
Precedence of messages.
Cascaded messages.
No functions, just methods and blocks.
Tcl
Tcl Reference Manual
Tcl Standard Library
Tcl has some traits which will be familiar to anyone who has done Unix shell script programming:
(1) variables have a $ prefix except when values are assigned to them, in which case they are used unadorned:
set v 42
puts $v
(2) statements consist of a command and zero or more arguments. Commands which are not built-in functions or user defined functions are resolved by looking for an external command in the search path and running it.
(3) the values are always stored in variables as strings. Commands which expect numeric arguments perform an implicit conversion, so there isn't much practical consequence for the developer.
(4) in the absence of quoting ("", {}, []) the arguments of a command are parsed into words using whitespace; commas are not used to separate arguments.
(5) square brackets [] must be used to execute a function and use its return value as an argument. A combination of square brackets [] and the expr command must be used to evaluate an expression and use its value as an argument:
puts [format "%10s" "lorem"]
puts [expr 1 + 1]
Square brackets can be used to invoke an external command, but the value of the square brackets containing an external command is always the empty string: "".
Unlike shells, *, ?, ~ in variable names are not automatically expanded using the filesystem, but this behavior can be invoked with the glob command.
AutoHotkey
JavaScript
Mozilla Developer Network: JavaScript
JavaScript for Automation: Release Notes
Mozilla Developer Network: Document
Mozilla Document Network: Window
W3C: Document Object Model (DOM) Level 3 Core Specification
W3C: Document Object Model (DOM) Level 3 Events Specification
Most browsers include a debugger which can be launched with a keystroke:
| browser | mac | windows | linux |
|---|---|---|---|
| Chrome | ⌥⌘J | Cmd+Shift+J | Cmd+Shift+J |
| Firefox | ⌥⌘S | Cmd+Shift+S | Cmd+Shift+S |
| Safari | ⌥⌘C |
The debugger has a console pane, which is a JavaScript REPL.
> Math.log(10)
2.302585092994046
> alert("Hello, World!")
The console provides a global object named document which provides access to the DOM of the current page:
> document.getElementsByTagName("div").length
302
TODO: more ways to select node elements. Attributes of node elements.
There is also a global object named window which is useful.
JavaScript can be embedded in an HTML document using the <script> tag:
<script>
var sum = 1 + 2;
alert('the sum is ' + sum);
</script>
Alternatively the JavaScript can be in a separate file served by the same server:
<script src="foo.js"></script>
<script> tags can be placed in either the <head> or the <body> of an <html> document. They are executed as they are encountered by the browser. If there is a syntax error, then none of the JavaScript in the <script> tag is executed. If there is an unhandled exception, the browser stops execution of the <script> at that point. Neither syntax errors nor unhandled exceptions prevent the browser from executing JavaScript in subsequent <script> tags.
using JavaScript to modify the DOM
waiting for all JavaScript to load
javascript URL
DOM events
To guard against websites serving malicious JavaScript code, the JavaScript interpreters in browsers do not provide the ability to interact with the local operating system. In particular, client-side JavaScript cannot read or write to files. Client-side JavaScript cannot spawn other processes.
Client-side JavaScript can make HTTP requests. Client-side JavaScript can modify the DOM of an HTML page which was served from the same origin as the JavaScript. To be from the same origin, the URLs must have the same protocol, domain, and port. Client-side JavaScript can also get and set cookies which share the same origin. The origin policy for cookies is slightly relaxed, since the JavaScript can also get and set cookies for a parent domain, excluding public top level domains such as .com, .net, and .org.


Crisis Team:
Head of Crisis Team: To be announced
Deputy Head of Crisis Team: To be announced
Member: To be announced
Member: To be announced
Press Team:
To be announced
Administrative Staff:
Head of Administrative Staff: To be announced
Deputy Head Administrative Staff: To be announced


|
Panda3D
|
This class represents a thread-safe handle to a promised future result of an asynchronous operation, providing methods to query its status and result as well as register callbacks for this future's completion. More...
Public Member Functions | |
| __init__ () | |
| Initializes the future in the pending state. More... | |
| __init__ (const AsyncFuture) | |
| object | addDoneCallback (object fn) |
| bool | cancel () |
| Cancels the future. More... | |
| bool | cancelled () |
| Returns true if the future was cancelled. More... | |
| bool | done () |
| Returns true if the future is done or has been cancelled. More... | |
| str | getDoneEvent () |
| Returns the event name that will be triggered when the future finishes. More... | |
| output (Ostream out) | |
| object | result (object timeout) |
| setDoneEvent (str done_event) | |
| Sets the event name that will be triggered when the future finishes. More... | |
| setResult (const EventParameter result) | |
| setResult (nullptr_t) | |
| Sets this future's result. More... | |
| setResult (TypedObject result) | |
| setResult (TypedReferenceCount result) | |
| setResult (TypedWritableReferenceCount result) | |
| wait () | |
| Waits until the future is done. More... | |
| wait (double timeout) | |
| Waits until the future is done, or until the timeout is reached. More... | |
| Public Member Functions inherited from TypedObject | |
| TypeHandle | getType () |
| int | getTypeIndex () |
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
| bool | isExactType (TypeHandle handle) |
| Returns true if the current object is the indicated type exactly. More... | |
| bool | isOfType (TypeHandle handle) |
| Returns true if the current object is or derives from the indicated type. More... | |
| Public Member Functions inherited from ReferenceCount | |
| int | getRefCount () |
| Returns the current reference count. More... | |
| ref () | |
| Explicitly increments the reference count. More... | |
| bool | testRefCountIntegrity () |
| Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
| bool | testRefCountNonzero () |
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
| bool | unref () |
| Explicitly decrements the reference count. More... | |
Static Public Member Functions | |
| static object | __await__ () |
| static object | __iter__ () |
| static object | gather (object args) |
| static TypeHandle | getClassType () |
| Static Public Member Functions inherited from TypedReferenceCount | |
| static TypeHandle | getClassType () |
| Static Public Member Functions inherited from TypedObject | |
| static TypeHandle | getClassType () |
| Static Public Member Functions inherited from ReferenceCount | |
| static TypeHandle | getClassType () |
Public Attributes | |
| const String | done_event |
| Returns the event name that will be triggered when the future finishes. More... | |
| Public Attributes inherited from TypedObject | |
| TypeHandle | type |
| Returns the TypeHandle representing this object's type. More... | |
| Public Attributes inherited from ReferenceCount | |
| int | ref_count |
| The current reference count. More... | |
This class represents a thread-safe handle to a promised future result of an asynchronous operation, providing methods to query its status and result as well as register callbacks for this future's completion.
An AsyncFuture can be awaited from within a coroutine or task. It keeps track of tasks waiting for this future and automatically reactivates them upon this future's completion.
A task itself is also a subclass of AsyncFuture. Other subclasses are not generally necessary, except to override the function of cancel()
.
Until the future is done, it is "owned" by the resolver thread, though it's still legal for other threads to query its state. When the resolver thread resolves this future using set_result()
, or any thread calls cancel()
, it instantly enters the "done" state, after which the result becomes a read-only field that all threads can access.
When the future returns true for done(), a thread can use cancelled() to determine whether the future was cancelled or get_result() to access the result of the operation. Not all operations define a meaningful result value, so some will always return nullptr.
In Python, the cancelled()
, wait()
and get_result()
methods are wrapped up into a single result()
method which waits for the future to complete before either returning the result or throwing an exception if the future was cancelled. However, it is preferable to use the await
keyword when running from a coroutine, which only suspends the current task and not the entire thread.
This API aims to mirror and be compatible with Python's Future class.
|
static |
| __init__ | ( | ) |
Initializes the future in the pending state.
| __init__ | ( | const | AsyncFuture | ) |
|
static |
| object addDoneCallback | ( | object | fn | ) |
| bool cancel | ( | ) |
Cancels the future.
Returns true if it was cancelled, or false if the future was already done. Either way, done() will return true after this call returns.
In the case of a task, this is equivalent to remove().
| bool cancelled | ( | ) |
Returns true if the future was cancelled.
It is always safe to call this.
| bool done | ( | ) |
Returns true if the future is done or has been cancelled.
It is always safe to call this.
|
static |
|
static |
| str getDoneEvent | ( | ) |
Returns the event name that will be triggered when the future finishes.
See set_done_event().
| output | ( | Ostream | out | ) |
| object result | ( | object | timeout | ) |
| setDoneEvent | ( | str | done_event | ) |
Sets the event name that will be triggered when the future finishes.
Will not be triggered if the future is cancelled, but it will be triggered for a coroutine task that exits with an exception.
| setResult | ( | const EventParameter | result | ) |
| setResult | ( | nullptr_t | ) |
Sets this future's result.
Can only be called if done() returns false.
| setResult | ( | TypedObject | result | ) |
| setResult | ( | TypedReferenceCount | result | ) |
| setResult | ( | TypedWritableReferenceCount | result | ) |
| wait | ( | ) |
Waits until the future is done.
| wait | ( | double | timeout | ) |
Waits until the future is done, or until the timeout is reached.
| const String done_event |
Returns the event name that will be triggered when the future finishes.
See set_done_event().


CoachMark Demo
Styled using the Elements SDK.
First Example
Default Coachmark should appear
Second Example
Default Coachmark should appear above this text
Third Example
This Coachmark has no pointer and a callback that shows another Coachmark
Fourth Example
This Coachmark is wrapped in HTML tags
Fifth Example
This Coachmark is informational
Sixth Example
This Coachmark is generic
Seventh Example
This Coachmark is animated
Eighth Example
This Coachmark doesnt have an X
Ninth Example
This Coachmark can close when a target is clicked outside the coachmark and it scrolls the screen
Tenth Example
This Coachmark appears to the right
Eleventh Example
This Coachmark appears to the left
Twelveth Example
This Coachmark pops out of a hidden content scrolling container


Arthur Marshall (born 1910-05-10[ref]) has appeared in 184 episodes between 1978-1988. Arthur Marshall on Wikipedia.


This is purely for testing/demo, with data saved only for the session. A random entry appears. You can copy the draft if it seems fine.


list_example_en
This file contains some examples for Python Lists How to create lists how to print lists
example 1 added by @engshorouq empty list
my_list=[]
example 2 added by anonymous define a list with numbers from 1-5
my_list=[1,2,3,4,5]
example 3 added by anonymous list with mixed datatype
my_list=[2,"python",2.2]
example 4 added by @engshorouq print specific index
my_list=['p','y','t','h','o','n']
print("first index in the list in positive index : ",my_list[0])
print("first index in the list in negative index : ",my_list[-5])
to print a range of items in the lists
print("from beginning element to end : ",my_list[:])
print("from the second element to fifth element : ",my_list[1:4])
print("from beginning to the second : ",my_list[:-5])
print("from second to end element : ",my_list[1:])


Before Change
if len(states) > 0:
w = states[0]
vocab[w] += 1
return vocab
def conllLines(tsfile):
txts = []
After Change
def conllBuildVocab(files):
vocab_word = Counter()
vocab_ch = Counter()
maxw = 0
for file in files:
if file is None:
continue
with codecs.open(file, encoding="utf-8", mode="r") as f:
for line in f:
states = re.split("\s", line)
if len(states) > 0:
w = states[0]
vocab_word[w] += 1
maxw = max(maxw, len(w))
for k in w:
vocab_ch[k] += 1
return maxw, vocab_ch, vocab_word
def conllLines(tsfile):