Very simple command to best fit using gnuplot

How calculate and plot a linear best fit using gnuplot with only a subset of data-file?
to generate an output like this:


you should use a command such:
f(x) = a * x + b
fit f(x) "datafile.data" every ::15:0:30:0
plot "datafile.data" ,  f(x)

It means that gnuplot perform the best fit calculation only for data from row 15 to row 30.

May be usefull select visually the subset of data to fitting in this way:
plot "datafile.data" every ::15:0:30:0 , ""


different color help you to select the desired subsection without modify the original data-file.

How make quick histogram using gnuplot [data elaboration]

Make an histogram using gnuplot isn't very simple if you have raw data (not collected in classes).
Here we show a quick and easy way to create and draw an histogram using gnuplot starting from raw data.

This is the command you have to use:

bw = 2   #substitute what you want
bin(x,width)=width*floor(x/width)
plot 'data.dat' using (bin($2,bw)):(1.0) smooth freq with boxes

And this is the output:



file "data.dat" exemple:
1 1
2 3
4 12
5 6
.....

[Via: http://www.nabble.com/gnuplot-histograms-td15811193.html]

Risolto: Cambiare MAC address macbook unibody snow leopard

Sebbene la procedura per cambiare il MAC address della scheda AirPort sia presente su un numero elevatissimo di siti, questa non risulta funzionante per numerosi macbook (pro e non) prodotti nel 2010.

Riporto qui la variante corretta che risulta funzionante anche sui macbook 2010.
0. Aprire il terminale
1. Controllare il MAC address digitando il comando:
ifconfig en1 | grep ether
2. Mantenere la scheda Airport accesa, ma disconnessa da qualunque network wifi (cliccare l'icona Airport, “Accedi ad un'altro Network,” inserire un nome a caso, e premere "cancella" mentre avviene la ricerca del network fasullo).
4. Digitare sul terminale :
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -z


5. Ancora nel terminale, modificare il MAC address con un comando del tipo:
sudo ifconfig en1 ether  00:00:00:00:00:00
(00:00... va modificato con il MAC address che volete)
6. Verificare che il nuovo MAC address sia stato correttamente inserito:
ifconfig en1 | grep ether

Il punto 4 è quello che manca su molte guide ma che rende funzionante la procedura.
A volte è necessario riprovare più volte la procedura (non va sempre a segno).

Home made, do-it-yourself: ipod touch 2g microphone

Who knows deeper Apple devices' know that the big lack of iPod Touch 2G is microphone.

The ability to use the device as a VoIP phone through the free apps as "Fring" or "Skype" is certainly a tempting idea, but it's just hampered by the absence of the microphone.

The solutions are already on the market: Apple offers the headsets with mic. to € 29.00 and Griffin offers the $ 19.99 SmartTalk.

Well, I propose the ... the ... momo-microphone (I invented the name rigth now).
Having a cemetery of an electrical fault, its cost is about € 1.00.
Suitable, isn't it?

Since I had searched for a long time in vain for such a solution, and that many others can benefit, I explain how I did it (I will not go into too much detail, if anyone wants clarification please contact me).

Thanks to the video on youtube of a certain "hermanwahsletn" I found out what the wiring diagram of the jack is:


I went to buy a 4-pin jack (0.80 €) and with a little trial and welding, I hooked up a microphone capsule exhumed from the cemetery of electronic components:





The result was great!
Inserted into the headset jack on the Touch, I registered for a few seconds with the apps "iTalk" of Griffintechnology and the quality is excellent!
You can connect the other contacts of the 4-pin jack to your stereo headphones.

Because I had an old headset for cell phones I decided to reuse it by connecting its wires to the 4-pin jack.

I checked with a multimeter which wires went to the microphone and what the cap and I challenged the welder.

a bit 'of photos of various stages:






The audio quality is excellent, the construction was very simple (2 days).
The test with the operation of Nimbuzz Skype was positive!

The secret iPhone calendar landscape view

Is the iOS calendar the only app that does not support the horizontally view (landscape view)?

It would appear so in less than a little unknown
bug/eastereggs:


How to get the landscape view?


0 - Select Day or Listing
1 - Create an appointment,
2 - Click on Edit,
3 - Rotate the iPhone horizontally,
4 - Cancel the appointment and confirm





Every time I open calendar I have to perform this tedious process?
NO! (Almost)

Thanks to multitasking (specifically the possibility of reopening the apps just as we left) the horizontal orientation is preserved.

However, you must:
1) Remember to turn the device BEFORE you open the calendar.
2) If you opened another apps you must close the same apps with the device positioned horizontally and after you can open calendar.

For iDevice that do not support multitasking (2g and 3g iPhone, iPod touch 1, Jan. 2.) calendar will always appear at every opening in portrait orientation.

The same functionality and more can be found on the apps: Calendar Week
(just 1,59 eur)

Il calendario landscape segreto di iPhone

L'apps calendario di iOS è l'unica app di default che non supporta la vista orizzontale (landscape view) ?
é possibile visualizzare il calendario di iphone ruotato?

Sembrerebbe di sì a meno di un piccolo bug/eastereggs poco conosciuto:

Come ottenere l'orientamento orizzontale?

0- Selezionare Giorno o Elenco,
1- Creare un appuntamento,
2- Cliccare su Modifica,
3- Ruotare l'iPhone in orizzontale,
4- Cancellare l'appuntamento e confermare


Ogni volta che apro il calendario devo eseguire questa noiosa procedura?
NO! (o quasi)

Grazie al multitasking (precisamente alla possibilità di riaprire l'apps esattamente come l'avevamo lasciata) l'orientamento orizzontale viene conservato.
Tuttavia è necessario:
1) Ricordarsi di ruotare il dispositivo PRIMA di aprire il calendario.
2) Se dopo la chiusura del calendario si è aperta un'altra apps bisogna chiudere la stessa con il dispositivo posizionato in orizzontale.

Purtruppo per gli iDevice che non supportano il multitasking (iPhone 2g e 3g, iPod touch 1° 2° gen.) il calendario si presenterà sempre in orientamento verticale ad ogni apertura.

Chi volesse una apps economica che aggiunga la visualizzazione orizzontale (settimanale e giornaliera) può provare Calendar Week

cosa è successo durante l'infedele del 5 aprile?

Oggi 5 Aprile, giorno di pasquetta, durante l'infedele su la7 è apparso per pochi secondi un messaggio di auguri pasquali in stile "televideo".
Sfondo nero, testo giallo, riportava un messagio simile a: "Fly video Brescia auguri di buona pasqua".
cos'è stato?