Это код Python3 для преобразования субтитров Persian / Farsi в кодировки с кодировкой UTF-8.
def correctSubtitleEncoding(filename, newFilename, encoding='windows-1256'):
with open(filename, 'r', encoding=encoding) as fr:
with open(newFilename, 'w', encoding='utf-8') as fw:
for line in fr:
fw.write(line[:-1]+'\r\n')
man-page pm-action
pm-suspend
During suspend most devices are shutdown, and system state is saved
in RAM. The system still requires power in this state. Most modern
systems require 3 to 5 seconds to enter and leave suspend, and most
laptops can stay in suspend mode for 1 to 3 days before exhausting
their battery.
pm-hibernate
During hibernate the system is fully powered off, and system state
is saved to disk. The system does not require power, and can stay
in hibernate mode indefinitely. Most modern systems require 15 to
45 seconds to enter and leave hibernate, and entering and leaving
hibernate takes longer when you have more memory.
pm-suspend-hybrid
Hybrid-suspend is the process where the system does everything it
needs to hibernate, but suspends instead of shutting down. This
means that your computer can wake up quicker than for normal
hibernation if you do not run out of power, and you can resume even
if you run out of power. s2both(8) is an hybrid-suspend
implementation.
Я предполагаю, что разница в том, что состояние системы сохраняется на диске (а не в ОЗУ), но система не полностью выключена (например, спящий режим), но вместо этого приостановить.
Сравните с pm-suspend, я думаю, разница в том, что состояние системы сохраняется на диске и в ОЗУ - и то, и другое, но система не полностью выключена (например, спящий режим), но приостанавливает работу.
Затем для возобновления: 1. если не закончилось питание - возобновите работу с плунгом 2. если закончите работу - возобновите работу с диска
Albert,
Suspend - это «теплое резюме», означающее, что система по-прежнему «активна», просто кошка нажимает «одним открытым глазом», чтобы использовать общую фразу », тогда как при спящем режиме система полностью отключился, и у него есть ум «Не отвлекай меня от службы в комнате»