Tips & tricks Tutorials

Speed comparison between USB 2.0, USB 3.0, SATA and Firewire

The theoretical maximums are as follows:

In bits per second, that is:

  • USB 1.1 = 12 Mbit/s
  • Firefire 400 = 400 Mbit/s
  • USB 2.0 = 480 Mbit/s
  • FireWire 800 = 800 Mbit/s
  • USB 3.0 = 5 Gbit/s
  • USB 3.1 = 10 Gbit/s
  • eSATA = Up to 6 Gbit/s (750 MB/s) right now as it depend on the internal SATA chip.
  • Thunderbolt = 10 Gbit/s × 2 (2 channels)
  • Thunderbolt 2 = 20 Gbit/s
  • Thunderbolt 3 = 40 Gbit/s

In Bytes per second, that is:

  • USB 1.1 = 1.5 MB/s
  • Firefire 400 = 50 MB/s
  • USB 2.0 = 60 MB/s
  • FireWire 800 = 100 MB/s
  • USB 3.0 = 625 MB/s
  • USB 3.1 = 1.21 GB/s
  • eSATA = 750 MB/s
  • Thunderbolt = 1.25 GB/s × 2 (2 channels)
  • Thunderbolt 2 = 2.5 GB/s

However, this does not provide the actual answer. As an example, FireWire 400 is a serial connection. The entire 400 Mbps is available for data transfer. USB 2.0 sends command and control data through the same connection the data uses limiting the 480 Mbps connection to 380 to 400 Mbps. When considering throughput the list looks entirely different.

Tips & tricks Tutorials

IP Ratings (Ingress Protection)

IP_Code_ProtectionTwo-digit number established by the International Electro Technical Commission, is used to provide an Ingress Protection rating to a piece of electronic equipment or to an enclosure for electronic equipment.

The protection class after EN60529 are indicated by short symbols that consist of the two code letters IP and a code numeral for the amount of the protection.

Example: IP65 (NEMA 4)
The two digits represent different forms of environmental influence:
• The first digit represents protection against ingress of solid objects.
• The second digit represents protection against ingress of liquids.

The larger the value of each digit, the greater the protection. As an example, a product rated IP54 would be better protected against environmental factors than another similar product rated as IP42.

read more »

SQL Server

SQL Server: The transaction log for database is full

Right-click your database in SQL Server Manager, and check the Options page. Switch Recovery Model from Full to Simple then right-click the database again. Select Tasks Shrink, Files. Shrink the log file to a proper size (I generally stick to 20-25% of the size of the data files).

Switch back to Full Recovery Model, and take a full database backup straight away.

You now need to figure out whether you need the ability to recover your database to a point-in-time. If so, schedule regular transaction log and perhaps differential backups according to the requirements of your business.

In case the business can live with a certain amount of data loss, schedule full backups and switch to Simple mode.

Code Snippets IIS wordpress

WordPress ISS Permalinks

Enabling Pretty Permalinks in WordPress

This walkthrough describes how to enable “Pretty Permalinks” for blog posts in the WordPress blog engine that is installed on IIS 7 and above. Typically, without URL rewriting functionality on a Web server, WordPress users must use “Almost Pretty” URLs, for example, By using the URL Rewrite module, you can use “Pretty Permalinks,” for example,, for WordPress blogs that are hosted on IIS.

This walkthrough requires the following prerequisites:

IIS 7 or above with FastCGI and PHP installed. If you need to install PHP, follow the instructions in this article.
WordPress installed. If you need to install WordPress, follow the instructions in this article or use the instructions from the official WordPress site.
URL Rewrite installed.

Note that for the purposes of this walkthrough it is assumed that WordPress is installed in a Web site root directory. If WordPress is installed in a subdirectory, then the rewrite rules that are used in this walkthrough should be included in the Web.config file that is located within the same subdirectory where the WordPress files are.
Enabling Pretty Permalinks in WordPress

Use the following instructions to create pretty permalinks for your blog posts.

To enable pretty permalinks in Word Press:

