[PHP]html标签与实体之间互换
PHP中的几个函数,实现实体与标签之间的互换。记录一下,具体用法就不贴了。 htmlspecialchars_decode() 函数把预定义的 HTML 实体转换为字符。 会被解码的 HTML 实体是: & 解码成 & (和号) " 解码成 " (双引号) ' 解码成 ' (单引号) < 解码成 < (小于) > 解码成 > (大于) htmlspecialchars_decode() 函数是 htmlspecialchars() 函数的反函数。 html_entity_decode() 函...标签: php
[ubuntu]Set swap file on ubuntu12.04
Creating the Swap File # dd if=/dev/zero of=/swapfile bs=1024 count=512000 512000+0 records in 512000+0 records out 524288000 bytes (524 MB) copied, 10.411 s, 50.4 MB/s # mkswap /swapfile Setting up swapspace version 1, size = 511996 KiB no label, UUID=7baa7ca8-c840-4c6e-bd53-038ce4e9a477 ...标签: ubuntu
[ubuntu]ubuntu 12.04 install redis
1.Install redis $ wget http://download.redis.io/releases/redis-2.8.3.tar.gz $ tar xzf redis-2.8.3.tar.gz $ cd redis-2.8.3 $ make $ sudo make install #These files are put in /usr/local/bin now. 2.Copy some files important # cp ...[ubuntu]Set environment
1. Edit environment file: vi /etc/environment Add something like ":/opt/nodejs/bin" in end. 2. Enable it: source /etc/environment标签: ubuntu
[nodeJS]ubuntu Nodejs和npm的安装
一.NodeJs安装 1.下载nodejs源码,这是目前最新版本 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz 首先确保系统安装来python,gcc,g++,如果没有则安装: $ sudo apt-get install python $ sudo apt-get install build-essential $ sudo apt-get install gcc $ sudo apt-get install g++ 2.解压...标签: nodeJS
[MySQL]Failed to read auto-increment value from storage engine Query
一条数据插入数据库时报错:Failed to read auto-increment value from storage engine Query. 原因不详。 一种情况是自增字段数值达到最大值,这个我没有办法了。 另一种情况是自增字段还很小,像我的还是0,但也会出现这种问题,所以我不知道什么原因。解决方案是把这个字段的自增属性去掉,然后再重新加上。最好居然就可以了。标签: MySQL
[PHP]subscribe in mqtt by php
/* subscribe: subscribes to topics */ function subscribe($topics, $qos = 1){ $i = 0; $buffer = ""; $id = $this->msgid++; $buffer .= chr($id >> 8); $i++; $buffer .= chr($id % 256); $i++; ...标签: php
[nodeJS]mysql.pool must release connection
/* In nodejs. While processing database by pool, don't forget release the connection. */ var pool = app.mysql.pool; ...标签: nodeJS
[angularJS]How to use angular-acl?
Angular-acl is a service that allows you to protect/show content based on the current user's assigned role(s). How to use angular-acl : /* This is app.js */ var app= angular.module('app', ['ngRoute','mm.acl','LocalStorageModule']); app.run(['...标签: angularJS
[angularJS]An example about angular-ui-router
<html ng-app='myApp'> <script src="js/angular.min.js" ></script> <script src="../framework/angular-ui-router.js"></script> <!-- in index.html --> <body > <section ui-view></section> </body> <script> angular.module('myApp', ['u...标签: angularJS
日历
最新微语
- 有的时候,会站在分叉路口,不知道向左还是右
2023-12-26 15:34
- 繁花乱开,鸟雀逐风。心自宁静,纷扰不闻。
2023-03-14 09:56
- 对于不可控的事,我们保持乐观,对于可控的事情,我们保持谨慎。
2023-02-09 11:03
- 小时候,
暑假意味着无忧无虑地玩很长一段时间,
节假意味着好吃好喝还有很多长期不见的小朋友来玩...
长大后,
这是女儿第一个暑假,
一个半月...
2022-07-11 08:54
- Watching the autumn leaves falling as you grow older together
2018-10-25 09:45
分类
最新评论
- Goonog
i get it now :) - 萧
@Fluzak:The web host... - Fluzak
Nice blog here! Also... - Albertarive
In my opinion you co... - ChesterHep
What does it plan? - ChesterHep
No, opposite. - mojoheadz
Everything is OK!... - Josephmaigh
I just want to say t... - ChesterHep
What good topic - AnthonyBub
Certainly, never it ...