/** * 猜猜输出结果是什么 */ public class appalet { public static void main(String[] args) { char x = 'x'; int i = 0; System.out.print(true ? x : 0); System.out.print(false ? i : x); } } /** * 输出:x120 * 原因分析: * System.out.print(false ? i : x) 中 i 是第二个操作数 , x 是
前言:本文以学习记录的形式发表出来,前段时间苦于照模型聚合中group by 找了很久,官方文章中没有很明确的说出group by,但在文档中有提到!!! 正文(最后编辑于2016-11-12): 聚合: LOrder.objects.values('com_chnl_name').annotate(Count('serv_id')) #相当于select count(serv_id) from LOrder group by com_chnl_name 模型高级运用—条件表达式+数据库函数:
conditional expressions are used by the [[ compound command and the test and [ builtin commands. arithmetic expression 共有三个 [[,test,[ Shell中[和[[的异同 test判断方式: [ ] 不支持Shell中提供的各种通配符状态判断的方式:[[ expr ]],和test不同的是,该方式中的表达式支持通配符,在[[ expression ]]中,expressio