1.hashmap ,初始长度为16 2.mysql行转列 初始,如下 要求查询之后结果如下 SQL语句: select xm, SUM(case kecheng when '语文' then fenshu else 0 end) as '语文', SUM(case kecheng when '数学 ...
分类:
其他好文 时间:
2020-05-22 19:26:35
阅读次数:
51
在有很多的if-then-else语句的情况下,go语言可以写成: package main import ( "fmt" "time" ) func main() { t := time.Now() switch true{ case t.Hour() < 12: fmt.Println("Goo ...
分类:
其他好文 时间:
2020-05-22 17:22:15
阅读次数:
63
互交反馈 export function myAlert(e,text,icon,mask){ if(!icon){icon="none"} switch (e) { case 0: uni.showToast({//消息提示框。 title:text, mask:mask, icon:icon, ...
分类:
其他好文 时间:
2020-05-22 17:04:25
阅读次数:
63
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <ctype.h> 4 #include <string.h> 5 typedef int ElemType; 6 typedef struct stack{ 7 ElemType *item ...
分类:
编程语言 时间:
2020-05-22 12:50:08
阅读次数:
41
D14 case语句是多级的if...then...else...fi语句很好的替代方式。它可以让一个条件与多个模式相比较,而且case语句的读写比较方便。 语法: case EXPRESSION in PATTERN1 ) CONSEQUENT-COMMANDS ;; #必须使用 PATTERN2 ...
分类:
系统相关 时间:
2020-05-22 12:48:23
阅读次数:
61
Description Given an array A of integers, return the number of (contiguous, non empty) subarrays that have a sum divisible by K. Example 1: Note: 1 思路 ...
分类:
编程语言 时间:
2020-05-22 12:29:23
阅读次数:
47
Python 字符串内置函数(一) '''可以通过dir(s)查看 其中s为字符串'''s = "heLLo WoRld!"# 查看字符串s内置函数print(dir(s))'''运行结果中的主要函数:['capitalize', 'casefold', 'center', 'count', 'en ...
分类:
编程语言 时间:
2020-05-22 00:04:34
阅读次数:
56
iter: def iter(source, sentinel=None): # known special case of iter """ iter(iterable) -> iterator iter(callable, sentinel) -> iterator Get an iterato ...
分类:
编程语言 时间:
2020-05-21 21:16:23
阅读次数:
88
Intent(意图)主要是解决Android应用的各项组件之间的通讯。 对于intent主要的分类主要包括隐式意图和显式意图。显式意图通常主要是启动本应用中的Activity之间的数据,而隐式意图则常见于启动系统中的某些特定的动作,比如打电话,或者是跨应用的Activity启动。通常来说:显式意图: ...
分类:
移动开发 时间:
2020-05-21 19:23:58
阅读次数:
72
1 重点: 1.1 多维度排序 thenComparing(详见实战案例) 1.2 Comparator.reverseOrder()的应用 2 排序demo 排序demo需求: 股票撮合交易,优先按照价格高的排序,在按照时间早的,再按照交易量大的,在按照先机构后个人的方式 测试类: package ...
分类:
编程语言 时间:
2020-05-21 19:01:49
阅读次数:
52