Unicode in Python

Unicode is not a new topic in my blog. Last time, when I was writing PHP script on Windows, I met the problem about read file content with unicode file name. In that case, I have to get the file by give file name which is encoded by UTF-8, while all Chinese characters are encoded by CP936/GBK in Windows (I am using windows 7). I will not repeat that again. You can find the solution by reading that post. Today, I am going to talk about Unicode in python. Python is a great language to write crawlers. When getting the website content, we will save the content and parse it for later usage. Here is a piece of example source code to get content from URL.
Read more

Enable SSL on Your WordPress Website

There are several benefits when we enable SSL on our WordPress website. The main benefit is make your website and your visitors more secure. Meanwhile, it will also benefit your site SEO result. But how big the impact is, no one knows. Anyway, enabling SSL is better than nothing. If you are using WordPress to setup your website and it will be easy to use SSL. If you already have a website and you decide to switch your website from HTTP to HTTPS, there will be some extra jobs to do. Normally, you have to accomplish following task to switch your website from HTTP to HTTPS.

  • Apply HTTPS certificate
  • Enable HTTPS in your share hosting
  • Setup WordPress Address (URL) and Site Address (URL)
  • Redirect all HTTP traffic to HTTPS
  • Update all link in Database

Read more

Connect Wechat with Your WordPress Website

Wechat is the most famous app in China, almost everyone has installed wechat app on their smart phone, even my mother. However, wechat is not just a chat app, it’s a real social platform for people to chat, share, and discuss. People can add others as friends by mobile number or scanning the QR code. Then they can start to chat with each other, or form a chatting group to discuss together, or share photos, states in the moment (a place to share information and see information shared by other friends), and leave comments on others sharing.
Read more

3 Most Common Import Problems in Python

I am working on Python language programming these days. It’s my first time to work with Python. From my point of view, it’s so easy to learn and it’s very efficient to write app with Python. Compare with PHP or Java, it saves me a lot of time to write extra code. During the time, the most difficult problem I’ve met is the module management. In this post, I will share the most 3 common import problems in my Python project.

Read more