Категория: Компьютеры

Заметки о программировании и на околокомпьютерные темы

Вложенные категории: Delphi, Игры

World End Economica

Напоминаю, что у Исуны Хасэкуры (автора Spice and Wolf) есть ВН за полным его авторством, которая называется World End Economica:

Roughly 16 years after the people emigrated to the Moon… The boy named Haru was facing a place that gathered up people’s desires. Sometimes it granted them, and sometimes it crushed them mercilessly.
There are only two key rules that govern that land.
The first rule, is to never take a loss.
The second rule, is to never forget the first.

Трейлер

Первая часть есть в Стиме на английском, перевод неплохой. Чтения примерно на 20 часов, развилок нет, сюжет к концу первого тома более-менее закончен (следующие серии будут про новое).
Главное, что интересует всех начинающих играть, это дотянул ли автор до уровня “Волчицы и пряностей”. На мой взгляд, даже превзошёл, во всяком случае серийные тома (4+).

Dai Gyakuten Saiban

В 2015-м будет новый Феникс Райт, который на этот раз что-то типа “Сэр Феникс Райт, блистательный присяжный поверенный” (大逆転裁判 / “Имперский переворот в деле”):

Только собственно там не Феникс Райт (Наруходо Рюити), а опять же, что-то типа “Финист Райт” (Наруходо Рюноске), его предок. И не Аясато Маёй, а вообще непонятно кто, но по сути тоже она. Выглядит симпатично, а вот зацикленная музыка из трейлера. Ещё трейлер.

HOWTO: Assign checkable TAction to TSpeedButton

To make TSpeedButton work with TAction.Checked when it's a singular option (either On or Off), make sure that at design-time:

SpeedButton.Action = Action
SpeedButton.GroupIndex = 0
SpeedButton.AllowAllUp = true
Action.GroupIndex = 0
Action.AutoCheck = true //only if you need AutoCheck

Then add this to FormCreate:

SpeedButton.GroupIndex := 17; //any non-used group index

SpeedButtons are linked to Actions through TSpeedButtonActionLink. It only updates their Down property if AllowAllUp is set and SpeedButton.GroupIndex property is NOT 0.

But when Action is linked, SpeedButton.GroupIndex gets rewritten by Action.GroupIndex on load.

And if Action.GroupIndex is 0 because it's a singular option, then no matter what you put into SpeedButton.GroupIndex at design-time, it's going to be rewritten with 0 at load, so TSpeedButtonActionLink does not update Down property.

The simplest solution is to set SpeedButton.GroupIndex to something in FormCreate.

Эх, съезжаю с Оперы

Какая же она была удобная! Сколько с файрфоксом не вожусь, всё равно — всё неуклюже и вразнобой…

Пока ситуация такая (может, кто знает что?):

Табы

Более-менее как в Опере можно сделать с помощью TabMix Plus, если хорошо его попилить в настройках. Не хватает Tab Stacking (это когда можно несколько табов в один сложить).

Сайдбар

Кое-как справляется All-in-one Sidebar. Очень нехватает добавления сайдбаров из закладок (чтобы кроме “Закачек”, “Закладок” и т.п., были “Твиттер”, “Вконтакте”, “Google Tasks”).
Пока нашёл очень кривое решение: пользовательские кнопки, в которых вручную прописать “showInSidebar(URL)” и вручную назначить иконку. И всё равно открываться будет не каждая в своей панели, а всё в MultiPanel.

Speed Dial

Перепробовал несколько Speed Dial-расширений, остановился на Fast Dial потому, что он самый быстрый и хранит диалы в закладках (как можно вообще было по-другому додуматься?).
Ни одно расширение не поддерживает, как в Опере, живые тайлы на Speed Dial (это когда “На дайри у вас 4 комментария и 1 сообщение”, “На реддите карма 9000”, “В задачах на сегодня то и то”). Было очень удобно — одним взглядом можно увидеть все новости.
Скриншоты сайтов во всех расширениях тоже некрасивые, пиксельные.

Notes

Кое-как годится Scrapbook. Сохраняет заметки в своей собственной базе, так что обычная Firefox-синхронизация не работает (блин, ну почему?!) Экспорта в txt-формат нет. Горячих клавиш на добавление заметки нет и не настраиваются. Полно багов: правишь первую строку заметки — в каталоге не обновляется, пока не выберешь другую. Добавляешь папку/заметку — существующие перетасовываются.

Почта

