Some excel formulas

Cheatsheet for function translation (because functions change name with localization)

http://wwwhome.ewi.utwente.nl/~trieschn/excel/excel.html

Some useful functions

Domain in an email
Italian =STRINGA.ESTRAI(B4;RICERCA(“@”;B4)+1;LUNGHEZZA(B4))
English =MID(B4;SEARCH(“@”;B4)+1;LEN(B4))

Split string on first occurrence
First half
Italian =STRINGA.ESTRAI(E2;1;RICERCA(“,”;E2)-1)
English =MID(E2;1;SEARCH(“,”;E2)-1)

Second half
Italian =STRINGA.ESTRAI(C2;RICERCA(“,”;C2)+1;LUNGHEZZA(C2))
English =MID(E2;SEARCH(“,”;E2)+1;LEN(E2))

Absolute references
Put dollar sign before row/column to block it ($B$4 or $B4 or B$4)

Data classification trick for pivots
provide a reference sheet like param|value1|value2
and in the data sheet add columns which call the value from the reference sheet (FALSE is for exact match)

Italian =CERCA.VERT(A2;Config!$D$2:$F$58;2;FALSO)
English =VLOOKUP(A2;Config!$D$2:$F$58;2;FALSE)

Sqlite database queries not working on server

If you are developing an application based on a sqlite database (with php and PDO class for example), if you want to succeed with queries like INSERT and UPDATE, make sure not only the database file is writable and executable, but also the access path to it. So give execute and write permission to the folders containing the file till the website root.

Missing folder from Outlook mailbox

If some folders are missing from an email syncronized via IMAP in Outlook (all versions I assume), rightclick on the email folder, in the menu select “IMAP folders”.
In the form click Query: if you see folders without the folder icon on the left, select each and press Subscribe.
Press Apply and OK. Now the folders are back.

Joomla 3: “JUser: :_load” warning

Yesterday I upgraded a website from Joomla 2.5.6 to 3.0.3 (via 2.5.9 version, upgrade directly was not possible) and this morning I found this warning:

JUser: :_load: Unable to load user with id: 42

Turned out that in a previous upgrade were deleted some users, and the articles assigned to user id 42 in the table *_content (where * stands for the table prefix chosen during the installation process).
I solved assigning those articles to an existing user (in this case the superadmin of this site).

When you are inside the db (with phpmyadmin or heidisql or another interface), it needs to run this query

UPDATE jos_content SET created_by = [existing uid] WHERE created_by=[old uid]

The old uid stands for the uid you read in the warning (in my case was 42), the existing uid can be read into the *_user table (in the id field).

Example, if 123 is a valid user id and 42 the old one, and the prefix is ‘joomla’

UPDATE joomla_content SET created_by = 123 WHERE created_by=42

GoSMS Pro as default messaging app

GoSMS Pro is a nice and extensible messaging application which is probably the best among those handling SMS and MMS.

Installing it is simple and using it is simpler, but how to replace Messaging (the default Android app?).
1) Open messaging, go to Settings, scroll down till Notification settings and uncheck Notification.
2) Open GoSMS, go to Settings, Notification settings and check the first checkbox (Enable notification).
3) Go to Applications, open the menu and choose Modify. Drag the Messaging icon into the applications list, and the GoSMS icon in the bar.
4) Pay attention to move the app into main memory! If installed in SD it will disappear from the bottom bar after next reboot. (From Settings->Applications you can move it)

Rimuovere un proxy ancora attivo su apt-get

All’università devo usare un proxy per connettermi ad internet e su Ubuntu imposto gli indirizzi dalla scheda Proxy di Network, per ritornare a toglierlo una volta a casa.
Mi è successo che fosse solo apparentemente tolto (internet ed altre connessioni funzionavano), ma quando sono andato ad aggiornare apt-get mi ha dato un sacco di 404 anche sui repository Universe.
Dopo un controllo sui file di repository (come sources.list) ho trovato un riferimento alla questione dei proxy. In effetti aprendo diversi file ho trovato ancora gli indirizzi impostati dalla scheda, perciò li ho rimossi.
I file che ho controllato erano:

/home/Utente/.gconf/system/http_proxy/%gconf.xml
/etc/environment
/etc/apt/apt.conf
/etc/bash.bashrc
/home/Utente/.bashrc
/etc/apt/sources.list

Da questi ho rimosso tutti i riferimenti al proxy che erano presenti.

Non avendo avuto effetto, ho trovato qui la soluzione che finalmente ha posto fine al problema: nel file /etc/apt/apt.conf ho inserito la linea

Acquire::http::Proxy “false”;

Riuscendo finalmente ad aggiornare i miei pacchetti (e incidentalmente a far andare Dropbox che aveva smesso di funzionare).

Totale delle email in Gmail

Gmail non fornisce in alcun modo semplice il numero complessivo delle email presenti nella casella. Bisognerebbe andarsi a cercare l’ultima email presente e a quel punto avremo un numero preciso.
C’è un modo di farlo velocemente? Si.
Adesso ci sono diversi schemi di presentazione delle email: quello classico dove tutte le mail sono presenti in ordine di arrivo, e quelli ‘filtrati’ (prima email da leggere / importanti / speciali, i filtri li trovate vicino all’etichetta Posta in Arrivo in un menu a tendina) dove abbiamo due spazi distinti, quello superiore per le email scelte, quello inferiore per tutte le altre.
Nel caso abbiate attivo uno di questi filtri, dovete accedere all’elenco completo delle mail cliccando a destra di “Tutto il resto” il link con scritto ad esempio “1-25 di molti”.
Avremo nella barra degli indirizzi un link del tipo
https://mail.google.com/mail/?shva=1#section_query/in%3Ainbox

Adesso nella barra degli indirizzi andiamo ad aggiungere /pX dove X è il numero complessivo di pagine che vi potreste aspettare di avere (ad esempio /p100), anche se non è esatto pazienza, basta che sia maggiore, infatti Gmail lo sistema automaticamente sull’ultima pagina. Inserendo 100 ad esempio mi è andato sulla pagina 56, dove ho scoperto che me mie email erano 5542.
https://mail.google.com/mail/?shva=1#section_query/in%3Ainbox/p56