Log on to WordPress with Administrator user rights.
In WordPress, click the Options tab.
On the Options page, click the Permalinks subtab.
This will take you to the page where you can customize how WordPress generates permalinks for blog posts.
On the Permalinks page, select Custom, specify below and enter “/%year%/%monthnum%/%day%/%postname%/” in the Custom structure text box.
Click Update Permalink Structure.

All the blog post links will have URLs that follow the format that you have specified, but if you click any one of those links the Web server will return a 404 – File Not Found error. This is because WordPress relies on a URL rewriting capability within the server to rewrite requests that have “pretty permalinks” to an Index.php file. In the next section, you will create a rule that will provide this capability.
Creating a Rewrite Rule

Open the Web.config file that is located in the same directory where the WordPress files are installed, and paste the following XML section into the system.webServer element:

<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<action type="Rewrite" url="index.php" />

This rule will try to match any requested URL. If the URL does not correspond to a file or a folder on the file system, it will rewrite the URL to the Index.php file. At that point, WordPress will determine which content to serve based on the REQUEST_URI server variable that contains the original URL before it was modified by this rule.
Testing the Rewrite Rule

After you save the rewrite rule to the Web.config file, open a Web browser and click any one of the permalinks in your WordPress blog. You should see the correct content returned by the Web server for each permalink.


In this walkthrough you learned how to use the URL Rewrite module to enable “pretty permalinks” in the WordPress blog engine. WordPress is just one example of the many popular PHP applications that can take advantage of the URL Rewrite module in IIS, a feature that enables user-friendly and search engine-friendly URLs.



By Ruslan Yakushev

Tips & tricks Utils

Fix Internet Explorer Printing Blank Pages

I just ran into an issue where three different clients in the same morning reported that Internet Explorer was printing blank pages.  A quick search on Google turned up the following article:

The problem specifically manifests itself by printing a blank page with a footer (if you haven’t turned them off) displaying the following line: “file:///C:/Users/userprofile/AppData/Local/Temp/Low/randomfilename.htm”.

To fix this issue, you’ll need to bring up a command prompt (but not with elevated permissions) and type the following commands:

mkdir %userprofile%\AppData\Local\Temp\Low
icacls %userprofile%\AppData\Local\Temp\Low /setintegritylevel low

I’ve also found some information from Microsoft’s site to fix the problem.  They even include a Microsoft Fix It utility to fix the problem automatically:

12/2/2014 UPDATE:
I recently had a client contact us about this very problem but the challenge was slightly different.  The web application (online credit card processing) was using framesets and IE was attempting to print an empty frameset.  Microsoft suggests turning on Compatibility Mode, however, I suggested:

  • Highlight what you’d like to print
  • Right click the selection
  • Click Print
  • Make sure to select “Selection” in the page range box
  • Click Print


Thanks to


RFID Standards

  • 125 Khz (low-frequency) tags are write-once/read-many, and usually only contain a small (permanent) unique identification number.
  • 13.56 Mhz (high-frequency) tags are usually read/write, they can typically store about 1 to 2 kilbytes of data in addition to their preset (permanent) unique ID number.
  • 860-960 Mhz (ultra-high-frequency) tags are typically read/write and can have much larger information storage capacity (I think that 64 KB is the highest currently available for passive tags) in addition to their preset (permanent) unique ID number.

Most read/write tags can be locked to prevent further writing to specific data-blocks in the tag’s internal memory, while leaving other blocks unlocked. Different tag manufacturers make their tags differently, though.

Depending on your intended application, you might have to program your own microcontroller to interface with an embedded RFID read/write module using a manufacturer-specific protocol.




How to Change Backup Location on MailEnable Backup utility

HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Backup Directory = “D:\\MailEnable”

NOTE: MailEnable will automatically add “Backup\Sets” to the path from that registry key.

Don’t forget that if you’re running a 64-bit version of Windows you’ll need to run regedit out of the Windows\SysWOW64 directory. read more »

Tips & tricks Utils Windows 10

Como iniciar o Windows 10 no Modo de Segurança