Ближайшее к Opera Mail расширение – Simple Mail, но пользоваться невозможно, IMAP-папки не поддерживает, все сообщения на аккаунте считает непрочитанными, скачивает по одному, как по SMTP. Похоже, вариантов нет, и надо переходить на отдельный клиент.

How to maybe fix Gigabyte RF-G90B and certainly void your warranty

Disclaimer, read first. I have no qualifications to give any advice on this topic. I give no assurances or guarantees of any kind. This article is not meant to serve as an instruction, it's just a description of what I did. Whatever you do, do it at your own risk, after properly studying and following safety measures.

I have a Gigabyte GZ-G90B1 Power Bank which seems to be more commonly known as RF-G90B. It's also appears to be the same as Enerpad MG-9000 which is the brand name for Samyatech contents (board + cells imported from Japan, or so they say). So Gigabyte just sells that.

I haven't used it for a while and when I tried to use it, it appeared dead. No matter if I tried to charge it, use it to charge mobile, press the button and/or hold it, the device wouldn't react and lights would stay off.

As I've already lost my receipt I had no hope for replacement, so I unscrewed it (there's a single screw). The box wouldn't open at first because the cells are glued to both halves of it, but there's no way around it but to pull. I detached the chip from the cells and then attached it back. This seems to have rebooted the chip and it started working.

If you cannot start Windows Live Marketplace

If you cannot start Windows Live Marketplace or games dependent on Windows Live even after completely reinstalling it, and you're having the following errors:

  1. Application crash when starting Windows Live Marketplace with "FileNotFoundException" or "MethodNotFoundException" or something.
  2. Errors related to "msidcrl40.dll" in your %UserProfile%\AppData\Local\Microsoft\GFWLive\Logs.

Then this may help you.

  1. Uninstall Windows Live and all of its components (usually there are two: Microsoft Windows Live Runtime and Microsoft Windows Live Marketplace)
  2. Uninstall Windows Live Essentials or just Windows Essentials (same thing)
  3. Go to C:\Program Files\Common Files\Microsoft Shared\ and check that there's no Windows Live subfolder or that it's empty or whatever. Delete it if not empty. If some apps do not let you delete some files, rename those files and delete after restart.
  4. Restart
  5. Download and install Games for Windows Live 3.5, web setup will do. Check if the folder mentioned above is now present again and with files. If not, download wllogin_64.msi (or _32) and run it.
  6. All should work. Run Marketplace and check.

The folder Microsoft Shared\Windows Live is created by the thing that's installed by wllogin_64.msi (Windows Live Login Helper or something). That thing is automatically installed with Windows Essentials, and it seems that it's a newer version which lacks some function which is needed for Games for Windows Live. It is also automatically installed by GFWL 3.5 installed, but it won't install it if it finds newer version (installed by Essentials), so reinstalling just GFWL doesn't help.

I included that step where you may install the thing manually because GFWL 3.5 install may be stubborn and skip it anyway for whatever reason. If it so does, download and install manually.

О закладках

Идею закладок (bookmarks) давно надо расширить, глядя на то, как люди их используют (точнее, не используют):

  1. Закладка должна по возможности сохранять кешированную копию страницы.
    Часто сохраняешь ссылку не на ресурс, а на какой-то полезный материал, и неудобно, что он может исчезнуть. Фактически, это убивает смысл таких закладок. Приходится вести какие-то сторонние хранилища заметок, копировать нужные тексты. Гораздо лучше, чтобы в закладке сохранялась текущая копия страницы, ну и её можно было обновить по желанию.
  2. Табы должны быть закладками.
    Держать открытыми больше 20 табов – это глупо, т.к. уничтожает все преимущества табов. И тем не менее, люди так делают. Почему? Потому, что люди бестолковые. Похоже, по двум причинам: табы привычны и на виду, и табы помнят, где ты остановил чтение. Значит, надо добавить эти же функции закладкам, и сделать табы особым их видом: таким, который показывается как открытые страницы, а не в меню. Хотите хранить свои закладки кучей и на виду – пожалуйста.
    Технически это очень хорошо, т.к. табы невозможно будет потерять случайно при закрытии, они будут синхронизироваться между компами, не обязательно загружать все 200 табов при старте браузера и памяти они до первого обращения тратить не будут. Единственный минус – загромождение табов по-прежнему неудобно, но это уже проблемы того, кто так делает. Сам себе злобный буратино.
    Ах да: и легко будет сделать папки табов, о которых многие мечтают
  3. Стеш должен быть встроен в браузер.
    Стеш – это такое место, куда кидаешь найденное в интернете, чтобы прочесть как-нибудь позже. У многих это место – открытые табы, увы. У других это корень букмарков. Где бы это ни было, там образуется бардак. Надо, чтобы в браузере для него было отведено специальное место, с которым удобно было бы работать.
    Вообще-то, никто не мешает сделать отдельную папочку в закладках, назвать её “Стеш”, вытащить на панель инструментов и пользоваться. Но никто так не делает – то ли в голову не приходит, то ли неудобно. Так что браузер должен делать это сам. Для тех, кто предпочитает хранить всё табами, можно сделать галочку “Отображать стеш как табы”.
    Что-то такое пытается сделать новая Опера.
  4. Speed Dial, панель быстрого запуска, боковые панели, быстрый поиск – это всё должны быть подвиды закладок.
    Потому, что незачем плодить сущности. Плохо, когда нужно вспоминать – “вот этот сайт с панели быстрого запуска есть у меня в закладках или нет”. Ну как же его может не быть, когда вот он на главном экране.
    Это у многих браузеров сделано, особенно у Файрфокса – во всём. У Оперы в части панелей.

