Category Archives: howto’s

MySQL SELECT query with more WHERE conditions runs faster

For some reason I wanted to add more redundant conditions to a WHERE clause in a MySQL SELECT query, but I feared that, being redundant conditions, I may end up slowing up the query.

Shortly, there is this classifieds site, where each item’s table has the town_id, province_id and region_id rows. If you know the town_id you’re looking for already, you can query:

SELECT * FROM items WHERE town_id='12'

instead of:

SELECT * FROM items WHERE town_id='12' AND province_id='34' AND region_id='56'

as the results will be the same… but should you?

I prepared a quick test panel:

$creationstart=strtok(microtime()," ")+strtok(" ");
for($i=0;$i<=999;$i++)
 $test=doquery("SELECT * FROM items WHERE town_id='58003'");
$creationend=strtok(microtime()," ")+strtok(" ");
$creationtime=number_format($creationend-$creationstart,4);
echo "town only: $creationtime<br />";

$creationstart=strtok(microtime()," ")+strtok(" ");
for($i=0;$i<=999;$i++)
 $test=doquery("SELECT * FROM items WHERE town_id='58003' AND province_id='58' AND region_id='12'");
$creationend=strtok(microtime()," ")+strtok(" ");
$creationtime=number_format($creationend-$creationstart,4);
echo "all conditions: $creationtime<br />";

Surprisingly, it took anywhere from 2.4s to 4.5s for the “all conditions” routine to complete, while the “town only” query ended up being about 0.4s slower. At first I thought it might be the MySQL cache in action, but even inverting the position of the cycles inside the code, results were the same.

So well, even if it looks redundant to you, adding more WHERE ... AND ... clauses in your query speeds up the fetching of the results.

  This article has been Digiproved

Enable force feedback of Logitech Driving Force Wheel under windows

I got a Playstation 2 wheel controller for free off Freecycle sometime ago (thanks again Claudia), I read it was compatible with the PC, and in fact it sports a USB port, and Windows 7 recognizres it correctly; I wasn’t expecting full support for all the functions, but it did work as a game controller, even if the dead zone in Need For Speed: Hot Pursuit, and the lack of any feedback, made me lose most of the interest in driving games. What’s sad, is that there is no entry on the Logitech website for this kind of wheel, but only for upgraded versions (Driving Force something); I just tried downloading the logitech profiler for Windows 7 64bit (there are profiler versions also for Windows XP and Vista) off the page of another wheel, the G27 (but apparently you’re going to get always the same exe file) and as soon as I launched the tool after installation, the force feedback led of the wheel lightened up, some “updated” drivers were installed under windows, and I could use the wheel at full potential under hot pursuit… another story entirely, and also the dead zone was gone for me!

  This article has been Digiproved

BCU rattle on passenger airbag and dash/fascia in Rover 75

Vibrating noises while I am driving drive me nuts. It’s as simple as that.

I got my Rover 75 less than a year ago, and the excitement of driving an elegant classy car somehow made me ignore at first the abundant rattles I heard everywhere while I drove (especially behing the passenger airbag), yet I reached a point where I literally went mad and occasionally violently hammered everywhere on the fascia hoping to make the noise stop, but also, let’s be honest, to ease my nerves against the bad machine.

I must thank MikeM from the MG-Rover forums for the written tutorial that helped me through the procedure of solving this problem, and inspired me to make this visual anti-rattle guide.

