php源代码之函数集介绍array_change_key_case — 返回字符串键名全为小写或大写的数组array_chunk — 将一个数组分割成多个array_combine — 创建一个数组,用一个数组的值作为其键名,另一个数组的值作为其值array_count_values — 统计数组中...
分类:
Web程序 时间:
2015-01-14 21:19:15
阅读次数:
362
Docker学习总结之跨主机进行link Docker的功能非常强大,但要想驾驭好Docker却不是一件很容易的事情。下面就介绍一种日常工作中会遇到的一个user case。比如现在有两台host,分别标记为hostA和hostB。hostA用来运行oracle服务,hostB用来运行app服务。....
分类:
其他好文 时间:
2015-01-14 12:22:46
阅读次数:
168
表转成代码如下:1 SELECT YEAR 年, 2 SUM(CASE MONTH WHEN 1 THEN amount ELSE 0 END) 一月,3 SUM(CASE WHEN MONTH=2 THEN amount ELSE 0 END) 二月,4 SUM(CASE WHEN MONTH=3...
分类:
数据库 时间:
2015-01-13 17:26:34
阅读次数:
218
Problem Description Now you are back,and have a task to do: Given you a string s consist of lower-case English letters only,denote f(s) as the nu...
分类:
其他好文 时间:
2015-01-12 23:44:24
阅读次数:
272
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
递推公式T(n) = T(n-1) + T(n-2);
...
分类:
其他好文 时间:
2015-01-12 17:39:19
阅读次数:
227
FreeMarker还提供了一些内建函数来转换输出,可以在任何变量后紧跟?,?后紧跟内建函数,就可以通过内建函数来轮换输出变量.下面是常用的内建的字符串函数: html:对字符串进行HTML编码 cap_first:使字符串第一个字母大写 lower_case:将字符串转换成小写 upper_cas...
分类:
其他好文 时间:
2015-01-12 17:22:44
阅读次数:
215
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2015-01-12 13:03:03
阅读次数:
136
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
先将原字符串数组中的字符串单独排序,如:bac-->abc,然后对整个的数组排序,此时数组中相邻的字符串如果相等,则原数组中的两字符串必满足条件,将其加入到结...
分类:
其他好文 时间:
2015-01-12 11:37:18
阅读次数:
200
Climbing Stairs https://oj.leetcode.com/problems/climbing-stairs/ You are climbing a stair case. It takes n steps to reach to the top. Each time you c...
分类:
其他好文 时间:
2015-01-11 22:56:12
阅读次数:
225
175Combine Two Tables题目:左连接Person表和Address表。select FirstName,LastName,City,State from Person p left join Address a on p.PersonId=a.PersonId;7个case耗时1....
分类:
数据库 时间:
2015-01-11 16:09:20
阅读次数:
299