1、安装
[root@vh01 ~]# yum install -y memcached
[root@vh01 ~]# systemctl start memcached
[root@vh01 ~]# systemctl enable memcached
2、测试
[root@vh01 ~]# yum install -y telnet
[root@vh01 ~]# telnet 127.0.0.1 11211
set name 0 180 3 # 设置变量名为name,0表示不压缩,
#180表示name变量的缓存时间是180秒,
#3指的是name变量占用3字节空间
zzg #变量name的值
get name #获取变量name的值
add myname 0 180 5 #添加变量myname,如果变量存在则报错
hello #myname的值
set name 0 180 10 #添加或替换变量
replace name 0 180
分类:
系统相关 时间:
2018-01-17 10:09:32
阅读次数:
186
function urlToJson(){ var ret = {}; window.location.search.substr(1).replace(/(\w+)=(\w+)/ig, function(a, b, c){ret[b] = unescape(c);}); return ret;}; ...
分类:
Web程序 时间:
2018-01-17 01:15:38
阅读次数:
201
1. HttpServletWrapper 和 HttpServletResponseWrapper 1). Servlet API 中提供了一个 HttpServletRequestWrapper 类来包装原始的 request 对象, HttpServletRequestWrapper 类实现了 ...
分类:
编程语言 时间:
2018-01-17 00:31:20
阅读次数:
153
Tansducer-js lib A high performance Transducers implementation for JavaScript. Transducers are composable algorithmic transformations. They are indepe ...
分类:
Web程序 时间:
2018-01-16 01:01:08
阅读次数:
392
select CHARINDEX('bob','my name is bob',1)--返回12 bob的第一个b在字符串中排第12(从1开始数) select CEILING(456.4)--457向上取正 select CURRENT_USER--dbo select REPLACE('1234 ...
分类:
其他好文 时间:
2018-01-16 00:55:09
阅读次数:
378
前台数据得到的有换行的数据,存到数据库后存的是/r/n。从后台取出来要展示到页面,页面不认识/r/n,除非回显到<area>标签中去,它认识/r/n.不通过<area>标签展示换行的数据,就需要在后台把这些换行的数据得到后,用replace方法,把/r/n换成,br /> replace("/r/n ...
分类:
其他好文 时间:
2018-01-15 22:45:17
阅读次数:
304
1、安装 DatabaseLibrary 库 DatabaseLibrary 下载地址:https://pypi.python.org/pypi/robotframework-databaselibrary/0.6在线文档:http://franz-see.github.io/Robotframew ...
分类:
数据库 时间:
2018-01-15 16:40:10
阅读次数:
225
表达式: NVL(filed, replace) NVL函数的作用是在查询遇见field的值为null是,使用replace将null替换,改变其为null的查询值. NVL能够转换任何数据类型,但前提是replace的类型样式要和原filed定义相同. 当某行的owner为null(空)时,用字符 ...
分类:
数据库 时间:
2018-01-15 16:39:08
阅读次数:
226
--字符串函数--1、LEN:返回一个字符串的字符数select LEN('中国'),LEN('abc123!')select LEN('abc '+'1'),LEN(' abc')--2、DataLength:返回一个字符串的字节数select DATALENGTH('中国'),DATALENGT ...
分类:
数据库 时间:
2018-01-14 20:18:06
阅读次数:
209