站长
  • 第 1 位会员
  • admin
  • 2019-04-02 03:37:10
  • Offline
  • 1 2 46

最近发布的主题

    暂无

最近分享的资源

    暂无

最近发布的项目

    暂无

最近的评论

  • mysql 8: create table Tmp_Data ( List_ID int , UID varchar(10), LoadTime datetime ); INSERT INTO Tmp_Data (UID,LoadTime) values ('201','2017/01/01'), ('202','2017/01/02'), ('202','2017/01/03'), ('203','2017/01/03' ), ('201','2017/01/04'), ('202','2017/01/04'), ('201','2017/01/05'), ('202','2017/01/05'), ('201','2017/01/06'), ('203','2017/01/06'), ('203','2017/01/07'); Select UID,max(cnt) as cnt From ( Select UID,Grp_No,count(*) as cnt From ( Select UID,LoadTime,(Day(LoadTime)-ROW_NUMBER() OVER (Partition By UID Order By UID,LoadTime)) as Grp_No From Tmp_Data ) a Group By UID,Grp_No ) a Group By UID; select version(); select * from Tmp_Data;
  • Golang.org Slices, maps and channels are reference types that do not require the extra indirection of an allocation with new. The built-in function make takes a type T, which must be a slice, map or channel type, optionally followed by a type-specific list of expressions. It returns a value of type T (not *T). The memory is initialized as described in the section on initial values Ref https://golang.org/ref/spec#Making_slices_maps_and_channels
  • 可以将slice map channel理解为golang中的引用类型 而其他也为值类型
  • Golang中的数组为值传递 且append操作slice的时候必须传入指针 否则原slice不会被append成功添加
  • slice map channel使用字面量literal的初始化方式 仍然类似于c++中的引用传递 传递后可以直接改变原始slice map或channel的值 引用传递和make的初始化方式应该是无关的 另外注意struct的var申明并非nil 而是带有初始化后的结构体对象 而slice map channel 的申明为nil