rover 75 glovebox removal screws
This glovebox has already been removed, anyway let's assume it isn't: you have to remove the seven torx screws shown in the red circles, the bottom three are under the mat and you have to forcefully unglue it from the floor of the box to make them show. Also, it is advisable to act on the green circled hinges to let the lid slide all the way down.
rover 75 glovebox arm hinge
This is just a closeup of the hinge where you need to press the little plastic thing to let it slide further down; do it for both of the hinges.
rover 75 glovebox socket
This is the empty socket left after you removed the glovebox, circled in green is the power plug for the glovebox lighting, which you need to unplug before completely pulling out the glovebox; what you're looking for is situated beneath the upper front of the fascia, and is accessible by looking from beneath in the direction of the arrow.
rover 75 bcu near glovebox
Here is your peace hinderer: the BCU (body control unit, even if on the box it's called "Control Unit Body"); cicled in green is the bolt that fixes the box to the metal panel beneath it, what happens is that the tip of the bolt is very very close to that tubular metal frame you can notice, and at around 2k RPM it vibrates rattling against it generating the noise, in the area ponted by the red arrow, below that metal panel.
packaging plastic sheet
You need something to interpose between the two metal rattling objects to silence them; anything could be good, really, but my choice fell on this packaging material that I wisely saved months ago.
rover 75 bcu rattle isolation
I took some 10cm of that soft plastic strip, folded it in two, pulled down the metal plate so there was enough space between screw and tubular frame, and slided the insulator between the two, then released the assemply that simply went lying over the plastic; job done, no more vibrations!
rover 75 dash under panel
Sinbce I was on it, I decided to work on some rattling I got from the underpanel of the fascia over the speedometer. Circled in red are the two screws you need to remove in order to detach the plastic panel, and the green arrows point to the areas where the rattling was apparently originated.
rover 75 isolated under dash panel
I used most of the remaining packaging plastic to create some sort of cushion around the three catches that grapple inside the fascia (indicated by the green arrows). I stabilized the two ends with some insulating tape. Put everything back together, and rattles in that area will be gone as well!

Extract string between two tokens inside a text in bash shell scripting

The other day, as a total newbye, I was writing a script in bash to process an HTML page, look for a URL inside it, and then download the content at that URL, recursively for a series of pages; I had it already done in AutoHotKey language, but since I don’t keep my Windows workstation always on, while my linux homeserver is, I decided I was better off learning a little of bash language to make the procedure more efficient.

In this script I need to extract a segment of string between two known “tokens”, in order to get the needed URL off the HTML page; in AutoHotKey I saved the string position inside the text for both of the tokens, and then did a precalculated substring operation between those two offsets, and was obviously looking to do the same in bash, as I was translating step-by-step from AutoHotKey.

With my big surprise, this is not possible, as the only operation to search for a string inside another string, actually searches only for the first occurrence of the first caracter of the key string; in other words, you can search for “my” inside “The mellow fur of my cat is brown”, but the result would be 4, and not the expected 18, because as said expr index "$string" $substring only matches the first character of substring, hence the first position of “m” inside the string.

Now, I didn’t really care to find the position of those tokens, I only cared about the string in the middle, so any other operation that did the trick was fine; alas, I realized it only after about a hour of wasting time, but in the end I came up with the solution, and I am publishing it here to save time to other wanderers.

It basically consists in stripping from the string everything that is before the first token (including first token), and then stripping, from the result of this first operation, everything that is after the second token (including the second token):

#variables declaration
text="longtexttoprocess"
firsttoken="something"
secondtoken="somethingelse"

#actual processing
middlestring=${text#*$firsttoken}
middlestring=${middlestring%%$secondtoken*}

This returns $middlestring as the string contained between the first occurrence of $firsttoken (single # symbol), and the first occurrence of $secondtoken (double %% symbol, indicating the farthest occurrence from the end of string).

Li-Ion battery calibration, funny myth? Personal thoughts

I regularly lurk over at XDA since I started -happily- using my HTC HD2 Leo (actually, I just brought it to a collection center for warranty servicing… dead touchscreen, sigh). Since then, I began reading about “funny” practices regarding lithium ion battery usage to prolong their life. Even before that, when I still used older pocketpc’s (namely, iPaq’s) I would always run down the battery to about 30% and then recharge to full, and I avoided at most to recharge before it was “time”; on the other hand, you can often read guides saying that LiIon batteries get better the more often you recharge them, and get worse the bigger and less frequent the charges (sure, now tell me your laptop battery improves by always using it attached to the mains charger…).

Following is an excerpt taken from here (I suppose these are pretty standard steps, I’ve read similar ones on some XDA threads):

  1. Run the device down until it turns itself off.
  2. Turn it back on and wait for it to turn itself off again.
  3. Remove the battery for 10 seconds.
  4. Replace the battery, but leave the device off.
  5. Charge the device until full and then for another hour.
  6. **Root users only** Using a Terminal Emulator, type “su” enter, followed by “rm /data/system/batterystats.bin”
  7. Run the device’s battery down until it turns itself off.
  8. Turn the device on and charge for at least 8 hours.
  9. Unplug the device, turn off, then charge for another hour.
  10. Unplug the device, turn on, wait 2 minutes.
  11. Turn off again and charge for another hour.
  12. Restart and use as normal.

Now, the least of my intentions is to criticize their work in any way (believe me), yet, personally (very personally) I think you could insert in any place in that list the following statement:

  • Dress in a striped white and greenish scottish skirt, and, while wearing ONLY that, during a full moon, jump yelling “IIIOOOONNNN” around your charging phone

and it would perfectly fit in the overall mood of said list.

On a side note, when the charging device says it’s full, it stops sending energy to the battery, so for any kind of purpose you could leave the charger attached for a whole day after the led got green, it won’t really make any difference.

I am an extreme case, and I know it, but I can very honestly report my experience: I have the standard original battery, and I bought off chinese eBay other 3 clones (1230mAh, perfectly identical to the original except a slightly tinier barcode), together with a desktop charger.

I use the phone until it runs down to ~20% (lately down to 10% or even 5% if I’m doing something I don’t want to interrupt, like reading manga) at which point I take out the battery, and put inside the next charged one (I have them numbered, from 1 to 4). The drained battery goes straight inside the desktop charger (or in my pocket, until I get back home).

I rarely use the car charger, but I kind of regularly use the phone inside the car as MP3 player/navigator.

I have gotten, on very light use, up to 4 days uptime. Yes, you read it well, FOUR days uptime; I may have used it very little, yet it’s still 96 hours. Are you going to tell me that with those tricks you read about it could’ve lasted even longer?

PHP search string functions performance is “needle” dependent

I was playing with some templating benchmarks in my post before this one, and bumped into an interesting find regarding the way strpos works, and consequently all similar “search (and replace)” functions like str_replace, strrpos, stripos, str_ireplace, substr_replace, even preg_match and preg_replace (I tested only str_replace and preg_match out of these, but I assume they will all bear the same results).

  1. From here on  am using the php.net convention, and will call “needle” the string you’re searching for, and “haystack” the string inside of which you’re executing the search.
  2. Knowing these results will only be useful if you can choose which “needles” to put in the “haystack” to be searched for in a later time, hence only if you’re building a template.
  3. I serched if someone else found this already, but this doesn’t appear to be the case, so if I am selling for new already known things just don’t bash me.

So let’s say you’re creating a template scheme, where you insert several tags that need to be replaced by the dynamically generated content of your website. You can call them whatever you want as long as they are unique strings inside the template, so for example %tag% or {tag} or <!–tag–> or ~tag~ (or just whatever). Maybe you think that choosing which delimiting chars to use for the tag name is only up to your personal tastes, and I did too before discovering this by accident, but I am going to guess that if the template contains well formed HTML code, then using ~tag~ is going to be much faster than using <!–tag–>.

The general principle is, searching for a needle beginning with a “rare” character is much faster than searching for a needle starting with a commonly used character inside the haystack.

For example, if your haystack is an excerpt from an ebook, searching for “%hello” (if present) will be way faster than searching for “hello”. The reason for this? The function in C that searches for the string, starts by searching for its first character, if found checks if the following one matches, and so on; so if you’re searching for “hello” the function will pause at every “h” to see if after that there’s an “e”, and if yes then checks if there’s and “l” and then another “l”, yet if the word is “hellish”, the function will not find the ending “o”, and will have to discard the work and time spent and go on with the search. The “%” character on the other hand is pretty rare inside of a “normal text”, if not unique, so the function will have to “pause” way less times before hitting a full match.

Let’s put it to the test, this is the routine:

$creationstart=strtok(microtime()," ")+strtok(" ");
for ($i=0;$i<100000;$i++) $testpos=strpos($test,"malesuarda");
$creationend=strtok(microtime()," ")+strtok(" ");
$creationtime=number_format($creationend-$creationstart,4);
echo "malesuarda $testpos: ".$creationtime."<br />";

$creationstart=strtok(microtime()," ")+strtok(" ");
for ($i=0;$i<100000;$i++) $testpos=strpos($test,"%malesuada");
$creationend=strtok(microtime()," ")+strtok(" ");
$creationtime=number_format($creationend-$creationstart,4);
echo "%malesuada $testpos: ".$creationtime."<br />";

Let’s do some explaining: $test is a fairly long string that I previously defined inside the code (it is made of a lorem ipsum kind of text, several paragraphs amounting to almost 13kb), inside of which I took a random word, “malesuada“, which is repeated several times, and I made two occurrences of this word slightly different, to render them unique; they were both towards the end of the string, I changed one into malesuarda adding a”r”, and another one (further away in the string) into %malesuada, then just loaded the PHP script; I echoed the value of $testpos as well, to confirm that the strings were actually found.

As expected, here are the results:

malesuarda 10970: 3.5609
%malesuada 11514: 0.7632

Replacing strpos with any other functions listed at the beginning of this article will deal similar results.

PHP templating, preg_match, file_get_contents and strpos, the fastest

While working on the website of reecycle.it, il frecycling italiano per il riciclo degli oggetti, I am spending my resources also on reducing at most the load on the Apache server of my italian shared hosting, Tophost, so i decided to make some benchmarks to see which was the best speed I could load the templates at, using different methods (a template is a “model” of a page -or part of-  written in HTML code, inside which the dynamic values loaded by the website engine are inserted).

All the templates used by reecycle.it were initially created as several .html files (one per each template) with several %tags% substituted by the str_replace() function before the output, but I thought that maybe there were different, faster ways to obtain the same result; a page can contain up to 5 or more different templates (general layout, login panel, simple search widget, search results table, and single row of the search results table), so each page could tell the server to access and load 5 different files on the hard disk (we are ignoring the disk cache for simplicity); maybe reading a single, bigger file containing all of the templates, loading it into memory, and later extracting the needed parts, is faster? This path can be taken in two ways, either by writing two “clean” lines of code using preg_match() and a regular expression, or by using a rather less “elegant” but strictly more performant combo of strpos() and substr() which instead needs several more lines of code.

In other words, I needed to know which one of the three (separate template files, single big template with regexp extraction, and single big template with strpos/substr extraction) was faster. I already knew preg_match was heaps slower than strpos/substr, yet I included it in the test for the sake of completeness.

This is the routine I used:

<?php
$creationstart=strtok(microtime()," ")+strtok(" ");

for ($i=0;$i<1000;$i++) {
 $text=file_get_contents("full.html");
 for ($n=1;$n<=8;$n++) {
 preg_match("/<!--{$n}\(-->(.*)<!--\){$n}-->/s",$text,$matches);
 $html[$n]=$matches[1];
 }
}

$creationend=strtok(microtime()," ")+strtok(" ");
$creationtime=number_format($creationend-$creationstart,4);
echo "preg_match: ".$creationtime."<br />";

/////////////////
$creationstart=strtok(microtime()," ")+strtok(" ");

for ($i=0;$i<1000;$i++) {
 $text=file_get_contents("full.html");
 for ($n=1;$n<=8;$n++) {
 $start=strpos($text,"<!--$n(-->")+strlen("<!--$n(-->");
 $ending=strpos($text,"<!--)$n-->");
 $html[$n]=substr($text,$start,($ending-$start));
 }
}

$creationend=strtok(microtime()," ")+strtok(" ");
$creationtime=number_format($creationend-$creationstart,4);
echo "strpos/substr: ".$creationtime."<br />";

////////////////////
$creationstart=strtok(microtime()," ")+strtok(" ");

for ($i=0;$i<1000;$i++) {
 for ($n=1;$n<=8;$n++) {
 $html[$n]=file_get_contents($n.".html");
 }
}

$creationend=strtok(microtime()," ")+strtok(" ");
$creationtime=number_format($creationend-$creationstart,4);
echo "file_get_contents: ".$creationtime."<br />";

where full.html is the single HTML file containing all the templates (a total of 8, consisting in paragraphs in lorem ipsum style, of different length), identified by <!--templatenumber(--> and <!--)templatenumber--> between which was the code to extract, while the single template files were named from 1.html to 8.html.

What the code does is, for each method it repeats 1000 iterations in which every single template is loaded, from 1 to 8, and measures the needed time to complete. This usage is not very realistic, as the template code is actually several lines of HTML code instead of few long lines of text, and templates are never loaded all together, but only those which are actually needed to draw the page; anyway, better performance in this test means better performance in real-life use (WRONG! check bottom for more details).

So, this was the result:

preg_match: 1.8984
strpos/substr: 0.0681
file_get_contents: 0.1352

Final times were obviously different at each page refresh, from a minimum (for preg_match) of 1.4s up to a maximum of 3s, anyway the relationship between them remained the same, that is the strpos/substr combination was two times faster than file_get_contents called for each file, yet what surprised me is how preg_match method is almost 30 times slower than strpos/substr, and hence 15 times slower than asking the server to read several different files together (I suppose this was due to the disk cache in action).

On a side note, the tech support of my hosting, inquired about this, suggested me to drop reading separate files in favour of reading a single file and using preg_match… go figure.

UPDATE:

I just went and tested this benchmark with real templates off reecycle.it… oh how much I was wrong.
I made a function on reecycle.it to fetch the requested template, that when the template inside the big file is missing, loads the single file template, returns it, and adds the missing template to the big single file, so after a while I got a 37kb supertemplate.tpl containing all of the templates of the website. I just changed the routines in the example above, to use the real files of the templates… and behold, the results were inverted! Using file_get_contents() on several files was two times faster than using strpos/substr on a single big file. No matter how I changed it, several, separate small files were still much faster than a single big file.

I blame it on two things: the file is actually big, so string functions have to deal with a big chunk of data to process, and especially the tag formats, since the template delimiters, practically in HTML comment format, begin with the “less than” symbol which is bound to be repeated lots of times inside HTML code, maybe confusing the strpos function.

In fact, in the templates archive file I modified the delimiting tags so they were like {tag(} and {)tag} instead of using the html comment tags <!–…–>, and the results of the benchmark went back to normal, being faster for the strpos/substr combo on the single file archive than with file_get_contents on several separate files, and the more the template requests, the faster the strpos/strsub method if compared to file_get_contents… see results of my next post.

Se vuoi cambiare la tua password, o non la ricordi, inserisci qui l’indirizzo di posta elettronica con cui ti sei registrato<br />
<form method=”post” action=”index.php”>
<table>
<tr>
<td class=”dida”>
email
</td>
<td class=”dati”>
<input type=”text” name=”resetmail” />
</td>
</tr>
<tr>
<td colspan=”2″>
<input type=”hidden” value=”resetpassword” name=”action” />
<input type=”submit” value=”Invia mail di reset” name=”sendresetpassword” />
</td>
</tr>
</table>
</form>

  This article has been Digiproved

Tophost e variabile di sessione “user” riservata in PHP

Stavo allegramente imprecando stamattina contro il server FTP del nodo8 di tophost su cui è ospitato un progetto a cui lavoro, siccome non era utilizzabile a causa di impressionante lentezza nelle risposte.

Ho colto l’occasione per rivedere alcuni aspetti del codice PHP e riordinare la gestione delle sessioni utente per renderle più funzionali, al che ho deciso di caricare in un’unica variabile di sessione, $_SESSION["user"], un array contenente tutti i dati rilevanti dell’utente per potervi accedere rapidamente senza richiedere costantemente un accesso al database.

Ebbene, non sembrava che riuscissi a far funzionare nulla, eppure è tecnicamente possibile caricare un array all’interno di una variabile di sessione. L’array veniva caricato subito dopo il login (confermato da var_dump) ma alla pagina successiva era sostituito da una stringa, corrispondente allo username MySQL del sito. Ho messo in discussione il mio codice, cercando dove fosse il problema, e modificando alcune assegnazioni (il tutto perdendo minuti ad aspettare che il server FTP accettasse gli upload), fino a quando non ho provato a cambiare il nome della variabile a $_SESSION["visitor"], e magia, ha funzionato tutto correttamente. A quanto pare, siccome non ho trovato traccia di questo in manuali “ufficiali”, i server di tophost sono impostati per accedere al nome utente MySQL tramite la variable di sessione “user”… non so cosa pensare. Qual è la variabile di sessione contenente la password MySQL?

  This article has been Digiproved

UPS and car battery, how to power up your emergency supply

UPDATE: there is a new article that expands and powers up this idea, you find it here.

For a while an old UPS of mine was abandoned in a corner because its battery was long dead and didn’t sustain the load of a PC for even a few seconds; and for a while I’ve been telling myself I needed to buy a spare battery off ebay or something, but never got around it because the prices were less than inviting; in the meantime, my little home server kept dying at each and every blackout or brownout.

The other day I noticed a car battery lying at home; we actually have a few car batteries here, unneeded but we keep them for the sake of it; none of them is new and they have been taken off old dismissed cars, they still work though.

car battery
When I saw this boulder I thought I may very well check if it was up and running, and hook it up to my abandoned UPS

Going by the theory, it’s still a 12V lead battery, so it should perfectly work with a normal computer UPS, yet I digged for information around several websites, and actually there weren’t any particular warnings (on the contrary, car batteries are made to sustain intense but short drains, followed by frequent charging, and that’s exactly the way an UPS is mostly used), but on the other hand, there could be, maybe, a little risk of production of toxic vapours, due to the acid contained in the battery; in other words, no problem whatsoever, but it’s recommended the setup be put inside an isolated, or well aired room; in the worst of cases you can keep the UPS by the PC, and use cables long enough to place the battery elsewhere; in this case the room I needed it into was quite isolated, so no problem at all.

After removing the old battery, I connected a couple of cables to the connectors (they should be thick enough), and I isolated everything with a hot melt glue gun (man's best friend)
ups battery cables outlet
I chose to make the cables come out of the front of the UPS, since the back was crammed with 220V outlets, so I made a little hole with a dremel and fixed everything with hot glue
car battery homemade contacts
I used a metal strip to fold into a couple of ring springs to connect to the end of the cables, isolated them with melt glue, and they fitted perfectly onto the battery poles
ups car battery setup
This is the final look of my own setup; the size of the UPS is roughly the same as the battery, so they fit together quite well; I could have found way longer cables (home AC cables are perfectly fine) to accomodate the battery farther away from the UPS, either in another room, or even outside

This setup has been tested to work perfectly, removing the plug activated the switch to battery power seamlessly, and I tested it for about one minute; I don’t know how long it could last, but probably could reach 30 or even 60 minutes, I didn’t test it thoroughly because I don’t really care, blackouts and brownouts last very short over here, and I don’t want to stress the battery for no particular reason, reducing its operative life.

A detail to note: when I wired the battery only, in a test setup, I couldn’t turn on the UPS, and I started thinking I failed somewhere, or even the UPS died for some reason, but it was just a coincidence, because my particular model of UPS is silly enough to refuse turning on if you try doing it without external power, in other words I needed to attach it to the mains plug as well, and I turned it on no problem.

This article has been Digiproved

Come si usa la vernice elettroconduttiva a base di argento

Scrivo questo articolo anche per riferimento personale: la vernice elettro-conduttiva all’argento è costosa (mi dicono che quella al rame è più economica), pagata 10 euro per 3cc, un furto a mio parere, ma considerando il valore della cosa che dovevo aggiustare (una pista stampata su un foglio di acetato per degli interruttori lavabili, attaccati ad un aggeggio da più di 100 euro, il cui ricambio ci avrebbe impiegato almeno un mesetto per arrivare, ammesso che fosse stato possibile trovarlo, e chissà quanto sarebbe costato), insomma, come dicevo tutto considerato ne è valsa la pena, ed ora ho un intero tubettino che potrebbe tornare utile un domani per altre cose.

Ora, il problema con la vernice conduttiva è che ad un primo utilizzo potrebbe sembrare di essere stati raggirati da chi ve l’ha venduta, e farvi venire voglia di tornare in negozio sbattendogliela sul bancone e pretendendo un rimborso. Infatti, fino a quando non vi sarà andata bene, la vernice elettroconduttiva NON CONDUCE. Diamine, anche immergendo i puntali di un tester direttamente all’interno del barattoletto non viene misurata alcuna continuità elettrica, persino dopo aver agitato con veemenza.

Comunque ho scoperto che esiste anche lo zen della vernice all’argento, ed ecco le direttive da seguire:

  1. Agitare bene
  2. Agitare ancora bene
  3. Continuare ad agitare bene fino a quando il gomito non è dolorante
  4. Ho già detto che il tubetto va agitato bene prima di aprirlo per la prima volta?
  5. Pulire bene la superficie da trattare con alcool, eventualmente raschiare appena le parti da connettere se ossidate, anche per renderle più ruvide in modo che la vernice si attacchi meglio
  6. In base alla dimensione della pista da creare scegliere lo strumento più adatto, anche se in generale io non userei mai il pennellino gigantesco in dotazione; nel mio caso ho preso un punteruolo, e dopo aver agitato un’ultima volta il barattolino l’ho inclinato per far avvicinare al bordo la vernice, ed ho bagnato la punta con la preziosa miscela argentea
  7. Stendere con mano fermissima la pista tra le due estremità da collegare, meglio se coinvolgendo almeno 2mm di lunghezza dei capi da connettere; creare prima un “filo” di vernice che connette le due estremità, e continuare a stenderlo passando la punta dello strumento da una parte all’altra, con delicatezza, anche allargando la pista un po’
  8. Soffiare delicatamente e a lungo fino a quando la superficie non diventa più opaca e di aspetto meno liquido, e di consistenza gommosa
  9. Ripetere i due passaggi precedenti stratificando almeno altre due volte e asciugando
  10. Dopo qualche minuto da quando l’ultimo strato è diventato gommoso è possibile usare un tester toccando gli estremi che si sono uniti assieme con la vernice (non posare i puntali del tester direttamente sulla vernice) e dovreste notare un valore misurabile di resistenza
  11. Vi conviene a questo punto lasciare l’intruglio all’aria per un giorno in modo da farlo asciugare bene e fargli fare presa in modo più solido

  This article has been Digiproved