Category Archives: Bugs & Troubleshooting

Mysql Workbench error #1064

This is an incompatibility (assuming the database model is correct) between MySQL workbench and MySQL Server. For example, this could occur occasionally by installing XAMPP 3.2.2 and latest MySQL Workbench 8.

For example: XAMPP 3.2.2 installs Maria DB 10.1.37 which is compatible with MySQL 5.7 but MySql workbench 8 is compatible with MySQL 8.0.

The solution would be to either upgrade MySQL to 8.0 so that it is compatible with MySQL workbench or downgrade the MySQL workbench model:

  • Open MySQL workbench and desired model
  • Go to Edit, Preferences, then Modeling section, MySQL
  • set MySQL version to 5.7.
  • forward engineer

Audio staggering in Windows 10

Update:

There are now two better solutions:

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:

  1. Download 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.

Continue reading Audio staggering in Windows 10

Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

You have a Linux distribution with Xorg and you have configured the keyboard layout switcher to use alt+shift to switch between languages. But once you do that, keyboard shortcuts that use alt+shift+<key> combinations cannot be used. The same could happen if you have selected ctrl+shift as a shortcut to change language which disables all ctrl+shift+<key> combinations.

Continue reading Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

Clock messed up when dual booting

The problem:

  • Linux store the time on the hardware clock as UTC by default
  • Windows store the time on the hardware clock as the local time by default

Since both operating systems access the hardware clock you may encounter problems when you dual boot between them.

A comment for the geeks:

The advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets. Continue reading Clock messed up when dual booting

Restart/shutdown linux with magic (REISUB)

To restart your system, press alt + Printscreen/SysRq. Then, while holding those keys, slowly type the keys  R E I S U B (one key at a time, requires QUERTY keyboards). You can find a list of all SysRq keys here which includes key presses for other keyboard layouts.

To define the mode of SysRq you should edit the file: /etc/sysctl.d/10-magic-sysrq.conf . That file includes details of various levels of SysRq.

Here is an example of it’s contents:

# 0 - disable sysrq completely
# 1 - enable all functions of sysrq
# >1 - enable certain functions by adding up the following values:
# 2 - enable control of console logging level
# 4 - enable control of keyboard (SAK, unraw)
# 8 - enable debugging dumps of processes etc.
# 16 - enable sync command
# 32 - enable remount read-only
# 64 - enable signalling of processes (term, kill, oom-kill)
# 128 - allow reboot/poweroff
# 256 - allow nicing of all RT tasks

A recommended value is 64 because it permits you to use oom kill which is very useful.

Here is a short explanation for reboot (not all keys will work, as it depends on the value you have defined in  /etc/sysctl.d/10-magic-sysrq.conf file) :

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • B: Immediately reboot the system, without unmounting partitions or syncing

Here is a short explanation for shutdown:

  • R: Switch the keyboard from raw mode to XLATE mode
  • E: Send the SIGTERM signal to all processes except init
  • I: Send the SIGKILL signal to all processes except init
  • S: Sync all mounted filesystems
  • U: Remount all mounted filesystems in read-only mode
  • O: Immediately shutdown the system, without unmounting partitions or syncing

Here is a cool mnemonic:

  • R – Reboot
  • E – Even
  • I – If
  • S – System
  • U – Utterly
  • B – Broken

References:

http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

https://en.wikipedia.org/wiki/Magic_SysRq_key

 

Copy text from pdf does copy gibberish

 

Read the full explanation (optional)

It’s a  “problem” that often happens accidentally, but is also used intentionally to prevent copying and indexing of PDF files, especially when posted online.

Fonts in PDF files are stored with two tables, one contains the glyphs (the character shapes) and one contains a “toUnicode” map, which says what character each glyph represents. Acrobat uses the first table to draw the page, so it doesn’t actually know what the text “says”, only which patterns of shapes to draw. When you copy or search the file, the second lookup table is used to work out what the text says (i.e. in the word APPLE the first table says the second shape looks like “P” even if the shapes aren’t stored in alphabetical order, the toUnicode table says the second letter is 0x0050, a capital P).

If this toUnicode map is corrupted or missing, the PDF will render to screen (and print) just fine, but Acrobat has no idea what the shapes mean. The result when you screenread, export, search or copy/paste is a default set of mappings – so it will be a 1:1 relationship (every “A” will become the same character) – but the pairing is not predictable, so it cannot automatically be repaired. You can do it using plugins but would have to manually work out what each pair should be, and recreate the map table a letter at a time.

When this happens intentionally, it means the document author has removed or re-written the toUnicode map, using a plugin. When it happens accidentally it usually means the software exporting the PDF didn’t pass the correct font information to the PDF print driver (in the PostScript stream).

 

Here are the solutions:

#1 – Best Solution – Use google docs. Platform independent solution

  1. upload pdf to google docs
  2. open the document in google docs
  3. copy paste whatever you want

#2 – Use OCR

You need Acrobat 9:

  1. Document  → Watermark  → Add (add a text watermark, hit the space bar once).
  2. Advanced  → Print Production  → Flattener Preview  → Convert all text to outlines (checkbox on). Save.
  3. Document  → OCR text recognition  → recognize text using OCR. Select all text with the type tool, copy.

#3 – Print to Microsoft XPS Document Writer

  1. Print from Acrobat using “Microsoft XPS Document Writer” Output is: “your file name.oxps”
  2. Open “…oxps” with XPS Viewer.
  3. Print to PDF (Acrobat PDF, or CutePDF), using the highest resolution (600 DPI).
  4. Open with Acrobat and use OCR (Searchable Image (Exact)) option.

References: