Welcome to the Italian course! Remember that you can click on the words to see tips of possible translations.
Personal pronouns
The subject pronouns in Italian are:
The verb is always conjugated to match the subject, and the subject is only specified for clarity or emphasis.
Articles
Articles have to match gender and number of the noun they refer to.
The singular determinate articles ( the ) are:
The indeterminate articles ( a / an ) are:
Plural articles
The plural definite articles ( the ) are:
Articulated prepositions
When some prepositions are followed by a definite article they merge into a single word.
The compounds formed by con and per are archaic and literary, with the exception of col (con + il) for which the contraction is optional.
Negations
In this section you'll use negations for the first time.
The English no has two main uses:
The English not almost always translates to the Italian non . However, while not often follows the verb it negates or its auxiliary, the Italian non always precedes it.
Greetings
Ingredients
Italian has three ways to express the presence of an ingredient in the name of a dish:
When there is no room for confusion the three can occasionally be mixed up, e.g. "panino al salame" is as common as "panino con salame"; however, in many cases using one instead of the other can give hints on the dish's composition.
Questions
In this section you'll meet the first proper questions. In Italian word order doesn't change in a question, meaning that the question mark at the end and the raising tone of voice are usually the only differences between a question and a statement.
Tips
It's important to keep in mind that the English idiom of "having food" being synonymous with "eating food" doesn't apply to Italian, where "avere cibo" simply means owning food.
You already met some noun variations in gender and number in the past lessons.
The most common noun classes in Italian are the following:
Italian possessives are in the form definite article (il, la, i, le) + possessive adjective. They agree with the gender and number of the thing they describe:
il mio cane My dog ("Cane" is masculine singular, so we use "il" and "mio.")
la mia pizza My pizza ("Pizza" is feminine singular, so we use "la" and "mia.")
Even though in English the possessive in the third person (his, her, its) varies based on the owner, remember that in Italian the gender and number are determined by the thing being owned:
il cane di Giulia > il suo cane ("Cane" is masculine, so we use the masculine, even though it is her dog.)
In Italian an article is almost always mandatory before a possessive. The exceptions are:
Possessive pronouns (possessives acting as a noun) are formed using the definite article and the possessive. They agree with the object they describe, even if it is not explicitly mentioned in the sentence:
Dov'è la tua macchina? La mia è qui. Where is your car? Mine is here. (It is understood that "la mia" refers to my car, so it is feminine.)
In this section you'll learn some common verbs; let's have a look at the "tough" ones.
Both verbs translate the English "to know": that means that while the difference is obvious to speakers of other languages (e.g. German kennen vs wissen , Spanish conocer vs saber , Latin cognoscere vs sapere ), it might be particularly hard for native English speakers.
This is the first verb you'll meet with a different transitiveness compared to English: it means "to like" but the one being liked is the subject ! Again, this is something that speakers of other languages might be familiar with (e.g. German gefällt mir , Spanish me gusta , Latin placet mihi ):
Note that contrary to Spanish the indirect object doesn't need a reinforcement (A Julieta le gusta Romeo), and instead using one is often regarded as a grammar mistake.
Prepositions , just like in English, don't always make sense. For example, things that in English are in something, in Italian may be at something. It very much depends on context, and/or on the verb that precedes them (again, just like in English). However, you'll find that most of the time English and Italian are not that different after all!
The main prepositions are di, a, da, in, con, su, per, tra, fra .
Tra and fra both mean between , or among , and they're almost completely interchangeable nowadays. However, it's better not to use tra before a tr sound, or fra before a fr sound.
They can also mean in , when talking about time:
The main difference between English and Italian, however, is that some Italian prepositions have to be combined with the article the whenever it ends up next to them. As you can see, di and in change into de- and ne- respectively, but the rest are quite predictable!
| Italian | English | il | lo | la | i | gli | le |
|---|---|---|---|---|---|---|---|
| di | of, from | de l | de llo | de lla | de i | de gli | de lle |
| a | to, at | a l | a llo | a lla | a i | a gli | a lle |
| da | from, by, since | da l | da llo | da lla | da i | da gli | da lle |
| in | in, into | ne l | ne llo | ne lla | ne i | ne gli | ne lle |
| con | with | con il, co l | con lo | con la | con i, co i | con gli | con le |
| su | on, about | su l | su llo | su lla | su i | su gli | su lle |
| per | for, through | per il | per lo | per la | per i | per gli | per le |
| tra/fra | between, among | tra il | tra lo | tra la | tra i | tra gli | tra le |
There are three ways to specify an occupation in Italian:
The verb "mancare," when referring to people, works like "piacere": the indirect object misses the subject.
Io (subject) non le (indirect object) manco.
She does not miss me.
In this section, you will see several different types of object pronouns: 1) direct objects , 2) indirect objects , 3) objects of preposition , 4) reflexive pronouns , 5) the passive “si,” and 5) ci and ne .
1) Direct objects
A direct object receives the action of the verb and answers the question, “What?” For example:
We can ask, “What do I see?” and answer “The girl.” So “la ragazza” is our direct object.
Just like how in English we can replace “the girl” with the pronoun “her,” in Italian we can replace direct objects with pronouns. The direct object pronouns are the following:
| 1st person singular (me) | mi | 1st person plural (us) | ci |
| 2nd person singular (you) | ti | 2nd person plural (you) | vi |
| 3rd person singular (him, her, formal you) | lo, la, La | 3rd person plural (them) | li, le |
Usually these pronouns come before your verb. So the sentence “Vedo la ragazza ” becomes “ La vedo” ( I see her ).
Sometimes pronouns are put after the verb for emphasis, and then use a different set of pronouns, called tonic pronouns :
| 1st person singular (me) | me | 1st person plural (us) | noi |
| 2nd person singular (you) | te | 2nd person plural (you) | voi |
| 3rd person singular (him, her, formal you) | lui, lei, Lei | 3rd person plural (them) | loro |
Except for “me” and “te,” these are the same forms as the subject pronouns. Going back to “Vedo la ragazza,” we can say “Vedo lei ,” if we want to emphasize that it is her (not someone else).
2) Indirect objects
Like direct objects answer the question “What?” indirect objects usually answer the question “To whom?” or “For whom?” For example:
“My sister” answers the question, “To whom do I write?” so “mia sorella” is the indirect object.
The indirect object pronouns look like the direct object pronouns, except the third person:
| 1st person singular (to me) | mi | 1st person plural (to us) | ci |
| 2nd person singular (to you) | ti | 2nd person plural (to you) | vi |
| 3rd person singular (to him, her, formal you) | gli, le, Le | 3rd person plural (to them) | gli |
Like the direct object pronouns, these typically come before the verb:
You can also use the tonic pronouns (see above) after the verb for emphasis or clarification, but with the indirect object, “a” is required:
The only exception is “loro,” which does not require “a”:
3) Objects of preposition
After a preposition (for example, “con,” “di,” “per”), you should use a tonic pronoun (see above):
4) Reflexive pronouns
In Italian, some verbs are reflexive, meaning that the person doing the action does it to him or herself. Examples of this would be “mettersi” (to put a piece of clothing on), “chiamarsi” (literally “to call oneself”), and “sentirsi” (to feel). In the dictionary, you may notice that the infinitive has “si” on the end to show the verb is reflexive.
Reflexive verbs have their own pronouns:
| io | mi | noi | ci |
| tu | ti | voi | vi |
| lui, lei, Lei | si | loro | si |
These pronouns match the verb (“mi” with the “io” form, “ti” with “tu,” etc.) and are usually placed before the verb:
5) The passive “si” (si passivante)
We use the passive or impersonal “si” when we don't want to state who exactly did the action. This can be translated in different ways in English. For example:
This could be translated as: In Italy, pizza is eaten , In Italy, you (in general) eat pizza , In Italy, one eats pizza , In Italy, they (in general) eat pizza , among other things. The important thing to remember is that this action is not being done by any specific person.
To form this, use “si” and a verb in the third person (the form for lui/lei or loro). If there is an object after the verb, the verb agrees with the object. So we say:
but
If there is no object, the verb is singular:
For reflexive verbs, you add “ci” before “si”:
6) Ci and ne
“Ci” and “ne” replace prepositional phrases. “Ci” replaces “in” or “a” and their object:
“Ne” replaces “di” and its object:
To express a person's age, Italian offers the choice of either a number or an adjective:
Alongside numbers, in this section you'll learn how to express the time of day: in Italian it is always expressed as a hour number, e.g.
The most common format is in multiples of 24 hours, but it's also possible to express it in multiples of 12, in which case to avoid confusion it could be necessary to specify the period of day:
Minutes are expressed as additions (e) or subtractions (meno):
The Italian passato prossimo (near past tense) is very similar, in form and definition, to the English present perfect: however, there are some important differences to keep in mind.
In many cases the choice of auxiliary differs between English and Italian.
The past participle is a verbal adjective, and as such can be declined in gender and number.
The Italian infinitive has many uses.
As a rule, when the subject of a subordinate sentence is the same as the one of the main sentence, the subordinate should be "shortened" into an infinitive proposition: but in many cases the same happens for subordinates referring to the object of the main sentence, or acting as its object.
There is no clear-cut rule of which preposition to use before each infinitive, and sometimes synonyms require different ones, and the same verb might require a different preposition when used reflexively.
The verbs that can be followed directly by an infinitive are:
Most verbs need a preposition before the infinitive:
The infinitive subordinate can also be introduced by other sentence elements for different effects, and in this case the prepositions are more loosely related to the main sentence:
The imperative (commands) is used for giving instructions or orders. In this section, you will find commands for tu , voi , Lei , and noi . These are all formed in slightly different ways.
1) Tu
For affirmative commands for "tu," you use the 3rd person singular (the form for lui or lei) in the present for verbs with -ARE and the normal second person (tu) for -ERE and -IRE.
| Infinitive | Affirmative command |
|---|---|
| CHIAMARE | Chiama! |
| LEGGERE | Leggi! |
| SENTIRE | Senti! |
With affirmative commands with "tu," pronouns are placed at the end of the verb:
For negative commands for "tu," you use the infinitive:
| Infinitive | Negative command |
|---|---|
| CHIAMARE | Non chiamare! |
| LEGGERE | Non leggere! |
| SENTIRE | Non sentire! |
With negative commands, pronouns can be placed either before or on the end of the verb:
When attached to the end, the final E of the infinitive is dropped.
2) Voi and Noi
Forming commands with "voi" and "noi" is easy - you just use the normal present tense form!
Chiamate! Non chiamate! Call! Don't call!
Chiamiamo! Non chiamiamo! Let's call! Let's not call!
When adding pronouns to these commands, follow the same rules as with "tu" commands:
Affirmative : Chiamate mi ! Chiamiamo ci ! Call me! Let's call each other!
Negative : Non mi chiamate! / Non chiamate mi ! Non ci chiamiamo! / Non chiamiamo ci !
3: Lei
Formal commands with "Lei" use the present subjunctive. You will learn the other forms of the subjunctive mood later. For now, the regular endings for Lei are:
| -ARE | -ERE | -IRE | -IRE (-isc-) |
|---|---|---|---|
| -I | -A | -A | -ISCA |
| CHIAMARE | LEGGERE | SENTIRE | CAPIRE |
|---|---|---|---|
| CHIAMI | LEGGA | SENTA | CAPISCA |
Words with an irregular "io" form will use that one as the stem for the formal imperative. For example:
Fare --> (io) faccio --> (Lei) faccia!
For the formal imperative, pronouns are always placed before the verb:
The imperfect tense (l’imperfetto) is another past tense in Italian. Unlike the passato prossimo, which is used for defined actions in the past, the imperfect is used for actions without a set starting and ending point.
The imperfect has three primary uses:
Paolo era alto. Paolo was tall.
Il bambino aveva due anni. The child was two years old.
Quando ero piccola, andavamo sempre al mare. When I was little, we always went to the beach.
Parlavo con mia madre quando ha suonato il telefono. I was talking to my mother when the phone rang.
Because English does not have an imperfect tense, we can use a variety of different structures to translate it. Consider the following paragraph:
When I was a kid, I always wanted to be an artist. I used to draw pictures every day. I would take out my markers and I would color all afternoon.
In Italian, all of the phrases in bold would be in the imperfect. We must remember, then, that there is not a one-to-one correspondence to a certain structure in English. Likewise, when we see the simple past (“went,” for example), only context can tell us which Italian past tense is appropriate.
Because of this, it can sometimes be hard for English speakers to know when to use the imperfect and when to use the passato prossimo. Apart from being used in a similar way to the English present perfect (“have gone,” for example), the passato prossimo is used for completed actions in the past tied to a specific point in time or a specific length of time. We use the imperfect for the midpoint of an action, but the passato prossimo for the beginning or end .
Consider these sentences:
In this case, I went to the dentist once, and this is a completed action.
In contrast, we can say:
Here, going to the dentist is a repeated, habitual action. It does not have a clear ending or starting point.
We could also say:
In this case, we have two actions. One, “andavo” ( I was going ), is an ongoing action (an action in progress), so we use the imperfect. The other, “ho visto” ( I saw ), is a complete action, confined to this set moment in time, so we use the passato prossimo.
The future tense , or futuro semplice , is quite simple for the most part, but there are a few irregularities.
Some verbs lose the vowel before the last r .
Among these verbs, those that would end in -nr- or -lr- end in -rr- instead.
Finally, stare, dare and fare mantain their -ar- ( io starò, io darò, io farò ), while essere changes its root altogether ( sa- ).
| regular verbs | AMARE | CREDERE | CAPIRE |
|---|---|---|---|
| io | am erò | cred erò | cap irò |
| tu | am erai | cred erai | cap irai |
| lui, lei, Lei | am erà | cred erà | cap irà |
| noi | am eremo | cred eremo | cap iremo |
| voi | am erete | cred erete | cap irete |
| essi | am eranno | cred eranno | cap iranno |
| some irregular verbs | ESSERE | AVERE | VEDERE |
|---|---|---|---|
| io | sa rò | av rò | ved rò |
| tu | sa rai | av rai | ved rai |
| lui, lei, Lei | sa rà | av rà | ved rà |
| noi | sa remo | av remo | ved remo |
| voi | sa rete | av rete | ved rete |
| essi | sa ranno | av ranno | ved ranno |
The future perfect in Italian is formed using the future tense of “avere” (avrò, avrai, avrà, etc.) or “essere” (sarò, sarai, sarà, etc.) followed by the past participle of the verb (-ato, -uto, -ito). Agreement for the participles and the use of “avere” or “essere” follows the same rules as the present perfect (passato prossimo) and all other perfect tenses.
Though the Italian future perfect can be translated as the future perfect in English (for example, “will have played”), there are a couple of unique uses of the future perfect in Italian.
One of these is the conjectural future tense . In Italian, the future and future perfect are used to express a conjecture about something in the present or the past, respectively. For statements, this can often be translated as “must” (in the future) or “must have” (in the future perfect):
Marta avrà voluto un gatto. = Marta must have wanted a cat.
For questions, one can express conjecture in English with “could,” “can,” “might,” etc.:
Chi l’avrà preso ? = Who can have taken it?
You may also note that Italian uses the future or future perfect in some adverbial clauses (after “quando,” for example) referring to an action in the future, where English prefers the present or present perfect. For example:
Quando avrò finito i compiti, ti chiamerò. = When I have finished my homework, I will call you.
The subjunctive is a grammatical mood used to express doubt , emotion , wishes , orders , or opinions . In other words, it doesn't refer to facts or actual events, but to feelings or situations that are uncertain or simply not yet verifiable. Mastering the subjunctive is a great way to impress native speakers with your Italian, mostly because even native speakers get it wrong sometimes! Don't worry though, it's only a matter of getting used to it.
This mood can be found in English as well ( that you be... if I were... ), and in Italian it's often introduced by the conjunction che ( that ), but not necessarily. Here are some examples:
Also, the conjunctions nonostante , sebbene , malgrado and benché (= even though) always trigger the subjunctive. Many native speakers often ignore this rule, but still...
Finally, regular verbs follow this pattern:
| -ARE | -ERE | -IRE | |
|---|---|---|---|
| io | -i | -a | -a/-isca |
| tu | -i | -a | -a/-isca |
| lui, lei, Lei | -i | -a | -a/-isca |
| noi | -iamo | -iamo | -iamo |
| voi | -iate | -iate | -iate |
| loro | -ino | -ano | -ano/-iscano |
| PARLARE | VEDERE | PARTIRE | CAPIRE | |
|---|---|---|---|---|
| (che) io | parl i | ved a | part a | cap isca |
| (che) tu | parl i | ved a | part a | cap isca |
| (che) lui, lei, Lei | parl i | ved a | part a | cap isca |
| (che) noi | parl iamo | ved iamo | part iamo | cap iamo |
| (che) voi | parl iate | ved iate | part iate | cap iate |
| (che) loro | parl ino | ved ano | part ano | cap iscano |
The conditional is another grammatical mood, and simply put, it's the Italian equivalent of the English verbs would, could, might and should .
Lo farei solo per te. = I would do it only for you.
Lei potrebbe leggere un libro. = She could/might read a book.
Tu dovresti essere qui. = You should be here.
So, in Italian instead of could and might you use the conditional of the verb potere ( can, to be able to ), instead of should you use the conditional of dovere ( must ), and instead of would ... you just use the conditional, because there's no need for an additional verb.
The conditional is formed by taking the root of the future tense , and adding these endings:
| AMARE | VEDERE | CAPIRE | |
|---|---|---|---|
| io | amer ei | vedr ei | capir ei |
| tu | amer esti | vedr esti | capir esti |
| lui, lei, Lei | amer ebbe | vedr ebbe | capir ebbe |
| noi | amer emmo | vedr emmo | capir emmo |
| voi | amer este | vedr este | capir este |
| essi | amer ebbero | vedr ebbero | capir ebbero |
The imperfect subjunctive is used in similar situations to the present subjunctive (wishes, hopes, emotions, doubts, orders, etc.), but is set off by a verb in the past.
When preceded by a past tense verb, the imperfect subjunctive indicates an action occurring at the same time or after the main verb.
Volevo che fosse vero. I wanted it to be true.
Non credevamo che Anna avesse paura. We didn't believe that Anna was afraid.
Occasionally you will see the imperfect subjunctive following a present tense verb to show an action occurring before the main verb:
Another use of the imperfect subjunctive is in "if" statements . You use the imperfect subjunctive after se when referring to a hypothetical situation. Sometimes these are called "contrary-to-fact" statements, because they describe something different from reality. In these cases, the imperfect subjunctive is paired with the conditional.
Se fossi miliardaria, comprerei un castello. If I were a billionaire, I would buy a castle.
Se i cani parlassero , cosa direbbero di noi? If dogs talked, what would they say about us?
We may notice that in English we also use a past tense for these hypothetical statements. We just have to remember to use the past subjunctive in Italian.
| -ARE | -ERE | -IRE | |
|---|---|---|---|
| io | -assi | -essi | -issi |
| tu | -assi | -essi | -issi |
| lui, lei, Lei | -asse | -esse | -isse |
| noi | -assimo | -essimo | -issimo |
| voi | -aste | -este | -iste |
| loro | -assero | -essero | -issero |
| PARLARE | VEDERE | CAPIRE | |
|---|---|---|---|
| (che) io | parl assi | ved essi | cap issi |
| (che) tu | parl assi | ved essi | cap issi |
| (che) lui, lei, Lei | parl asse | ved esse | cap isse |
| (che) noi | parl assimo | ved essimo | cap issimo |
| (che) voi | parl aste | ved este | cap iste |
| (che) loro | parl assero | ved essero | cap issero |
Unlike the imperfetto , which refers to continuous or habitual actions in the past, the passato remoto is a tense that indicates a single action that was completed a long time ago. This tense presents lots of irregularities, and some verbs even have multiple correct conjugations. In fact, even native speakers find this tense a bit difficult sometimes, and that's probably why in the spoken language the passato remoto is often replaced by the passato prossimo (ho mangiato, ho bevuto...), which is easier and far more regular. Oddly enough, in southern Italy the exact opposite tends to happen: for some reason many southerners often prefer to use the passato remoto , even when talking about recent events.
So, why learn the passato remoto ?
Just because many native speakers try to avoid it, it doesn't mean they never use it! Some verbs in particular are very common and very easy to learn.
It's without a doubt the most common tense in Italian literature, where events usually take place at some indefinite point in time, or in the distant past from the narrator's point of view.
It will definitely take your Italian skills to the next level!
Here's an example with three different past tenses:
Lui mi
diede
un consiglio. [passato remoto] =
He gave me advice. Once, a long time ago.
Lui mi
ha dato
un consiglio. [passato prossimo] =
He gave me advice. Once, maybe recently.
Lui mi dava consigli. [imperfetto] = He gave me advice, for a period of time. / He used to give me advice.
| common conjugations | -ARE | -ERE | -IRE |
|---|---|---|---|
| io | parl ai | ricev ei/etti | part ii |
| tu | parl asti | ricev esti | part isti |
| lui, lei, Lei | parl ò | ricev é/ette | part ì |
| noi | parl ammo | ricev emmo | part immo |
| voi | parl aste | ricev este | part iste |
| loro | parl arono | ricev erono/ettero | part irono |
| some irregular conjugations | ESSERE | AVERE | DIRE |
|---|---|---|---|
| io | fui | ebbi | dissi |
| tu | fosti | avesti | dicesti |
| lui, lei, Lei | fu | ebbe | disse |
| noi | fummo | avemmo | dicemmo |
| voi | foste | aveste | diceste |
| loro | furono | ebbero | dissero |
You might be wondering, "how should I learn all those other irregular forms outside of Duolingo?" The same way native speakers do: through exposure , and mostly through reading ! Luckily, many irregular verbs share the same patterns.


This document gives a quick overview of the main angular components and how they work together. These are:
$
- angular namespaceThis is how we get the ball rolling (refer to the diagram and example below):
angular.js
scriptDOMContentLoaded
eventng-app
directive, which designates the application boundaryng-app
(if any) is used to configure
the $injector
$injector
is used to create the $compile
service as well as $rootScope
$compile
service is used to compile the DOM and link
it with $rootScope
ng-init
directive assigns World
to the name
property on the scope{{name}}
interpolates
the expression to
Hello World!
.
$apply
(stimulusFn)
. Where stimulusFn
is
the work you wish to do in Angular execution context.
2. Angular executes the stimulusFn()
, which typically modifies application state.
3. Angular enters the $digest
loop. The
loop is made up of two smaller loops which process $evalAsync
queue and the $watch
list. The $digest
loop keeps iterating until the model
stabilizes, which means that the $evalAsync
queue is empty and the $watch
list does not detect any changes.
4. The $evalAsync
queue is used to
schedule work which needs to occur outside of current stack frame, but before the browser's
view render. This is usually done with setTimeout(0)
, but the setTimeout(0)
approach
suffers from slowness and may cause view flickering since the browser renders the view after
each event.
5. The $watch
list is a set of expressions
which may have changed since last iteration. If a change is detected then the $watch
function is called which typically updates the DOM with the new value.
6. Once the Angular $digest
loop finishes
the execution leaves the Angular and JavaScript context. This is followed by the browser
re-rendering the DOM to reflect any changes.
Here is the explanation of how the Hello world
example achieves the data-binding effect when the
user enters text into the text field.
1. During the compilation phase:
1. the ng-model
and input
directive set up a keydown
listener on the <input>
control.
2. the {{name}}
interpolation
sets up a $watch
to be notified of
name
changes.
2. During the runtime phase:
1. Pressing an 'X
' key causes the browser to emit a keydown
event on the input control.
2. The input
directive
captures the change to the input's value and calls $apply
("name = 'X';")
to update the
application model inside the Angular execution context.
3. Angular applies the name = 'X';
to the model.
4. The $digest
loop begins
5. The $watch
list detects a change
on the name
property and notifies the {{name}}
interpolation, which in turn updates the DOM.
6. Angular exits the execution context, which in turn exits the keydown
event and with it
the JavaScript execution context.
7. The browser re-renders the view with update text.
name
expression will evaluate
into a different value depending on which scope it is evaluated in. The example is followed by
a diagram depicting the scope boundaries.
A controller is the code behind the view. Its job is to construct the model and publish it to the view along with callback methods. The view is a projection of the scope onto the template (the HTML). The scope is the glue which marshals the model to the view and forwards the events to the controller.
The separation of the controller and the view is important because:
The view is what the user sees. The view begins its life as a template, is merged with the model and finally rendered into the browser DOM. Angular takes a very different approach to rendering the view compared to most other templating systems.
.innerHTML
, which causes the browser to render the HTML.
When the model changes the whole process needs to be repeated. The granularity of the template
is the granularity of the DOM updates. The key here is that the templating system manipulates
strings.compiler
. The compiler
looks for directives which in turn set up watches
on the model. The result is a
continuously updating view which does not need template model re-merging. Your model becomes
the single source-of-truth for your view.A directive is a behavior or DOM transformation which is triggered by the presence of a custom attribute,
element name, class name or comment. A directive allows you to extend the HTML vocabulary in a
declarative fashion. Following is an example which enables data-binding for the contenteditable
in HTML.
Filters
perform data transformation. Typically
they are used in conjunction with the locale to format the data in locale specific output.
They follow the spirit of UNIX filters and use similar syntax |
(pipe).
The injector
is a service locator. There is a single
injector
per Angular application
. The injector
provides a way to look up an object instance by its
name. The injector keeps an internal cache of all objects so that repeated calls to get the same
object name result in the same instance. If the object does not exist, then the injector
asks the instance factory to create a new instance.
A module
is a way to configure the injector's instance factory, known
as a provider
.
// Create a module var myModule = angular.module('myModule', []) // Configure the injector myModule.factory('serviceA', function() { return { // instead of {}, put your object creation here }; }); // create an injector and configure it from 'myModule' var $injector = angular.injector(['myModule']); // retrieve an object from the injector by name var serviceA = $injector.get('serviceA'); // always true because of instance cache $injector.get('serviceA') === $injector.get('serviceA');
But the real magic of the injector
is that it can be
used to call
methods and instantiate
types. This subtle feature is what
allows the methods and types to ask for their dependencies instead of having to look for them.
// You write functions such as this one. function doSomething(serviceA, serviceB) { // do something here. } // Angular provides the injector for your application var $injector = ...; /////////////////////////////////////////////// // the old-school way of getting dependencies. var serviceA = $injector.get('serviceA'); var serviceB = $injector.get('serviceB'); // now call the function doSomething(serviceA, serviceB); /////////////////////////////////////////////// // the cool way of getting dependencies. // the $injector will supply the arguments to the function automatically $injector.invoke(doSomething); // This is how the framework calls your functions
Notice that the only thing you needed to write was the function, and list the dependencies in the
function arguments. When angular calls the function, it will use the call
which will automatically fill the function
arguments.
Examine the ClockCtrl
below, and notice how it lists the dependencies in the constructor. When the
ng-controller
instantiates
the controller it automatically provides the dependencies. There is no need to create
dependencies, look for dependencies, or even get a reference to the injector.
To prevent accidental name collision, Angular prefixes names of objects which could potentially
collide with $
. Please do not use the $
prefix in your code as it may accidentally collide
with Angular code.


