在用FreeMarker过程中,感觉FreeMarker的字符串,日期,集合等处理能力还是很强大的,上网搜了一些资料,整理如下,以便能帮助大家更熟练的应用Freemarker完成项目开发. 一.Sequence的内置函数1.     sequence?first 返回sequence的第一个值.2.     sequence?last  返回sequence的最后一个值.3.     sequence?reverse 将sequence的现有顺序反转,即倒序排序4.     sequence?s…
sqlserver中有很多内置函数,这里总结了一些常用的 一.关于字符串的函数: 1.CHARINDEX 寻找一个指定字符串在另一个字符串中的起始位置 SELECT CHARINDEX('world‘,'hello world',1) 返回:7解释:第一个参数是要查找的字符串,第二个参数是源字符串,第三个参数是从源字符串的第几个位置开始查找,1是指从开头开始查找,默认值也是1.注意:若查找到结果,返回该查找字符串的位置:若没有找到,则返回0 2.LEN 返回传递给它的字符串长度 SELECT L…
原文链接:http://www.iteye.com/topic/908500 在我们应用Freemarker 过程中,经常会操作例如字符串,数字,集合等,却不清楚Freemrker 有没有类似于Java 一样有相关的类及方法.在本文当中,我将向大家详细的介绍Freemarke 的内置函数及用法,以便能帮助大家更熟练的应用Freemarker 完成项目开发. 一.  Sequence 的内置函数 1.     sequence?first 返回sequence 的第一个值. 2.     sequ…
本文介绍Oracle 的内置函数. 常用!  一. 字符函数 ASCII 码与字符的转化函数 chr(n)   例如 select chr(65) || chr(66) || chr(67) , chr(54678) from dual; ascii(char) 作用于chr相反 例如 select ascii('徐'), ascii('asd') from dual; 其他常用字符函数: (1) 大小写控制函数(UPPER.LOWER和INITCAP); initcap (char) 表示首字…
一. Sequence的内置函数1. sequence?first 返回sequence的第一个值.2. sequence?last 返回sequence的最后一个值.3. sequence?reverse 将sequence的现有顺序反转,即倒序排序4. sequence?size 返回sequence的大小5. sequence?sort 将sequence中的对象转化为字符串后顺序排序6. sequence?sort_by(value) 按sequence中对象的属性value进行排序二.…
使用Python内置函数:bin().oct().int().hex()可实现进制转换. 先看Python官方文档中对这几个内置函数的描述: bin(x)Convert an integer number to a binary string. The result is a valid Python expression. If x is not a Python int object, it has to define an __index__() method that returns a…
使用Python内置函数:bin().oct().int().hex()可实现进制转换. 先看Python官方文档中对这几个内置函数的描述: bin(x)Convert an integer number to a binary string. The result is a valid Python expression. If x is not a Python int object, it has to define an __index__() method that returns a…
转载请注明转自:http://www.cnblogs.com/feiyumo/p/8763186.html 1.concat对于字符串进行拼接 concat(str1, str2, ..., strN) - Returns the concatenation of str1, str2, ..., strN. Examples:> SELECT concat('Spark', 'SQL'); SparkSQL 2.concat_ws在拼接的字符串中间添加某种格式 concat_ws(sep, […
转载请注明转自:http://www.cnblogs.com/feiyumo/p/8760846.html 一.获取当前时间 1.current_date获取当前日期 2018-04-09 2.current_timestamp/now()获取当前时间 2018-04-09 15:20:49.247 二.从日期时间中提取字段 1.year,month,day/dayofmonth,hour,minute,second Examples:> SELECT day('2009-07-30'); 30…
1.strip, lstrip, rstrip x = ' jiahuifeng ' print(x.strip(' ')) print(x.lstrip(' ')) print(x.rstrip(' ')) 2.lower ,upper x = 'jiahuifeng' print(x.lower()) print(x.upper()) 3.startswith,endswith x = 'fengjiahui_haha' print(x.startswith('fe')) print(x.e…