Архив рубрики: Публикации

How to rename a file extension in Python

Task: there is a file with the .raw extension in the folder and I need to rename this file to the same one, but with a different .txt extension – how can I do this?

Solution:

You need to import the os module, which has the os.path.splitext() and os.rename() methods. Using the os.path.splitext() method, you can split the source file into two parts – its name and permission, which falls into square brackets as [0] – name and [1] – permission. Next, you just need to glue the name with the new permission via os.rename(). Читать →

How to update old WordPress (1.x, 2.x, etc.) – the universal and simple way

The most concise instructions, from me personally:

 

0) If you have WordPress version 2.7 or higher – use automatic update. If not, read on (smiley face)

 

1) Backup site

 

(phpmyadmin database and files, download backup on the local).

Читать →

Hide the author of WordPress posts

By default, stupid Worldpress puts the user’s login in the author URL of each post. To remove this: in the child theme, in the file functions.php:

Читать →

Голосовой ввод текста WordPress

Всем привет, я Штукенция. Решила попробовать голосовой ввод текста через Google Docs. Эта статья будет посвящена возможностям голосового ввода и написания текстов в ваши социальные сети или блоги. Я надеюсь, что мне не придётся много редактировать этот текст. Для того, чтобы ваш голос хорошо распознавался желательно говорить четко. Где же взять этот инструмент? Набираем в Google поиске поисковой запрос “Google Docs” или по-русски “Гугл документы”. Этот сервис доступен онлайн, вам не нужно скачивать специальные программы или устанавливать приложения. Это бесплатный сервис от Google. Читать →

Что программируют на Python? Реальное практическое использование с примерами библиотек

Когда я начала изучать Python, мне стало любопытно, а что вообще пишут на этом языке. Если посмотреть общим взглядом, то кажется, что как будто бы Python используется везде — такой супер универсальный язык, на котором можно и компьютерные игры написать, и социальную сеть с картинками создать, и сделать сайт, и вообще все что угодно. Просто учи Python и сможешь программировать все,

что хочешь. Это как сказать, что как будто бы весь дом построен из штукатурки… он только покрыт штукатуркой, а построен, например, из бетона. Python в этом смысле штукатурка. Читать →

Choosing a web server for WordPress on Windows

There are situations when an Internet site must be hosted by Windows Server. This is a fairly rare case, but it happened to me recently (the first time in a dozen years of working with Web servers): I had to organize a hosting site on the iron, which already ran all sorts of services.

 

The first question that arises – but what web-server to use? Of course, it is possible to cobble together everything on a pure Apache, but manually install and configure everything is lazy, especially for a relatively small project.

 

There are plenty of ready-to-use builds – from popular Denver and Open Server to 100500 variants of *AMP’es.

Читать →