A maneira mais rápida ——————————————————

  1. Digite MSCONFIG e clique em Configuração do Sistema:
  2. Clique na aba Inicialização do Sistema e clique em Inicialização Segura. Escolha Mínima e clique em Aplicar e depois em OK.
  3. Pronto! Na próxima reinicialização o Windows entrará em Modo Seguro. Posteriormente você deve voltar nesta tela de Configuração de Sistema e desclicar a opção “Inicialização segura” para o Windows carregar normalmente.

Clicando em  F8 no arranque do PC —————————————-
Quem tem saudades de pressionar a tecla F8 para entrar no em Modo de Segurança (entre outras opções) pode fazer isso no Windows 10 (e também no Windows 7 e Windows 8.x) seguindo o passo-a-passo abaixo:

  1. Clique com o botão da direita do mouse sobre o logo do Windows e clique em Prompt de Comando (Admin):
  2. Digite bcdedit /set bootmenupolicy Legacy e tecle ENTER:
  3. Pronto! A partir de agora você pode pressionar a tecla F8 para entrar no Modo de Segurança no Windows 10:
    Como iniciar o Windows 10 no Modo de Segurança com tecla F8

Caso você queira voltar ao modo anterior (desconsiderando a tecla F8):
digite bcdedit /set {default} bootmenupolicy standard e tecle ENTER

A maneira mais técnica ———————————————————-
Abra a Central de Ações e clique em Todas as configurações:

– Agora clique em Atualização e recuperação:
– Acesse a categoria Recuperação e clique no botão Reiniciar agora exibido abaixo de Inicialização avançada:
– Se você não quer perder muito tempo nos passos acima, clique com o botão direito do mouse no botão Iniciar, mantenha a tecla shift pressionada e clique em Reiniciar:
– Na tela abaixo, selecione a opção Solução de problemas:
– Em seguida clique em Opções avançadas:
– Na tela Opções avançadas, clique em Configurações de inicialização:
– Agora clique no botão Reiniciar:
– Pressione F4 no teclado para iniciar o Windows 10 no Modo de Segurança, F5 para iniciar o sistema operacional no Modo de Segurança com Rede ou F6 para iniciar o sistema operacional no Modo de Segurança com Prompt de Comando:

Code Snippets MySQL SQL

Mysql Proper Case

    SET GLOBAL  log_bin_trust_function_creators=TRUE;
    CREATE FUNCTION proper( str VARCHAR(128) )
      DECLARE c CHAR(1);
      DECLARE s VARCHAR(128);
      DECLARE punct CHAR(17) DEFAULT ' ()[]{},.-_!@;:?/';
      SET s = LCASE( str );
      WHILE i < LENGTH( str ) DO 
          SET c = SUBSTRING( s, i, 1 );
          IF LOCATE( c, punct ) > 0 THEN
            SET bool = 1;
          ELSEIF bool=1 THEN 
              IF c >= 'a' AND c <= 'z' THEN 
                  SET s = CONCAT(LEFT(s,i-1),UCASE(c),SUBSTRING(s,i+1));
                  SET bool = 0;
              ELSEIF c >= '0' AND c <= '9' THEN
                SET bool = 0;
              END IF;
          END IF;
          SET i = i+1;
      END WHILE;
      RETURN s;
SQL Server

Query to list number of records in each table in a database

    t.NAME AS TableName, as indexName,
    sum(a.total_pages) as TotalPages, 
    sum(a.used_pages) as UsedPages, 
    sum(a.data_pages) as DataPages,
    (sum(a.total_pages) * 8) / 1024 as TotalSpaceMB, 
    (sum(a.used_pages) * 8) / 1024 as UsedSpaceMB, 
    (sum(a.data_pages) * 8) / 1024 as DataSpaceMB
    sys.tables t
    sys.indexes i ON t.OBJECT_ID = i.object_id
    sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
    sys.allocation_units a ON p.partition_id = a.container_id
    t.NAME NOT LIKE 'dt%' AND
    i.OBJECT_ID > 255 AND   
    i.index_id <= 1
    t.NAME, i.object_id, i.index_id,, p.[Rows]