MySQL 修改密码
1.Set the new root password
1 | $ mysqladmin -u root password NEWPASSWORD |
2.Change the root password
2 | $ mysqladmin -u root -p'oldpassword' password newpass |
3.Change MySQL password for other user
3 | $ mysqladmin -u vivek -p oldpassword password newpass |
Drupal t函数
Drupal supports translation is largely through the t() function.
The function takes an optional second argument。
1 2 | $values = array('@user' => $username); print t('Welcome, @user', $values); |
If the placeholder begins with at sign @, then before it inserts the value, Drupal sanitizes the value using its internal check_plain() function.
1 2 | $values = array('!url' => 'http://example.com'); print t('The website can be found at !url', $values); |
If the placeholder begins with exclamation mark !, then it will be entered with no escaping. We can do this safely only because we already know the value of URL.
1 2 | $values = array('%color' => 'blue'); print t('My favorite color is %color.', $values); |
If the placeholder begins with the percent sign %, it tells Drupal to escape the code and to mark it as emphasized. (The content will be embedded in the em tag)
Magento 订单状态
There are several other order status aside from pending, processing, and complete. Orders can be set to
any of the following status:
- Pending: Pending orders are brand new orders that have not been processed. Typically, these orders need to be invoiced and shipped.
- Pending Paypal: Pending PayPal orders are brand new orders that have not been cleared by PayPal. When using PayPal as a payment method customers are redirected to the PayPal site. If they have not paid for the order, orders will be marked as Pending PayPal. It is not recommended to process these orders without referencing PayPal first to see if payment has been made.
- Processing: Processing means that orders have either been invoiced or shipped, but not both.
- Complete: Orders marked as complete have been invoiced and have shipped.
- Cancelled: Cancelled orders should be used if orders are cancelled or if the orders have not been paid for.
- Closed: Closed orders are orders that have had a credit memo assigned to it and the customer has been refunded for their order.
- On Hold: Orders placed on hold must be taken off hold before continuing any
further actions.
Yslow solution for wordpress
网站性能应该是仅次于网站功能的一个重要参考指标。有时功能做了非常不错的网站,最终去因为性能不佳而丧失了用户。应此Yahoo推出了Yslow来进行对您网站性能进行评测,YSlow也基本成为了完整性能的风向标。
WordPress是一个非常不错的建站工具,关于YSlow的解决方法就是:W3 Total Cache。
你可以通过安装W3 Total Cache 这个插件(http://wordpress.org/extend/plugins/w3-total-cache/)获得WordPress的性能最佳化。
Benefits:
- At least 10x improvement in overall site performance (Grade A in YSlow or significant Google Page Speed improvements) when fully configured
- Improve conversion rates and “site performance” which affect your site’s rank on Google.com
- “Instant” second page views (browser caching after first page view)
- Optimized progressive render (pages start rendering immediately)
- Reduced page load time: increased visitor time on site (visitors view more pages)
- Improved web server performance (sustain high traffic periods)
- Up to 80% bandwidth savings via minify and HTTP compression of HTML, CSS, JavaScript and feeds
Investing in Emerging Markets
M: Hello English learners! Welcome back to EnglishPod! My name is Marco.
E: And I’m Erica.
M: We’re bringing you an Advanced lesson today.
E: That’s right, an advanced lesson where we talk about investing in emerging markets.
M: Right, so, it’s kind of a business topic, it’s kind of a world topic as well.
E: Yes.
M: And it’s pretty difficult.
E: Yeah, it is really hard.
M: Right, so, if you’re listening and you don’t understand everything, please don’t get discouraged, don’t, uh, worry about, because we are here to learn.
E: Yes, and we’re here to help you.
M: Right.
E: Uhu.
(更多…)
如何更新搬迁到新域名下的WordPress内容中的图片和链接
If you move your WordPress website to a new domain name, you will find that internal links to pages and references to images are not updated. Instead, these links and references will point to your old domain name. This plugin fixes that problem. This Update URLs plugin updates all urls and content links in your website.
Plugin地址:http://wordpress.org/extend/plugins/velvet-blues-update-urls/
低智商社会
副标题: 如何从智商衰退中跳脱出来
作者: (日) 大前研一
译者: 千太阳
出版社: 中信出版社
出版: 2010-04-01
页数: 313
定价: 32
装帧: 平装
ISBN: 9787508619262
读了几章,感觉写了还是不错。让我了解了一点日本的状况,原还以为小泉是个牛人,原来事实并非这样。现在人感觉做任何事都思考太少,只会简单的依靠google来解决问题。长此以往,人最终将被替代。
Google Web fonts
在过去,每当你创建一个网站或者网络应用的时候,能够让你选择的字体总是少得可怜——Times和Arial(宋体),这两种你随便挑吧。而如果你想个性,就需要使用Adobe Flash或者嵌入图像文本。而弊端是,图像文本是不能自动被翻译成其他语言的,并且不能被搜索引擎索引。
好了,现在有了Google网页字体,可以使你在你的网页里使用几百种字体,而不用担心安全性。选择你喜欢的字体然后应用到网页,博客或网页应用,嵌入的也仅仅是一小段HTML和CSS代码。只要30秒就可以让你的网页上布满漂亮的字体,并能在主流浏览器上显示。从此你就可以摆脱Flash和图像文本。
我们通常使用的Times和Arial字体是通过引用本地已安装的字体,而网页字体确实通过浏览器请求从服务器上获取的(就好比网页上图片的读取),这便意味着你可以在用户的机器上显示任何字体。而当用户看到这些漂亮的字体取代了枯燥的Arial时会非常高兴。
这种网页字体技术的普及非常迅速。现在Google网页字体每天处理来自80万个独立网站和50万人次的请求,并且以每月30%的速度增长。
程序API:http://code.google.com/apis/webfonts/
只需加入以下代码即可:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <html>
<head>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine">
<style>
body {
font-family: 'Tangerine', serif;
font-size: 48px;
}
</style>
</head>
<body>
<h1>Making the Web Beautiful!</h1>
</body>
</html> |
