Hello World!

Yes, I’m going to try to write this blog in English.

by daohanggou
Yes, I’m going to try to write this blog in English.
No matter who you are, English is very important to you. If you learn more than one language, you will have more ways to see the world. The world is so big that we can only get to know her as much as possible. I think if we want to learn English well, we must use it. Some people around me, however, don’t think so. They always think that it is enough to know some simple English words. What a mistake it is!
In order to practice English, I certainly do not use English here only.
I have a twitter account:
I also like to write E-mails, so, If you want have a pen pal, write me a letter! This is my personal home page on website Language.Exchange:
OK, that’s it today.

Python实现猜数字游戏1.0版

"""
功能:
随机生成一个数字,最多有3次猜测机会,如果第一次没有猜对,则从第二次猜测开始会提示玩家所猜的数字是大了还是小了。
运行环境:
Python 3
"""
import random    #调用生成随机数的模块random
secret = random.randint(1,10)    #调用random模块中生成整型随机数的函数randint,生成的随机数范围在1到10之间,包括1和10.
print('-----猜数字游戏1.0版--------')
temp = input("猜一下我现在想的是哪个数字吧,你只有3次机会哦:")
guess = int(temp)
i = 0
if (guess == secret):
    print("第一次就猜对了,好厉害!!!")
while (guess != secret) and (i < 2):
    temp = input("猜错啦,再猜一次吧:")
    guess = int(temp)
    if guess == secret:
        print("Wow!你猜的真准!")
    else:
        if guess < secret:
            print("猜的小了")
        else:
            print("猜的大了")
    i = i+1

代码方式设置WordPress内所有URL链接都在新标签页打开

前言:
WordPress默认情况下几乎所有URL链接都是在同一个标签页打开。这样的话,读者点击一个链接就会离开当前页面,如果读者想要查看原来的页面又要进行返回操作,在某些情况下用户体验不佳。但是,如果一个一个单独为每个链接添加新标签页打开的代码,工作量会很大,也容易造成遗漏。本文就介绍一种通过一次添加代码的操作,达到全站链接都在新标签页打开的方法。

继续阅读“代码方式设置WordPress内所有URL链接都在新标签页打开”