Toggle navigation
Home Page
Introduction to Game Development
This workshop allows students to unleash their full creative imaginations as we explore how to make our very own versions of games like "Snappy Bird" and “RecBot”
Sign Up to Workshop!
-1) intro to course + presenters + tech + game dev (concepts of the industry)
Your browser does not support the video tag.
check point 1
display demo
0) Learn JS pt 1: vars/data, print, arrays
Your browser does not support the video tag.
check point 2
display demo
check point 3
display demo
Quiz Time!
Take Quiz 1
Code Editors
editor sample 1
function foo(items) { var x = "All this is syntax highlighted"; return x; }
editor sample 2
editor sample 3


angular2-draggable is an Angular(ver >= 2.x) directive that makes the DOM element draggable
Documents Github


ledger
/
net.corda.v5.ledger.contracts
/
BrokenAttachmentException
/
attachmentId
attachmentId
val
attachmentId
:
AttachmentId
Property
attachmentId
-


Since I wrote this post, my views have softened quite a bit and I’m actively using and participating on Twitter again. I’m leaving this up because revising history doesn’t change what I actually felt at the time. I ended up having a month long break from Twitter and found the “off switch” on the constant reload cycle I was trapped in.
One of the topics that Saul and I discussed on NSBrief was my posts on Twitter, and how they tended to be a bit cranky. As I mentioned in the podcast, I have used Twitter in the past to vent about the ‘unimportant’ aspects of my day-to-day life that get to me — so much so that one of my peers has anonymously created the TonyArnoldsRage account (Be sure to visit the account just to marvel at the high art of my face pasted onto the Hulk’s body!).
I realised shortly after the NSBrief episode that while the stream of information going across my timeline in Twitter was at times informative, it was tending more and more toward negativity. And I wasn’t getting much back from it in return — in fact, I’ve pretty much stopped communicating effectively across all of my online channels.
None of my ideas or thoughts were being presented in a way that helped others understand them, and I was finding that I wasn’t bothering to use any of my critical thinking skills. My communication had essentially turned into a steady stream of knee jerk reactions to the refresh-read-refresh-read cycle.
I’m a lucky guy – gosh I could rattle off the amazing things in my life that I’m thankful for. I’m not spiritual, and I believe that everything I have in my life is a direct result of my actions. So if something is wrong, it’s up to me to make a change for the better. I struggled with why I had become so negative on Twitter: I actually got pretty despondent about it, and last week decided that the best thing I could do was to stop being quite so active on Twitter.
A week in, it’s been a good chance to reevaluate how I communicate online. A big red reset switch on the content reloading, and on my enthusiasm for communication. I look forward to writing on my blog and actually taking the time to explain my thoughts on topics that I previously would have muddily explained in 140 character quips on Twitter. I’m getting more work done.
I’ve come to the conclusion that Twitter’s activity stream is nothing more than a constant distraction to what’s important. It’s a channel of communication that’s ineffective, hard to follow and littered with advertising and nastiness. It has moments of usefulness and supportiveness, but it’s not the cohesive community that it used to be.
I’m a bit of a Johnny-come-lately to this party, as Brent Simmons came to a similar conclusion months ago, and came out the other side with a reasonable balance of still wanting to interact on Twitter, but recognising it’s lack of value. I agree with Brent: the magic has gone out of Twitter, and I don’t think it’s coming back.
Some of you will see this situation as an issue of self control, and you’re not entirely wrong. I see it as an opportunity to get my online persona back in sync with who I am in real life and contribute in a way that makes me happy and fulfilled.