Если какой-нибудь браузер всё это сделает, цены ему не будет!

pyoperalink: certificate verify failed

If you're trying to use pyoperalink and you're getting certificate verification errors:

httplib2.SSLHandshakeError: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

That might be because libhttpd2's root certificate list is too short (I don't know why).

Quick solution: Download this cacert.pem and save as Python\Lib\libhttpd2\cacerts.txt or Python\Lib\site-packages\libhttp2\cacerts.txt. You'll need administrator privileges and make a backup of cacerts.txt beforehand.

Ostensible explanation: Certificates are chained: there's a handful of root certificates which are used to sign site certificates or second-layer certificates and so on. Open auth.opera.com and study the certificate (in Opera you have to click the green placard in the address bar). At the time of writing the topmost certificate in its chain is "DigiCert High Assurance EV CA-1".

Open cacerts.txt. This is the root certificates libhttpd2 understands. Search for "DigiCert" or "Digi": no matches. Thus, libhttpd2 does not trust the "DigiCert High Assurance". It has to be added to this list. "Quick solution" does this by replacing the file with a longer list of trusted certificates extracted from the list at mozilla.org. You can use any other list in compatible format which contains root certificates you need. (You should study the source before copying it because I may be malevolent or mistaken myself).

Restore deleted notes in Anki

Sometimes you accidentally delete notes/cards in Anki. Ctrl-Z can revert one deletion, but several notes cannot be restored. If you use Anki Sync and haven't done any important edits locally, you should simply delete the collection and redownload it. But what if you don't want to lose local edits/reviews?

Note: If you have Sync enabled, do not sync at any point throughout this instruction. Pull out the network cable, disable Wi-Fi etc, to stop Anki from accidentally uploading your collection midway.

  1. Close Anki.
  2. Go to My Documents and zip the whole Anki folder. Put the archive in the safe place.
  3. Revert the collection to an older date:
    • Go to My Documents\Anki\YourProfile\Backups and choose a backup from when you have not yet deleted the cards.
    • Start Anki, wait until it loads, then double-click the chosen .apkg file.
    • Anki will say this will replace your collection, confirm it.
    • You have now reverted the collection to the older date.
  4. Export the broken deck:
    • Go to File->Export.
    • Choose "Export format: Anki deck package".
    • "Include": the deck where the deleted cards were.
    • Include sheduling information and media.
    • Press "Export" and save the file somewhere outside of Anki folder.
  5. Restore the current deck state
    • Close Anki.
    • Delete the My Documents\Anki folder
    • Unpack the zip file you have prepared before
    • Make sure the contents of My Documents\Anki folder is as before (no double Anki\Anki folders etc)
  6. Start Anki
  7. Double-click the saved deck .apkg file and let Anki import it
  8. Missing cards are imported with all their history.

Не печатайте домен

Многие забывают, что тэг a href можно использовать без домена:
<a href="/path/">
Поддерживается всеми браузерами с незапамятных времён. Выгода двойная: меньше печатать, и если когда-нибудь перенесёте сайт – не придётся менять адреса.

В сочетании с умением вордпресса находить пост или страницу только по их ярлычку (slug), это позволяет писать вот такие замечательные ссылки:
<a href=opera>Полезные заметки по браузеру Opera</a>
Также можно указывать путь относительно текущей папки <a href="./path/">