Lua语言提供了如下几种数据类型:booleans(布尔)、numbers(数值)、strings(字符串)、tables(表格)。 下面是一些 Lua 的示例,里面注释部分会讲解相关的作用: Redis 中执行 Lua 脚本 Lua脚本功能为Redis开发和运维人员带来如下三个好处: Lua脚本在 ...
分类:
其他好文 时间:
2017-06-16 19:24:33
阅读次数:
292
//wsRouter_test.gopackage Network import ( "encoding/json" "io/ioutil" "logs" "net/http" "net/url" "strings" "testing" "time" ) type testData struct {... ...
分类:
Web程序 时间:
2017-06-16 16:45:21
阅读次数:
251
题目: Given two strings S and T, determine if they are both one edit distance apart. 链接: http://leetcode.com/problems/one-edit-distance/ 6/14/2017 2ms, ...
分类:
其他好文 时间:
2017-06-14 21:09:53
阅读次数:
228
Mac OS X下二进制可执行文件的动态链接库是dylib文件,Linux下用ldd查看,苹果系统用otool即可,不过要安装xcode otool –L xxxx.dylib The "strings" tool can output a list of the methods that the ...
分类:
系统相关 时间:
2017-06-14 21:08:18
阅读次数:
1051
Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i ...
分类:
其他好文 时间:
2017-06-14 20:18:39
阅读次数:
133
Problem Description There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string pa ...
分类:
其他好文 时间:
2017-06-14 11:37:37
阅读次数:
164
前一篇文章介绍了Trie树。它实现简单但空间效率低。假设要支持26个英文字母,每一个节点就要保存26个指针,因为节点数组中保存的空指针占用了太多内存。让我来看看Ternary Tree。 When you have to store a set of strings, what data struc ...
分类:
其他好文 时间:
2017-06-13 11:24:37
阅读次数:
313
转自菜鸟网络:http://www.runoob.com/redis/redis-data-types.html Redis 是一个开源(BSD许可)的,内存中的数据结构存储系统,它可以用作数据库、缓存和消息中间件。 它支持多种类型的数据结构,如 字符串(strings), 散列(hashes), ...
分类:
其他好文 时间:
2017-06-13 00:08:39
阅读次数:
279
传送门 给定一个字符串 L,已知这个字符串是由某个字符串 S 重复 R 次而得到的,求 R 的最大值。 1.后缀数组 做法比较简单,穷举字符串 S 的长度 k,然后判断是否满足。判断的时候, 先看字符串 L 的长度能否被 k 整除,再看 suffix(1)和 suffix(k+1)的最长公共 前缀是 ...
分类:
其他好文 时间:
2017-06-12 10:45:09
阅读次数:
371
ArcGIS 的栅格影像可以供保存的格式有: The format strings used for the supported formats are below, and they are case sensitive: Format NameString Used Imagine "IMAGI ...
分类:
其他好文 时间:
2017-06-11 22:17:20
阅读次数:
330