What’s New¶
These are new features and improvements notes for each release.
v0.9.0 (June 13, 2020)¶
Drop support / compatibility for Python 2.7.
inputs / outputs names are now optional.:
@graph.register() def f_my_function(a, b): c = a + b return c
Additional argument to
Graph
to prevent inputs deepcopy (@Tosa95). This is useful when having large inputs when thedeepcopy
might be slow, but remove inputs immutability.
v0.8.1 (October 27, 2019)¶
Allow optional input data for kwargs (@veronicaguo)
v0.8.0 (March 17, 2019)¶
Can pass list of
Input
/Output
toGraph
.Names mapping.
Inputs validation with JSON Schema.
Some misc. refactoring and styling.
v0.7.0 (February 10, 2019)¶
Refactoring, and introduction of
Input
andOutput
objects.Contracts feature.:
graph.add_node( my_function, inputs=[Input(name='a', contract='>0'), Input(name='b', contract='float')], outputs=[Output(name='g', contract='float')] )
Nodes IDs refactoring (now uses uuid).
Run topological sort only when needed.
Everything accessible from pyungo __init__ (@nelsontodd)
Docstrings / Sphinx doc / GitHub page
v0.6.0 (July 6, 2018)¶
Fix “false parallelism” implementation. This require an optional dependency (multiprocess module) which is more friendly to work with stateful objects and multiprocessing.
Ability to pass predefined inputs at the node definition:
@graph.register(inputs=['a', {'b': 2}], outputs=['c']) def f_my_function(a, b): return a + b
v0.5.0 (April 3, 2018)¶
Nodes can be run in parallel using Python multiprocessing module:
graph = Graph(parallel=True, pool_size=3)
inputs and outputs parameters are mandatory and will raise an explicit error when missing.
Add a longer test using pvlib
v0.4.0 (March 23, 2018)¶
Fix single output when dealing with iterables. Previously, returning one output with an iterable was resulting in taking the first element.
Args and kwargs can be used in functions:
@graph.register( inputs=['a', 'b'], args=['c'], kwargs=['d'], outputs=['e'] ) def f_my_function(a, b, *args, **kwargs): return a + b + args[0] + kwargs['d']
Can create a Node without using the decorator:
graph.add_node(f_my_function, inputs=['a', 'b'], outputs=['c'])
DAG pretty print (graph.dag)
v0.3.0 (March 18, 2018)¶
First version in pypi