Thursday, December 30, 2010
Friday, October 8, 2010
Tuesday, October 5, 2010
Tuesday, April 13, 2010
reBlog from njvitto.com: njvitto
I found this fascinating quote today:
Il secondo è stato il consiglio dell’amico Giancarlo di prendersi un’ora per guardare il talk di David Heinemeier Hansson (il creatore di Ruby On Rails e partner di 37signals) a Stanford dal titolo “Unlearn Your MBA”, con un interessante intervento di Steve Blank che, tra le altre cose, è anche professore lì. Capisco che non sia facile trovare tutto questo tempo, ma se ci riuscite vale sicuramente la pena di ascoltare il suo punto di vista (no venture capital in fase di startup, realizzare progetti con 10 ore a settimana disponibili, fatturare milioni di dollari con un team di 15 persone, etc.).njvitto.com, njvitto, Apr 2010
You should read the whole article.
Sunday, April 11, 2010
A new MooG plugin is behind the corner: MooGStreet
L'obiettivo è quello di arrivare a rilasciare un plugin durante questa settimana che permetta di scrivere una linea di codice javascript come la seguente:
var mgs = new MooGStreet("Madrid");
mgs.show();
see it on Moog:
Take a MooG of MoonKiKi - A new MooG plugin is behind the corner: MooGStreet
Nunzio
Saturday, April 3, 2010
Preparing YoutubePL for the forge.

