# Visual Studio code settings

Enable zoom via mouse:

1. Ctrl+Shift+P (or View->Command Palette…)
2. Type Open User Settings
3. Edit settings.json
5. Save it.

# Audio staggering in Windows 10

Update:

There are two better solutions (source):

1. Disable dynamic tick

1. Open Command prompt (Admin) to bring up elevated command prompt.
2. Type BCDEDIT /SET DISABLEDYNAMICTICK YES command and press Enter to fix the high DPC latency
3. restart the computer

2. Install and use TCP optimizer:

2. Set settings to optimal
3. restart the computer

If the above does not work, you can try the older solutions mentioned below.

#### Older solution (Jul 2017)

Before upgrading to Windows 10, check if there are drivers written for your hardware specifically for Windows 10. You should definitely check that drivers exists for your network card and your audio card.

One reason is that Windows 10 suffer from the same (and important) problem Windows 8 suffer: High DPC (deferred procedure call) latency. If the drivers do not work properly you may have high DPC latency, which may result to audio staggering, lag, clicks, drop outs even if your CPU does not reach 100%. This means that there is a high chance you won’t be able to playback movies flawlessly while using the network card! What a break dealer!!!

You can verify if your system suffers from high DPC latency by using LatencyMon. To learn what DPC latency is read this article.

If there is no Windows 10 driver for your network card, the easiest thing to do is not to upgrade to Windows 10 !!!

Now, what do we do if we have upgraded to Windows 10 and do suffer from undesired DPC latency? There are numerous solutions in the net. Most of which do not work.

Imho, you should complete the following steps by order referenced. If the problem is solved at any point, you don’t have to (and better not to) complete the rest of the steps.

Step 1: Update your system completely.

Step 2: If possible, remove 3rd party antivirus and firewall software.

Step 3: Remove any software you don’t need (you should do that anyway)

At this point, if the problem persists then most probably one of your drivers is faulty or not completely compatible with Windows 10. There is also a slight chance that Windows 10 install an invalid version of the driver. You can find which process causes the problem by using LatencyMon but you can bet it is the network/wireless driver.

The only thing you can do is rollback to an older version of the driver or install another one of the same family. So there are two more steps to do:

Step 5: Verify that the driver installed is for the correct hardware model and not just for the correct hardware family. If your card is named 6200 then your driver should be for 6200. Anything else like 6201, 6205, 6300 is not acceptable.

Step 6: Find the proper driver for Windows 7 and install it

If the last step does not work, then you can try other drivers from the same family but you should be careful because this could lead to BSOD screens (so it is not recommended if you are a newbie).

Lastly, if the problem still persists after the last step then there are two more steps but they are both long shots and should definitely not apply them if your problem does not persist:

Step 7: Optimize BIOS:

Important settings to disable (and potentially help provided you do not need them enabled) are:

• Virtualization
• High precision timer

Step 8: Update the BIOS

Personally, I don’t think the last step helps. But many people claim it does, so you have nothing to lose.

At this point, if the problem persists you are unlucky. You may have to rollback to Windows 7 or install a version of Ubuntu. There are plenty that are fast and user friendly.

# Use PostMan to post JSON to laravel

1. Set web method to POST
1. a key named: Accept with value application/json
2. a key named: Content-Type with value application/json
3. Add the JSON data to the raw area of Body of Postman.
4. Click send.

Body:

# Windows 8/2012 dark configuration

Here is how you can configure Windows 8/2012 to use a dark task bar with white letters:

1. Install uxstyle
3. Decompress to C:\Windows\Resources\Themes
4. delete the archive
5. Right click Desktop → Personalize
1.  Select Aero Dark MK IV Theme
2. Click Color
1. Click “show color mixer”
2. Configure color as desired
6. Optionally install classicshell

# Laravel – Hash of my password

To calculate the hash of a password perform the following steps:

1. Open terminal
2. Navigate to the Laravel installation (your project’s root directory)
3. type:
php artisan tinker

# Import and export SQL tables

You should not use phpmyadmin to export big tables from mysql. You may get partial exports because of php server timeouts.

Best way is to connect via SSH to the server and use mysqldump to export the dataset. Then you can download it and transfer it to the new server. There you could use the mysql command to import the dataset.

# How to migrate wordpress

### Export the WordPress database.

1. Create an SSH account if needed
2. Connect to the server via SSH
3. Export the wordpress database to an SQL file using mysqldump
4. Download the SQL file to the local computer using the server’s file manager, sftp etc.

# Modulo of a negative number

-b mod N = b(N-1) mod N

Common incorrect implementation:

(−b) mod k = k − (b mod k).

References: