-
Thinking in Angular 4: Templates
Jul 28, 2018 · 2 min read ·
To understand Angular 4, after the “Hero” tutorial you should start from the Template syntax.
We highlighted some statement in red below:
Data direction Syntax Type One-way from data source to view target \{\{expression\}\} [target]="expression" bind-target="expression" Interpolation Property Attribute Class Style One-way from view target to data source (target)="statement" on-target="statement" Event Two-way [(target)]="expression" bindon-target="expression" Two-way Binding types other than interpolation have a target name to the left of the equal sign, either surrounded by punctuation (
[],()) or preceded by a prefix (bind-,on-,bindon-).The target name is the name of a property. It may look like the name of an attribute but it never is. To appreciate the difference, you must develop a new way to think about template HTML.
Read More -
Ci sono una nuova generazione di “nullasapienti”, persone che con una inutile laurea (tipicamente in legge) diventano giornalisti dilettanti, seguono i trend della “blogosfera” e leggono magari qualche bel libro di comunicazione.
Il risultato è che pubblicano video che non sono scontati, non sono banali ma non sono neppure perle di saggezza. Sono ovvi. La cosa diventa meno bella se mettendoci la loro faccia, vogliono pure dei soldi da voi.
Read More -
Arduino is a great hardware for a lot of reason: easy to use, difficulto to break, it is a very solid 5-Volt board.
But it a way too much and it has a very limited amount of RAM. So I started exploring other more “different” solutions. I need an economy chip with some RAM on it. After some research, I stumpled upon a lot of so-called Arduino alternative…
Read More -
Sometimes you need to remove nasty duplicate on a table, based on a subset of the column. On every big database there is something called “rowid” which can be used to indentify a column in a unique way. On PostgreSQL is called ctid, as we shall see:
Read More -
In Excel you can easily fill in a column with a list of values. Some times also in Emacs you my need to write down a bunch of similar code. The dotimes function with the “elsp eval” M-x : (Esc + : on windooze) will solve your trouble easily. Try out this code on scratch buffer:
Read More -
La mia esperienza nell’open source
Jan 15, 2017 · 4 min read ·
Nel 2011, per studiare node js creai un progetto chiamato OrgModeParser.
Org Mode è un package per l’editor Emacs, ed è pensato per tenere note strutturate, pianificare progetti con una schedulazione, mantenere una lista di cose da fare e generare poi documenti word o html da tali file in modo piuttosto efficace.
Read More -
AngularJS is indeed a good framework, but if you lose some grip on it (i.e. you go in vacation for 2 weeks), it is very complex to re-grasp.
Also I have seen junior JavaScript developer confused my $scope use.
JavaScript on client side has damned destiny: it is too easy to develop a framework from scratch: so roll you dice, cross your finger and find plenty of AngularJS alternatives
Read More -
Oracle SQL Developer is full of nice feature, damned by a overwhelming options pane, like the one I will describe to you right now.
Even if Oracle databases (<12) does not support auto increment, you can easily ask to your sql data modeler to generate for you a sequence and a trigger in a automatic way.
Read More -
Oracle SQL Developer is full of nice feature, damned by a overwhelming options pane, like the one I will describe to you right now.
I will show here a very fast way of comparing different database and auto-generate migration script.
- Reverse engineer the source database using Oracle Data Modeler
- Now select the right arrow shown below:

- Select the destination datasource (more here) when asked.
- The compare pane will enable you to compare the databases.
But the default options will also use schema name to detect different object, so you will not get what you want in every scenario.
In 50% of my daily job, schema are different, so you must select the options below to fix it:
Select "Options" and then "Compare options". Then de-select "Use schema property" like suggested below:

- Push the "Sync new object". Then push the "DLL Preview" button and inspect the generated database.
- Bonus: by default the tool will not include tables to drop. Inspect the two pane ad check the table you want to drop in the left pane.
- Refrain launching the script without proper testing. You are migrating your valuable data.
-
Pandoc is an universal document converter to convert Markdown, Org-Mode, Html, Word documents from one markup format into another After using different tools, (including GNU info and SGML). I find out pandoc vert handy.
Read More -
In ambito Open source vi sono innumerevoli licenze disponibili. Quali sono le loro differenze salienti? Come orientarsi? In questo breve articolo diamo una serie di indicazioni e spunti di riflessione.
Read More -
To increase performance and SD life of your raspberry PI 2/3, you can follow my first article on this subject.
You can easily increase even more the SD life if you can trade a bit of RAM.
The key idea is to take advantage of tmpfs, which can be resized on the fly too.
Read More -
After my first child reached 5 years old, I decided it was time to start my Lego Technic Revenge, together with KyloRen Star Wars lego-puppy (eh eh).It is very difficult to find out a good set to play with gears and so on. The big Lego Technic toys like cars and so on are sold without nice pieces to link with “normal bricks” (see below the red one).
Read More -
Finding the good one: mithril
Feb 21, 2016 · 2 min read ·
I have just read this insightful statement on this blog article about congitive load in Javascript
jQuery is undoubtedly useful when dealing with browser quirks, but once an application grows over a few thousand lines of code, unstructured jQuery code simply becomes too difficult to maintain, and you start needing the discipline of a framework to organize code. But when you're at tens of thousands of lines of code, you start to run out of entity types to CRUD, and your application growth starts to build on top of existing concepts. This is when you need the mental shift from being a library consumer to being a reusable component author,
This clever guy is the creator of Mithril, a very small, well crafted javascript library a friend of mine pointed to (via github…):
Read More -
Do you have cygwin base install right? So no dos2unix…you can convert a windows file to unix format with a small tr command like
tr -d '\\
15\\32' < winfile.txt > unixfile.txtI prefer the awk way of life:
[bash] awk ‘{ sub("\r$", ""); print }’ winfile.txt > unixfile.txt awk ‘sub("$", "\r")’ unixfile.txt > winfile.txt [/bash]
Read More