Continua la strada verso il forge.
Ho fatto evolvere lo script YoutubePL in modo che si possa creare un'istanza anche senza la combobox dei video. Al link che segue potete trovare alcune informazioni di come si evolvera' questo plugin.
Preparing YoutubePL for the forge.
Qui potete vedere un esempio in una Mooshell:
Monday, March 29, 2010
Take a MooG of MoonKiKi
In questo primo articolo troviamo un plugin che ho chiamato YoutubePL.
Nella stessa pagina è possibile creare playlist multiple. Presto rilascerò un plug-in anche in forge di Mootools, da cui sarà possibile controllare la dimensione del video e recuperare la lista del video da una chiamata JSON.
Restate sintonizzati su questo Moog.
Nunzio
Wednesday, December 2, 2009
reBlog from njvitto.com: njvitto
I found this fascinating quote today:
- Non contano le idee, ciò che conta è la loro realizzazione
- Seguite il Cult Of Done Manifesto. Fate come me ed Alberto e stampatevene una copia di fianco alla vostra scrivania…
- E’ giusto fare un business plan, magari a 5 anni. E’ un esercizio utilissimo e fondamentale ma i fatti sono altro: sviluppate il prototipo della vostra idea ASAP.
- Usate il Pomodoro (o la mia tecnica mista GTD + Pomodoro) non solo per lo sviluppo ma anche per la gestione della altre attività quotidiane. Vi sarà utile sia per avere una visione d’insieme che per misurare nel dettaglio dove state andando, il tempo che ci mettete e dove ci sono gli eventuali sprechi
- Usate Basecamp, Google Sites, Docs e/o qualunque altro sistema che possa agevolare e facilitare lo scambio di informazioni online tra chi partecipa al progetto insieme a voi
- Preferite una breve e puntuale call su Skype o qualunque altro sistema di videochiamata con i vostri soci/collaboratori piuttosto che una pesante e inutile riunione di un giorno…non c’è tempo!
- Parlando con qualunque interlocutore (soci, collaboratori, investitori, etc.) andate sempre dritti al sodo e niente giri di parole…non c’è tempo!
- Si inizia con la passione e si continua con i soldi
- Corollario del punto precedente: andate dagli investitori con una beta, prototipo o qualunque altra cosa che dimostri la vostra “passione” nel progetto e le vostre capacità di realizzarlo, poi i soldi (forse) arriveranno…
njvitto.com, njvitto, Dec 2009
You should read the whole article.
Wednesday, May 20, 2009
Tuesday, May 19, 2009
Saturday, May 16, 2009
Friday, May 15, 2009
dropbox
For my italian readers:
I found this fascinating quote today, is in italian:
Dropbox ha un’interfaccia web molto intuitiva tramite la quale potete accedere ai vostri dati in sicurezza da qualunque parte del mondo vi troviate con una connessione ad internet ed un browser web a disposizione. Potete anche installare l’apposita applicazione sul vostro computer Windows, Mac o Linux per accedere ai dati tramite una semplice cartella da posizionare dove preferite: potete installarla su tutte le macchine che volete e i dati saranno sempre sincronizzati bidirezionalmente in automatico (and of course: anche da e verso il web ovviamente).njvitto, May 2009
You should read the whole article.
Thursday, May 14, 2009
RETRIEVE GIVEN PROPERTY FROM A JSON
the function eval, a property from a json, if that property is in a string.
So not to write that:
and use it as I display below.
getProps = function(obj, prop) {
for (var i in obj) {
if (i==prop) { alert(obj[i]); return; }
if (typeof obj[i] == "object") {
dumpProps(obj[i], i);
}
}
}
var json = {"pippo":"ciao","pluto":"bao"}
var searchedProps ="pluto"
getProps(json,searchedProps);
In these example I shown an alert for the searched property, but you need to return itn
in that way:
if (i==prop) { return obj[i] }
So you can notice something that not all newbies know. You can reach a
value by name in the json properties name/value collection.
Because variable "i" is the name of property
given from the for with the keyworld "in".
Do you want something simpler than previous function?
Ok.
Look here:
if (json[searchedProps])
alert(json[searchedProps])
;)
Moonkiki
Wednesday, May 6, 2009
How to realize a calendar with Mootools (STEP I)
First of all, as usual, the demo:
HERE A LINK TO MY MOOTOOLS CALENDAR
And now some explanation:
In your html code add a layer like this:
<div id="cal"></div>
The attribute "id" is important beacause you'll use it for istance of your javascript calendar.
And now let's go with the first rows of our js.
In this lesson we introduce the method initialize and the main options of our class.
Date.prototype.getWeek = function() {
var onejan = new Date(this.getFullYear(), 0, 1);
return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()) / 7);
}
var Calendar = new Class({
Implements: [Events, Options],
options: {
id: '',
dateObject: new Date(),
where: ''
},
initialize: function(options) {
this.setOptions(options);
this.id = this.options.id;
this.dateObject = this.options.dateObject;
this.where = $(this.options.where);
this.where.set('html', '');
this.cal = null;
this.wait = new Element('img', {
'src': 'images/wait.gif'
});
this.wait.setStyle('margin-left', '38%');
this.wait.setStyle('margin-top', '18%');
this.body = $(document.body);
this.buildBody();
this.header = this.options.header;
this.length = this.getLength;
this.month = this.dateObject.getMonth();
this.date = this.dateObject.getDate();
this.day = this.dateObject.getDay(); //console.log("week "+this.week);
this.year = this.dateObject.getFullYear();
this.getFormattedDate = this.getFormattedDate;
this.dateObject.setDate(1);
this.firstDay = this.dateObject.getDay();
this.dateObject.setDate(this.date);
this.days = null;
this.months = null;
this.marginLeftDay = 0;
this.days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
this.months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var set_sipario = function() {
$('sipario').setStyle('display', 'block');
};
},
First of all we gave a new extension to the base prototype of javascript Date object. In this way we have a new method called getWeek that return the week number in the year.
After that we started declaring our Calendar class as usual in Mootools. To use fireEvent method and Options, we implemented this main object of MooTools Core. After that we just started with the initialize method (our costructor, for OOP developer), and here we just implemented options and wrote all the variables we need into the others method that we'll see next time. All declaration, as AGILE developing teach to us, are self explanated. If it's not, write your question on comment and I'll answer you.
I just want to stop your attention on the last steps of this first lesson about js/mootools/calendar:
this.days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
this.months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var set_sipario = function() {
$('sipario').setStyle('display', 'block');
};
The first and the second objects are useful to write the header of our calendar, the last function (set_sipario) is called to put a layer over our page. In this way we can make all our works behind the SIPARIO layer, and create our table object and function, when we'll finish it, we'll make disappear tha SIPARIO and we'll find our calendar ready to go.
Follow next lesson for other particulars.
Nunzio Fiore
(You can find a special implementation of Calendar in this web application: http://www.moonkiki.com/moonkiki/moogenda/ )
Wednesday, April 29, 2009
DATAGRID. ONE OF THE REVOLUTIONARY ROAD OF HTML5
4.11.2 The datagrid element
Working draft
Tests: 0
Demos: 0
Latest Internet Explorer beta: no support whatsoever
Latest Firefox trunk nightly build: no support whatsoever
Latest WebKit or Chromium trunk build: no support whatsoever
Latest Opera beta or preview build: no support whatsoever
JavaScript libraries, plugins, etc: no support whatsoever
- Categories
- Flow content.
- Interactive content.
- Sectioning root.
- Contexts in which this element may be used:
- Where flow content is expected.
- Content model:
- Either: Nothing.
- Or: Flow content, but where the first element child node, if any, is not a
table,select, ordatalistelement. - Or: A single
tableelement. - Or: A single
selectelement. - Or: A single
datalistelement. - Content attributes:
- Global attributes
disabled- DOM interface:
-
interface HTMLDataGridElement : HTMLElement {
attribute boolean multiple;
attribute boolean disabled;
attribute DataGridListener listener;
// columns
void addColumn(in Column id, in DOMString label, in DOMString type, [Optional] in HTMLImageElement icon, [Optional] in boolean sortable, [Optional] in boolean visible);
attribute DOMString sortColumn;
attribute boolean sortAscending;
void clearColumns();
// rows
void renotify();
void setRowCount(in long childCount, in long rowCount);
void setRows(in RowList rows);
void insertRows(in RowList rows);
void deleteRows(in RowIDList rows);
void repaint(in RowID row, in DOMString column);
void clearRows();
};
typedef DOMString Column;
typedef sequence<Column> ColumnList;
typedef sequenceCell; // Column, [Variadic] any (exact types expected depend on the column type)
typedef sequence<Cell> CellList;
typedef sequenceRow; // RowID, long, long, CellList, [Optional] boolean, [Optional] long
typedef sequence<Row> RowList;
typedef sequenceRowID;
typedef sequence<RowID> RowIDList;
[Callback=FunctionOnly, NoInterfaceObject]
interface RenderingContext2DCallback {
DOMString handleEvent(in CanvasRenderingContext2D context, in unsigned long width, in unsigned long height);
};
The datagrid element represents an interactive representation of tree, list, or tabular data.
The data being presented is provided by script using the methods described in the following sections.
The disabled attribute is a boolean attribute used to disable the control. When the attribute is set, the user agent must disable the datagrid, preventing the user from interacting with it. The datagrid element should still continue to update itself when the underlying data changes, though, as described in the next few sections. However, conformance requirements stating that datagrid elements must react to users in particular ways do not apply when the datagrid is disabled.
The disabled DOM attribute must reflect the content attribute of the same name.
4.11.2.1 Introduction
This section is non-normative.
In the datagrid data model, data is structured as a set of rows representing a tree, each row being split into a number of columns. The columns are always present in the data model, although individual columns might be hidden in the presentation.
Each row can have child rows. Child rows may be hidden or shown, by closing or opening (respectively) the parent row.
Rows are referred to by the path along the tree that one would take to reach the row, using zero-based indices. Thus, the first row of a list is row "0", the second row is row "1"; the first child row of the first row is row "0,0", the second child row of the first row is row "0,1"; the fourth child of the seventh child of the third child of the tenth row is "9,2,6,3", etc.
The chains of numbers that give a row's path, or identifier, are represented by arrays of positions, represented in IDL by the RowID interface.
The root of the tree is represented by an empty array.
Each column has a string that is used to identify it in the API, a label that is shown to users interacting with the column, a type, and optionally an icon.
The possible types are as follows:
| Keyword | Description |
text | Simple text. |
editable | Editable text. |
checkable | Text with a check box. |
list | A list of values that the user can switch between. |
progress | A progress bar. |
meter | A gauge. |
custom | A canvas onto which arbitrary content can be drawn. |
Each column can be flagged as sortable, in which case the user will be able to sort the view using that column.
Columns are not necessarily visible. A column can be created invisible by default. The user can select which columns are to be shown.
When no columns have been added to the datagrid, a column with no name, whose identifier is the empty string, whose type is text, and which is not sortable, is implied. This column is removed if any explicit columns are declared.
Each cell uses the type given for its column, so all cells in a column present the same type of information.
4.11.2.1.1 Example: a datagrid backed by a static table element
...
4.11.2.1.2 Example: a datagrid backed by nested ol elements
...
4.11.2.1.3 Example: a datagrid backed by a server
...
4.11.2.2 Populating the datagrid
- datagrid .
listener[ = value ] -
Return the current object that is configured as the
datagridlistener, if any. Returns null if there is none.The listener is an object provided by the script author that receives notifications when the
datagridneeds row data to render itself, when the user opens and closes rows with children, when the user edits a cell, and when the user invokes a row's context menu. (TheDataGridListenerinterface used for this purpose is described in the next section.)Can be set, to change the current listener.
- datagrid .
renotify() -
Causes the
datagridto resend notifications to the listener (if any) for any rows or cells that thedatagriddoes not yet have information for. - datagrid .
addColumn(id, label, type [, icon [, sortable [, visible ] ] ] ) -
Adds a column to the
datagrid.If a column with the given identifier has already been added, it just replaces the information for that column.
The possible types are enumerated in the previous section.
- datagrid .
sortColumn[ = value ] -
Returns the identifier of the column by which the data is to be sorted.
Can be set, to indicate that the sort order has changed. This will cause the
datagridto clear its position information for rows, sosetRows()will have to be called again with the new sort order.The columns are not actually sorted by the
datagrid; the data has to be sorted by the script that adds the rows to thedatagrid. - datagrid .
sortAscending[ = value ] -
Returns true if the data is to be sorted with smaller values first; otherwise, returns false, indicating that bigger values are to be put first.
Can be set, to indicate that the order is about to change.
- datagrid .
clearColumns() -
Removes all the columns in the
datagrid, reinstating the implied column. - datagrid .
setRowCount(childCount, rowCount) -
Sets the numbers of rows in the
datagrid, excluding rows that are descendants of rows that are closed.Throws a
DATAGRID_MODEL_ERRexception if the arguments contradict each other or previously declared information (e.g. declaring that thedatagridhas three rows when the 12th row has been declared). - datagrid .
setRows(rows) -
Updates data for rows in the
datagrid, or fills in data for rows previously implied by a call tosetRowCount()but not previously declared.The rows argument is an array of rows, each represented by a further array consisting of:
- A
RowIDobject identifying the row. - An integer giving the position of the row in its parent, given the current sort order, or −1 to set other row data without setting a position or changing a previously declared position.
- An integer giving the number of children of the row, or 0 if the row has no children, or −1 if the row has children but the count is currently unknown. If the number of children has already been set to 0 or a positive integer, then passing −1 leaves the previous count unchanged.
- An array giving the data for zero or more cells in the row, as described below.
- A boolean declaring whether the row is open or not. This entry, if omitted, is assumed to be false (closed), unless the row has already been declared as open.
- An integer giving the number of rows that are descendants of this row, excluding those that are descendants of descendants of this row that are closed. This entry can be omitted if the row is closed or if it has already been declared.
The array giving the data for the cells in the row consists of a further set of arrays, one per cell. The first item of each of these arrays is the column's identifier; the subsequent values vary based on the type of the column, as follows:
text-
- A string giving the cell's value.
- Optionally, an
imgelement giving an icon for the cell.
editablecheckable-
- A string giving the cell's value.
- A boolean, indicating whether the cell is checked (true) or not (false).
- Optionally, a boolean indicating whether the value of the cell is obscured as indeterminate (true), or not (false).
- Optionally, an
imgelement giving an icon for the cell.
list-
- A string giving the cell's current value.
- A
selectelement giving the list of options. - Optionally, an
imgelement giving an icon for the cell.
progress-
- A value in the range 0.0 (no progress) to 1.0 (task complete).
meter-
- A number giving the cell's value.
- Optionally, a number giving the maximum value, if it's not 1.
- Optionally, a number giving the minimum value, if it's not 0.
- Optionally, a number giving the highest value that is considered "low".
- Optionally, a number giving the lowest value that is considered "high".
- Optionally, a number giving the value that is considered optimal.
custom-
- A number giving the minimum width of the cell, in CSS pixels, that is desired.
- A number giving the minimum height of the cell, in CSS pixels, that is desired.
- A function that is passed a
CanvasRenderingContext2Dobject, along with the width and height (in CSS pixels) of the cell that the context will draw on.
While the rows in a single call to the
setRows()method can be in any order, for each row, it is important that all its ancestor rows and all its open previous siblings are also declared, either in the same call or in an earlier one.Throws a
DATAGRID_MODEL_ERRexception if the arguments contradict each other or previously declared information (e.g. saying that a row's position is 5 when the parent row only has 3 children, or naming a column that doesn't exist, or declaring a row without declaring its parent, or changing the number of children that a row has while that row and its ancestors are all open). - A
- datagrid .
insertRows(rows) -
Inserts the given rows into the
datagrid, increasing the numbers of rows that thedatagridassumes are present.The rows argument is an array of rows in the same structure as the argument to the
setRows()method described above, with the same expectations of consistency (a given row's ancestors and earlier open siblings being listed either earlier or in the same call as a given row). However, unlike with thesetRows()method, if a row is inserted along with its child, the child is not included in the child and row counts of the parent row; every row in the rows argument will increase its parent's counts automatically.Throws a
DATAGRID_MODEL_ERRexception if the arguments contradict each other or previously declared information. - datagrid .
deleteRows(rows) -
Removes the given rows from the
datagrid, and updates the number of rows known to be in thedatagridaccordingly. The argument is an array ofRowIDobjects identifying the rows to remove.Throws a
DATAGRID_MODEL_ERRexception if the argument includes a row thedatagriddoesn't know about. - datagrid .
repaint(row, column) -
If the given column's type is
custom, then causes thedatagridto reinvoke the function that obtains the desired rendering. - datagrid .
clearRows() -
Clears the
datagridof all row data, resetting it to empty.
Thursday, April 16, 2009
STOP LIVING IN THE PAST
This site is a contribution to the large and growing movement started by a conglomerate of Norwegian newspapers to finally phase out Microsoft’s ancient (in internet terms anyway) Internet Explorer 6 browser. If you find yourself reading this chances are you got here because a site you visited warned you that your browser is out of date. And if you are in fact using Internet Explorer 6, you really are living in the dark ages where web browsing is concerned.
The time has come to phase out this dinosaur of a browser. Permanently. Microsoft is about to roll out IE8 which makes Internet Explorer 6 a full two generations behind the times.
Follow the links below to upgrade Internet Explorer to the current version, read about why upgrading is so important and join the movement to phase out Internet Explorer 6 forever.
JOIN THE MOVEMENT TO PHASE OUT INTERNET EXPLORER 6. FOREVER.
Monday, April 13, 2009
Sunday, April 12, 2009
MoonKiKi PIANO ETUDES. A web 2.0 musical fragments with links to connect them
see and download mine:
http://transition.turbulence.org/spotlight/pianoetudes/net.jasonfreeman.pianoetudes.PianoEtudes/PianoEtudes.html?tag=147
Nunzio Fiore
What is this
Inspired by the tradition of open-form musical scores, I composed each of these four piano etudes as a collection of short musical fragments with links to connect them. In performance, the pianist must use those links to jump from fragment to fragment, creating her own unique version of the composition. The pianist, though, should not have all the fun. So I also developed this web site, where you can create your own version of each etude, download it as an audio file or a printable score, and share it with others. In concert, pianists may make up their own version of each etude, or they may select a version created by a web visitor. Right now, you are looking at a specific version of an etude created by another web site visitor. Listen to it by using the playback controls below. Download it as an audio file or printable musical score by using the menu on the left. Or create your own version of this etude by clicking the links below. Enjoy! -Jason Freeman




